Why Software Engineering Is Difficult 2

Ivan Marsic • Rutgers University 90 now need to be accounted for. Possibly even by the user A key issue is, How to let the user to “rewire” the pathsflows within the program if a need arises?

2.6 Implementation

This section shows how the above system might be implemented. The reader may wish to review the Java programming refresher in Appendix A below before proceeding. One thing that programmers often neglect is that the code must be elegant and readable. This is not for the sake of the computer which will run the code, but for the sake of humans who will read, maintain, and improve on the original code. I believe that writing good comments is at least as difficult as writing good code. It may be even more important, since comments describe the developer’s intention, while the code expresses only what the developer did. The code that lacks aesthetics and features poor writing style in comments is likely to be a poor quality code. 11 Assume we have an embedded processor with a keypad, wired to other hardware components of the system, as shown in Figure 2-16. The embedded processor accepts “commands” from the computer via a RS-232 serial port and simply passes them on the corresponding device. The many intricacies of serial communication are omitted and the interested reader is directed to the bibliography review at the end of this chapter. The embedded processor may in an advanced design become a full-featured computer, communicating with the main computer via a local area network LAN. 11 On a related note, writing user messages is as important. The reader may find that the following funny story is applicable to software products way beyond Microsoft’s: “There was once a young man who wanted to become a great writer and to write stuff that millions of people would read and react to on an emotional level, cry, howl in pain and anger, so now he works for Microsoft, writing error messages.” [ Source: A Prairie Home Companion, February 3, 2007. Online at: http:prairiehome.publicradio.orgprograms20070203scriptsshowjokes.shtml ] Computer RS-232 Interface cable Keypad and Embedded processor Light bulb Switch Alarm bell Photosensor Figure 2-16: Hardware components for the system implementation.