Crazy code


Programming, as I understand it, is something that needs one to solve problems by analytical thinking. But one thing that I have noticed recently reviewing code is that a lot of people code in a pretty haphazard, “just finish it” kind of way. What happens due to this is that, you end up with a lot of crazy code. Crazy code?! Oh, this is not code that won’t work. It will work all right… cause that was the objective from the start right? to get it working. What makes it crazy is that, it present to you the work created by a shut-out mind. Sometimes it feels like the person was almost brain dead or highly doped. Yup! I find no traces of the logical work by a thinking mind.

There will always be those who are no good at programming. Who are just doing a job with no love for the programming and logic that goes behind it. I can’t seem to find a way to help them, but what was more shocking was that, a lot of good programmers too wrote crazy code.  Why?! One thing that totally kills the thinking mind are deadlines set by a non thinking mind. When you work in a services company, and have clients who always want the code ready before they thought of developing it you get mindless deadlines. Yes, you can argue; you can get extentions… But whenever there is a deadline, that leave no scope for a programmer to sit there, think about the situation and decide the best solution, you are bound to find crazy code.

Who pays for it?! Before we talk about who pays, lets see what all costs we are talking about here. I have found that you spend more time writing crazy code that writing well thought out code. Yes it may appear that you are just scribbling on paper when you should be programming… but that saves time. So the first cost comes in extra time spent by programmers. The code is inefficient, so system performance is degraded. User experience will be bad and you are bound to loose value. This code is difficult to understand, debug, modify, fix, maintain… they all add to a lot of extra cost. In the end you will hire more programmers, tighten the deadline, mess up the code even more, and come up with a crappy product. Losses losses losses….

If you are a programmer who wants to avoid writing crazy code, I suggest writing a small plan on paper, needn’t be a complex flow chart or something, but just a few lines of step by step documentation of how you plan to solve the problem at hand. Before this is ready, don’t even start coding. You are bound to miss out a lot of things. This plan is not foolproof, but avoid a lot of logical errors.

If you are someone who sets deadlines…. GIVE YOUR PROGRAMMERS TIME TO THINK!

Some explanations…


This blog has not had any posts for sometime now.

Where was I? No where far, a bit busy yes.

Didn’t I have any time to write? I did have some time, but I was trying to do something, rather than just blabber for a change.

Did I come up with something cool?! Not everything works out the way you want it. Somethings don’t workout, some take longer than expected… Some just need a little more thought. 

Vague! Keep reading… this place will have more answers. 

Code phata!!


I don’t know where and when this phrase originated, or how it came to be part of the indian IT scene. But a very comman phrase that many must have heard of was “code phata”.. Phata is a hindi word, that literally means tear. Now we all know that compueter programs are not written on paper, and it cannot in the normal sense tear. So when does the Indian IT engineer use it?! It is used when the program crashes or throws exceptions. So when someone yells “code phata”, they have found a bug; that causes an application to crash

When I heard it for the first time, I thought it was something that just my programming team used… one of those phrases that a team develops when the work together for a long time, but later I learned that they all had picked it up from previous work places. Being a little inquisitive, I spoke about this to college friends who are now in IT too. And they all had heard it at their workplaces too.I have not been able to trace down the origins of this phrase, but if you are an Indian IT engineer, chances are very high that you have heard it.

Why am I writing about it?! Well, it is not popular enough yet to be included in a dictionary yet… lets say the dictionary of Indian IT slang! But who knows, one day it may just make it. I guess this is how language develops, borrowing from other languages where there is a confluence  of cultures; coined by groups who need new words and phrases to communicate cause the language does not offer simple alternatives. To catch a jargon in the making would be quite cool, isn’t it!

To all you programmers out there, hope you keeping writing great code, and that you don’t hear ppl yelling “code phata”, around you.