Author: Marijn Haverbeke
Is this the "modern introduction to programming" that its subtitle claims it to be?
The new edition is divided into three parts with the final part being mostly new.
Part 1 is called Language and it is an introduction to the core language without much attention to its environment - e.g. the browser.
Chapter 1 proper begins with a look again at the very basic things that a complete beginner would need to know. What's a value, what's a variable and flow of control. The chapter starts very slowly but the level starts to ramp up. By the end of the chapter we are dealing with automatic type conversion, Boolean operators and lazy evaluation.
The treatment of program structure has been split out into a new chapter which is sensible but it is still a very fast introduction to some very brain changing ideas. The big problem is that if you program you think this stuff is easy because it is second nature to you - but not to your readers. The ideas are introduced in a logical order but with little help for the complete beginner. It almost reads like a manual listing each syntactic form. There is very little guidance about how to think about what is being taught. For example, the break and continue statements are introduced but there is nothing about why or when you should use them.
See mystring has changed - its mutable! No it isn't but exactly how mystring was changed in this interaction isn't explained and its subtle.
Chapter 5 delves into function more deeply into function but as higher order functions rather than functions as objects. The next chapter introduces objects in more detail. It does take a prototype approach at first but it just isn't deep enough. For example there is a brief mention of instanceOf but no discussion of how this gets set or how relying on it can go horribly wrong.
Chatper 7 is a nice project - a simulation. One of the good features of the book are the very readable projects that are included in many of the chapters.
From here we move on to error handling, regular expression and modules. In each case there is a competent account of the basic ideas. The section finishes with a another project - implementing a programming language.
Part III is called "Beyond". What could be beyond?
Chapter 20 is a short introduction to Node.js. Chapter 21 is a project a skill sharing website and the final chapter is on performance.
I enjoyed reading this book. The author has a light style and there nice quotes at the start of each chapter and a few cartoons. The big problem is that this is not a beginner's book because it has too many advanced ideas jammed up against simple things. It isn't an advanced programmer's book either for the same reason.
This is a nicely written, nicely produced book, but it doesn't really do its subject justice.
|Last Updated ( Saturday, 12 September 2015 )|