

It could also be a symbolic computation, like searching and replacing text in a document or (strangely enough) compiling a program. The computation might be something mathematical, like solving a system of equations or finding the roots of a polynomial.

1.2 What Is Programming?Ī program is a sequence of instructions that specifies how to perform a computation on computer hardware.

Nowadays it’s fairly standard, even for a smartphone, to have at least eight processors and four gigabytes (four billion cells) of memory.

Users generally see and interact with touchscreens, keyboards, and monitors, but it’s the processors and memory that perform the actual computation. The two most important hardware components are processors (or CPUs) that perform simple calculations and memory (or RAM) that temporarily stores information.įigure 1.1 shows what these components look like. Mainframes, desktop and laptop computers, tablets, and smartphones are some of the different types of computers.”Įach type of computer has its own unique design, but internally they all share the same type of hardware. However, in a more general sense, a computer can be any type of device that stores and processes data.ĭ defines a computer as “a programmable electronic device designed to accept data, perform prescribed mathematical and logical operations at high speed, and display the results of these operations. Not surprisingly, searching for “computer” on Google Images ( ) displays rows and rows of these types of machines. When people hear the word computer, they often think of a desktop or a laptop. On one level, you will be learning to write Java programs, a useful skill by itself.īut on another level, you will use programming as a means to an end.Īs we go along, that end will become clearer. It involves the ability to formulate problems, think creatively about solutions, and express solutions clearly and accurately.Īs it turns out, the process of learning to program computers is an excellent opportunity to develop problem-solving skills. Like engineers, they design things, assembling components into systems and evaluating trade-offs among alternatives.Īnd like scientists, they observe the behavior of complex systems, form hypotheses, and test predictions.Īn important skill for a computer scientist is problem solving. Like mathematicians, computer scientists use formal languages to denote ideas-specifically, computations. This way of thinking combines some of the best features of mathematics, engineering, and natural science. The goal of this book is to teach you to think like a computer scientist.
