Browsed by
Category: Software

Coding is a marathon of sprints

Coding is a marathon of sprints

Coding a new feature is like running a marathon by doing a lot of short sprints.

The mistake we as developers often make is trying to achieve too much in one go. We try to complete all the work in the spec in one go, i.e. we disappear into a dark hole and only resurface once we are done. There is several reasons why this is a bad idea.

  • Only revealing what you have worked on when it is done means you cannot incorporate any feedback into your work while you code, which in turn means you will be re-doing a lot of it.
  • The longer you wait to release code the higher the chance that something external has changed that will result in you having to change some of what you have done.
  • Working in isolation means no collaboration, which in turn reduces innovation.

The best way to go is to release lots of small incremental changes (the sprint) instead of going all the way (the marathon) before releasing the code. This way you get feedback quickly, and should you be going off track you can get on the right patch quickly.

Divide your task into small chunks, and do these one at a time. Not only will you be able to better measure progress, but you will be able to collaborate much better, and the instant feedback will result in a much better result. This approach will also make it much easier for the person having to review, merge and release your code into the bigger product set.

There is no such thing as a quickly adding a new software feature

There is no such thing as a quickly adding a new software feature

How often have you though that you could quickly add a new feature to your system? If you ask me, the answer is many times.

How often did it turn out to be quick? For me, none so far.

Adding a new feature quickly implies the following assumptions:

  • You know exactly what you want the actual requirement is
  • You know exactly what needs to be done
  • You know exactly how this will impact the rest of the system

Most of the time at least one of these assumptions are wrong, more than often two or even three. This means a job that you thought would take a day turns into a week or even two.

Another seriously delaying factor is the dreaded scope creep. Often business wants more once they see what you have done. This can be managed, but what is far harder to control is the internal force that drives the top developers. We always want to over deliver, which means we keep adding more and more as we code, causing our own scope creep.

My rules to manage this is simple:

  • Rule 1. Write down exactly what you want to accomplish
  • Rule 2. Write down exactly how you are going to accomplish it
  • Rule 3. Stick to the two rules above, no matter what

If you decide halfway along that it would be a good idea to add X, Y or Z features, don’t. Resist all temptation. Refer to the rules above if confused. Only once your new feature is done can you consider doing more, but now you can step back and consider the bigger picture before you dive back into the code.

Own the bug

Own the bug

Bugs slipping into code is inevitable, no matter how carefully we code and test. I have created many bugs in my day, and still make the odd mistake to this day. It is how you respond to your bugs that matter.

If you know there is a bug in your code, own up & fix it. If there is a chance that it has gotten out to live sites then patch & release a fix. If something on the customer side got affected by the bug then make the customer aware and sort it out. Not disclosing creates an atmosphere of mistrust, as the customer is bound to find out eventually.

If you work as part of a team, there is no debate here. Make sure your team knows what is going on. They cannot have your back if they are in the dark.

Read More Read More