The crux is that parent's don't seem to enjoy parenting is a strange conclusion made by almost all studies in this field. I am not sure I fully subscribe to this theory as I oscillate between happiness and despair when parenting. Maybe its more despair than happiness, but one thing I am sure about it is that happiness definitely has a longer lasting effect than despair.
Wednesday, November 2, 2011
Parenting
Interesting insight on this blog entry in Freakonimics - http://freakonomics.blogs.nytimes.com/2010/07/07/the-paradox-of-parenting/
Accomplishment is important
Not losing focus is the key. It’s about switching your focus from quantity to quality, and making sure that you use your productivity for a greater good: reaching your goals. Wonderful insights at http://workawesome.com/productivity/being-productive/
Tips for remembering and organizing ideas
Use a pocket recorder and record the thoughts. Musicians do it all the time.
Saturday, September 10, 2011
Who are you?
someone who follows rules and also believes in the them is Ram. Some who follows rules but does not believe them is Duryodhana.
one who believes in rules but breaks them is Krishna, one who neither believes in rules nor follows them is Ravan. Who are you?
Monday, February 14, 2011
gdb: script
Recently I discovered the easy way of debugging in gdb - GDB scripting. Often while debugging I got stuck wondering what the value of an item in a complex data structure was. Till a few days ago, I used to modify the code to add debug messages and then recompile and then rerun. This wasted a lot of time.
Then one day after having wasted a lot of time, in recompile and rerun, I decided to use GDB scripts (which I had known since long, but had never used). And it is really fun now. I save a lot of time in debugging.
A sample script that I used to count the number of elements in a linked list (which we use a lot in our code) is below:
define cntList
set $l = $arg0
set $i = 0
if ($l == 0)
printf "NULL list found\n"
else
set $n = $l
while ($n != 0)
set $i = $i+1
set $n = $n->next
end
end
printf "list size %d\n", $i
end
document cntList
count the number of elements in the list
Usage: cntList ptr
end
Then one day after having wasted a lot of time, in recompile and rerun, I decided to use GDB scripts (which I had known since long, but had never used). And it is really fun now. I save a lot of time in debugging.
A sample script that I used to count the number of elements in a linked list (which we use a lot in our code) is below:
define cntList
set $l = $arg0
set $i = 0
if ($l == 0)
printf "NULL list found\n"
else
set $n = $l
while ($n != 0)
set $i = $i+1
set $n = $n->next
end
end
printf "list size %d\n", $i
end
document cntList
count the number of elements in the list
Usage: cntList
end
Subscribe to:
Posts (Atom)