Quality Driven Development

I was reading an article about Reasons to write bad code !!, the author was sharing his experience about having problems with some bad code, written by his senior colleague. He further elaborated that his fellow wrote bad code to avenge his company for stress and frustration. But I don’t agree with it completely because developer alone can’t be blamed for his bad code and there might be very few exceptions that will avenge the company. My argument is; what the project manager, team lead or test team was doing when the developer was writing that creepy code. These problems could have been mitigated early in the project cycle if you had conducted peer reviews, implemented proper coding standards and verified them during testing etc.

You can’t develop quality product in tight schedules and stressful environment. Many companies often ignore long term consequences over short term gains. Quality is a company driven activity, unless company is not focused on developing quality product, people will continuously face such problems.

So what are good practices of developing quality in the code, here are some practices that will help you develop good code and quality product.

  • Quality is a company driven activity. (Very important)
  • You should allocate justifiable time for each activity in the project life cycle.
  • Encourage peer reviews among the developers and team lead should be responsible to look after this activity.
  • You should have a quality assurance team capable of doing white box testing, performance and load test etc.
  • Follow good coding standards and verify those standards during testing and peer reviews. Automated testing tools for verifying coding standards save lot of time.
  • Encourage your employees to learn new technologies, we all know older technologies have deficiencies and limitations.
  • Company should try to integrate new versions of the technologies, its not always required but it helps.
  • Unit testing must be compulsory for developers.
  • When you have time review your own code, you will find few issues yourself. I personally experienced that when developers do load testing they improve their code a lot.
  • Train your employees, specially inexperienced ones, on how to write good code and about good practices. To argue about code is bad, you must know what is good.

There might be more practices that will help you improve your code and skills. Please use comments to extend the list or argue about the practices :) .