English | हिन्दी | 中文 | Mac
As far as I am concerned, there are two kinds of programming work I've done so far - (a) the stuff I did in school and in college up until now and (b) useful stuff. The thing is that, in school and in introductory programming courses in college (I can't speak about about the more advanced courses because that's all I've done), all I learnt about was algorithms and 'beautiful ideas in computer science'. It's the equivalent of having learnt stuff like multi-variable calculus but never having sat down and calculated the average of five numbers. Of course, what I'm doing right now is equivalent to calculating the standard deviation from a hundred thousand test cases - by hand. I am not by any means disputing the usefulness of algorithms or saying that what we did in school was wasted effort, but that "real" systems probably require only two awesome algorithms as solid foundation and then five hundred stories worth of non-algorithmic work. As far as the algorithmic portion is concerned, the order tracking system I'm working on practically has none. Here's how it looks like on paper:
  • Add orders into a database
  • Modify orders in a database
  • Query orders from a database
However, in reality there is a trillion times more to take care of. I would explain it all but it would be an immensely boring read I promise.

What I've realized - actually, I've known it for a long time, but this is the first time I'm implementing this kind of stuff myself - is that, in the average project, if the algorithms involved are the size of an apple, then data modeling is about the size of New Delhi and implementing that model around the order of Jupiter and Saturn combined. Debugging, surprisingly, is only as big as the Earth. I was tempted to say that implementation would be the size of the known universe, but then, as grand as it may sound, I would be lying. Of course, many developers would tell you that debugging would be the size of the known universe, but I've found that that's not as true for web programming as it is for the C++ stuff I've done. And that's mostly because C++ is an uptight bitch with a cauldron for a heart. It really is, no kidding. I mean, there's Java - the friendly maternal type who prevents you from doing blunders, there's C++ which lets you do pretty much all possible combinations of blunders you can ever imagine, and then there's PHP, which is more like the indulgent grandparent who simply lets you get away with a bunch of stuff. Although PHP looks like it's just C++ with a dollar-sign placed in front of variable names, it is remarkably different in its working because it gives you the benefit of the doubt in almost all the right places where as C++ does it in all the wrong places. For example, almost all the of "Fatal Errors" I receive when I try to run a dysfunctional PHP script are for obvious things like making a syntactical error (I almost never remember to put a semicolon after "echo" statements - it's always those pesky "echo" statements). In contrast, C++ will give you errors that, once you resolve them, will make you want to bite your own leg off. I'm not even going to mention one because it might kill a portion of my soul (calculated to be 4.37% by latest estimates) in the process. To give you some insight, I'll tell you a couple of things that C++ does. For example, if you make a new variable, say a harmless integer, and you ask C++ to simply print the contents of this brand new variable, you'll get some totally random number like 1726 and you're going to ask "Well, who ordered that?" and you'd be quite justified in doing so. And because of this "feature", you get some really weird bugs in your code because you forgot to initialize the number to be 0 (hey, it happens) and wrote the rest of your code assuming that you did, and let me tell you - unless your program is only a couple of hundred lines of code, it is going to take you an eternity to figure the problem out, and especially so if you just started programming, say, the day before. Every sensible programming environment initializes variables to something reasonable, like 0, but no, not C++. With integers, it might only be harmful to a limit, but what if you forgot to initialize a pointer (a pointer is a variable that stores the memory address of another variable)? Having finished CS106B recently, I should like to mention that the possibilities are virtually limitless and the result of it all is a person with a significantly reduced quantity of hair.

And this is the sort of thing that makes me say "No Wonder". After this summer, I think I'm going to be a lot softer on the developer if I find a bug in my favourite piece of software or when Windows crashes again (yeah, the if/when thing really doesn't apply here), because, honestly speaking, if you multiply the amount of code you have by 2, you increase the complexity of debugging that code by 102. And any person or group of persons working on a project that claims to have "millions of lines of ancient C code" clearly deserve the world's pity.

Labels: