The Limited Times

Now you can see non-English news...

The programming language that changed the web (and your life) turns 25

2020-08-29T00:46:19.205Z


Brendan Eich wrote the first version of JavaScript in just ten days in May 1995. A quarter of a century later, it is still a key part of the Internet.


When JavaScript was born in 1995, internet cafes were still a hit noveltyJonathan Elderfield / Getty Images

One May 25 years ago, Brendan Eich invented a language. He did it against the clock. And after 10 days without much sleep, he submitted his order to Netscape. It was the earliest version of JavaScript. The programming language that changed the web, intended to be interpreted directly in the browser, and written by both software developers and designers. Eich, who is now CEO of the Brave browser, began his college years interested in Physics and Mathematics. "But I was in Silicon Valley, and it was all about computers there," he recalls. In addition, Physics seemed to have stalled after the space program, so he ended up seduced by computing. “I had studied Spanish in high school and German in university; I was interested in languages ​​”.

JavaScript is now the most widely used programming language, and according to Stack Overflow surveys, it has been for the past seven years. “If I had to sum it up in one sentence, I would say that is what makes the web interactive. It is accessible for beginners because you can write two lines of code and see the results before you. In a certain sense, it democratizes, because you don't need to go to university to learn it, ”says Jad Joubran, a web consultant and teacher with extensive experience in teaching this language. In the beginning, it brought us buttons and crazy animated cursors. Over time it opened the doors to video playback, video calling and even the advertising industry. In fact, you are partially responsible that the sites we visit know us so well. “Javascript was not the only one that made monitoring possible on the web. He just added fuel to a fire that was already there, ”Eich admits.

But their domains do not end in the browser window: JavaScript has spilled through our lives, integrating itself into the code that controls robots, refrigerators, televisions and even light bulbs. “It is not an exaggeration to say that JavaScript has changed our lives, there are more than 10 million professionals in the world who consider themselves JavaScript developers. That is a substantial impact on the world. Another layer of this is that the evolution of the web would not have been so clean if we had not had such a flexible language at its center ”, explains Kyle Simpson, author of the famous series You don't know Javascript - You don't know JavaScript -, which was born as three short books and, very tellingly, ended up as a collection of six rather long volumes. For him, the path of openness that this language has followed, whose specifications are now standardized for use in any browser, is a key part of the Internet that we have. "Open technologies that are available to different actors and evolve according to their different needs always better withstand the tests of time," he says.

JavaScript, child of war

The urgency with which Eich worked during the spring of 1995 was no accident: Netscape at the time held a fragile reign over the browser market. One wrong step could give Microsoft the edge it was looking for. And vice versa. However, Marc Andreessen, co-founder of the defunct company, was trying to close a deal with the owner of the Java programming language, Sun Microsystems - now Oracle - and he looked strong to keep the crown. "He didn't hold back from saying things like 'Netscape plus Java kills Microsoft,'" says Eich. And those bravado didn't go unnoticed by the competition. "They told me that someone from the Microsoft board told Marc, in person, 'You have waved the cape in the face of the bull, now you will receive the goring.'

This was the courtyard in which JavaScript was born. Pure din of the first battle of the browser wars. The baby's father was commissioned to develop a version of the then popular Scheme - which was born at MIT in the mid-1970s - for browsers, but by the time he got down to business, things had changed. “The negotiation with Java was ongoing and the plan was to integrate it into Netscape. In fact, when I arrived, some in the company wondered why we needed two languages ​​then ”. The answer takes us back to the tug of war with Bill Gates' nascent empire.

Microsoft was gaining ground in those years through universal user-friendly programs. The new Netscape language was called to be a similar bridge. “Java would be for professionals. And JavaScript would be for those who did not even know that they were programmers ", sums up Eich, who made sure to comply with the demands of a language designed for outsiders. “I realized that if I could create a language that was easy to write and could be written directly on the web, a lot of people would learn to do it. They would copy and paste, learn by imitation, and it would spread successfully. If we didn't do it, Microsoft would. " And it arrived just in time.

The first version was called Moccha, in a coffee nod to Java, but it bore little or no resemblance to his presumed half-brother. Even so, at the second christening it was decided to further narrow the forced kinship with the JavaScript name. “This has always been confusing, but Java and JavaScript are different languages. Both are in the syntactic family of C ++ -classic multiplatform programming language-, but they are not parent and child or anything like that. It was a marketing gimmick to steal some of Sun's traction at the time. " The result was a mess of names that has survived to this day as healthy as JavaScript itself, surviving even the disintegration of Netscape. The latter, by the way, perished overwhelmed by the birth of Windows 95 with Internet Explorer under his arm. And this, in turn, will perish in August 2021, Microsoft announced a few weeks ago. The turns that the Internet gives.

One for all

“In 1997, during a road trip from Paris to Nice, Jeff Weinstein asked me if I was going to continue working on this. I said, 'Either JavaScript dies fast or it's going to be out there for another 20 years, ”recalls Eich, who now celebrates falling short. The Holy Grail that gave this language its apparent immortality came in 1997, when it was integrated into the ECMA standards. This process marked the birth of ECMAScript, a universal specification for the use of this language and the first brick of the open Internet that we have today, where the consumption of content is not, in general terms, limited to one browser or another. Not surprisingly, ECMAScript drank from JavaScript and the substitute for it created by Microsoft, JScript.

This meeting point is also the reason that this programming language can be used in places as foreign to the web as a light bulb. This specification, Simpson explains, could be compared to a guide that explains the general idea of ​​what a vehicle should be. "Where the wheels go, where the engine goes ...". From these instructions you can build cars, trucks, tractors, ride-ons ... but they are all implementations of the standard concept.

The rise of JavaScript to ECMA Olympus did not end with that first version. Since then until today, eleven editions of ECMAScript have been released - the latest last June - and Eich has followed them closely. “I think there is a hidden story here that goes beyond JavaScript. It has to do with the way the web is immortal in the sense that you cannot replace it. The old pages have to keep working ”, he explains. This commitment is in contrast to the common practices of software vendors, whose old programs eventually stop working on new devices. “People complain about all the mistakes I made at the beginning of JavaScript or the ones that have been made in the standards. They say it's ugly, it can't be fixed. But the good side is that it is immortal, ”he reasons.

The DNA of the web

The rush of those ten days, the deal with Sun, the rivalry with Microsot, standardization, the need for stability of the web ... and ultimately, the things of life forced the evolution of this language and introduced rarities and complications that have been vilified by developers around the world, Eich included. “There is a proverb that says that the perfect is the enemy of the good. When you focus on making something perfect before opening it to the world, many times you never get it. An interesting thing about JavaScript was that they decided to release it and evolve it, ”Simpson shares.

The current leader of Brave compares the future of his creature with the peculiarities of DNA. “In the human genome there are sequences that are ancient endogenous retroviruses, that can even be expressed and come to the surface. But they are either shown in some parasitic or symbiotic way or they add some value. Also, we don't fully understand them. This is also true in the case of the web ”, he assures. Thus, the random marks of the JavaScript age give wings to malware as well as to a creative new web application. The birth of Google Maps is one of the second. Eich himself never imagined that something like this was possible: “It was surprising. I didn't know how they had done all the graphical tricks like zooming. And it turns out they were using JavaScript very cleverly to manipulate their images. "

Will it continue to surprise us 25 more years? Joubran, Simpson and Eich do not rule it out. The latter, in fact, is encouraged to repeat his 1997 prediction: either it disappears in 20 years or it becomes even stronger. For one thing, it's so ingrained on the web that it's not easy to imagine how it could end up being completely abandoned or replaced by another language. “A use case would have to appear that now we cannot even imagine and for which JavaScript was not the correct tool. It would take a paradigm shift in the way we interact with the web, "Simpson reasons. On the other hand, programming languages, like purely human languages, stay alive as long as someone else speaks them. Joubran says he is seeing the number of speakers increase: “People are more and more interested in learning JavaScript. I think for several reasons. One is that it works everywhere. And another is that it catches the way. Let's say I want to learn React Native. For that I have to know React, and to understand React, I have to know Javascript ”, explains the expert.

Eich acknowledges that if he could travel in time, he would change a few things: he would ignore Java and ignore outside suggestions. “This is an important lesson: if you are given the opportunity to invent something that is going to be great, do not complicate yourself. Learn to say no, ”he stresses. What if you could create the great new language of the web (or whatever you are about to invent)? “I think it's something for a younger person. There are a lot of people coming into the industry that should have this opportunity, so I would let someone else do it. But I would love to help. "

Source: elparis

All tech articles on 2020-08-29

You may like

Trends 24h

Latest

© Communities 2019 - Privacy

The information on this site is from external sources that are not under our control.
The inclusion of any links does not necessarily imply a recommendation or endorse the views expressed within them.