Chapter 7. Design and Programming


There's a famous quote attributed to Kent Beck, a widely respected software engineer who's responsible for many advances in the field: "I'm not a great programmer; I'm just a good programmer with great habits." This chapter is about introducing some of those great habits. A good programmer who adopts these habits will build better software.

Programmers spend their time designing and building software, and all of their project work revolves around the source code. But many programming teams find that they lose control of their own code. Sometimes they lose track of the changes that they make; new additions might occasionally disappear, and old bugs routinely pop up. They might lose control of the design of the code, finding that no matter how much care they put into designing the software well, they still end up with messy code that's difficult to maintain. Some programmers have never known any other way, and don't realize that these problems can be eased. A project manager can improve the code by helping the team adopt good programming practices.

While many development problems originate outside of the programming team, there are some basic changes that the programmers can make that will improve the quality of the code they produce. Most teams, even ones with skilled and talented programmers, are vulnerable to the same design and programming problems. These problems can be addressed with a few basic tools and techniqueswhich can often be put in place entirely within the programming team, without involving anyone else in the organization.

A programming team that adopts the tools and techniques in this chapter will avoid many common project pitfalls. This chapter only covers their most fundamental usethere are many advanced operations that can be done with all of them that are not covered here. With these practices in place, the team will find that they have a much firmer grasp on their own source code. If these tools are not yet in place, working with the programmers to implement them should be high on the project manager's priority list.

Much of this chapter is an introduction to refactoring and unit testing. Many experienced programmers will recognize that refactoring and unit testing are important skills that require practice, reading, and training. We tried to write this book in such a way that someone could read each chapter and immediately use the tools and techniques on a project. Unlike the other practices, however, we don't expect the reader to be able to fully develop unit tests or refactor code after reading this chapter, any more than we would expect to be able to give a thorough presentation of object-oriented programming in one section of a chapter. Instead, our goal is to give the reader an introduction to the theory and practice of both refactoring and unit testing, illustrated with simple examples of each.


Note: We encourage anyone interested in developing unit testing and refactoring skills to read these excellent books:


Applied Software Project Management
Applied Software Project Management
ISBN: 0596009488
EAN: 2147483647
Year: 2003
Pages: 122

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net