Johnny [Life & Code]

November 8, 2009

ACL Reconstruction recovery journal

Filed under: GNOME, Inspired, LIFE, Running, Thoughts, cycling, eXtreme — Johnny @ 6:13 am

Tore my ACL while playing badminton. An awesome jump, delivered a smash at a impressive angle. On landing I slipped twisting my ankle and entire weight of my body fell on the right knee. After 15 minutes I was walking out of the club with the idea of a 10k ride (cycle) back home. Probably I was high on adrenaline/endorphins. But as soon as walked 20 meters, I couldn’t take another step.

Friends helped me out. Few days later a MRI confirmed the ACL tear. Sought opinions from 3 surgeons. A day later I was scheduled for ACL Reconstruction.

Day 0 : Wheeled into surgery. Got shots of anaesthesia in my spine. 5 minutes into the procedure I started feeling my knee again. Then some new shots to my neck and i’m out for next 4 hours. Woke up in recovery room. Crying with pain in my thigh and knee.

Day 1 : High fever. Unable to move my leg. Felt like a dead log.

Day 2 : Realised that morphine (a better refined form .. Fentanyl ?) is being pumped in to me 24 hours.

Day 3: Fever continues. Unable to therapy. But was on CPM.

Day 5 : First time moved around 10 meters (felt like 5 km) to physio rehab. Was able to walk holding support ramps. Did some weight excercises. Morale boost.

Day 6 : Fever started fading.

Day 7 : Discharged from hospital. Realized I lost so much muscle mass. Right leg is very lean.

Day 8 : Woke up at brother’s place. Good food. Ate like a hungry pig.

Day 11 : Regained some strength in the thighs. Able to move around confidently with support.

Day 16 : Moved back to my own place.

Day 17 : Afraid to bend my knee. Looks like I’m resisting to bend the knee.

Day 18 : Able to sit with around 90 degree bend in my knee. Noticed some muscle development.

Day 19 : 90 Degrees knee bending :D

Day 21 : Mental battle is tougher than actually bending the knee.

Day 22 : Walking without support (crutches). Yay!

Able to handle stairs without support.

Day 25 : 95 – 100 Degrees. Moving to Squat exercises.

Started riding on a stationary bike. Able to walk  small distance with little limp.

Day 31 : 115 Degrees. Knee feels stronger.

Day NN : Recovery still continuing. Yet to build muscles. And regain those remaining degrees. But I’m confident now that i would be back to 110% in few months (yeah .. months!).

I should confess that I’m not a very fit athlete. I’m just a ordinary clumsy guy who started playing a bit. So this is my recovery timeline. Rehab is the tough part. Painful and needs a good amount of will power to keep doing it. It is going to take a long time to get back to my running (hopefully a marathon!). Can’t wait to get back on my bike (cycle).

One thing I kept remembering was this “Pain is temporary. Quitting lasts forever” (Lance Armstrong). In this case it is literally true.

Notes :

  • Do research. Learn about the injury and the procedure before you go in. Helps a lot. Realize that you have options on the graft being used.
  • Ice is the best pain management you got. I personally don’t like pain killers.
  • Most of the online materials on this subject give times lines for fit athletes. So don’t get discouraged if you are not. Keep at it.
  • Mail from nice people at Bangalore Bikers Club

Misc :

  • Fun when you are on a stretcher and pushed around. Profound :)
  • Scary part was not the surgery, but the catheter in my arm. Got over it after a day.
  • Enjoyed the royal treatment. People always around you. don’t have to do anything. Everything is there as soon as you think about it!
  • I was without a laptop for about 15 days.
  • Long phone calls from stoned friends. ;-)
(Would try to add more information and keep this post updated ..)

July 20, 2009

Me.

Filed under: CODE, LIFE, Tech, Thoughts — Johnny @ 6:13 pm

Johnny Jacob

July 7, 2009

GDB Scripting : A short article for a internal magazine

Filed under: CODE, GNOME, Linux Fun, Programming, Tech, Thoughts, suse — Johnny @ 8:56 am

I wrote a small article for a internal magazine and few of my friends wanted me to post it to this blog.

This is for people who are new to GDB and still exploring itz features. So if you’ve used GDB for more than few weeks please ignore and skip :)

GDB – Scripting

A good majority of novice programmers tend to use printf functions to trace function calls and to printout the debug data. This forces you to change the code and compile again and again. To eliminate these superfluous tasks from your day-to-day work, use GDB. The GDB has facilities for scripting and helps in saving plenty of your time.

Tracing Function Calls

If you want to know whether a function is called or not, create a break point and write a simple script.

<code>

#Set the breakpoint

(gdb) b mapi_sync

Breakpoint 1 at 0×7fffd75f36e2: file camel-mapi-folder.c, line 741

#Tell GDB what to do when the breakpoint is reached

(gdb) commands

Type commands for when breakpoint 1 is hit, one per line.

End with a line saying just “end”.

> continue

> end

(gdb)

</code>

continue – Come out of break and continue

end – terminate command list

Run the program now. The GDB prints the function name when the breakpoint is hit and automatically continues running the program.

Breakpoint 1, mapi_sync (folder=0xc9c1a0, expunge=0, ex=0xf3a0c0) at camel-mapi-folder.c:741

741             CamelMapiStore *mapi_store = CAMEL_MAPI_STORE (folder->parent_store);

Using the GDB Scripts for Analyzing the Data

Suppose that you have a singly-linked list that has strings in it. At some point, you might want to know the contents of the list. To do this, use the GDB scripting instead of adding the debug statements in your code.

<code>

#Example for gslist traversal.

define p_gslist_str

set $list = ($arg0)

while ((GSList *)$list->next != 0)

p (char *)(GSList *)$list->data

set $list = (GSList *)$list->next

end

end

document p_gslist_str

p_gslist_str <list>: Dumps the strings in a GSList

end

</code>

Add the above snippet into a file and load it into the GDB as follows:

<code>

(gdb) source /home/jjohnny/scripts/gdb/gslist.gdb

</code>

Now, anywhere you want to take a look in the GSList, simply break and

<code>

(gdb) p_gslist_str server_uid_list

$17 = 0×7fffd81101b0 “7666BC1E000000015870BD1E00000001″

$18 = 0×7fffd810e330 “7666BC1E000000015970BD1E00000001″

$19 = 0×7fffd810cbe0 “7666BC1E000000015C70BD1E00000001″

</code>

Simple scripts thus can save you a lot of time from adding or removing the debugging statements from your code. Now go ahead and create a suite of scripts to aid the library you are writing.

More cool developer tricks later. Have fun !

— End —

Thanks to Radhika for editing the article.

Btw when is Archer branch  (Python scripting) getting into GDB ? I’ve been using it a bit .

GDB

- Scripting

A good majority of novice programmers tend to use printf functions to trace function calls and to printout the debug data. This forces you to change the code and compile again and again. To eliminate these superfluous tasks from your day-to-day work, use GDB, the GNU Project Debugger. The GDB has facilities for scripting and helps in saving plenty of your time.
Tracing Function Calls
If you want to know whether a function is called or not, create a break point and write a simple script.
<code>
#Set the breakpoint
(gdb) b mapi_sync
Breakpoint 1 at 0×7fffd75f36e2: file camel-mapi-folder.c, line 741
#Tell GDB what to do when the breakpoint is reached
(gdb) commands
Type commands for when breakpoint 1 is hit, one per line.
End with a line saying just “end”.
> continue
> end
(gdb)
</code>
continue – Come out of break and continue
end – terminate command list
Run the program now. The GDB prints the function name when the breakpoint is hit and automatically continues running the program.
Breakpoint 1, mapi_sync (folder=0xc9c1a0, expunge=0, ex=0xf3a0c0) at camel-mapi-folder.c:741
741             CamelMapiStore *mapi_store = CAMEL_MAPI_STORE (folder->parent_store);
Using the GDB Scripts for Analyzing the Data
Suppose that you have a singly-linked list that has strings in it. At some point, you might want to know the contents of the list. To do this, use the GDB scripting instead of adding the debug statements in your code to print out the data.
</code>
#Example for gslist traversal.
define p_gslist_str
set $list = ($arg0)
while ((GSList *)$list->next != 0)
p (char *)(GSList *)$list->data
set $list = (GSList *)$list->next
end
end
document p_gslist_str
p_gslist_str <list>: Dumps the strings in a GSList
end
</code>
Add the above snippet into a file and load it into the GDB as follows:
<code>
(gdb) source /home/jjohnny/scripts/gdb/gslist.gdb
</code>
Now, anywhere you want to take a look in the GSList, simply break
<code>
(gdb) p_gslist_str server_uid_list
$17 = 0×7fffd81101b0 “7666BC1E000000015870BD1E00000001″
$18 = 0×7fffd810e330 “7666BC1E000000015970BD1E00000001″
$19 = 0×7fffd810cbe0 “7666BC1E000000015C70BD1E00000001″
</code>
Simple scripts thus can save you a lot of time from adding or removing the debugging statements from your code.
Now go ahead and create a suite of scripts to aid the library you are writing.
More cool developer tricks later. Have fun !

May 5, 2009

24.

Filed under: Thoughts — Johnny @ 11:58 pm

24 awesome years in planet earth! 24 years !

When are we going to mars ? :)

April 18, 2009

Lessons on a friday evening

Filed under: LIFE, Thoughts — Johnny @ 3:13 pm

Last Friday evening I had to go through 20 minutes of verbal blah blah and haha haha . Yes I was the object of ridicule. I was angry but wore a mask of fake smile. I wanted to punch few faces and also considered using a GoW Lancer . But thank God I did not do that because I was either polite / a coward. Walked away. I hoped that my rage would go off after 10k of biking. It did not. I tried ranting to a few. It did not. Then in a moment a realization : “nobody is perfect that includes me”. Started looking at this in a different point of view. I had lessons to learn from this :

  • If you don’t understand something, take your time and learn about it. Don’t utter STUPID words and advertise that you are a FOOL.
  • Don’t make money as the object of living.
  • If somebody does something and it looks stupid according to your life’s code, share your opinions. And try not to be a IDIOT claiming that what you are doing is the ideal way to go.
  • Every right word that is not said and ever wrong one that is shouted is going to hurt somebody. As you sow so shall you reap.
  • Just because I’m friendly doesn’t mean that I’m your friend. Trust once broken, hard to mend.
  • Understand your relationship and choose your words accordingly.  If you are just a work mate, then you CANNOT speak like my brother / father / friend. KNOW YOUR LIMITS.

Thanks to you : when you buy that dream house or go about buying nonsense expensive gadget or a new motorcycle, I will smile and _try_ to share the joy brought by those stupid things (stupid according to my life’s code) even though I don’t understand it.

Today’s prayer would be : God,  help me to remember and use these lessons. And help me to be a better person.

Note : There were 4 -5 of you standing around and *having fun* . This is not for all. I appreciate a few who actually tried to bail me out of that ‘bully session’. Not expecting this but please don’t come and apologize. It is better the way it is (as of now )

“Do you see someone who thinks himself wise? There is more hope for a fool than for him!”

update : Comments closed.

April 12, 2009

Dirty bike.Yay ! (STR Apr 11 2009)

Filed under: LIFE, Thoughts, Trek 3700, cycling — Johnny @ 2:08 pm

This weekend wanted to go for a ride. STR (Staurday Trail Ride) was interesting. Saw some pictures from their previous rides and was wondering whether I would be able to actually match up with their pace. Anyhoo we (me & Kalyan) started @ 0545 and reached the rendezvous point @ 0600. Met the other riders and off we went. Well, i saw the black tar road only for few minutes. The lead pack jumped off the road and it was dirt road (most of the time).

We were tailing and was slowing down the group. Awesome group of riders. Very patient with us :)

I simply loved the ride. Some of the stretches had surprises. Then tried some jumps (ahemm ;-) )

And my bike is dirty ! Finally .. felt like i did some justice to trek over this ride .. Hoping to do more.

Paro’s report : http://ride-bike.blogspot.com/2009/04/off-sarjapur-road-11apr09.html

Abhi : Some pics / Vids /Trail route : http://bikeszone.com/forum/viewtopic.php?f=10&t=2677#p23152

Some lessons :

- Carry more water and some chocolates.

- Train more.

- Be with the lead pack ..  :)

- And try to take some pictures :)

April 9, 2009

Commute to office : A Test Ride

Filed under: LIFE, Thoughts, Trek 3700, cycling — Johnny @ 12:32 pm

According to plan, I was supposed to go for a long ride in morning (XT – running) before going to office. But thanks to mosquitoes I couldn’t get enough sleep and woke up bit late. So i decided I’ll do a test commute to office. Just wanted to know how it feels. Started from home @ 0635 and reached office by 0710. Stopped to check saddle height and front tires (I think the brakes are not aligned)

Thanks to Kalyan & Nikanth for letting me park it in their house. I’m not confident of parking in office (yet) .

Firefox Cyclone & Trek 3700

Kalyan's Firefox Cyclone & Trek 3700

Left office earlier and rode back home. Loved the ride and would be commuting to office in my bike :)

April 4, 2009

Life += Trek 3700

Filed under: LIFE, Thoughts, Trek 3700 — Johnny @ 4:43 pm

Bought a Trek 3700 today.

A beautiful machine in ‘Acid Gold’ colour. Will be using this for cross training and some fun rides on weekends. Have to assess about commuting to office. (Distance is not a problem . Parking is ).

Trek 3700 Acid Gold

Initially I was looking at a Firefox Target. But when i tried out the Trek i just had to get it. Its definitely worth it.

Rohan from BOTS suggested that I go for a 4300. But itz a bit over my budget. so settled for a 3700.

This Trek 3700 is from BumsOnTheSaddle.com .

Why BumsOnTheSaddle.com ?

  • Passionate people. (Differentiates lot of other stores)
  • They know what they are talking about.  (They are real bikers!)
  • They are building a nice community.
  • Have very good online presence. And very good on emails :) (important to me .. and i didnt have to make a single phone call!)
  • Good amount of material about bikes : notebook.bumsonthesaddle.com (i’m impressed by this)

Thanks a lot Rohan, Nikhil and umm ForgotHisName! It was a good experience. A nice run through the bike and personalizing it for me!

I rode all the way from Jayanagar (BOTS) to Koramangala 1st block (6km ?). Was worried about the traffic a bit .. But it was not a problem at all. The ride was smooth. Was learning about the gears and really understood why people stress on consistent cadence ! After that had a quick lunch and started off to CV Raman Nagar (10 km) . It was around 1430 and the sun just drained me out when I went over Domlur flyover. Reached Kalyan’s place. Went out with Kalyan and he bought a Firefox Cyclone.

Later in the evening we (Me and Kalyan) went out and explored CV Raman nagar a bit.Was learning about gear ratios all along. Realized the importance of  saddle height. It dropped down and my knees started hurting. Stopped and fixed (Yup carrying Allen keys proved very useful :) ).  Would leave CV Raman nagar in morning (of course .. on my Trek 3700 ! ) (10 km)

I should have got a bottle cage along with the bike. Stopping and drinking from the bottle in the backpack wasted time.

I’m going to enjoy this part of my life.  Yay!

Random words :

  • New would be  bikers : Please do your own research before getting a bike. It helps you a lot in understanding your equipment.
  • For calculating gear ratios : http://sheldonbrown.com/gears/

Hmm … big post. Been a while ..

Update :  19 Hours after buying :  Pedaled 30+ Km

March 19, 2009

Untitled

Filed under: Evolution, Linux Fun, Tech, Thoughts — Johnny @ 9:48 am

Comments like http://blogs.gnome.org/sragavan/2009/03/18/announcing-anjal-the-new-mail-for-netbooks/#comments makes me do more at times like this :)

Proud to be part of Anjal (Pronounce as “An-jal” similar to “Brin-jal”).

Awesome !!!

January 5, 2009

0o3731 0×7D9 (2009)

Filed under: LIFE, Thoughts — Johnny @ 4:37 am

Back from 2 week long break. Met family. Some observations :

+ You got no idea why your relatives like / hate you !

+ When you have a 8 month old nephew around , Don’t pack your laptop for the trip.

+ In some places you don’t have GSM network, but have access to internet @ 240 KB.

+ Cruising at 130+ K in Indian roads! yep .. they are no more dreams.

+ RB doesn’t help when you are sleep deprived and driving ! (hey .. not me)

+ Solitude helps after 2 weeks of too much human contact.

2009 :

+ This is going to be a awesome year! (or in Swen’s words : New year : Same shit )

+ Need change. Can’t take crap everyday from crapy ppl. You know what i mean.

Looks like my urges to write blog posts are back. naaah …

Code :

+ Been fixing up e-seek. Thanks to GIT for all itz offline awesomeness.

+ Will finish up Hiveminder for Tasque (live.gnome.org/Tasque) soonish. Already started scratching files for Toodledo backend.

Looks like my urges to write code is still there and strong :)

November 24, 2008

Evolution MAPI : Contributions… Testing… Bugzilla …

Filed under: CODE, Evolution, GNOME, Tech, Thoughts, Work, suse — Tags: — Johnny @ 10:03 am

Development is more active after our move to new svn ! Julien (of openchange.org) has patched evolution-mapi to be compatible with libmapi 0.8 .Patches are welcome :) !

Some of the cool things with libmapi 0.8 is the possibility of having multiple exchange accounts (multiple sessions) in Evolution (Yep. you read that right! ). But they will hit the trunk little later .

Now more focus is on real world testing on servers other than few test servers we are running. What doesn’t work in different setups is something we would like to know and fix them all ! Thanks to those who have been reporting issues and TIA :)

NEWS :

+ evolution-mapi is proposed for GNOME 2.26. Yay !

+ we have a new product ‘evolution-mapi’ in GNOME bugzilla.

+ Wiki page is updated with information on building evolution-mapi .

November 4, 2008

Still around …

Filed under: Thoughts — Johnny @ 10:02 am

Looks like people were wondering what happened to me. since i’vent written anything here.

Well still here. Was busy with work. later ..

Older Posts »

Blog at WordPress.com.