Книга: Practical Programming, Fourth Edition
Назад: What You’ll See
Дальше: Programs and Programming

Chapter 1
What’s Programming?

Before you learn what programming is, let’s consider two real-world problems that seem very different, but inspire a similar solution.

Rondonia Rondonia

Take a look at the pictures above (Photo credit: NASA/Goddard Space Flight Center Scientific Visualization Studio). The first one shows forest cover in the Amazon basin in 1975. The second one shows the same area twenty-six years later. Anyone can see that much of the rainforest has been destroyed, but how much is “much”?

Now look at this (Photo credit: CDC):

Smear

Are these blood cells healthy? Do any of them show signs of leukemia? It would take an expert doctor a few minutes to tell. Multiply those minutes by the number of people who need to be screened. There aren’t enough human doctors in the world to check everyone.

That is where computers come in. Computer programs can measure the differences between two pictures and count the number of oddly shaped platelets in a blood sample. Geneticists use programs to analyze gene sequences; statisticians, to analyze the spread of diseases; geologists, to predict the effects of earthquakes; economists, to analyze fluctuations in the stock market; and climatologists, to study global warming. Increasingly, scientists are writing programs to assist them in their work. In turn, those programs are making entirely new kinds of science possible.

Of course, computers are suitable for a lot more than just science. We used computers to write this book. Your smartphone is a pretty powerful computer; you’ve probably used one today to scroll through TikTok or Instagram, join a Zoom study group, check your class schedule, order boba or tacos via a delivery app, or track your steps and sleep. Every day, someone discovers a new way to make a computer perform a task that has never been done before. Together, those “somethings” are changing the world.

This book will teach you how to make computers do what you want them to do. You may be planning to be a doctor, a linguist, or a physicist rather than a full-time programmer, but whatever you do, being able to program is as important as being able to write a letter or do basic arithmetic.

This chapter begins by explaining what programs and programming are. It then defines several key terms and provides helpful information for course instructors.

Назад: What You’ll See
Дальше: Programs and Programming