9 Comments

Don't Be Ashamed of Your Code

I came across a post the other day by Guy Davis about 3 Levels of Programmers. In it, he stated that programmers fall into one of 3 Levels, the Good, the Lazy, and the Bad. According to his post, the bad are those that say “I can do that myself!”, and then create a solution that is rather messy. The lazy are those that don’t build from scratch and instead find existing solutions. The good are those who are the ones creating the frameworks and libraries.

While he admits in his comments that he was mainly venting against as he calls them “weak build-it-yourselfers” I thought it brought up an unfortunate opinion that at times seems to rise up in this industry. Now please note, I am not trying to pick on Guy Davis at all. There are some very valid points raised in his post, and as I stated before, he does admit he was mainly venting. I am sure all of us have vented about such things before.

Developers sometimes give a cold shoulder to developers whose code is not up to par. This is an unfair judgment though. Particularly in an industry as fast moving as the web development industry is, you cannot afford to wait until you are an “expert” to code. You have to code using the best ways you know how, and continue to learn. This means that there are undoubtedly some projects you wish you could pretend you never touched. I know I have them.

I think that a better classification is to broaden it out a bit and say there are two kinds of developers. The first kind are those that are content just getting the job done. They are not particularly concerned with how it is taken care of, so long as it functions relatively well. If they have to use inline Javascript to create an effect, then so be it. They don’t push themselves to learn more and find better ways of doing things, they just accept that what they do works well enough and why would they ever need to progress further.

The second type of developer, however, is never satisfied with where they are at. Yes, they will use the knowledge they have to get the job done, which results in some unseemly coding at times. But they know that they have more to learn, and are constantly pushing themselves to find a better method of doing it. These are the types of developers that push the industry forward. They will take their bumps and bruises along the way, but they will continue to further their understanding and knowledge of whatever skill it is they are using.

This doesn’t mean that they always develop the solution themselves, or never use libraries or frameworks. Sometimes the best solutions are libraries. It simply means that this kind of developer is always wondering, is there a better way to accomplish this.

Therefore, I say if you are new to a language, be it CSS, Javascript, PHP, or whatever else, don’t be ashamed of the code you produce. As long as you are trying to learn more and come up with more fool-proof and efficient ways of developing, there is nothing to be embarrassed about.

If you asked some of the biggest names in web development today if they had ever done a project using coding methods they aren’t exactly proud of, I am sure the answer would be “yes”. If everyone thought that someone smarter out there would develop a better solution, the industry would become quite stagnant.

  • Tumblr
  • Twitter
  • Facebook
  • del.icio.us
  • Digg
  • DZone
  • RSS

9 Smart Things Were Said

  1. Guy Davis
    01/11/2008

    You raise some good points. We need to encourage developers to try out new ideas and create innovative solutions. I’d never want my opinion to have dissuaded Gavin King from creating Hibernate all those years ago.

    On the other hand, for every Gavin King and Hibernate, there lots of crappy attempts at data persistence. Then subsequent developers are left to clean up the mess caused these home-grown ORM approaches.

    So, it seems the critical thing is to know when to call it quits. A developer should have the courage to try and build something themselves, but also have the courage to discard their code when a demonstratively better library comes along.

    For example, a Java developer who hacks together some data persistence without knowing the definition of ORM or having heard of Hibernate. Maybe they’ll get lucky and create an alternative that is better in some cases such as iBatis. However, it’s more likely they’ll create a big pile of crap. :)

  2. Dave Doyle
    01/11/2008

    Oooooh… This is an interesting comment on developer ‘types’ but I’ve always thought that if you don’t hate the code you wrote 6 months ago you’re not going to last long in the industry. I appreciate that not everyone is a superstar (i.e. yours truly) but I don’t see how your first developer type manages to stay employed. I can see them going on just fine for a few years… but surely some growth is required. That’s been the case in the places I’ve worked. Am I missing something?

  3. Tim Kadlec
    01/11/2008

    Quick comments guys!

    @Guy – You absolutely hit it on the head when you said ‘A developer should have the courage to try and build something themselves, but also have the courage to discard their code when a demonstratively better library comes along.’

    It is important that a developer tries something themselves, but also that they are not to proud to recognize when someone else has presented a better solution. If a developer has both those traits, they are on the way to a very successful career.

    @Dave – I think the success rate of the first kind of developer is much lower, but there are still some that seem to hang around. Many aren’t so much unwilling to learn a new effect, but learning a new solution to an effect they have already used is a different matter.

  4. Michael McLawhorn
    01/14/2008

    Sometimes the difference between your categories of ‘do what it takes to get it out’ and ‘try to do it with art, try to improve your art’ has a lot to do with the environment a developer is in. Under pressure and stress, we all cut corners on elegance.

  5. Reid Carlberg
    01/15/2008

    The only thing on all this is that, no matter what pressure you’re under and no matter how quickly you are pushed toward coding, you need to keep traveling through the learning curve. It’s OK to make sacrifices early on as long as a) you learn something that helps you get better and b) you ACTUALLY get better. It’s that b) where people seem to sometimes get stuck.

  6. Cattp
    01/15/2008

    Hey Now Tim,
    Nice Post, I saw it on a screen shot on coding horror so I had to read it.
    Thx 4 the info,
    Catto

  7. Thomas Johnson
    01/15/2008

    Yep that screen shot on coding horror was some pretty good adverstising.

  8. Gaurav
    01/16/2008

    Nice post.. I can completely relate to what you are pointing out

  9. Tim Kadlec
    01/16/2008

    Thanks for the comments guys!

    @Cattp & @Thomas – Guess I’ll have to cut Jeff that check now for advertising! :)