Making Good Software

A blog by Alberto G (Alberto Gutierrez)

Written by Alberto Gutierrez

May 10th, 2010 at 3:59 pm

Before coding… Think!

with 7 comments

There is lately a lot of hype around engineering practices as TDD, Refactoring, keeping things simple (KISS)… and while they are great, it is important to remember that they will never replace your intelligence and experience.

thinker

Engineering practices are considered by some developers to be the best tools in your toolbox for coding but the best tools are still the very old same ones used to solve any problem: a board, or a piece of paper, and some other good programmers to discuss the issue with.

Some developers, usually action heroes, tend to overuse engineering practices (mainly refactoring and KISS), falling in the “no need to think” mode. This particular kind of Hope Driven Development (HDD) is a constant source of bugs and productivity killers. It is like if we try to go from A to B only looking at our feet. It can only work when there isn’t any big, or unexpected obstacle in the path.

Engineering practices only help you to drive your code, but they can’t take any decisions for you, so before you start coding Think!

  • Always ask other colleagues to review your ideas and code, and offer yourself to do the same.
  • Use meeting rooms with big boards. It might look ridiculous if your are not used to it, but drawing on a board is a great way to share your ideas.
  • Thinking beforehand doesn’t mean that you have to come up with the complete design of the application. That is impossible, but at least try to identify the big  picture of  what you need to design.
  • Don’t let the enthusiasm for engineering practices make you forget that your intelligence and analysis are your best tools to create good code.
  • Use engineering practices.  They are great and will make you a better developer, but don’t hope that they will come up with the design for you.
  • Don’t ignore parts of your design because they are complex. If you have to ignore them, do it because it is not necessary to deal with them right now. If you are going to code something and you know already that you are going to deal with some complexity try to fit how you are going to deal with it in your code.
  • When coding a part of the application, think on the big picture and how are you going to integrate that part with the rest of components of your application.
  • Remember that apart from your intelligence there are other things that are more important than the engineering practices such as having fun or other non technical skills.