|Coding for Beginners, 2nd Ed (In Easy Steps)
Author: Mike McGrath
This book aims to introduce hands-on modern programming to complete beginners. Can this be achieved in fewer than 180 pages?
Thanks to the ongoing campaign by Code.org, programming, or as coding as it is generally referred to to make it sound practical and trendy, is now firmly on the secondary school agenda. But this still leaves a lot of non-coders in the world, many of whom may be beginning to feel disenfranchised in today's digitally-oriented world. This makes a book that is aimed at complete beginners very welcome. But let's be frank, even if you break it down into "Easy Steps", teaching complete beginners to turn their ideas into working code is difficult.
All the books in the In Easy Steps seines share some distinctive characteristics. They are published in full-color and they conform to a fairly rigid template. The content is split up into sections, changing color to make navigation easier, each of which concentrates on doing something. Each section comprises around seven topics, with one or two pages devoted to each topic and ends with a Summary that gives a bullet point list of everything covered in the section. The topic pages have wide sidebars and here you'll find copious tips distinguished by three icons that correspond to warnings, points to remember and "Hot Tips" intended to "spice up you learning" and here used for both background and essential information.
You can get a good idea of what you will learn from this book by the list of sections:
From this list it is obvious that the book is about "doing", as opposed to just theorizing, about programming and so at the outset it needs to choose a programming language. The choice made is Python, specifically Python 3.10.4 and readers are guided how to download and install it in the second topic of the first section following steps shown in clear screenshots. Readers are also expected to use IDLE to follow along throughout the book and while you might want a more sophisticated IDE when you get beyond beginner status there are at least two advantages of this choice - IDLE is is supplied by the download and it has inbuilt help. More importantly for following the steps in the book it means you can compare your progress to that shown in the screenshots and program snippets are provided on the book's website in a zip file with icons in each topic's sidebar to indicate where you need specific program snippets as you proceed.
Once you've got Python and IDLE and have seen how to use IDLE's help utility, the next topic is "Saving Programs" - but first you create a first program, an archetypal Hello World of course, and having saved it you discover how to run it.
This fast pace continues. The next topic, Storing Values introduces the idea of a variable, likened to a box. To my mind this topic provides an example of how the need to cram everything in leads to overload as it also introduces Boolean values. Next comes a single page on Adding Comments, which having explained the use of # to identify comments in Python goes on to point out how IDLE automatically colorizes your code and how code listed in the book uses the same color scheme. The final topic in Getting Started is on Naming Rules and most of the page is devoted to two tables, one a list of all the keywords you can't use in variable names and the other a very confusing list that has examples of names that are not allowed and ones that are. The tip on this page - choose meaningful names - and the warning - that names are case sensitive - are helpful but I did feel that there should have been another Hot Tip about Python keywords - look them up in the documentation. I had a similar reaction to other long lists in the book.
The section Storing Data starts with input and output in just one page each. Then comes a two-pager on Recognizing Types starting:
There are four essential types of data that you can represent when coding a computer program and that can be stored in variables
It goes on to list str, int, float and bool with brief descriptions and examples. This is all correct, but it might feel like being thrown in at the deep end to the beginner. After another dense topic on converting from one data type to another there's a Guessing Game program. Although this includes features that are only more fully demonstrated later in the book, seeing a program in action is a really good way to motivate making further progress. The next topic is on Correcting Errors - covering syntax, runtime and semantic errors - and even though this means making deliberate errors it is very useful to see how IDLE reacts.
The next three sections are pretty straightforward and, apart from the break-neck speed can be considered as a standard introduction to the programming fundamentals of arithmetic and comparison and logical operators, lists and ways to manipulate them, if statements and loops, and exception-handling - well that does seem a bit of a stretch.
While Section 6, on creating your own functions feels a bit like having the training wheels withdrawn, it does seem a logical progression. But next there's a discontinuity with one devoted to Sorting Algorithms. While this is something you might expect to cover in a classic Computer Science course here it seems out of place. Using a sort to explain the idea of an "algorithm" seems a good idea - but there are simpler algorithms, ones that don't even merit being called algorithms that would be more useful in this section. Initially I had similar reservations about the section on Importing Libraries but in fact it covers some of the basics such as Telling Time and Running Timers.
No such reservations with the section on Managing Text, apart from whether it could have been introduced sooner but then we come to object-oriented programming - in just a dozen pages. This would serve as an excellent a refresher for someone returning to programming after a long enough gap to have forgotten what all the jargon means and in fact the summary of the section is as good a one-page outline as you could wish for, but I still question what a complete beginner would make of it
Next we are back to two highly practical sections, Building Interfaces, which is done using tkinter and Developing Apps, which outlines the processes of creating a "Lucky Number" generator. For the beginner these sections are satisfying because it feels like "real coding".
The final section is on Transferring Skills and, using the Guessing Game from early in the book, you recreate the program in C, C++, C# and Java. The section starts by making the distinction between a compiler and an interpreter. It's a bit like having taken driving lessons and gained a little confidence you are suddenly told to go and see what happens when you look under the car's hood. It will undoubtedly suit some readers but for other it will be just another level of complexity.
I have awarded a rating of 4 to this book because I think many people will find it helpful - perhaps in combination with another resource such You Tube videos which are a very popular way of taking your first steps in programming. Don't just read it - follow the instructions with the code provided - and when you find it's going too fast consult the documentation or another book.
For more Book Watch just click.
Book Watch is I Programmer's listing of new books and is compiled using publishers' publicity material. It is not to be read as a review where we provide an independent assessment. Some, but by no means all, of the books in Book Watch are eventually reviewed.
To have new titles included in Book Watch contact BookWatch@i-programmer.info
|Last Updated ( Saturday, 13 August 2022 )