1.2. DEVELOPMENT TOOLS 4
• Platform independence. Since the program is not expressed in a “real” programming language for execu-
tion on a “real” computer system, the programmer is not constrained by limitations imposed by the OS or
idiosyncrasies of the programming language.
• Avoids the limitations of testing. Testing cannot prove the absence of errors; it can only demonstrate the
presence of errors. Mathematical proofs, when done correctly, are not misled by testing traps such as:
– Coincidental correctness—as a simple example, consider the expression x + y. If the programmer acci-
dentally uses multiplication instead of addition and values x = 2 and y = 2 are used to check, then the
program appears to evaluate this expression correctly, since both 2 + 2 = 4 and 2 ×2 = 4.
– Poor coverage—in complex programs, certain parts of a program may be executed only under unusual
conditions. Often these unusual conditions elude testing, and lurking errors appear only after the software
is deployed.
Unlike pure mathematicians, most programmers do not often use formal mathematical reasoning techniques as
they write programs. Some argue, with a strong case, that this lack of formality leads to poor-quality software.
However, capable programmers employ techniques that are often far less formal but highly effective in producing
high-quality software. These informal techniques and notions often map directly to their more abstract mathematical
counterparts. Some circumstances, such as the development of critical software systems concerning safety, privacy,
or financial affairs, may warrant a more formal approach.
Programmers have a variety of concrete tools available to enhance the software development process. Some
common tools include:
• Editors. An editor allows the user to enter the program source code and save it to files. Most programming
editors increase programmer productivity by using colors to highlight language features. Some syntax-aware
editors can use colors or other special annotations to alert programmers of syntax errors before the program is
compiled.
• Compilers. A compiler translates the source code to target code. The target code may be machine language
for a particular platform, another source language, or, as in the case of Java, instructions for a virtual machine
(§ 1.3).
• Debuggers. A debugger allows programmers to simultaneously run a program and see which source code
line is currently being executed. The values of variables and other program elements can be watched to see
if their values change as expected. Debuggers are valuable for locating errors (also called bugs) and repairing
programs that contain errors. (See § 8.5 for more information about programming errors.)
• Profilers. A profiler is used to evaluate a program’s performance. It indicates how many times a portion of a
program is executed during a particular run, and how long that portion takes to execute. Profilers also are used
for testing purposes to ensure all the code in a program is actually being used somewhere during testing. (This
is known as coverage. It is common for software to fail after its release because users exercise some part of
the program that was not executed anytime during testing.)
Many developers use integrated development environments (IDEs). An IDE includes editors, debuggers, and
other programming aids in one comprehensive program. Examples of IDEs include Eclipse, Microsoft’s Visual
Studio, NetBeans, and DrJava.
Despite the plethora of tools (and tool vendors’ claims), the programming process for all but trivial programs is
not automatic. Good tools are valuable and certainly increase the productivity of developers, but they cannot write
software. There are no substitutes for sound logical thinking, creativity, common sense, and, of course, programming
experience.
2 March 2007 Draft © 2007 Richard L. Halterman