Thursday, October 27, 2005

Rains - Floods and Bangalore .

going to office everyday from Malleswaram is awful enough.
to top that ... imagine having to wade through the traffic and water
Why ? just .. yesterday .. our office bus had to go places .. before we could
reach the other end of Hosur Road near Madiwala. ... (an hour's journey
for what could have actually taken abt 10 minutes)
Ofcourse the journey had its plus points... it gave us a really clear picture of rural
Bangalore like nothing else could have done... looking at those places ..
it is hard to imagine that we are so near "Silicon Valley of Asia"
funny things do happen ... and though we started early ... (5pm) taking
into consideration .. the traffic and all ... first half-an-hour was spent in
trying to get the exact route by which we can reach Madiwala totally
avoiding Hosur Main Road ... we went this way.. reached a dead end ...
and we went another way .. stopped ... clueless looking at the slush thro'
which we might have to swim ... we jogged along .. this way that way ..
and finally hit upon a route.. (which by the way had lot of traffic .. BTM buses
to bullock carts ... ). Even with Radio city going on in full swing inside the bus..
it was not difficult to catch the beautiful Kannada swear words of some of
the villagers there .. ;-) ...
In the morning .. on way back .. as if the existing traffic was not enough ...
I saw NDTV and AAjTAk vans swarming the exact point where the traffic
is at its peak (silkboard junction near Hosur flyover..) I got a strong urge to
go out and start .. a whats-the-big-ideaing at them .. (or much better .. kick them .. )
but controlled myself with lot of effort.
Whatever the reasons .. people might give for the stagnant water .. from ..
Deve Gowda to Bommanahalli villagers... this week will be remembered by me
for a long long time as the week in which i had to travel three hours to reach home
from office...
with

Sunday, October 16, 2005

what race conditions can do

if you ever feel that there is a part of your code that might lead to a race
condition. don't u dare neglect it.
I had learnt this from a bad experience with alarm notification code for
evolution groupware. there was a call for alarm_init from two places
(one in the main loop and another in the bonobo factory initialization)
after checking on a condition if it is already inited or not ..
but the problem is that the two calls can be so near in time that it lead
to a race condition in which alarm_init gets called twice on the whole by
two different threads and all ........... yes indeed ... ALL the data structures
are duplicated .. The alarm notification was occupying double the memory
than it should have .. and the reason being negligence in checking for race
conditions ..
the fun part is that this problem surfaced in a seemingly independent way:
when an alarm notification is made ... each alarm summary was shown twice ...
since the alarm list is a static global list both the threads update it. with two
instances for a single appointment... Chen happened to trace back the problem
to this race condition and I have learnt an important lesson ..
"never mess with threads" (a parody of "never mess with pointers" heh ... )

Thursday, October 06, 2005

buidling a software

there are a number of details that are very essential when one tries to build a software
in linux. and yeah .. those who use rug and/or jhbuild too .. beware ...
last three days i struggled due to my ignorance regarding automake .. autoconf, libtool
etc which are literally the "building" blocks to build a software ...
not that i know in and out now ... but i'm better than what i was.
typically building software from a source involves running makefiles in various directories
and subdirectories .... now .. it is not so easy to make sure everything goes fine for
your environment .. If u leave all the environment - platform checks for the user
one of this might happen :
1) he might give up installing the software and look for an alternative.
2) he might bang his head on the keyboard till his head aches.

software may involve a variety of components that need to be made platform independent..
compilation of a big program needs
1) inclusion of a hell lot of shared libraries
2) dependencies on versions of those libraries
3) number of compilation options as per the needs of the user.

many huge software sources provide a autogen.sh which takes care of generating
the necessary configuration checking script called configure (autogen.sh generally
uses a configure.in file to achieve this feat)
running configure makes sure the three points above are taken care and generates
Makefiles for various directories and subdirectories (making use of Makefile.am
and Makefile.in present in each directory)
now running a make and a make install in the main directory will install the software.
Now people might think "hey what are rpms for .. eh ?" .. yeah sure ... rpms are for
knaive users and these are tips for devel builds needed by developers of the software.
all ye developers:
1)thou shalt assureth that thy PKG_CONFIG_PATH and LD_LIBRARY_PATH be free
of any errors.
2) thou shalt do a make clean and rebuildeth the sources if it happens that location of
any of thy dependent libraries changeth,
3) thou shalt assureth thyself that multiple versions of same libraries are not used to
build the software unless absolutely essentital...

happy building software

Saturday, October 01, 2005

come back

blogging after a long long time....
if feels like ages and ages ...
I can see that many of my friends will be surprised at this.
'll try to summarize the main events after my previous blog.
* Enjoyed two month vacation at home.
* Joined Novell.
* Got into Evolution (groupware suite) project.
* Working like hell from then .... :-)
now ... what made me come back ?? I donno...
may be i just felt "its time ..."
I get this initial blogger feeling ... what they call
premier intérêt ... that I should continue blogging
at a rate of atleast once a week ... i'll try my best...
first things first ...
i have surprise my friends of my come back ... :-)