An article called
My Top Ten Tips on how to become a Rock Star Programmer has been circulating on the net. It is probably well-intentioned, but I'm afraid it misses the mark.
How to be a Rock Star BabysitterLet's start with the title. There is no such thing as a "Rock Star Programmer," so if you want to become one, you already have problems that reading a blog post can't fix. Rock stars get sex, drugs, parties, limousines, fame, glory, dates with supermodels, and
Rolling Stone covers. Good programmers get . . . uh . . . fewer compiler errors. Or fewer runtime errors, depending on which language you're using. So let's not pretend that "Rock Star Programmer" makes any more sense than "lighter-than-air paperweight" or "Rock Star Babysitter."
Tips 1, 2, and 3 advise using a fast machine, a big monitor, and all the features of your IDE. This is like telling people to become better guitar players by buying a more expensive amp and turning the volume up to 11.
Tip 4 says not to learn APIs too well because they might change. This is like telling a musician not to learn a scale "too well" because the next song might be in a different key.
Tip 7 says to "go back and enhance your old code" because "you learn oodles of things reading your own crap, which old code always is." Sorry, but you don't learn how to write good code from reading your own bad code, you only learn why bad code is so aggravating.
Tip 8 says to eat your own dog food, and write something using your own API. This is decent advice, but just like tip 7, you won't learn how to write good code by using your own bad code, you will only learn why your own bad code is just as hard to use as it is to maintain.
This list overlooks the one obvious tip, the one tip that rules them all and in the darkness binds them.
The One Tip That Rules Them AllYou don't learn about good code by studying bad code. You learn about good code by studying good code.
- Reading bad code won't teach you about good code
- Writing bad code won't teach you about good code
- Using bad code won't teach you about good code
- Compiling bad code faster with a faster machine won't teach you about good code
- Seeing more bad code on the screen at once with a bigger monitor won't teach you about good code
- Writing bad code faster with IDE shortcuts won't teach you about good code
- Performance testing bad code won't teach you about good code
The best way to improve is to study code that is better than your own. Read good code written by experts, in a variety of programming languages. Study it until you understand how it works and what makes it good. That's it. That's the one tip. Oh yeah, and also take the money you would have spent on a faster machine and a bigger monitor and send it to me.