Why I am thankful for all the maintenance programming I did
As the author notes, almost every developer wants to work on a new project. So much so that, it is invariably brought up in job interviews either by companies to sell their position or by candidates trying to decide whether to take up an offer. I was no different when I graduated from college and was duly disappointed when couple of months into my first job I realized I would be doing maintenance of several legacy systems. Only later did I realize the whole lot of good that it did to me:
- I got to see what really good code, written by experienced developers, looked like. Common idioms and styles which make a code base maintainable for long (there was one product which was over 12 years old and still pretty clean).
- I got to see what really bad code looked like. Code most likely written by rookies or people in hurry to get their little feature done. I probably cannot emphasize enough how illuminating it is to actually look at bad code
- Although it is easy to dismiss something as “bad code”, it is much harder to realize that it is pragmatism which is most important. Ultimately, we are building a product to be used by customers. Having clean code is important only as much as it helps you do other future changes quickly enough. Doing maintenance of other people’s code makes you keenly aware of what real life code looks like. You will never cringe at some small stylistic gotchas in code, but rather focus on the bigger picture of getting it correct and efficient.
- One other important thing that it taught me was importance of writing tests. When you are doing maintenance, you live or die by your test suite. Also, only later I realized that the nifty trick of writing tests first before doing the bug fix or a feature that I was using had a name for it already (TDD).
- Of course, while doing maintenance, you get to see the difference you are making to the life of a customer, almost immediately.
I think doing maintenance programming was a significant factor to help me grow as a developer and shaped my judgment ever since. I strongly recommend every beginner developer to spend at least a year or two doing maintenance. With the spread of open source, it has become all the much easier to look at other people’s code.