I know which function to call when, but I don't know why. I can create a for loop that traverses an Array of objects and picks one out and copies a property, but I don't know how it works. And the more I program, the more I realize how little I really know. And to me that's one of the more frustrating things about being a developer. You sometimes spend so much time memorizing syntax that you forget how important learning is.
The book takes an interesting approach by introducing debugging and testing topics immediately from the start, which most textbooks that I've read usually reserve for the last few chapters. I actually like this approach. Normally with debugging saved for last, I end up ignoring those chapters. I get to the heart of the code, the syntax, and I probably finish the text at the 70% mark. By introducing testing and debugging first, the book sets up a nice framework for testing that will run through the rest of the chapters. Here you'll learn good ways to output content and how to work with test groups, which definitely do make an appearance once you get to chapter 3. The book also covers several testing frameworks and their best use case scenarios and offers several small snippets on how to debug asynchronous applications.
Personally for me this chapter was more informative than anything else as I currently have my own testing framework set up that seems to do the job alright. But it's definitely useful to see someone's approach to the whole thing and perhaps take a few elements for my own work while I'm at it.
A Deeper Look At Functions
Function context isn't something that I normally thought about, until now. I used functions mainly in the one way that I knew how to use functions, and that would be as such:
There are several areas that deal with recursive function calls, which I personally avoid at any and all cost. But that's a personal choice. While it can simplify the amount of code that you write, it's also a big harder to read I think and makes debugging slightly more difficult as well. But the examples in the book do a fine job of showing recursion in action.
This book covers the importance of Closures and does so, once again, with full examples and comparisons. The examples build upon each other in a way that makes them easier to grasp. After months of just pasting in code from the interwebs, I can finally start to come up with that same code, and to me that's the end of goal of learning anything.
This Book Is Difficult
Who Should Buy This Book