Home > Articles > Programming > C/C++

  • Print
  • + Share This
This chapter is from the book

Definitions

An algorithm is a set of precisely defined steps to calculate an answer to a problem or set of problems, and which is guaranteed to arrive at such an answer eventually. As this implies, a set of steps that might never end is not, strictly speaking, an algorithm.3

Programming is the art and science of solving problems by the following procedure:4

  1. Find or invent a general solution to a class of problems.

  2. Express this solution as an algorithm or set of algorithms.

  3. Translate the algorithm(s) into terms so simple that a stupid machine like a computer can follow them to calculate the specific answer for any specific problem in the class.

At this point, let's see what Susan had to say about the above definition and my response to her.

Susan: Very descriptive. How about this definition: Programming is the process of being creative using the tools of science such as incremental problem solving to make a stupid computer do what you want it to. That I understand!

Your definition is just fine. A definition has to be concise and descriptive, and that you have done — and covered all the bases. But you know what is lacking? An example of what it looks like. Maybe just a little statement that really looks bizarre to me, and then say that by the end of the chapter you, the reader, will actually know what this stuff really means! Sort of like a coming attraction type of thing.

 

Steve: I understand the idea of trying to draw the reader into the "game". However, I think that presenting a bunch of apparent

 

Steve: gibberish with no warning could frighten readers as easily as it might intrigue them. I think it's better to delay showing examples until they have some background.

Now let's return to our list of definitions:

Hardware refers to the physical components of a computer, the ones you can touch. Examples include the keyboard, the monitor, the printer.

Software refers to the nonphysical components of a computer, the ones you cannot touch. If you can install it on your hard disk, it's software. Examples include a spreadsheet, a word processor, a database program.

Source code is a program in a form suitable for reading and writing by a human being.

An executable program (or an executable, for short) is a program in a form suitable for running on a computer.

Object code is a portion of a program in a form suitable for incorporation into an executable program.

Compilation is the process of translating source code into object code. Almost all of the software on your computer was created by this process.

A compiler is a program that performs compilation as defined above.

  • + Share This
  • 🔖 Save To Your Account