Posted Originally on LApstrEz BLoG – http://www.Journalhome.com/lapstre
I am a computer science student and I hate lab classes. Sounds strange eh?. We’ll thats because people have me play the role of a debugger/maintenance programmers. I go around correcting each and every person’s mistakes, only to find them mad at me for not paying enough attention. The teachers scold me saying I spoil the class, and the students scold me that I don’t help them enough.
On the job, I often come across hilarious mistakes, Sometimes dumb ones. I wonder why people make the mistakes they do. I’ve always wanted to write a guide book collecting all the silly mistakes people make(Another one of my ambitious virtual ntrepreneurships, I reckond i could be atleast as famous as Charulatha 😉 ). But as usual, I have neither the the experience nor enough technical knowledge to do that. Who’d buy it anyway!
All this rambling because of this particular article on The Hackers Choice, A group of international security experts, which stirred up some memories. The original Article was published on on Roedy Green’s Mindproducts. It’s about how to make your code unmaintainable. The Article written as a joke but in the end you will endup introspecting your programming techniques.
STUATUARY WARNING:
This article is meant to be a joke and you are supposed to learn to correct your styles from it,
NOT follow it blindly and lose your job.
Here are some excerpts:
Never create separate Listeners for each Component. Always have one listener for every button in
your project and simply use massive if…else statements to test for which button was pressed.
In engineering work there are two ways to code. One is to convert all inputs to S.I. (metric)
units of measure, then do your calculations then convert back to various civil units of measure for
output. The other is to maintain the various mixed measure systems throughout. Always choose the
second. It’s the American way!
Go wild with encapsulation and oo. For example:
myPanel.add( getMyButton() );
private JButton getMyButton()
{
return myButton;
}
That one probably did not even seem funny. Don’t worry. It will some day.
If a module in a library needs an array to hold an image, just define a static array. Nobody will
ever have an image bigger than 512 x 512, so a fixed-size array is OK. For best precision, make it
an array of doubles. Bonus effect for hiding a 2 Meg static array which causes the program to
exceed the memory of the client’s machine and thrash like crazy even if they never use your
routine.
U can read the whole article on THC. The http://mindprod.com/unmain.html original link is down for some unknown reasons. Also check out The Sun JAVA Coding Conventions.
Wired.com has a excellent article on Google’s expanding power and ambition. Don’t forget to check that out.
And hey if u’ve had ne issues with google talk, leave a comment. I’ve added a new Blog roll of some of my favourite sites, Check it out!.