DEV Community

Remo H. Jansen
Remo H. Jansen

Posted on • Edited on

The most important lesson that the success of JavaScript has taught us

The incredible rise in popularity that JavaScript has experienced over the last decade has been spectacular. According to the yearly developer survey by StackOverflow [1], JavaScript is today the most popular programming language in the world:

JavaScript also leads the ranks in other studies and surveys like the quarterly Programming Language Rankings by Redmonk [2] or the 2018 Developer Skills Report by HackerRank [3]:

The success of JavaScript has been so spectacular that we even have a "law" about it [4]:

Any application that can be written in JavaScript, will eventually be written in JavaScript.

However, the success of JavaScript has not been free of detractors. JavaScript has been the source of inspiration for some well-known jokes:

JavaScript has been the focus of a lot of negative criticism, It has even been described by some as "a phenomenon of mass psychosis" [5]:

JavaScript programmers have been mind-fucked into thinking that JavaScript is a good programming language. The president speaks of "mass psychosis" and "crowd thinking" but I’ve used the analogy of Stockholm syndrome and cult psychology. Think Patty Hearst and Scientology.

However, all these negative comments don't seem to have been able to stop it from becoming extraordinarily successful. So, I've been asking myself one question for some time: Why? Why is JavaScript so successful?

Accessibility matters

If we could explain the success of JavaScript with just one word what would it be? The answer is Accessibility.

I think about "accessibility" as the design of products, devices, services, or environments for people who experience disabilities. However, according to the Oxford Dictionaries, the terms accessibility has a broader meaning [6]:

accessibility

/əksɛsɪˈbɪlɪti/

noun

  • the quality of being able to be reached or entered.
  • the quality of being easy to obtain or use.
  • the quality of being easily understood or appreciated.

Please don't get me wrong, I'm not trying to rest importance to the design of products for people who experience disabilities. It is extremely important to be empathic and ensure that when we create something, it can also be enjoyed by people who experience disabilities.

I was recently reading the book Homo Deus: A Brief History of Tomorrow by Yuval Noah Harari and he argues that what enabled humans to conquer the world wasn't a unique possession of consciousness because animals have that too in varying degrees. What was unique was our ability to cooperate in very large numbers.

Side Note: If you find this idea interesting, you will probably enjoy reading Homo Deus or watching the TED talk "Why humans run the world" [7].

When large numbers of humans collaborate we are able to achieve great things. The larger the group, the greater the achievements. If we want to be able to guess how much something is going to evolve and progress, all we need to do is to measure how big is the community around that something. Accessibility is what has made possible the growth of the JavaScript community and the community is what has made possible its progress and evolution.

The most important lesson that the success of JavaScript has taught us is that when building a product, application, service, framework, library or whatever; we will achieve better results if we focus our efforts trying to build something accessible for everyone. It doesn't matter if at the beginning we are creating something that lacks features or if it is not as fast as we would like it to be, or if it cannot scale as much as we would like. If our product is accessible, the community around it will grow and the community will then foster the creativity and innovation required to sustain long-term success.

It is also important to reflect on the fact that this is a lesson that can be applied to many different kinds of organizations. Open source projects, startups, research collectives, and governments are just some of them.

Focusing on accessibility

At this point, our main question should be: How can we focus on accessibility?

My first suggestion is to practice wishful programming. Wishful programming [8] is a very powerful programming practice that can help us to create accessible APIs. However, many programmers are unaware of it:

Write some code that uses a component before we implement the component. This helps to discover what functions and data we need, and following this discovery will lead us to more simple and useful APIs.

When we practice wishful programming, we focus our efforts on the creation of simple and useful APIs. We can achieve this by asking ourselves what is the easier and minimal way to allow someone to try, install, use, understand, extend something before we implement it.

My second suggestion is to try to ensure that our community is also accessible, as opposed to just our product. We can achieve this by promoting diversity and inclusiveness.

Did you enjoy this article? Do you have any other ideas that can help us to focus on accessibility? Please let me know.

Thanks for reading!

Top comments (15)

Collapse
 
6ones profile image
Promise Ogbonna

Is wishful programming the same as test driven development ?

Collapse
 
remojansen profile image
Remo H. Jansen

For me they are different, is more like sketching for UX design. Sometimes I find myself with a piece of paper, not an IDE or a text editor, writing down how I would like an API to be like so it is as dev-friendly as possible, once I reach something I feel happy about I proceed to implement it. During the implementation phase, sometimes I use TDD but not always.

Collapse
 
alvarocavalcanti profile image
Alvaro Cavalcanti

I do agree that they are different, but related, matters. And the description you provided illustrates it very well.

I would only add that I am pretty much a TDD practitioner, and not doing it is my utter-most exception. Thus I would say: always use both of them. Be wishful. Do TDD.

Unfortunately I'm not a JavaScript developer myself to quote/point to JS TDD practices (by that I mean that JS is not a language I'm proficient at, even though I'm not a stranger to Node and Angular) but I'm sure it's not hard to find the references if you ask around. :)

Collapse
 
redaalaoui profile image
Réda Housni Alaoui • Edited

IMO, it is more basic.
Javascript boosted in popularity thanks to the web. If you want to build webapps, you have simply no other choice.
I think this langage is a pill of crap mostly because it lacks typing. Therefore all my projects are written in TypeScript.

Collapse
 
yousafsyed profile image
Yousaf Syed • Edited

Incorrect, javascript boasted after nodejs.
Javascript is destroying bigtime on backend and people who do use nodejs are one the most sophisticated programmers out there.

NodeJS is one the most popular choice when it comes to microservices, realtime-time services, services with high I/O , streaming, proxying and specially when you are working with NoSQL/Object store there is no better choice than nodejs

Collapse
 
xicarus profile image
Sergiu-Lucian Petrica • Edited

What is Javascript destroying in the backend? All I see in 2018 is people realizing that they don't care about Node's asynchronous nature in most web projects, thus minimizing Node's expansion: w3techs.com/technologies/details/w...

And in the cases where you care about non-blocking IO, the PHP community has a solution available: reactphp.org/

Meanwhile PHP is easier to set up, easier to learn and has a far more mature ecosystem than Node does. There's just no reason to go towards Node if you want a CMS for example, and Laravel is also one of the best frameworks in existence. These things actually matter more than a few performance benchmarks or made-up scalability concerns which can ultimately be solved (see Facebook), especially since PHP7 and ReactPHP exist.

If you don't want PHP, you have Python which is a joy to code in and is one of the most coherent modern languages. It's immensely helped by the likes of Django and Flask if you want to write web apps, those are some seriously good frameworks. Maybe it doesn't have such a rich assortment of CMSs but it's a seriously strong alternative.

Java is also a very strong contender when it comes to web services. I personally don't like it, but nobody can deny its strength.

Your opinion that Node is destroying everything in the back-end is, as a result, false. Node has immensely strong competition and has barely managed to dent the back-end marketshare.

"people who do use nodejs are one the most sophisticated programmers out there."

This is the most useless and biased piece of text in this whole comment section.
A little advice: the web space moves really fast, it's an ill act to fanboy over one technology like you're doing right now.

Collapse
 
redaalaoui profile image
Réda Housni Alaoui

people who do use nodejs are one the most sophisticated programmers out there.

That is fanboy talk.
NodeJS is crushing nothing.
It is not used in most of the tech companies.

Please know that I saw your comment part questioning my programming capabilities before you erase it.

I doubt your credibility as a programmer as you use typescript when you have es6

I contributed to numerous open source projects among them Hibernate, Chrome, Spring and Maven.
PTAL github.com/pulls?utf8=%E2%9C%93&q=...
But maybe you googled me after posting your comment.
So I think I am entitled give an opinion on the subject.

Whatever the context, we should try to question the hype.

Last week, while every hipster was crying on the roof that Gradle >>> Maven, we discovered that Gradle was not so great.
Gradle support of Java 9 (started in 2016) is still experimental and buggy. By default, Gradle log output give zero information in case of failure. You cannot debug your Gradle script from IntelliJ.

Docker is another type. I think Docker is great, but not being able to start a container as the current user without scripting it is just lame.

I tried node as backend on little projects.
I think node is way behind JVM in the backend land because:

  • The ecosystem is not mature
  • Monitoring/profiling is not mature
  • The single threaded aspect is just an issue more than anything else
  • javascript (can be fixed with TS)
  • if you want to go all async, you can use Vert.x

But I enjoy building node CLI tools. With TS. I use it to build frontends. With TS.

At work, our main soft is a Java project made of 19 Millions lines of code. Can you imagine that with a weak typed langage like Python, Javascript or Ruby? You may answer microservices. But even a microservice have a few thousands lines of code.

IMO, weak typed langage are good for prototyping and other disposable projects.

Thread Thread
 
yousafsyed profile image
Yousaf Syed

Yes, I have changed my bad wording about you and its not because I googled you, instead, I realized it was personal and I am sorry about that.

I have never said Javascript is the best language when it comes to the language itself, I am not a NodeJS developer, I am an architect whose primary job is to work on the bleeding edge technologies, researching and optimizing the business on the highest scale in the ticket industry to handle millions of transactions per minute, my team manages hundreds of services and microservices if not thousands.

We have scaled up applications written in PHP and NodeJS, Python and Java and guess what? Which language has the microservices which are easiest to scale to handle millions of requests? Answer "NodeJS"

When I said people who work on NodeJS are one of the most sophisticated programmers because they are able to write amazing services even with the crappiest nature of the Javascript.

You don't agree with me that it's really making a huge dent in backend market shares while we are on the post which talks about the popularity of NodeJS.

You may answer microservices. But even a microservice have a few thousands of lines of code.
Yeah ofcourse I would have said that but whats wrong with 2000 lines of code in NodeJS?

I agree with first two points its not so mature as Java and its obvious, but single threaded nature of NodeJS forces you to think out of the box when desiging highly scale architectures, and its obviously not designed for complex computations, what its best is I/O primarily and you should consider something else when you want todo multi threading or complex computing.

if you want to go all async, you can use Vert.x why not scala, golang or rust ? they have a bigger community than vert.x

Docker is another type. I think Docker is great, but not being able to start a container as the current user without scripting it is just lame.

It is an uninformed comment from you about Docker. It is not designed for that and it has no intentions in doing so. Docker/Containerizations solves a bigger problem in software delivery than running a container with the current user in your host. If you are trying todo so, it's fundamently incorrect and an antipattern.

IMO, weak typed langage are good for prototyping and other disposable projects. Absolutely agreed, but you can always find exceptions and write easy microservices that can scale to infinitly with a minimal effort, at the end of the day its all about the business who does not cares about any langauge but time to market,stability and scale.

We should choose what's the best option given the parameters by business, and not because we have an opinion or love for a tool.

Collapse
 
portela828 profile image
Flavio Portela • Edited

Javascript boosted in popularity thanks to the web.

Exactly, it is accessible because JS is in web browsers.

Collapse
 
gautamkrishnar profile image
Gautam Krishna R

Thanks... Amazing blog...

Collapse
 
guitarino profile image
Kirill Shestakov • Edited

I understood your position about accessibility of the JavaScript and hence the qualities of its community. I have a few side questions:

1) Judging by your surprise at the success of JavaScript, do you believe that JavaScript is not "a good programming language"?

2) Who, in your opinion, should carry the burden of proof, people who believe that JavaScript is "a good programming language" or people who believe that JavaScript is not "a good programming language"?

Collapse
 
remojansen profile image
Remo H. Jansen • Edited

1) I consider JavaScript a very good programming language. However, I do acknowledge that in its early days (prior to ES5) some of its features created some issues (e.g. scope).

I personally use TypeScript because I enjoy working with types and I believe they make my life easier but that doesn't mean that JavaScript is a bad programming language.

I think accessibility has contributed to the success of JavaScript but it has also contributed to the misunderstanding of it. JavaScript is very easy to get started with but it is not so easy to master. So a lot of people got started with it without spending the time necessary to understand things like prototypes or closures.

2) I think no one needs to proof JS is a good or a bad language. If you like it, enjoy and if you don't like it, that's cool too, don't use it. Every language has pros and cons. For example, being single-threaded could be seen as a weakness but JavaScript (node.js) can be very good programming language to implement a proxy because being single-threaded (and non-blocking I/O) allows it to handle a lot of HTTP requests.

Collapse
 
guitarino profile image
Kirill Shestakov

Thank you for clarification!

Collapse
 
richardvk profile image
Richard vK

Great article! I was really surprised by the content, having expected something completely different based on the title. The accessibility angle is really interesting in the context of JavaScript, but also in programming in general, and even product development as a whole generalised topic.

Thanks for this food for thought!

Collapse
 
rrackiewicz profile image
rrackiewicz

At the end of the day I don't love programming in JS the way I LOVE programming in Ruby. I program in Javascript because I'm probably a lemming.