This can be a nightmare if the change is being made after a production crash and the pressure is turned up to move fast.
So what to do? You must implement standards for code design, coding structure, inline documentation and unit testing.
Take the time to investigate automation options available. These types of automated testing and code evaluation products provide management and developers unbiased visibility into their code and can greatly simplify developer testing.
Sure, it may take longer at the beginning as everyone gets used to the new standards and procedures for writing and testing code, so patience is important for the culture to take hold. Yet over time, the productivity of everyone involved in the life cycle will greatly improve.
Try to find automation software that provides simple grades for management to understand, but also enough detailed feedback to make it easy to redesign and create better code and tests. For the grades and feedback to be effective and efficient, its also important to have an easy interface to build evaluation rules that meet your standards.
Cant find automation software that meets your needs? Then do it the old fashioned way. Create sample code snippets and unit test templates for your developers to use. Create training so that new developers can easily follow these standards. And create methods to grade each deliverable.
Most important - enforce it! Use peer reviews and include the results in annual reviews. You may be considered the bad guy (or gal) for a while, but over time the culture will change and the code will get better. Overall productivity will improve.
I think there is nothing like some good banter between developers in peer reviews to not only identify improvements and bugs, but also to promote creativity. As an added bonus, peer reviews are a very natural team building exercise.
Be prepared for the argument that you are in actuality stifling their creativity. I think its the opposite.
Putting in a framework that everyone must adhere to will result in a better balance of productivity AND creativity. This combination is more important than one or the other.
As for Trey, he reluctantly relented and eventually became a believer in the peer reviews. It seems that the more mature programmers see the value in following standards and those less experienced come to appreciate it over time as they themselves inherent crappy code.
Eric Spiegel is CEO and co-founder of XTS, which provides software for planning, managing and auditing Citrix and other virtualization platforms.