This is the personal website of John Watson: father, software developer, artist, guitar player. Follow me on Mastodon or Twitter or Twitch or itch.io or GitHub.

Dear Rookie Web Developer

Dear Rookie Web Developer,

I had the task recently of taking over a project from a group of developers (who shall remain nameless) who were unable to finish it. When I saw what they had written, I could see why. The project had clearly been assigned to inexperienced, junior-level developers who did not have the guidance of an experienced mentor. For the benefit of other rookies, I offer this advice, based on problems I found in that project:

  • Your professional reputation among your peers will be based on the quality of the code you write.
  • Don't litter code with comments telling me what you changed. That's what diff is for.
  • Don't comment out sections of code and tell me you deleted them. If you want to delete something, please delete it.
  • Poor spelling and grammar are signs of a programmer who doesn't care about details. Care.
  • Never make a change to something just because it looks wrong---especially to mature code that has been in production for years. It looks wrong for a very good reason and you will break something if you change it.
  • I really don't care how you indent or use braces but please be consistent.
  • Don't leave comments explaining the obvious. I can read code.
  • Please learn how to use an image editor. You don't need to take a Photoshop class. Just learn how to slice, choose the right image format and compression, and how to get anti-aliasing right for graphics that will appear on a given background.
  • If you are duplicating a snippet of code throughout your project, you are doing it wrong.
  • Doing something the "easy" way today will cost you 10x what it would have cost to do it right in the first place. And I'm being optimistic. Be lazy for the long-term.
  • Learn CSS and the correct way to name your classes and IDs. And I don't mean learn just enough to get by. It's as important as any other code in your project whether it's Ruby or PHP or C.
  • Learn SQL. Inefficient SQL queries will kill your project.
  • More hardware may not be the best solution. Your app is slow because of inefficient code.
  • Cross-browser compatibility is no longer a holy grail. It is a minimum requirement and it is not difficult.
Sincerely,

John

Comments

  1. DaveTheWave on 2007-05-18 11:03:11 wrote: I feel your pain, been there and done that. I’ve been saddled with a developer that is supposed to be my tech lead on our next project. I’m worried… In the mean time, he is working on bug fixes for our mature, poorly designed and implemented client/server app. I will have to have a heart to heart with him on Monday for many of the issues you bring up above.

  2. Sean on 2007-05-18 12:01:44 wrote: Nice, and right on the money.

  3. Zonka on 2007-05-18 14:49:14 wrote: Amen.

  4. Norby on 2007-05-18 23:54:24 wrote: I was just explaining to somebody today that while I learned “how” to program, I do not possess the discipline to do actual “real” development (web or otherwise), which is why I only write for myself. It is, put simply, “not my job”. I hope you never have to look at anything I’ve written. I find it painful enough to do myself :) -//

  5. heSaid on 2007-05-21 17:37:23 wrote: I have not yet found a simple way to explain these things to people… I think I will be linking to your blog just to send people to when I am trying to answer the questions that contains… “The code works here, but not here…”

  6. JayMonster on 2007-05-22 18:24:48 wrote: I disagree with your complaint about comments. When I write code, I comment the same way I did when I would write an article for a Journal. Some things may seem obvious to you (and sometimes admittedly it is), but when somebody has to pick it up later, it is better to have a comment there that I don’t really need, than to not have one that I do. But on the other side, how about adding naming variables something useful. I may just hit somebody the next time I run across a “Dim X” or “i int;”

  7. John on 2007-05-22 22:01:19 wrote:

    I guess it depends on what one considers obvious. Here’s a gem I came across recently:


    /
    Updated by [name removed to protect the guilty] May 14 2007 /
    $sql .= " LIMIT 3"; // changed limit to 3

    I mean, come on. :-)

  8. JayMonster on 2007-05-24 13:55:14 wrote: OK, you got me.

  9. Ben on 2007-10-10 22:03:43 wrote: Thank you very much. I have just starting out with some web design and developing and I have been asking for advice from every one I can find and all of them just say, “awh, just do it”. Thanks for spelling out some great advice.