Maintainable Code: Where did we go wrong?

Every Product, when started has this as a main objective. The code has to be maintainable. But, few years down the line if you look at the code base, you will be really wondering where did we go wrong?

Over the last 6 years, following is what i have seen as a pattern.

  • Most of the applications had a great solution structure. A Well thought out BO, DAO, DTO/VO, Services and UI Projects.
  • Reasonable implementation guidance (unit tests, documentation etc.. etc..) on how the code works, how to create something new.

Image: dan / FreeDigitalPhotos.net

Great, But what about User Interface?
I guess, this is the place where most of the projects go wrong. Most of the good technical people with whom i worked with never consider UI as an important piece. So, typically you dont get to see implementation samples, documentation etc.. Obvious, Not much unit tests either. The effort which was put in creating a good solution goes for a toss as you start adding more developers in the team. People start hacking, logic leaks, not enough understanding of why things are done in a specific way, all this adds up to a big list of technical debts.

And finally comes MVC and Client side programming (JavaScript). Everybody talks about MVC, but not sure if most of the modern day developers understand why there is this M, V and C. Then comes this <%=%>. This is not only in the Microsoft community. I have seen best of the iOS developers struggling with this.

What should we start do differently?
1. Emphasize the importance of clean code in UI from day one.
2. Unit Tests, Unit Tests, Unit Tests…. Without this your code will be very hard to maintain after certain period.
3. Always start any project with sample implementations. Use that as a Reference Project and keep updating your reference project. New developers has to go through the Reference project, understand and follow.
4. Review your code base regularly (not just stop at services layer). Though this is a significant effort and need a very passionate person, doing this will definitely help in long term.
5. Coach your team members on the project architecture and design on a regular basis. Remind them about the technology vision during your  iteration planning every time (if at all if you have one :)).

Off late, Quick turn around/going to market quickly has become the selling point for most of the companies. Unless all the 7-ities are taken care in your project, it will be a nightmare to maintain the product for the next 10 years.

Happy Learning!!!

Advertisements

3 thoughts on “Maintainable Code: Where did we go wrong?

  1. if you are working on service mode ( even for product), it is not a your headache to worry of product maintenance. if you are start-up, you see that lot of other start-ups are gobbed by bigger ones in short time and founders think they are going to exit, why to worry about maintainability. if you are beyond this or you and me, we will worry on product maintenance.

    On UI, it has been nightmare to make developers write code for reuse, but it needs a lot of supervision and guidance in addition to passion.

  2. Very true,from the very beginning if we give equal weight-age to UI as we think to give for Code architecture I’ll must say 25% of issues will not come and also the product will be healthy for years without() …;)

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s