Your productivity pretty well defines your paycheck, and how much you can achieve during your professional career.
For a developer, productivity basically comes down to implementing functionality (that actually works as expected).
While just sitting down and starting to code in an ad-hoc manner lets you implement functionality, successful developers know that on the long run, the resulting technical dept kills your ability to add functionality to your project.
In this article, I show you what is in my opinion the one habit that distinguishes developers that constantly outperform their peers when it comes to coding productivity.
Try it for the next week to see how you can 10x your coding productivity!
When creating new functionality, stick to the following process:
Let’s look at these steps in more detail.
- Think of what you want to do. Before writing any code, try to envision what you want to do, as detailed as possible. What is the functionality that you want to implement? What are specific examples that should be covered? If something is unclear at this stage, make sure to clearify it! Talk to someone else who has the knowledge and decision authority to help you (e.g. your dev lead, or your project manager).
- Specify what you want to do. By writing down your thoughts from the previous step in a structured way, you can dry-proof your concepts. In other words, you see whether what you envision could actually work, or if some refinement is still needed before implementation. How can such a specification look like? You can e.g. define models that describe your envisioned system (e.g. in UML – read more about UML here) or already define and even implement Test Cases that cover the desired functionality (read more about Test Driven Development here). In many cases, it might already be sufficient to just write and draw down what’s going on in your mind. Either way, if you find out that some of your thoughts do not play out when being specified properly, don’t ignore that! Try to think of a solution. Only start with the final step if you know that everything in your thought actually plays out on paper as well!
- Only in a last step, actually implement your thought, based on your particular specification. When you’ve completed the previous step properly, this is simply a translation of your specification to the programming language of your choice.
Why does this 10x my productivity?
Of course, there is an overhead compared to just sitting down and starting to code.
So why does this increase your productivity 10x (in the sense of implemented functionality per week)?
- Avoid throwing away code: Most problems in software engeineering stem from misunderstood requirements. The issue here is that people start writing code before they actually have a clear picture in mind about what they want to implement. On the other side, one of the biggest pains of developers is when they have implemented something, but then have to decide throwing their implementation away, because it was based on wrong assumptions about what was actually needed. By trying to put all the pieces together beforehand, you see whether requirements are specified to a sufficient degree, and you understand what is required, before actually implementing something. In the end, this helps you avoid the pain of throwing away code that you implemented, but that did not represent what your client actually wanted.
- Clear code structure: By thinking about what you want to code, you already get an idea how to structure your code. This makes it easier to stick to patterns and clean code conventions from the beginning, especially if you don’t have decades of experience in development, yet. In the end, this will save you a lot of time-consuming restructuring and refactoring of your code.
Try this for a week, and let me know about your results (e.g. in the comments section below)!