Post

ok so... I'm writing a book. It's called JavaScript In Depth (www.manning.com/books/javasc...) ... the first four chapters are available by Manning. This has been a difficult project and will continue to be so. The reason is that it isn't a How To book that focuses only on how to use the langauge

manning.comJavaScript in Depth - James M. SnellExplore the inner workings of the world’s most popular programming language and enjoy the power and control that comes only from deep knowledge! In JavaScript in Depth, JavaScript and Node legend Jame...

The goal instead is to focus on how the various parts of the JavaScript language itself work, why they are defined the way they are, what those decisions mean for performance and complexity, etc. It's not intended to teach how to use the language but why it does the things it does...

... and honestly, it's probably the most difficult thing I've worked on in a long time. It's fairly easy to say, "Follow steps A, B, and C"... it's a whole lot more difficult to explain why those are the steps and to explain what's happening when those steps are taken! ...

0 reposts1 like

... The difficulty really lies in knowing what exactly to talk about, knowing how to frame it so that it is approachable to new and intermediate developers, and knowing how to discuss it so that the critical points come through without getting lost in the weeds... but why are these details needed?

What I've often found is that most bugs in JavaScript applications do not arise from a lack of understanding of how to *use* an API but rather a lack of understanding of what that API is *doing*... how it works, what side effects there are, why it was designed the way that it was, etc....

... This has certainly been true for Promises. Back when I was doing my Broken Promises workshops before coming to Cloudflare, it was most often the fundamental misunderstanding of how promises worked that led to issues. The promises api itself is not that complex but apps constantly have trouble...

... running into performance cliffs and memory issues in complex promise-based applications mainly because developers focus entirely on the ergonomics of the API and not on how it *actually* works under the covers...