Eloquent JavaScript

·

3 min read

Eloquent JavaScript

Summary of Introduction Chapter

In the Introduction chapter, the author revolved around some basic concepts of programming and computers. He started with an observation of how computers in modern society are like screwdrivers but their complexity far surpasses that of a simple tool. This is where programming steps in as a set of precise instructions telling a computer what to do. Although computers are dumb, programming is fundamentally very frustrating. However, the author also emphasizes that programming empowers individuals to do things in seconds that would otherwise take forever by hand. This can be immensely rewarding.

In the second section of the chapter, the author begins with the analogy that a program is like a building of thought. It is easy and costless to build, weightless and grows effortlessly with each keystroke. However, without care, a program’s size and complexity will grow out of control and it might even confuse the person who created it. As software programs become more complex, some programmers believe that the use of strict rules, also known as best practices, can help manage this complexity. However, the author disagrees completely, stating that this approach is both boring and ineffective because the new problem requires new solutions and these problems cannot be effectively addressed using only existing techniques. He believes that coding is such a new thing to humanity and it is still in the experimental phase as programming is always changing, so it's hard to define anything.

Do you agree that relying only on strict programming rules and best practices is ineffective? (Let me know in the comment section)

What we understood from the first part of the chapter is that computers are dumb machines and with the help of programming languages, we can instruct the computer to do tasks at very high speed. But at the birth of computing, programming was very unreadable and non-human-readable. This is where programming languages step in and add structure to a program. They make the program understandable and actionable to a developer. Now we have good languages that are almost English, such as JavaScript, and that is the good part about programming.

JavaScript was developed by Brendan Eich in 1995 in just 10 days to program web pages in Netscape Navigator. Ironically, we spend more time learning JavaScript than it took to invent the language.

Another fun fact that I learned while reading this book is that the name JavaScript was chosen partly because of the popularity of Java at the time, solely for marketing purposes; it has nothing to do with the programming language Java.

JavaScript is a liberal language compared to others. After its adoption outside of Netscape, the ECMAScript standard became the universal standard for JavaScript. ECMAScript and JavaScript can be used interchangeably—they are two names for the same language.

Then the book provides an overview and uses a monospace font for code snippets.