Chapter 1: Understanding and Breaking Down Problems

Written by Andrei Guevorkian on 2023-09-30. Illustrated by Dengyijia Liu

At its core, programming is the act of instructing computers to perform specific tasks.

Without instructions, a computer is essentially dormant, like a powerful engine without fuel. It's through programming that we harness its immense potential, turning complex algorithms into tangible, useful applications.

Whether it's calculating large sums, displaying graphics, playing music, or connecting with other devices over the internet, all computer operations boil down to specific sets of instructions we've programmed it to understand and execute.

The languages we use to communicate these instructions come in various forms, known as programming languages. Just like how we use different spoken languages (like English, French, or Mandarin) to communicate with one another, we employ different programming languages (like Python, Java, or C++) to converse with computers. Each language has its strengths and is suited for different kinds of tasks.

The purpose of this book is not to learn about any one specific programming language. Instead, we will learn something much more important: how to think like a programmer. Because if you know how to think like a programmer, you are able to effectively communicate with computers, irrespective of the coding language used.

But why is programming so vital, and why has it become a central skill in the modern world?

Programming is everywhere: from our smartphones to the systems powering our cities. We interact with code regularly, whether asking a voice assistant about the weather, ordering food via an app, or playing a video game.

While a programmer's code may be used by billions, it's their unique approach to problem solving that truly sets them apart. And this is thanks to the programmer mindset. Let's break this down:

  • Logical: At the heart of every program is logic. A programmer thinks systematically, understanding the sequence of operations and how different components interact with each other.
  • Creative: While logic forms the foundation, creativity adds the flair. Every problem can have multiple solutions, and it's often the most creative one that stands out, making a program more efficient or user-friendly.
  • Persistent: Anyone who's ever written code knows that it rarely works perfectly the first time. There are bugs, unexpected outcomes, and challenges. Persistence is about continuous troubleshooting and refining the code until it's just right (or just good enough).

Is this mindset essential for our book? Absolutely. While the technicalities of programming are vital, fostering this mindset will empower readers to tackle any coding challenge they encounter and, more broadly, to approach problems in their daily lives with a similar analytical and creative spirit.

As we journey through this book, we'll not only learn the nuts and bolts of coding but also nurture this mindset, making us not just better programmers, but better problem-solvers.