Kurze / Talasari Dam bike ride

Sunday, Sep 2, 2012

I used to wonder why kids in their paintings always paint the cliched green mountains, blue sky and a river flowing by through green valleys brimming with yellow-green farms. Today, I knew why ! – ‘Cause its a sight that leaves a mark on your memory. Mine was stamped today.

Saturday evening Manas called and an impromptu bike-ride was on the map. Kurze Dam, which is just close to the Talasari junction on the Mumbai-Ahmedabad, NH 8 highway.

Back to the kids’ paintings – By September, the earth has been painted, replenished and cleansed as well. The sights that we saw on our way were just from the kids’ art books. The flushed-clean highway clinging to the green bosom, climbing and caressing the green paddy fields, which were close to being harvested giving a slight hue of yellow through the broad green spectrum. The air too was crisp-clean. Every single particulate dust had settled. The small, yet picturesque hills around the Manor region added another touch of flavour to the picture. As if that wasn’t good enough to put in a frame, the sky with its receding black clouds, was now azure blue.

A right turn from Talasari took us through a lazy little country side still oozing of the wet spells that were continuing to be intermittent. The gravity dam’s wall was just ahead of us, the road kept moving along the wall teasing us as it would never touch the dam wall. We spotted a small brown opening through the grass and we ploughed through to the base of the water reservoir.

It was still raining, wind creating a wonderful mixture of the droplets. The water body streching ahead of us till we could only see the mist in trees far in the background. At our feet though was the pungent brown mud, blades of grass fizzing through it. The whole sight reminding why people in country side can’t think of places like Mumbai as their home.

Kids passed by us adoring the R-15 and the other lowly models. I asked them

तुम्ही पोहता का इथे ?

to which they eagerly pointed out at the base of the reservoir where they were heading and ran off. JK looked at them run bare foot, and his philosophical counterpart murmured

साला कोई टेंशन नही है

I too pondered … we had lost all, the carefree attitude, the innocence, the honest smile, everything.

We took a few snaps and headed back towards the base from the dam wall. To my surprise the kids were actually swimming, jumping in the water. We rushed and joined them. The water was warmer than the air, which made us feel out of the world! Manas enjoyed clicking our water buffalo (JK) and the kids with his water proof camera.

On our way back we had some parathas that my mother had helped us with and Granola bars with Mars chocolate that Manas always keeps handy on his bike trips.

Even the hot shower by the end of a wet, cold ride wasn’t good enough to wipe clean the warm swim that we enjoyed.

Travelling Directions

  1. Head on the NH-8 highway towards Gujarat
  2. Take a right under the flyover at Talasari
  3. Head right into the heaven in a minute.

Photos

  1. JK’s Facebook Page
  2. Manas’ Facebook Page

Tweaking Gnome3 / Fedora fonts like Ubuntu

Recently I installed Fedora 17. Font rendering in Fedora is somewhat unoptimized, thanks to many patent clad algorithms for rendering fonts. But you if you want the best, follow the steps below

  1. Enable RPM Fusion Repos
    rpm -ivh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-stable.noarch.rpm http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-stable.noarch.rpm

  2. Install freetype-freeworld package
    yum install freetype-freeworld

  3. Install gnome tweak tool
    yum install gnome-tweak-tool

  4. Tweak font rendering
    Open gnome-tweak-tool by typing “advanced settings”. Then set
    Hinting = Slight
    Antialiasing = Rgba

  5. Configure ~/.fonts.conf
    Please save the attached file as .fonts.conf in your home folder ( ie. /home/michael/.fonts.conf ). Note the file name is .fonts.conf with a period in the begining.
    fonts

Above will render fonts in the best possible way (Font Rendering is matter of preference – tweak around for yourself). Now any application, Google Chrome, Firefox, etc will render fonts in the same manner.

Sondai Trek

Aug 19, 2012

Mallik’s visit to Mumbai would’ve been pointless without a visit to the newly crowned UNESCO Heritage Site, Western Ghats, our beloved Sahyadaris.

The destination this time around was a simple one, Sondai fort Trek. Close to the Morbe Lake Dam, near Karjat. This place had its own little lake dam, the Vaverle Lake Dam.

The participants were Mallik’s rock climbing group buddies, Ritz, Farzheen, Sneha, Aditya, Meenaz. Me and Vj were just the climbing pals, the rocks seemed to shun us everytime we tried to overcome them.

Mallik stayed overnite with me, and we picked up Vj early morning from Bandra Station. “Picked up”, yes, this was the 5-star trek of ours, a direct car commute to the base of the village. Others joined us at Kalanagar junction and we headed straight to Dutta Snacks, at the Panvel junction. A lazy lavish hour spent there having Batata Vada, chai, etc. My first trek with Farzheen, and the pit-stop at Dutta snacks made perfect sense.

Another 15 minutes, and we were at the chowk junction. The rains were lashing hard, we thought that it was the first time this region including Mumbai was getting the heavy downpour of the season. At Sion junction, it was just 6.30am and it was already flooding. A left from Chowk/Karjat junction and few more minutes in the now decaying road conditions took us to Borgaon junction where we took a left and then wandered towards the Vaverle village, all in a car!

The country side was green, with every single green hue visible with the unsaturated grays of the hovering clouds simply dousing over the hills. The Sondai fort-hill was hidden behind the fluffy puffs. A small climb on top of what seemed like a wall opened up gasping landscape of a lake being nurtured by small hillocks on each side.

The actual trek itself was a small 1 hr climb, mostly including trail walks. At the top we had some more food, thanks to Vj and Mallik’s bags which contained loads of tasty food and lots of Katchi beer ( छाछ ). At the base, the lake awaited us, I was the first to get into the water body, which welcomed me with warm water. The sight was simply irresistible for others, and soon everybody followed.

Almost half-hour into the lake, and still all hesitated to move out. Mallik had already left. It was Mallik’s call for Maggi that put everybody in dilemma. A hot maggi on a rainy afternoon after a dip in the lake was something that nobody wanted to miss. We had maggi and other restover food in a small hut where another group was playing with an air gun and trying to determine whose pellet went longest in the pool! No wonder we miss out on so many of those shooting medals.

Back at the car, we got into our dry wear, with RD Burman’s songs blasting through. On our way back we halted at a restaurant in Nerul for snacks and then back to our concrete and mortar.

Travelling Directions

  1. Take left at Chowk junction for Karjat
  2. Another left at Vaverle or Borgaon


View Larger Map

Photos

Sondai Trek Aug 2012

Thundering Bolt – 9.63s

@##;.............```````````````````````````````````````````;
###;............````````````````````````````````````````````,
####,..........```````````````````````````.:```````````````..
##'.........`````````````````````````````,#:`````````````....
#+,.........```````````````````````````.+#':````````````.....
#;................``````````..```````.:#+,``````````````.````
#:..................................;#@'.````````````````````
#;....................:##:........:+@@'......``````.`````````
#;...................,@@@@:...,:;+@@#:.......................
##'..................:@@@@+.:@@@@@#:.........................
@@#;,.................+@@@#'@@@@@#...........................
@@@@'.................,#@@@@@@@@+:.............`.............
#@@@'...............,'#+#@@@@@@@'............```.............
#@@#:.............,'@#;;#@@@@@@@@:........``````.............
+@@@;:...........:#@@+@@@@@@@@@@@#,....```````` .............
@@@@##,,.;'.....,#@@@@@@@@@@@@@@@@+...```````````````````````
@@@@##+;+';......+@@@@@@@@@@@@@@@@@'.````````````````````````
@@@@#@####:.......,,,:;:'@@@@@@@@@@@;`````` `````````````````
@@@@@@#@##:..............'@@@@@@@@@@#,```` ``````````````````
@@@@@@@@@@,...............'@@@@@@@@@@#.``````````````````````
@@@#@@@@@@;:...............+@@@@@@@@@@'``````````````````````
#@@@@@@@@@#+,......````````.'@@@@@@@@@@:`````````````````````
##@@@@@@@@#;......```````````+@@@@@@@@@#.````````````````````
##@@@@@@@@#;.......`````````.#@@@@@@@@@@;````````````````````
###@#@@@@@@',...............'@@@@@@@@@@@#.`````````@@@@@@@@@@
##@@@#@@@@@##'.............,@@@@@@##@@@@@;..`````@@@@@@@@@@@@
##@@@@@@@@@#@#,............'@@@@@;..;@@@@#...;@@@@@@@#@@@@@@@
##@@#@@@@@@@@@#;:,.........#@@@@:.,:'@@@@@:..;#@@@@@@@@@@@@@@
##@@@@@@@@@@@####+:..,,,,,:@@@@'.,##@@@@@@+.;#@@@@@@@@@@@@@#@
#@@@@@@@@@@@######+,.....,+@@@#,.;@@@@@@@@@;'#@@@@@@@@@@@@@@@
#@@@@@@@@@@@@@@@###;:,...,@@@@:..+@@@@@@@@@@#@@@@@@@@@@@@@@@@
#@@@#@@@@#@@@@@@@@###'...'@@@+...;@@@@@@@@@@@@@@@@@@@@@@@@@@@
#@#''+#@@@@@@@@@@@####:..#@@@;...'@@@@@@@@@@@@@@@@#@@@@@@@@@@

Guitar Chords: Zindagi kaisi hai paheli (Anand)

This entry is part 31 of 42 in the series Guitar

A tribute to Rajesh Khanna, the soulful melody.

[CHORUS]
C                            G
Zindagi ...kaisi hai paheli, haaye
               F                C
Kabhi to hansaaye kabhi ye rulaaye
x2

C                     F
Kabhi dekho man nahi jaage 
                         C
peechhe peechhe sapno ke bhaage
x2

C               G
Ek din sapno ka raahi 
                      F        C
chalaa jaaye sapno ke aage kaha

[CHORUS]
Zindagi...

C                    F
Jinhone sajaaye yaha mele 
                     C
sukh-dukh sang-sang jhele
x2

C                   G
Wahi chunkar khaamoshi 
                F       C
yu chali jaaye akele kaha

[CHORUS]
Zindagi...

Strumming Pattern

Down Down Up … Up

In “chalaa jaaye sapno ke aage kaha”, the C chord has to be struck just once – down stroke, Same for “yu chali jaaye akele kaha”. Alternatively you can ignore strumming after G chord and just strum F chord once followed by last down stroke of C chord giving the “talk” feel.

git remote branch cleanup

Many times in development, you pull in remote branches and over a period of time they become stale and get deleted on the server. But your local repository still keeps a reference of those. You need to clean stale / deleted remote branches on your local system

A simple command git remote prune helps.

Check which branches are dpresent on local and getting tracked

[rutu@ruturaj-vartak git-bisect-clone-2]$ git branch -av
* master                     43e538a merged
  test-branch                7c06ab4 added p
  remotes/origin/HEAD        -> origin/master
  remotes/origin/master      43e538a merged
  remotes/origin/test-branch 7c06ab4 added p

The above command git branch -av shows my branch test-branch is present on local and also present on remote

The following command shows which branches can be un-tracked/deleted on local (as they’ve been deleted on remote)

[rutu@ruturaj-vartak git-bisect-clone-2]$ git remote prune -n origin
Pruning origin
URL: file:///tmp/git-bisect-demo/
 * [would prune] origin/test-branch

The option -n is a dry-run option, showing which branches can be deleted/pruned on your local – as in this case test-branch. So we can go ahead and actually prune/cleanup

[rutu@ruturaj-vartak git-bisect-clone-2]$ git remote prune  origin
Pruning origin
URL: file:///tmp/git-bisect-demo/
 * [pruned] origin/test-branch

This cleans up my repository, a git branch -av will show my local status of branches.

[rutu@ruturaj-vartak git-bisect-clone-2]$ git branch -av
* master                43e538a merged
  test-branch           7c06ab4 added p
  remotes/origin/HEAD   -> origin/master
  remotes/origin/master 43e538a merged

The remote branch origin/test-branch has been knocked off locally, but the local branch test-branch remains. If wanted, we can clean-up the local as well

[rutu@ruturaj-vartak git-bisect-clone-2]$ git branch -d test-branch
Deleted branch test-branch (was 7c06ab4).

Git Bisect Tutorial

If you’re reading this, you’re an avid user of git, have made tons of commits and now you’re trying to find..

where the hell did the bug get introduced ?

git-bisect is a perfect tool to find that. To explain this awesome tool, I’ve created a small demo-repository which has only one file text.txt. In this file, I’ve incrementally added a, b, c, d and so on in each commit.

This is how my file text.txt looks like

[rutu@ruturaj-vartak git-bisect-demo]$ cat text.txt 
a
z
c
d
e
f
g
h
i
j
k
l
m
n

My git graph/log looks as below

If you are wondering what is “git g” its just an alias, following is my ~/.gitconfig

[rutu@ruturaj-vartak git-bisect-demo]$ cat ~/.gitconfig 
[alias]
	ci = commit
	st = status
	di = diff
	co = checkout
	k = !gitk --all
	g = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all
	d = difftool
[color]
	ui = true
[user]
	name = Ruturaj K. Vartak
	email = ruturaj@localhost
[diff]
	tool = vimdiff

To simulate a bug, somewhere in my code, I’ve replaced b with z. Now the with the current state of my code, I’ve got to find where and who introduced z in my code ?. Lets begin

git-bisect uses BST style division and search mechanism. So lets start.

  1. Start with a command,
    $ git bisect start
  2. Now its necessary to tell git, that where was the code good and bad. Obviously my code was good at revision b162893 and the HEAD or 20bacecis now bad. So ..
    1. $ git bisect good b162893
    2. $ git bisect bad 20bacec

    Now if you check the git graph…


    Notice how git has divided this history into 2 parts, and the HEAD now points to the partitioning commit fa70446.

    We can now cat the file and see if the bug was introduced.

    [rutu@ruturaj-vartak git-bisect-demo]$ cat text.txt 
    a
    b
    c
    d
    e
    f
    g
    h

    As you see, the bug still has not been introduced, so lets tell git that this commit is GOOD

  3. $ git bisect good
    Now lets look how the graph looks


    The head is now d126a8f, the half between 20bacec and fa70446 and lets cat our file, text.txt

    [rutu@ruturaj-vartak git-bisect-demo]$ cat text.txt 
    a
    z
    c
    d
    e
    f
    g
    h
    i
    j
    k

    Wohoo ! our bug is existing here, but we don’t know if it was added in b38e6d7, df4f3bc or the HEAD – d126a8f

  4. So we now tell git, that this is BAD commit
    $ git bisect bad
    Now lets look at our graph,


    It has made another division, HEAD now pointing to df4f3bc
  5. Lets see if this HEAD is GOOD or BAD,
    [rutu@ruturaj-vartak git-bisect-demo]$ cat text.txt 
    a
    b
    c
    d
    e
    f
    g
    h
    i
    j

    Hey !!! The bug is non-existent over here. Lets tell git the good news

    $ git bisect good
    And this is what it returns us back

    [rutu@ruturaj-vartak git-bisect-demo]$ git bisect good
    d126a8fbd75cbf5e015228f0411d205745a77e05 is the first bad commit
    commit d126a8fbd75cbf5e015228f0411d205745a77e05
    Author: Ruturaj K. Vartak 
    Date:   Sat Jul 7 12:32:04 2012 +0530
    
        added k
    
    :100644 100644 92dfa216416a1ac944633ab674568f8bae139d95 261ccd63acaba8ae42219a40579a9acec61f05d0 M	text.txt

    Since there were no commits between our last found BAD commit – d126a8f and our current HEAD – df4f3bc, git has determined the bug was introduced in d126a8f. It throws a complete info stack of what it has for that commit.

    This is how our final graph looks like


    Note: there is nothing left to check between d126a8f(BAD) and df4f3bc(GOOD)

  6. The last thing to do, is reset everything with
    git bisect reset
    Which leaves a clean state

    [rutu@ruturaj-vartak git-bisect-demo]$ git bisect reset
    Previous HEAD position was df4f3bc... added j
    Switched to branch 'master'
    [rutu@ruturaj-vartak git-bisect-demo]$ git g
    * 20bacec - (HEAD, master) added n (3 hours ago) 
    * c7edac3 - added m (3 hours ago) 
    * 83a34bc - added l (3 hours ago) 
    * d126a8f - added k (3 hours ago) 
    * df4f3bc - added j (3 hours ago) 
    * b38e6d7 - added i (3 hours ago) 
    * fa70446 - added h (3 hours ago) 
    * e4efb05 - added g (3 hours ago) 
    * 8fe6f2a - added f (3 hours ago) 
    * 96381ba - added e (3 hours ago) 
    * a07ce18 - added d (3 hours ago) 
    * 0b824e0 - added c (3 hours ago) 
    * b162893 - added b (3 hours ago) 
    * 7a60f8d - added a (3 hours ago)

Automating git bisect

Even though the above method looks easy, it could be painful if you’re going through 100s of commits. git has an automated way as well, using the git bisect run. Lets look how we can search our above code for bugs using the automated way

For git bisect run cmd, It needs an argument of a command that’ll do the search of bug in the script and return exit code 0 for GOOD or 1 for BAD.

Lets create a simple bug-finder.sh script that will grep for b, if grep finds, it’ll give exit status as 0, or else 1. We’ll capture the exit status of grep and throw as exit status of our script. We’ll place our bug-finder.sh in root folder of our repo.

Here is the script, Make sure you chmod +x bug-finder.sh

[rutu@ruturaj-vartak git-bisect-demo]$ cat bug-finder.sh 
#!/bin/bash
grep "b" text.txt
exitCode=$?
if [ $exitCode -eq 0 ]; then
	exit 0;
else
	exit 1;
fi

Lets begin, steps stay the same…

  1. $ git bisect start
  2. $ git bisect good b162893
  3. $ git bisect bad 20bacec
  4. Now, the magic –
    $ git bisect run ./bug-finder.sh
    The output is as follows – git successfully finding the bug
[rutu@ruturaj-vartak git-bisect-demo]$ git bisect run ./bug-finder.sh 
running ./bug-finder.sh
b
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[d126a8fbd75cbf5e015228f0411d205745a77e05] added k
running ./bug-finder.sh
Bisecting: 0 revisions left to test after this (roughly 1 step)
[df4f3bc1e079bc75afd922726c719e16d1e4efdf] added j
running ./bug-finder.sh
b
d126a8fbd75cbf5e015228f0411d205745a77e05 is the first bad commit
commit d126a8fbd75cbf5e015228f0411d205745a77e05
Author: Ruturaj K. Vartak 
Date:   Sat Jul 7 12:32:04 2012 +0530

    added k

:100644 100644 92dfa216416a1ac944633ab674568f8bae139d95 261ccd63acaba8ae42219a40579a9acec61f05d0 M	text.txt
bisect run success

There it is, simply and cool. Ofcourse in this case a lot depends how and what you’ve coded in ur bug-finder.sh. A bug in this script will just fool git.

Update: You can clone the git-bisect-demo repository

ऋतुराज का Home Page