Bad Code is Bad Even for the Best Developers

Photo taken from http://www.dasuni.com/images/capics/keyboard-closeBW.jpg Several times in the past year I've written about the good and bad stuff at my military service and stated that one of the good stuff is the fact that I could experience some real world experiments about software development failures and bad practices that I never could experience in the outside.

One of these recent experiments, that is actually just a wrap up of what I've seen in the past year, is about the ugly code that developers write.

At military service some guys write code but not for very big projects and complex scenarios. Some of these guys are mainly responsible for this work and are known as software developers (in a very low level).

In the past one year of my regular collaboration with these guys there have been many times that they called me for assistance and help on a part of code that they were working on. Sometimes contractors at service do the same (since they usually know me from the outside and in the same way that many of you know me).

Usually they ask for my help when they face with a problem and expect me to solve that and sometimes they also ask for my suggestions and recommendations to write their code.

I can divide these questions into three groups:

When they ask me to help them, they often expect me to be able to help them %100. This is actually coming from the fact that they consider me as an experienced developer (actually I'm not that high but this is what they think!).

Facing with these requests, I try to help as much as I can but it always doesn't end up with a solution. That was interesting for me to find why because these problems never seemed to be very hard to solve when I've solved much harder problems before.

So I thought more about the possible reasons and ended up with something obvious that we all have read in software development books in theory but may have not experienced in the real world.

These developers (actually we can't call them software developers because there are some requirements that they can't meet) write their code on a random basis with no discipline and without a logical structure. They don't follow a real world methodology or a software development process to let themselves (and others) get in and do something. Moreover, their code is even dirty and has a bad structure that doesn't let you read it easily.

When they ask for my help, based on the depth of problem, I may be able to help them immediately, after a while or never can answer them. Neither I nor they, themselves, are able to manage this bad code since none of us are able to understand it.

We have heard some opinions about software development as a process like building a house or apartment. You never can end up with something good without having a good foundation and methodology, architecture and development processes are the foundation of a software.

You may be able to manage how to hang a window in an apartment because it's a minor thing even without a good foundation but how about an elevator?

As long as you build a bigger building, you need a better foundation and same is true for the software. You may develop a small software from the scratch without a good foundation and just face with minor issues but when you build a bigger software then you will face with more major problems that may be hard to solve or even impossible to solve.

Having this said, the wrong expectation is to expect someone with better experiences in software development to be able to solve these major issues at some stage without putting a lot of effort into the project to redo some parts and change other parts to reach to a point where he can solve the issue.

Even best software developers and architects can't manage a wrong software structure and a bad code. This isn't something that they can do with their good experiences and level of skills. We all learned how to develop standard software based on some practices that we learned during the time. Development languages, like human languages, are a way to communicate with others and every developer with standard skills can work on other's code when the code is written on top of a good foundation.

Of course, better skills can help to solve some minor problems like passing an exception but can't help with bigger problems.

+ Speaking of software development and what I've experienced at military service, I would talk about Code Complete for Nth time! You'll notice how great is this book when you start experiencing many things that this book gives you in a very shorter time. I'm thankful to say that I know many things from books that could take several years to experience. Time costs much and I've been able to save it a lot!

[advertisement] Axosoft OnTime 2008 is four developer tools in one: bug tracking, project wiki, feature management, and help desk. It manages your development process so developers can focus on coding. Installed or Hosted – Free Single-user license -- Free 30-day team trial.

1 Comment : 05.15.08

Feedbacks

Pingback from Dew Drop - May 16, 2008 | Alvin Ashcraft's Morning Dew

Leave a Comment