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 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 !

July 4, 2009

openSUSE 11.1 on PS3

Filed under: CODE, GNOME, LIFE, Linux Fun, PS3, Tech, suse — Johnny @ 10:41 am

Woohoo ! After a long delays and issues (in the last few days) I’ve managed to install openSUSE 11.1 in my PS3.  Running a full blown desktop is very sluggish. Reminds me of my first computer (amdk6 500mhz). Some screenies :

6 SPEs

Now onto get the Cell SDK running … Synergetic Processing Elements (SPE) here i come !

April 7, 2009

Makespace – Plugin for GNOME Evolution

Filed under: CODE, GNOME, Programming, Tech, suse — Johnny @ 3:59 pm

I’ve written (incomplete) simple plugin for Evolution which provides a combo box + menu for switching folders. Now you can hide the sidebar. This really helps in freeing up some space in your screen and can have good vertical view layout. This would help computers with smaller screen size.

Screenshots :

makespace-thumbSidebar hidden. Small combo box in top left corner

makespace-expanded-thumb1

Switching folders

To try out this plugin / For more information :   http://www.johnnyjacob.org/makespace.html .

One other feature that I would like to have is simple folder bookmarks. Bookmarked folders would appear in the top of the menu (You don’t have to navigate all the way down in the menus)

Let me know what you think and if you would like to have any features put it down in the comments. :)

March 19, 2009

Evolution MAPI update release. (0.26.0.1)

Filed under: CODE, Evolution, GNOME, Tech, suse — Tags: , — Johnny @ 10:55 am

Hello,  I just released a update to evolution-mapi. 0.26.0.1 has fix for Bug 574784 without which the package is totally unusable.

Thanks !

December 15, 2008

Evolution MAPI : Debut tarball release & RPM Repos are online

Filed under: CODE, Evolution, GNOME, Tech, Work, suse — Tags: — Johnny @ 1:08 pm

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 19, 2008

Evolution MAPI : New SVN Repository

Filed under: CODE, Evolution, GNOME, Tech, Work — Tags: — Johnny @ 6:16 am

New SVN repo for evolution-mapi provider is created :

** svn://svn.gnome.org/svn/evolution-mapi **

This repo has :
1. MAPI Account setup e-plugin.
2. libexchangemapi – Backend code for talking to server using openchange’s libmapi.
3. Evolution Data Server backends for addressbook and calendar.
4. Camel provider (mails).

More information on building evolution-mapi is available here .

We will be creating a new bugzilla component in bugzilla.gnome.org for evolution-mapi.

[ Update Nov 22 : Please report bugs under 'evolution-mapi' product in GNOME Bugzilla. ]

The EXCHANGE_MAPI_BRANCH[1][2] is closed.

Builds (RPMs) will resume shortly.

[1] svn://svn.gnome.org/svn/evolution-data-server/branches/EXCHANGE_MAPI_BRANCH

[2] svn://svn.gnome.org/svn/evolution/branches/EXCHANGE_MAPI_BRANCH

July 12, 2008

Happy birthday Srini

Filed under: GNOME, LIFE — Johnny @ 5:44 am

Happy Birthday Srini!

GUADEC : If you see him . Don’t forget to wish him ! :)

July 11, 2008

Evolution Exchange 2007 (MAPI) Provider : Changes in schedule and more.

Filed under: CODE, Evolution, GNOME, Programming, Thoughts, Work — Johnny @ 11:47 am

Code :

We have moved away from libmapi 0.7 to libmapi trunk (0.8 development) , so we can take advantage of the new APIs.

We will be constantly updating our code base to libmapi trunk.

http://www.go-evolution.org/MAPIProvider#Feature_Status

Currently :

Suman is busy in integrating meetings into evolution. (few more tasks left)

I’m currently working on finishing (completing) off the basic features in mailer and will move to optimizing the sync & more.

Schedules :

Sadly, we won’t be able to make it to Evolution 2.24 as we are late (details here). :( Meanwhile we will continue to provide pluggable packages and this will be available as a pluggable provider. 2.26 will have this.

Licensing :

Yay ! Very exciting day. Evolution licence change was announced by Michael Meeks in my talk this morning (Exchange, MAPI and Evolution) . Announce mail here!! .

Update 1 : GUADEC Talk available here

July 10, 2008

GUADEC 2008 – Day 0 – 3

Filed under: GNOME, Linux Fun, Thoughts — Johnny @ 12:12 pm

Day 0 :

+ Reached Istanbul after 12 hrs through airports / immigration … .

+ Bahrain is very hot !

+ Gulf Air is not fun to fly . 4 + 4 hr flights. So itz alright.

+ Nice Apartment: Istanbul Sweet Home : My Turkisk Bath [Video]

Day 1 :

+ Srini introduced us to other hackers. Confession : I actually had the idea that GNOME hackers are Octopus with lot of (more than 8) tentacles for writing code.They are infact humans :D

+ First BOF was fedrico’s GIT for GNOME. GIT is all good with cool workflows which is very flexible and you can adapt it to your workflow. But the question are

- Do we want to stick with one DVCS?

- Is there a way to inter-op with different DVCS, if yes ? how messy it is going to be to maintain ?

- And the learning curve for a newbie to learn using something like GIT (index , branches .. blah blah .. )

- I’m all for GIT.It perfectly fits my workflow and very flexible. I didn’t like bzr when i tried out long back. May be i should try it out now ..

+ Thanks to Burkay (one of the awesome volunteers in GUADEC). He helped us to find banks to get our Travellers Cheques cashed.

Day 2 :

+ Out of cash . Yep! Bankrupt. Had to change the our Travelers cheques. Well .. looks like they are not popular here. Well we did go to the corners of the city searching banks that do accept one. Finally we found one. But they need a “Tax Number” wtf ? Took a cab, showing the cabbie the “Tax Office” address (somebody scribbled it for us on paper. Thanks a lot ! ) He goes around & around and drops us just behind our apartment ! lol . Anyhoo .. walked a bit and found one. Few friendly people helped us to get “Tax Number”. Went to the bank cashed the maximum possible limit. What a day ! Totally exhausted walking around …

Day 3 :

+ Core days  : Met Miguel (Awesome) .

+ Interesting sessions. Interesting Talks. Well .. Really motivated. :)

+ Met Andre / Guenther / Muelli  (Pics later)

+ HPJ, Scott (from provo) , JP, Micheal ..

Very long post. Lot to write about. Anyhoo as many know, these posts are for helping my buggy MMU.

July 5, 2008

Johnny goes to GUADEC 2008, Istanbul, Turkey.

Filed under: CODE, Evolution, GNOME, Linux Fun, Tech — Johnny @ 5:31 am

A small talk on Friday morning regarding the new Evolution MAPI provider for Exchange 2007 connectivity.

We (srini & chen) will be reaching Istanbul on sunday evening.

see ya there !

Older Posts »

Blog at WordPress.com.