Development of any feature can be broken into three basic steps:

  1. Get everything working, all functionality included.
  2. Architect some logical, testable classes / methods.
  3. Finish your elegant solution.

1. Get ‘everything’ working

The first step is to get all of the required functionality in.

Don’t spend too much time writing perfect code. This stage should be fast and just enough to get a basic version of your functionality implemented.

This is not to say your code should be a disgusting mess, but if you find yourself labouring over method names or what belongs where, name it `briefDescriptionChangeMeLater()` and add a #todo alongside.

There is little point spending too much time writing perfect code at this stage, as some key element or feature you come to later on could change your entire approach.

2. Architect

You now have an understanding of your entire feature set, you know everything is working and there should be few surprises. Now is the time to start thinking like an architect.

Break up your code into logical classes and methods. Think carefully about how to name things, even ask your colleagues for their input. Ensure you have enough comments explaining why you’ve made the decisions you have.

3. Finish it

This is the part that you should usually probably skip, but many developers are compelled to include.

The solution is already finished, it’s well architected and feature complete. However, it could be better! It could be optimised, it could be fine tuned, it could be tweaked, etc.

It could be… perfect!

This is the moment you need to take a step back and say “is it good enough” in respect of the project you are delivering.

If your project is an every hundredth-of-a-microsecond-counts product, then yes, step 3 is crucial. If your project is a WordPress blog like this one, then you’re done. Move on.

4+. BDD / TDD

Included for completeness, add some behaviour driven / test driven development into this process from step one and you’re golden! However this is too big a topic beyond the scope of this article.

Photo by Julian Dufort on Unsplash.

Published by Joseph McDermott

A certified Magento solution specialist with twelve years experience leading ecommerce development projects, converting complex problems into elegant technical solutions.

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.