The Four Modes of Development

As a developer who is only recently breaching mediocrity, I still constantly strive to improve myself. One technique that I first read about in Martin Fowler's excellent book on Refactoring is to pay close attention to what development mode you are in and act accordingly. In Refactoring, Martin Fowler speaks about two modes - adding function and refactoring. In my personal experience, I expand this to four modes, with polishing and debugging as the other two modes.

It is important to understand which mode you are in at a given time to avoid being sidetracked and lose focus of your goal. If you are tasked with creating a new set of tools as quickly as possible, you can't let yourself be distracted with refactoring or polishing. If you are trying to polish the user experience through improved display and more intuitive controls, you don't want to get sidetracked with new features.

By keeping your focus straight, you not only get the work done more quickly, you often get it done more efficiently. Afterall, it's very hard to refactor when you keep adding new functions, and it's hard to add new functions when you keep trying to polish the display.

When you are adding function to your software, you are purely focused on creating new features and getting them into a working state. You want to take care of the most severe bugs, and try to get a workable interface, but those are not your focuses. You will write code that smells very bad, but you have to ignore most of that. This isn't a free pass to write horrible code, but if you feel a method you wrote has an inappropriate intimacy issue, you can ignore it for now.

When you are refactoring your software, your focus is on improving the efficiency and readability of the code. You should change nothing that would impact the end user - the functionality and the display should remain identical. All you are doing is rewriting blocks of code to make them smell better and be more easily maintained. You might inadvertantly fix a few bugs while doing this, but that is not your goal.

When you are polishing your software, you are trying to improve the user experience with better styling and more intuitive tools. The overall functionality of the software should remain as unchanged as possible. Your focus while polishing should be stylistic changes and interface changes. As a LAMP developer, my polishing is mostly done through CSS, JavaScript and HTML modifications; very little of my polishing involves changing the PHP itself.

When you are debugging your software, your focus is just making the tools work as intended and checking for edge cases and handling them. Just like when refactoring, you are trying to minimize the impact on the end user. Of course, debugging inherently changes the end user experience, but only in minor ways. You should always be able to say "Yes" when you ask the question "Am I trying to make this work as I originally intended?". If you can't say yes, you aren't debugging.

These four modes are distinct phases of programming that any developer should be familiar with. As I have gained experience (having reached my 10,000 hours as a professional developer earlier this year), I find myself more clearly defining when I am in each phase. And as I have done that, I have come to see my own strengths and weaknesses more clearly.

I am strongest while adding functionality and weakest while polishing, with debugging and refactoring somewhere in between. As I come to understand myself in these regards, I can work on improving that weakness with polishing. Of course, in a larger development team I might never have to polish, but as it stands now I still typically operate as the lone LAMP developer within my company.