All common mainstream programming languages work essentially the same way. You the programmer write instructions that eventually get executed or processed by the computer. The majority of instructions are declarations, computations, tests, and loops.
For now, think of declarations as instructions that define specific individual things. For instance, a piece of software might declare that Tom is a male human being. Once that declaration is done, Tom is known to the software in some meaningful way. And as is the case for all things in this book, each programming languages facilitates declaring things in its own way.
Computations are math or math-like operations and are fairly similar in most computer programming languages. All data in a computer, even letters of the alphabet, or represented by numbers. It therefore follows that all manipulations of the data is done on those numbers. To change a letter of the alphabet from the letter A to the letter B, simple add 1.
Tests are a common thing in all programming languages. Simply put, the software will constantly be comparing things to performing different computations based on the results of those comparisons. A test might be as simple as “if Tom is older than Jane then fire Tom.”
And finally, there are loops. A loop is a set of actions that are done repeatedly until stopped. In almost all cases, there is some bit of information that changes while the rest of the steps are repeated. When a human reads a book, they are doing the same things over and over in a loop: “Read Page” is followed by “Turn Page” and then repeated over and over while “Read Page” actually entails repeating “Read Sentence” and that itself is a loop of multiple “Read Word” actions. Looping is just repeating.
This book will attempt to describe basic computer programming ideas while showing these ideas in various programming languages. And whenever it seems important, a deeper comparison of the various languages will be included. Since this is a computer programming language book, the information here will be presented as in other programming language books with the simplest and most necessary features of the languages described first and more complex or less common features described later.