|
|
|
|
|
|
|
(text box continued from previous page) |
|
|
|
|
|
|
|
|
each stage, the person in charge must have the knowledge and experience necessary to define the next-lower level of the hierarchy and to estimate the resources necessary to implement it. This sort of organization is called programming in the large. |
|
|
|
| |
|
|
|
|
Programming languages and software tools can help a great deal in supporting programming in the large. For example, if a programming language lets programmers develop, compile, and test parts of a program independently before they are put together, then it enables several people to work on the program simultaneously. Of course, it is hard to appreciate the complexity of programming in the large when you are writing a small program for a class assignment. However, the experience you gain in this course will be valuable as you begin to develop larger programs. |
|
|
|
| |
|
|
|
|
The following is a classic example of what happens when a large program is developed without careful organization and proper language support. In the 1960s, IBM developed a major new operating system called OS/360, which was one of the first true examples of programming in the large. After the operating system was written, more than 1000 significant errors were found. Despite years of trying to fix these errors, IBM never did get the number of errors below 1000, and sometimes the fixes produced far more errors than they eliminated. |
|
|
|
| |
|
|
|
|
What led to this situation? Hindsight analysis showed that the code was badly organized and that different pieces were so interrelated that nobody could keep it all straight. A seemingly simple change in one part of the code caused several other parts of the system to fail. Eventually, at great expense, an entirely new system was created using better organization and tools. |
|
|
|
| |
|
|
|
|
In those early days of computing, everyone expected occasional errors to occur, and it was still possible to get useful work done with a faulty operating system. Today, however, computers are used more and more in critical applications such as medical equipment and aircraft control systems where errors can prove fatal. Many of these applications depend on large-scale programming. If you were stepping onto a modern jetliner right now, you might well pause and wonder, Just what sort of language and tools did they use when they wrote the programs for this thing? Fortunately, most large software development efforts today use a combination of good methodology, appropriate language, and extensive organizational toolsan approach known as software engineering. |
|
|
|
|
|
|
|
|
|
The other major source of input failure, invalid data, happens when numeric and character data are mixed inappropriately in the input. The input stream fails if it is supposed to read a numeric value, but the reading marker is positioned at a character that isn't allowed in the number. |
|
|
|
|
|
|
|
|
There are several possible causes of invalid data. The most common is an error in the preparation or entry of the data. Another cause is using the wrong variable name (which happens to be of the wrong data type) in an input statement. Declaring a variable to be of the wrong data type is a variation on the problem. Last, leaving out a variable (or including an extra one) in an input statement can cause the reading marker to end up positioned on the wrong type of data. |
|
|
|
|
|