Sunday, October 30, 2005

Feel My presence :)

So finally i m glad to release my own website... was waiting for years to this. check this out:
http://web.syr.edu/~siyer02/

Do tell me if any of you guys reading this find an error of a silly mistake... Jorge already pointed out that the w3c validator gives 7 standard errors... i'll fix them as soon as google fixes its 40 errors :)...

and yes am blogging after a week or so... i was really busy last few weeks with my mid terms. I went through the whole of Jeff Prosise and am pretty comfortable with C#.Net now.... though i have a million reasons to hate it. As all you guys would me knowing that C# is a derivative of Java, MS have crossed all the limits to make it look better. I call that over engineering.
They have introduced a feature called Boxing. People who have used java would be knowing that you cant simply use primitive datatype in conjunction with collections. eg. u cannot put an int in a HashMap, one needs to box int to Integer before doing the required stuff. C# has a work-around. It automatically boxes the primitive datatypes into objects.

Now for total newbies that might seem like a wonderful stuff but the consequences of this thing are really wicked. Now suppose i am making a multithreaded application and i want to give shared access to some stuff, say i want to lock on a variable

int i;
lock(i){
am doing stuffs really kewl;
}

this mechanism in C# is really easy and awesome, anyone who has worked with barebones C would agree to that. Now under the hood the CLR (common language runtime...just like jvm for java) is creating an object which boxes i. If the code was locking on some object like a System.Collection.Queue object then there wouldn't have been any problem. Now in above case if another thread tries to do the same thing the CLR reboxes i into a different object. So there will be no run time or compile time errors. Undercovers the threads are blocking on different objects but developer thinks that they are locked on same object. Java 1.4 with no autoboxing would have given me an error if i would have tried to lock on datatype but C# thinks that it is a lot intelligent than the coders. In short a slight mistake and there will be no synchronization between the threads.... resulting in hard to debug code and crappy race conditions which show up magically at sometime. Ya and by the way i can tell u about delegates too, which are hell lot similar to Qt signal and slots....aaah but i wont explain its pitholes...go learn C# urself :)

Jorge told me that Java5 is incorporating autoboxing!!! what is the world comming to???

Wednesday, October 19, 2005

Cant a Monkey be sane???

Okay i know i am intelligent, i use intelligence to get around problems in a nifty way. I hate cook book recipes. This also implies that i am not more intelligent myself. That is if i use my max intelligence to screw something then there is no possible way I myself can correct it (without heavy doses of caffiene :). Cook book comes to the rescue, u do something in the most boring way and if something screws up, u can almost always rectify the errors.

The above rant is with respect to software design/analysis/specs blah...
So if you follow a train of thought, your process almost always works and the chances of errors are minimized. I had written an entry early on about me being a monkey coder. I almost never read the specs (ok i read it ... but in the end made something more wonderful... but out of spec). The problem is I always rely on intutive stuff which is WRONG. I can design a nifty little algorithm and make great applications which I have done in the past, just because I have a brain... But thats the wrong thing to do for an engineer. An engineer almost never uses intution and always does things empirically. I took the SMA(software modelling and Analysis) course to just help me with that. And mind you it has helped me a great deal in that.

It is surely having catastrophic effect on my ego though. Earlier in class in bangalore "no one was above me" ...now "no one's below me". My design sucks, my specification are crappy, and the fun part is I always get mature enough to understand about a subtle part in a concept document or a software after it has been evaluated. So thats the only thing that is keeping me going in that class. I seem to be the only fresher there and most of my colleagues have loads of experience in Software Engg. People from Infosys like company are doing great cuz they are good at cook book methods.

As i mentioned before I was working as a system administrator for the psychology dept at my college. I have started a teeny weeny bit of research on Computational Neuroscience, although am not going great in it cuz it requires a lot of DSP based stuff but am catching on. But ya am awesome on the software they work on and that keeps me in business. I am working under Dr. Marc Howard, he told me a scientist just explores a subject and an engineer makes it useful for the mankind. I am starting to feel that I am more of a scientist than an engineer. I cannot work on the same thing at a stretch.... I worked on java... did a pretty good job at it but kindda got bored, then i shifted to inserting DProbes on some application on solaris... did well but the thirst to do something new was always there. I though cracking stuffs will be kewl, but ah so boring once u know it.

So here is my profile, give me any strange technology and I'll make the first great application that ever existed on it (I wrote small applications on matlab and vhdl without even seeing the docs, just once... i mean how difficult is it to write something which is srtuctured)... and dont bother to gimme the same thing again cuz i will do a really crummy job later on. I would love code in something which give crazy errors and has a lot of pointers hanging on, but if you gimme a language that has error handling and all those "oh so coool" features, i'll probably get bored.

Specs are great, without them there is no possible way to build an application. The applications am talking about needs atleast 400 programmers coding relentlessly for a period of 2 years... a minor design fault can have terrible consequences. Am a budding system analyst so I wont like to think what would happen if all 400 of them think intutively...CHAOS...Godamn we need 400 machines to fit everythink into its place. I HEERBY RESOLVE TO DESIGN BEFORE I CODE...

Friday, October 14, 2005

Hack-a-doodle-do

I am really feeling exuberant today.
The past few days were really crappy... partly cuz i was missing my friends on my bday(which was on 12th)

That brings me back to the point about my happiness. Well today i made my first working scheduler for FreeBSD. I wrote a scheduler which allocates fair share to each process, i.e. suppose a process asks a kernel for 10% of cpu time then my kernel ensures that it gets it. 2 weeks of messing with the process queues, strange priorities and deadly decays, and twitchy context switches eventually bore fruit. I am now a kernel hacker :D. I really love system coding.

Secondly I have discovered a few benifits of High speed internet that I had never experienced before. I got a new version of iTunes. Its incredible.

You can subsribe to podcasts and vodcasts like you subscribe to rss feeds. And you get new radio shows and TV shows. Its amazing!!! I mean who can imagine this in India with a puny bandwidth (max 128kbps Vs 11/54 Mpbs wireless). Moreover I will soon be getting a wireless router and will be converting my home to a wireless hotspot :) (psst...not that i m a rich bugger but its really cheap here and evrybody has it)... How many wireless hotspots are there in India?? The few available in IIMs and other institutes are publicised as if its something great.

And ya regarding those shows...they r absolutely free, just like rss feeds as i said. You can select the shows you want to download. I subscribed to a bollywood and a channel called system... downloaded a couple of countdown shows, and learned how to hack a iPod Nano, build a opensource HDTV capture tool. It really breaks my heart that there is no open source equivalent of iTunes though.

Thursday, October 06, 2005

Sys Admin Woes :(

Well Sys admin is supposed to be *The Geek* in a company. Specially in a non-IT firm, whatever he does is magic... even if he changes permission of a file :P or something seemingly naive for the *CS* guys....

But when you have a geekier employer life becomes difficult. Specially if all the system you maintain are really old ones and the corporate website is maintained by a bash shell!!... no jazzy OO, no hi-fi script... just u, me, html and bash.

So what happens when a poor soul tries to run a jazzy script ?? Chaos....

My experience in Debian here makes me wonder as to why on earth was i using Red Hat/ Fedora!!! I can hereby safely assert that Debian rules... guess why??? simple apt-get and aptitude.... the kewlest tool i've ever seen.

PS: If you think this entry is too cryptic... then it probably is.