< May 2006 >
  1 2 3 4 5 6
7 8 910111213
Mon, 29 May 2006:

People are sheep. They move in herds, believe in numbers (look at democracy) and avoid solving anything in person. This is, contrary to common sense, perfectly normal and how the world should be - read it through and then let me know, if you think otherwise. Before I can explain to you exactly why people are so timid, I'd have to explain why the Original Hero in our particular story wasn't the Go-Getter Hollywood crafts its dreams around. And it all starts out pretty normally [1].

So, I'm sitting around at my parents', munching on some easily munchables in front of the idiot box. Tuned in at the moment is one of the new cartoon channels which is reinventing Tarzan for the youngster of today. So there you see Tarzan telling his ape friends that the new evil leader (complete with silver back, huge fangs and red eyes) is weaker than the entire family combined. After hearing that motivational speech from somebody hanging upside down from the arms of the giant ape, the entire family drives the bullying big male out. And they all lived happily ever after, at least until the next episode.

Now, to pick out where this particular story diverges from stated 'real' world into a more fictional human world. But first, I want you to marvel at the sophistication of the tool at my disposal now - language. Sure, a cat call in the night or a howl in the distance is communication too. But our chatter possesses something unique in itself. We talk about things that could be - we talk about the future as if it were real. The first time your mother told you don't do that, or else $bad_thing_could_happen.... was when you were introduced to the very possibility (that word itself speaks volumes) of things that could be. In other words, the animals could understand what could be done if they joined forces.

Now, human society is very peaceful compared a lot of other social mammals. In almost every other primate society there is a lot of bullying and fighting at lower levels than the alpha males. Even in a stable society there are always some murmurs of disapproval and fights happen in the background. So what's different in our world that stops this from happening ? While I ponder about such important questions an advertisement for clean teeth (uhmm... I mean toothpaste) pops up.

*CLICK*. Yet another soap on some other channel. *CLICK*. Same story of a family broken by something. *CLICK*. Ah, it's a veritable cat fight between two women with bindis large enough to cover Switzerland (you *know* that I stole that analogy). Oh wait, they're just stopping at name calling. I guess language comes up as a winner yet again in this story - so where are the sheep people that I started talking about ?

Language is merely the tool. You might think the real clincher in the deal is how language helped organize things (like the Tower of Babel for instance). Well, before mankind was big enough to start dividing ourselves over language, religion, caste and creed, we lived in tribes. The organization there needed to kick some ass more than the mot juste and language was hardly (yet) the way to get your average cave-woman interested.

Even with philosophy running in parallel, daytime soaps are boring. *CLICK*. Oh, its some mafia gangster flick and some guy's getting shot because he ratted out some 'brother' to de cops. And he did that because the other guy made eyes at his sister. Seems fair, I think. If I were in the same posish, I'd be wiping the blood off my knuckles too. Wait, he didn't stand up and fight, he merely went to the Big Brother and squealed like the family pig (George Orwell is a genius). Language has its advantages for the weak and oppressed.

But didn't evolution stick up for the 'Fittest' or something ? So, if you are weak and oppressed, you'd do good to the species to stay out of the gene pool. Then why does human society discourage bullying and stick up for a very unnatural concept called fair play. Because long back during the dark ages of human evolution, language helped the weak to team up and beat up the bullies. That's just a prediction and this movie's getting way too bloody to have a happy ending.

*CLICK*. It's one of the 24x7 news channels and it's showing a strike in some factory plant somewhere. The union is demanding special protective masks and compensations to the families of its employees who have succumbed to halitosis. The basic co-operative skills mankind developed in the distant past for hunting large animals of the last ice age have been subverted to bring a factory to a grinding halt. On the other hand, the weak worker class have no way to fight the system other than uniting. And it looks like they're coming out winners.

The critical combination of language and co-operation form a very sharp tool in the arsenal of the weak and the timid. The call goes out - All for one and one for all. Such coalitions and brotherhoods must have picked off every one of the stereotypical aggressive alpha males when the species was passed through an evolutionary pressure like a famine or disease. Of course, you can't blame the mob - dying out was hardly a worthy choice. The badass alpha male just didn't Fit in with the times of crisis.

Even today, our society runs on the basis that its combined might is significantly bigger than is in possession of any one individual. This is why democracy is so popular, because aggressive individuals do not survive in a majority of their own - this town isn't big enough for the both of us. But we still need the risk taker, adventurer and explorer - they deny society and are labeled mavericks, become recluses in old age. You know the examples. We're not like them, as much as we admire them.

Still, somewhere in our primitive brains, we crave for an absolute leader to settle our disputes, punish the wicked and reward the good deeds. The all powerful, ape lord of our own tribe, that we used to see and obey everyday in those dark and distant days when we had hardly climbed down from the trees. We worship him, live our days in awe of his awesome power, sleep nights under his protection and follow him across hades if necessary. Oh, my God, what am I talking about ? (*heh).

Us humans, we are such a coalition of the timid, where decisions are by consensus and where politeness overrides correctness. That's the way it is and short of mass genocide there's nothing you can do to fix it. So quit cribbing.

  [1] - Nothing except loud music or talking women seem to snap my brain out of overdrive.

Let the meek inherit the earth -- they had it coming.

posted at: 12:09 | path: /philosophy | permalink | Tags: , ,

Last night, I was attempting to build Flubox-0.1.14 on my home amd64 box. After struggling with a couple of errors in src/Resource.hh I managed to get it built with gcc-3.4.2. Now the real bug hunting started in earnest. So consider the following code.

void va_arg_test(const char * pattern, ...) 
    va_list va;
    int i = 0;
    const char *p;

    while((p = va_arg(va, char *)) != 0) {
        printf("%02d) '%s'\n", ++i, p);

int main(int argc, char * argv[])
    va_arg_test("wvZX", "hello", "world", 0);

Now, to the inexperienced eye it might look like perfect working code. But the code above is buggy. If I wanted to really fix it, I'd have to rewrite it so.

    va_arg_test("wvZX", "hello", "world", NULL);

The old code pushes 2 pointers and an integer into the stack as variable args, while it reads out 3 pointers inside the loop. In normal x86 land that's not a big deal because pointers are integers and vice versa. But my box is an amd64, there LLP64 holds sway. A pointer is a long long, not just a long. So it reads 32 bits of junk along with the last 0 and goes on reading junk off the stack.

If you'd run my so called buggy code on an amd64, you'd have found that it doesn't actually crash at all. That's where the plot thickens. To understand why it doesn't crash, you have to peer deep into the AMD64 ABI for function calls. As far as I remember, the ABI says that the first 6 arguments can be passed to a function using registers. So the current assembly listing for my code shows up as

    movl    $0, %ecx
    movl    $.LC1, %edx
    movl    $.LC2, %esi
    movl    $.LC3, %edi
    movl    $0, %eax
    call    va_arg_test

But if I increase the arguments to 8 parameters, then the data has to be pushed into the stack to passed around and then you'll note the critical difference in the opcodes between a pointer and integer handling.

    movl    $0, 16(%rsp)
    movq    $.LC7, 8(%rsp)
    movq    $.LC8, (%rsp)
    movl    $.LC4, %r9d
    movl    $0, %eax
    call    va_arg_test

As you can see the integer 0 is moved into the stack using the movl while the pointers were moved in using the movq viz long word and quad word. Doing this for varargs on amd64 leaves the rest of the quad word in that stack slot unitialized. Therefore you are not guarunteed a NULL pointer if you read that data out as a char *.

After that was fixed in XmbFontImp.cc, fluxbox started working. God knows how many other places has similar code that will break similarly.

At this rate you'd be dead and buried before that counter rolls over back to zero.
Better get some exercise if you want to fix it when it happens.

posted at: 10:11 | path: /hacks | permalink | Tags: , ,

Fri, 26 May 2006:

I spent half of today hunting around for a 1 BHK house in Koramangala. The results were disappointing. I couldn't find a house that wasn't a bachelor's dive, which in a normal situation is nice, but not when you are expecting your parents to make long visits. So if you know of a good house somewhere in the vicinity of Forum, please email me at the address below.


And for the curious trying to copy paste that, take a look at cssplay and my pixeltext script.

Earth is like a big big house in some ways.
Nobody wants to be around when it's time to pay the rent.

posted at: 20:11 | path: /rants | permalink | Tags: ,

Thu, 25 May 2006:

Just got pissed with man pages. The idiotic tool has been pissing me off with a complete inability to scroll to the top or wrap around searches to the top. So I did some digging on how man actually displays the data. Here's a inside view on how the gzipped man pages are displayed on screen and it's an excellent example of the unix way of doing things.

bash$ ps x | grep "/usr/share/man"
....    sh -c (cd /usr/share/man && 
		(echo ".pl 1100i"; /usr/bin/gunzip -c '/usr/share/man/man1/seq.1.gz'; 
		echo ".\\\""; echo ".pl \n(nlu+10") | /usr/bin/gtbl |
		nroff --legacy ISO-8859-1 -man -rLL=77n -rLT=77n 2>/dev/null | 
		/usr/bin/less -iRs)

The man page for man provide yet another peice of the puzzle, where exactly this particular command is pulled from. There's a file called /etc/man.config which specifies where the pager (i.e less, more) command is pulled out of. And the default value was less. Instead of replacing it for the entire system, every user can override it by setting $MANPAGER in their environment. And so I did.

export MANPAGER="col -b | vim -R -c 'set ft=man nomod nolist' -"

Now, everytime I type "man something" I can read the manpage in vim.

blithwapping (v): Using anything but a hammer to drive a nail into a wall

posted at: 20:44 | path: /hacks | permalink | Tags: , ,

I don't know if you are even aware of Chris Shiflett's latest injection bug. It was reported in Mysql 5.0 and suddenly every other DB engine writer realized that it was present in almost every one of those. Postgres even churned out an immediate release to fix this particular issue. The blind spot of the whole fiasco has been multibyte encodings whereas the add_slashes is not binary safe. I was lurking in one of the php developer channels listening to exactly how this could've been exploited and it sounded really serious.

So 0x955c is a single SJIS character, when locale is taken into account, it's just a single character. But when you ignore locale and treat it as latin-1 it looks like 0x95 followed by a backslash. So in the php land, instead of treating it as a single character, escapes the backslash giving you a two character string that looks like 0x955c \ . Now you've got a stray slash which can be used as part of a user supplied escape sequence to inject whatever you require into the query data.

After Sara had explained all that, we turned to the quick fixes. Now, let me introduce UTF-8. A closer inspection of the UTF-8 code table and rationale behind contains the following pearl of wisdom - "The remaining bytes in a multi-byte sequence have 10 as their two most significant bits". So if you were using UTF-8 everywhere to handle unicode, it is not possible for a multi-byte character to end with the ordinal value of \ (0x5c). So convert a string to UTF-8 before escaping the backslashes and you're safe from this bug. So practise safe hex and always use UTF-8.

But for me the whole bug had a more hilarious side to it. Yesterday, I got two php server admins to take down talks.php.net (cached). And the reason it was taken down was due to a set of security vulnerabilities in a set of examples attached to a presentation. Authored by, you guessed it, Chris Shiflett.

<g0pz>    Derick: but I want to know what exactly is bugging the system
<Derick>  the apache process don't want to die either
<Derick>  all are dead now
<Derick>  let's start again
<g0pz>    it was probably the one I had attached with gdb
<Derick>  atleast the site works again
<g0pz>    Derick: shall I kill it again ? :)
<Derick>  g0pz: you know how to?

<g0pz>    edink: http://talks.php.net/presentations/slides/shiflett/
<>        oscon2004/php-security/code/shared-filesystem.php?file=/etc/passwd
<g0pz>    I found this in the access_log !!!
<g0pz>    Derick: that script is very very scary
<g0pz>    *please* *please* take it offline ?

<edink>   bloody hell
<Derick>  i now wiped all *.php files in shiff's dir
<edink>   and he now works for omniti?
<Derick>  yeah :)
<g0pz>    well, I'd have just put a .htaccess Deny all there
<edink>   g0pz: rm -rf is more effenctive :)
<g0pz>    more permanent ? :)
<johann__>slides/acc_php/tmp_table.php - sql (union) injection
<edink>   g0pz: yeah, security risks like that need to be dealt with permanently
<g0pz>    edink: IMHO, he probably wrote up that demo during the lunch break 
<>        before his presentation
<edink>   but how did that bring the site down?
<Derick>  some loop i think
<Derick>  .htaccess is disabled
*   Sebastian .oO( And he is an security expert, right? )
<Derick>  i don't have the time to deal with this either
<edink>   yeah ;)
<Derick>  i'll just turn off talks for now so that somebody can fix it

Somehow it stuck me as ironic that a security expert's own code should help someone read out the /etc/passwd from a publically visible, high traffic server. As Bart Simpson put it - The ironing is delicious.

The function of the expert is not to be more right than other people,
but to be wrong for more sophisticated reasons.
                      --  Dr. David Butler

posted at: 03:22 | path: /php | permalink | Tags: , ,

Wed, 24 May 2006:

I hate being the bad cop. For all that cliched formula attached to this particular idea of Good Cop, Bad Cop the sad fact is that it really works. The very idea that a person would often agree to a moderate in the presence of an extremist picking the seemingly lesser evil.

Sometimes to do what's good, you have to make others hate you.

God instructs the heart, not by ideas, but by pains and contradictions.
               -- De Caussade

posted at: 20:46 | path: /observations | permalink | Tags: , ,

Thu, 18 May 2006:

In php5 static variables in functions behave a little differently when the functions are member functions of a class. The problems start when the inheritance starts copying out functions into the child function table hashes. For instance, consider the following bit of code :

    class A {
        function f()
            static $a = 10;
            echo __CLASS__.": $a\n";
    class B extends A { }
    $a = new A();
    $b = new B();

Now, I'd assumed that it would obviously produce 11 12 as the output. Sort of ran into this while messing around with the zend_op_array reference counting code. The static members are killed off before the reference is checked.

gopal@knockturn:/tmp$ /opt/php5/bin/php -q test.php 
A: 11
A: 11

I definitely was slightly freaked and wrote up an almost identical bit of C++ code to just test out my preconceptions about static variables.

#include <stdio.h>

class A 
    void f() {
        static int a = 10;
        printf("A: %d\n", a);

class B : public A {};

int main()
    A a;
    B b;

But static variables inside a function in C++ behave identical to whether it was declared inside a class or outside. There seems to be no special handling for member functions unlike what php shows.

gopal@knockturn:/tmp$ ./static-test 
A: 11
A: 12

I am not enough of a dynamic language geek to decide which one's the right way to do it. Actually if I really had my way, there wouldn't be any static variables in functions at all. They're actually too much like global variables in terms of life-time.

Anyway, using a class static should make it behave like C++.

In theory, there is no difference between theory and practice.
In practice, there is.

posted at: 02:01 | path: /php | permalink | Tags: , ,

Tue, 16 May 2006:

Every year, I dread this day. Usually it is a day to take stock of my life and in general wonder whether living one day at a time is working out or not. But this year, it's different.

I did a lot of things I wanted to. I made that pilgrimage to New Zealand to meet Rhys, I grew my hair long and went to a lot of colleges to talk. I met a lot of people and made a lot friends. I listened to a lot of music, watched a lot of serials and read a shoveful of books. I went home every month, I even made a point to see everybody everytime I go. I did what I wanted.

As bright as that sounded, I did have my moments of darkness. The days when you feel like you've been cheated, used and abused. Days when it hardly paid to get out of bed, bouncing from one problem to another. 'T was but a small price to pay (in hindsight).

Now, I'm 24. Somewhere inside it is still 13 but *that* kid won't come out and play till he's done his homework.

If I learn from my mistakes, pretty soon I'll know everything.

posted at: 05:46 | path: /me | permalink | Tags: ,

Sun, 14 May 2006:

Being the bookworm, I couldn't resist this particular meme. The last one I'd indulged was the superhero one. This one on the other hand, makes a lot more sense.

You're Alice's Adventures in Wonderland!
by Lewis Carroll
After stumbling down the wrong turn in life, you've had your mind opened to a number of strange and curious things. As life grows curiouser and curiouser, you have to ask yourself what's real and what's the picture of illusion. Little is coming to your aid in discerning fantasy from fact, but the line between them is so blurry that it's starting not to matter. Be careful around rabbit holes and those who smile to much, and just avoid hat shops altogether.
Take the Book Quiz at the Blue Pyramid.

I'd hoped for Through the Looking glass or at least H2G2. Anyway, there it is though, full of smiling cats and queens playing crocquet with flamingos.


The real purpose of books is to trap the mind into doing its own thinking.
                -- Christopher Morley

posted at: 03:46 | path: /fun | permalink | Tags: , ,

I don't have a laptop and the hospital anyway doesn't allow any electronics inside anyway. So I ended up lugging a couple of dead trees conveniently pulped, flattened and printed on. The chosen few were from the Johnny Maxwell trilogy from Terry Pratchett - Johnny and the Bomb and Only You Can Save Mankind .

Both these books are classified as young adult fiction, but Pratchett's no Enid Blyton and doesn't try to replace her either. There is no Faraway Tree or Wishing Chairs in here, only a boy who can't filter out the wonders of this world and an old lady who's got time on her side. The total unreality of Johnny's world is different from the fairyland of the average adult fiction book.

The stereotypical gang in the books provide for some biting comments, especially on racism and female suffrage. For example the introductions are just too good to miss and is probably the best page on the book altogether. Here are the choice bits of it :-

The thing about all of us, Johnny thought, the sad thing is that
we're not very good. Actually that's not the worst part. The 
worst part is that we're not even much good at being not 
much good.

Take Yo-less. ... He was black. Technically. But he never said
'Yo', and only said  'check it out' at the supermarket ...
Yo-less said it was racial stereotyping to  say all black kids
acted like that but,however you looked at it Yo-less was born
with a defective cool.


'One of them was black'

Johnny nodded dismally at the phone. Yo-less had explained about
this sort of thing. He'd said that if one of his ancestors had 
joined Atilla the HUn's huge horde of millions of barbarians
and helped them raid Ancient Rome, people would've definitely
remembered that one of them was black.

For all that brilliant social commentary Pratchett is capable of, he just can't write out an ending to a book. Almost all good Discworld books were left hanging in status quo, which you can't do with a book like Johnny and the Bomb. There's a bit of closure missing in the book which sort of justifies its events with the ending rather than the other way around. Dark humor of Tom Holt too convey this disturbing sense of too many very convenient coincidences. Nobody but Wodehouse in Pearls,Girls and Monty Bodkin has written that perfect book where the audience is giggling away at the simple coincidences piling up to set up a ROTFL ending. But in that case, the twists were quite random and as surprising as the first time I read Oscar Wilde's Model Millionaire but multiplied many times over. Johnny and the Bomb doesn't even belong on the same shelves.

In other words, the book doesn't really keep you guessing. Only You Can Save Mankind on the other hand has a bit more material to it, especially if you put yourself in the early nineties with CNN broadcasting the Iraqi night sky with the Scuds, Patriots and AAA tracers flares included. The total disconnect a pilot feels between pressing a button and real people dying is palpable and carried into the book with clarity.

The initial messages from the alien spaceship and the very obvious absence of a Don't fire button are all digs at the guilt free violence that the war breeds in a real world, only here transported into a twelve year old's video game. The player respawns, but the enemies die forever which sort introduces the guilt factor while shooting down an enemy fighter.

Also buried in there are prods at the allied forces about the Geneva Convention and similar codified rules of war. The requirements of similar treatments for POWs as well as a blatant disregard for civilian collateral damage were highlighted in the game but the suggestions go a lot further than what just happened on your screen. Remember Vietnam, Agent Orange and hot Napalm.

It is quite unfortunate to say that you had to be there (or at least put yourself back in the '90s) to actually read between the lines of this book. These books are for all those who sat by watching the bombs drop over Baghdad and witnessed the 'taking out' of several strategic hospitals and bunkers. A fourteen year old in 2006 will not find the irony or relive the horrors reading this book - he (or she) just doesn't have the context. The books paint a blood red sunset to the west and spotless hands of those who pressed the buttons. So to simplify - I liked the stuff between the lines, hated the ending and liked the characters (totally).

Reality is hard to live with - Unlike Johnny, we can't cope.

How do wars start ? Diplomats tell lies to journalists, and they believe what they read.
                -- Karl Kraus

posted at: 02:22 | path: /books | permalink | Tags: ,

A long long time ago, one of my classmates happened to read one of my blog entries about taxation. He commented that my English has come a long way but I should under no circumstances write about economics or money. But recently I've started to watch the US stock market, more out of curiosity than actual expectations of profit.

Since I'm neither an investor nor a trader there, unlike most ticker watchers, I was interested in watching the ebb and flow of the stock prices rather than scramble to buy or sell. Considering the (rise and) fall of the petro dollars ever since the new millennium dawned, the dollar value is merely a transactional discrepancy for an outsider. Gold is rather more stable to compare against, especially considering the unique situation India is in terms of gold demand and consumption.

The frontrunner of the Web 2.0 stocks has been Google's IPO. The stock which was priced (possibly overvalued) at 300+ USD was and still is riding on the investor confidence thanks to the recent products (albeit Beta) which have come out of the Google stable. Then, suddenly Google insiders decide to get a little cash out of the market and into their pockets. The sell was more massive than all the other 199 companies put together and basically was a shot in the arm for California's treasury in tax dollars. It could be said that the sales wouldn't affect the economy as the money never really left the market but merely got converted into scrips. But the more important question to ask is whether this is a precursor to something more dramatic (always a good idea to watch CFOs selling stocks).

On the other hand, we see another trend marked up against Gold versus the stock market. Technically speaking, the stock market should be ahead of the curve on Gold in the growth sector mainly because of the risk involved (which should be compensated by increased returns and vice versa). But very recently, that has stopped being true for GOOG stock. This is probably more a reflection of the falling value of the dollar rather than the intrinsic value of the stock in particular but the trend in itself is disturbing.

I' m not the smartest dude in the world, but even I would be hedging my bets in tech stocks if I held a few million of these. So it is probable that these two events are related in some way, but to speculate whether one event was in anticipation of another would be completely irresponsible. In fact, if I were a Wall Street mogul I'd be convincing you to buy while I sold off all of mine slowly (just like the old times in '99).

In conclusion, something's cooking.

** disclaimer ** : these are very much my own opinions and I am a code monkey @ Yahoo!, so if you do something stupid based on these, Y'all can go to this excellent village ["Yee Haw !"] that's missing its idiot.

The only thing necessary for the triumph of evil is for good men to do nothing.
        -- Edmund Burke

posted at: 00:31 | path: /observations | permalink | Tags: ,

Fri, 12 May 2006:

Hospitals are such boring places to sit around. Sitting around in the lobby watching a bald seven year old tug on her father's hand is just too painful. Except for a few minutes sometime around 11 when all the cured pass out through the doors, the atmosphere is sterile and sounds like what a library should be. So I finally gave in and started staring at the TV showing the current events in Kerala.

Yesterday was the election results day. It is hardly a week after the elections, but thanks to all the voting machines the counting is quick and painless. You'd have hardly needed an election to predict the results. LDF (Left Democratic Front) won out 98 seats out of the 140 in offer. Basically, CPI (M) won out an entire majority this time around.

Communism, just like economics, has an entirely new model in Kerala altogether. If Kerala is a nursery for educated labour, it is in no small way indebted to the reforms by the communist regimes. Quite ironic that the Kerala's booming tourist industry and its main export product, viz people, has been due to communist non-developmental strategies. Kerala under the left has always invested in the people and seen its best being drained out into the Gulf, Bangalore and the U.S. Incidentally, that wasn't such a bad thing considering the prevalence of the joint family system.

All in all, the incumbents lost. Or more accurately, the incumbents have never won in Kerala. Now, we'll be introduced to the same old brand of Left corruption - party donations which trickle down instead of the Right's upwards kickbacks.

I've said this before and I'll say this again - democracy dilutes the power of the individual and rationalizes the actions of the mob rulers.

Hospitals are depressing. Facts for the day, there.

Health nuts are going to feel stupid someday, lying in hospitals dying of nothing.

posted at: 02:30 | path: /misc | permalink | Tags: , ,

Tue, 09 May 2006:

Last october, Radek Polak suddenly announced that now dotgnu has a debugger. As much as that was good news, it still didn't fit in easily with the current design where the debugger works over the wire. On wire debug protocols are all the rage these days and for good reason, except that a few too many exist in some places. The new debugger backend is checked into Portable Studio SVN for those interested in the nitty gritty details. Here's a sample debug session.

The server is running at port 4571
Waiting for a connection...
Connection accepted
Shortcuts for recently used commands
0. watch_method PrintFn
1. unwatch_method PrintFn
2. list_threads
3. unwatch_all
4. stack_trace
5. print_locals
6. dasm
7. watch_location simple.cs 2
8. watch_all
9. watch_method Main
> l
 <Breakpoint Offset="-1">
   <Location Linenum="0" Col="0"><SourceFile Filename="" /></Location>
   <Member MemberName=".ctor" Owner="$Synthetic.$164">
     <MemberSignature Language="ILASM" 
        Value="public hidebysig specialname rtspecialname
         instance void .ctor(int32) runtime managed "/>

> print_locals
   <LocalVariable Value="10" />
   <LocalVariable Value="0" />
   <LocalVariable Value="0" />

That is the raw debugger protocol dump, now I'll just wait for Radek (or someone else) to slap a pretty UI on top of that. In all probabilty, Portable Studio will let me debug dotgnu code without all the hassles we've been going through for the past few years.

Developer tools are the crack cocaine of the software world. One try and you're hooked.

Debugging is over when people get tired of doing it.

posted at: 02:14 | path: /dotgnu | permalink | Tags: , ,

Mon, 08 May 2006:

This one's for all the times I saw an eskimo on a sled with the banner North Pole or Bust in Miami. Actually that was just a cartoon - but that's the point. Ever wonder why it's funny ? Actually I have a pageful below that will do nothing explain it. But I think you'll understand why I hold back no smiles. This is actually a page from my life, carefully bookmarked (disclaimer: some names changed for more hilarity).

The problem with opportunities is that when they do knock, they're likely to press alarm bells rather than door bells. As articulated so clearly by Wally - there are no problems, only issues, challenges and opportunities. So, what does that have to do with my life ? Well, I was the neighborhood Wally when I used to work in Initech.

I used to show up at work a bit after nine. Yes, 9 AM and that's late by Initech standards. I'd walk upto to my desk with a cup of coffee as if I just nipped downstairs for a coffee. I never carried a bag and hardly ever an umbrella. I'd imagine somebody would be hard pressed to figure out whether I just walked in to work or whether I'm relaxing after my early morning bit of work. My job involved taking a mobile phone, flashing the latest build and literally key mash my way into the bugzilla records. I was a QE and they were wasting a really quality engineer by making him poke a few buttons. The managers knew it, but were really powerless to pull in a kid out of college into writing embedded software (*oooh*).

So the problems started in the April of 2004, when 25-odd people from the 34 member development team gave in their resignations. What I was doing at the moment was having an argument with my technical manager about my leave, without knowing about all the hush hush resignations. I basically had put in more than a month's salary into my round-trip (non-refundable) plane tickets to Trivandrum and wouldn't stand to any level of bullying about the leave which I'd applied for two months ago. So I left office to spend an enjoyable week at home.

I returned to a chaotic office. Almost every good developer in the team is on notice. At that point hardly anyone cares about the project to waste their time on it. Here's where the management decisions kick in with true force :- We need to hire more people. Since they've already sold the IP for the project, management is now being paid for time rather than code output - there's no motivation to hire excellent developers. Solution, throw the bunch of freshers who've been sitting around on to the code. The more time they take to do things, the more money the account pays. And I was one among them.

That, my friends, is how I became a developer in profession. The loss of a significant amount of technical talent in one place, means a significant opportunity to people sitting in the benches elsewhere. That might sound too simplified, but there are two unspoken assumptions. The new guys on the bench have to be really good and the management has to have enough confidence in them (or shouldn't care which way) to throw these kids at the hardcore work. On a normal day, that'd be a big risk - but during these few desperate hours, this could be the last gambit.

It might just be my big empty head, but I keep hearing echoes.

The solution of problems is the most characteristic and peculiar sort of voluntary thinking.
                -- William James

posted at: 08:46 | path: /observations | permalink | Tags: , ,

Looking at this world is like seeing a movie. The events are dramatic, the villains evil and the heroes just. But recently the script's gone awry - villains are missing. I think we need a Goliath for all the Davids this century has given birth to. So let me introduce to you the third part of the trilogy - Gulf War III. And this time it isn't personal.

Basically, the political actions of the last decade can be reduced to a single line. If you have nukes, the world's policeman would negotiate and embargo you rather walk in with their marines. But assuming you forgot to buy the old russian nukes and those are hardly the stuff that could go off without lightnink and mad scientist included, you'd get stomped over by U N inspectors and then by the afore said marines.

Now that the oil-rich lands of Iraq are ruled by Freedom, we have basically run out of targets which are non-nuclear. Maybe we could try to nail that monster behind 9/11, hunt him out of home, bust every bolt hole and shoot him like a dog ? Or maybe we could bring freedom and peace to the war ravaged lands of Africa but where's the oil, bauxite or natural gas to actually require such a peace keeping effort ?

Anyway, there's enough artillery sitting somewhere in the Persian Gulf to turn Iran into dust. And it is even parked right next to the border that it only takes a hand wave to get the motorcade moving. But whose hand would do the waving and exactly who has his (even her) hands up this particular sock puppet ?

Somebody (yes, a US president himself) said that "Speak softly and carry a big stick". He was right about not hitting anybody in particular. The world will sit idly by watching one getting cut out of the herd and killed, just like all the buffalo on the veldt. Except when you destroy rather than defeat will this world be truly afraid enough to team up and send a message back.

Twice in this world's history have nuclear weaponry been used on innocent civilians. Let this jaded generation wake up to the truth and I don't think anything would do but the glowing horror of the mushroom cloud. So, I say - go ahead and nuke Iran.

Yes, this script's missing a villain.

"I say we take off; nuke the site from orbit. It's the only way to be sure."
      - Corporal Hicks, in "Aliens"

posted at: 08:11 | path: /rants | permalink | Tags: , ,

When we last left off, we were talking about matchpot and the soon to be world championships. But what matchpot lacks in cerberal and social subtlety, Mafia brings out in potfuls. Basically the game is about killing innocent villagers, whether you are the mafia or one of the lynch mob yourself. I was introduced to this game when we were all sitting around in our hotel rooms in Thrissur. The real interesting part is not the game in itself, but how it lets (or in fact forces) you to study other people under a microscope.

After the first few games where Mafia won hands down, slowly the villagers started to pick up on the non-visual cues as well. It was quite interesting to see people trying to be overclever and bluff with poker faces. Also several interesting observations, some particularly personal, were made by a lot of people. I did get a quite inside picture of a couple of people's minds and it is terrifying what some people are actually capable of, compared to your mental estimate of their trick quotient. On top of that, it is also a measure of how successfully you can con other people into changing their opinions. On the receiving side, mafia has a way of exposing your gullibility in a painfully obvious way.

An important lesson the game has taught me is about myself. I found out to my surprise that I think a lot more clearly when I am not formulating a point to present. Being dead in the game gives you a totally different perspective which you are unlikely to get while you are talking. Sometimes just having to sit and watch the entire crowd ignore the clinical quality of the strategy is just way too frustrating. Masterpeices of strategy are completely lost to the villagers who're more concerned about staying alive to the next round rather than bringing the mafia down. Exposed are the simplified versions of our daily grind, where the evil go un-punished and good are targeted. Religions have been based on much less than fixing this (later, much later).

Nobody has seen me as the Mafia yet, but I'm better at finding things out than hiding them.

Fanatics are often blinded in their thoughts.
Leaders are often blinded in their hearts.
          -- Dune

posted at: 07:46 | path: /fun | permalink | Tags: , ,