Wednesday, September 06, 2006

Simple Code

The Joel Test: 12 Steps to Better Code - Joel on Software:

"But if you find a bug in code that you wrote a few months ago, you'll probably have forgotten a lot of things about that code, and it's much harder to fix. By that time you may be fixing somebody else's code, and they may be in Aruba on vacation, in which case, fixing the bug is like science: you have to be slow, methodical, and meticulous, and you can't be sure how long it will take to discover the cure."



Even worse, what if those people aren't even with your company. I've had a lot of occasions where I've had to go through code bases written be someone else, without documentation who are no longer around. Its slow work, and requires quite a lot of code reading. Their are some fun aspects to it though. You get to look at various different styles of programming. Some people seem to go a mile to make a simple thing extremely complex. Others write code that documents itself!

You can learn a lot from reading code. I believe in Simple Code, thats easy to read and understand. Maintaining code is hard.

I used to be this way. I used to love complicated designs and read everything I could about complicated technologies. But as I get more experienced and “older” as a programmer I find complex things just annoying. They aren’t a mental challenge to understand anymore, they are just irritating. I’ll pick apart the flashy crap, boil down the technology to its essence and then come up with a much simpler design for the task at hand almost every time.


(Via zedshaw.com/blog)

Mozilla and hypocrisy

Right, but what about the experiences that Mozilla chooses to default for users like switching to  Yahoo and making that the default upon ...