Guidelines

One of my favorite lines from a movie is from The Pirates of the Caribbean

the code is more what you’d call “guidelines” than actual rules

As I progress in my career I find myself in positions where I am leading, coaching and mentoring colleagues. A direction needs to be set. Whatever coding language is being used has it own syntax, libraries and best practices. Underneath there is the logic of if then else, switch statements, exception handling etc.

However there is a set of rules, well guidelines, that is a layer above the language that applies.  So as I’m designing, thinking and coding and talking about coding, not always done in that order, I recall the words that I saw written on a white board once

1. Make it Run

2. Make it Right

3. Make it Fast

Something clicked.  These three lines resonated with me. Since then I have promoted these ideas.

Rule 1 – Make it run:

When we talk to our business partners there is a vague idea about what they really want our software to do. This is the time to take the bull by the horns and write some code. Get something in front of the project sponsors. Show them something. It doesn’t have to be perfect. Ask questions. Is this what they wanted? Would it another approach be better?

  Rule 2 – Make it Right

So now you project sponsors have seen something. Adjustments have been made. Take the code and create what they actually want.

Rule 3 – Make it Fast

Your code now does exactly what your project sponsors want. Now is the time to make it fast. It is time to refactor. Eliminate the bottle necks. For example who wants to wait 5 seconds for a web page to load.

Now I thought that was it. However over time I’ve added 2 more rules.

Rule 4 –  Make IT simple

This was added to my list when I was discussing a design and system requirements with a business analysis . The business had all of these grand ideas, screens packed with data and functionality that may or may not actually be useful.. Sure with the right resources, time, money and manpower anything is possible. I pushed back, asking what the minimum product would actually work, keeping it simple. Also in the back of my mind, in the not too distant future, someone, and that could probably be you, will have to maintain the code. Fixing a bug, or adding functionality. There is a cost to this. Keeping the design simple helps those following you to understand what the thinking behind the design is. It allows them to easily make changes and not guess.

Rule 5 – Convention rather than configuration

Now I thought I was done but recently I have been writing some JavaScript code and unfortunately the files are getting large. This is when rule 5 was added.

I was writing similar functionality for different web pages.  Rather than write code specifically for the each page I decided to use the Ruby on Rails manta of convention rather than configuration. No more deciding whether to do this or that. Each business function treated in the same way. Easy to code and easy to debug.

So there you have it my 5 rules, sorry guidelines, for development.

1.Make it Run

2. Make it Right

3. Make it Fast

4. Make it Simple

5. Convention rather than configuration

As an after thought, add one more

Make IT fun.

Leave a Reply