Relevance for Software Engineering


Software engineers produce code (no matter which development method they choose to work in). This production includes the writing and reading of computer programs. On the surface, it seems that during the writing process one can ignore the others who participate in the development process. However, because software is an evolving creation, and the development of any piece of code is carried out (in most cases) by more than one programmer, it is more reasonable to assume that the code one writes will be read and will have to be comprehensible by others at some stage in the future. Thus, one cannot ignore the perspective of others during the processes of code writing.

This chapter focuses on considerations a software developer should address in order to produce comprehensible code. Because it is not a trivial task to produce qualified and comprehensible code at first writing, some reworking, reshaping, and redesign processes are required. Two techniques that may help in the production of more comprehensible code are described in this chapter as well: code inspections and refactoring.

Code inspection is usually carried out by a software team that reviews the code, suggests improvements, and helps find mistakes; refactoring is done by the individual (or pair of programmers) who develops the code. It guides developers to improve the code structure and shape during and after the code production. Refactoring improves code readability and understandability and, consequently, makes it cheaper to perform future modification on the code.

The relevance of each of these topics to software engineering is clear. Think about a situation in which you develop a piece of code and it seems to work very well according to all the defined tests. Since you are eager to continue working on your development tasks , you may conclude that you may move on to your next task. This would be true if you lived in an ideal world in which any piece of tested code is considered a finished product (that will never be altered) as soon as it passes all tests. However, in our software world, this is not the case, and it seems more logical to assume that this piece of code will be altered (or at least will be viewed ) in the future for different reasons. Thus, as much as you dislike it, before moving on to the next development task, you will have to invest more time, work, and effort to improve the code readability and comprehensibility.

Code inspections and refactoring may help you in overcoming the natural tendency to move on before your code is polished. The message that this chapter conveys is that although program comprehension is about the code, it has also a lot to do with people s thinking, attitudes, experiences, and even emotions.




Human Aspects of Software Engineering
Human Aspects of Software Engineering (Charles River Media Computer Engineering)
ISBN: 1584503130
EAN: 2147483647
Year: 2004
Pages: 242

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