Tired of ads? Enjoy an ad-free experience by signing up.
Joel Thoms · · 5 min read

How I rediscovered my love for Javascript after throwing 90% of it away

My journey with Javascript started way back in 1997 with Netscape Navigator 3. Back then, you couldn’t do much with it. The coolest use of Javascript was to create mouseovers. At the time, that was some high-tech 💩. Being able to change content on the page by just hovering? Mind-blowing. This was all pre-DHTML by the way, so you couldn’t even hide/show DOM elements.

At this point, Javascript was primarily being used for form validation. There wasn’t much progress or interest in it—not like today. Then, frameworks entered the market in a big way—Jquery, Knockout, Angular, React, Vue, etc. They came out slow at first, but now we get a new framework daily.

We are also seeing the accelerating evolution of Javascript itself. Before, it took us forever to get ES6. Now, people have already stopped talking about ES7 and are onto ES8!

We also have an infinite number of alternatives such as TypeScript, CoffeeScript, ClojureScript, ELM, etc.

It can be overwhelming and it’s impossible to keep up with everything.

The wrong path

When Javascript first started to mature, object-oriented programming (OOP) started to sneak its way into the language, and I loved it. I started playing with Javascript and all the different ways I could create a class. I could finally do proper inheritance, and I started to think that Javascript was starting to become a real language.

It wasn’t until many years later that I would discover that using OOP in Javascript was a terrible mistake.

I tried to force what I knew from C# into Javascript and, at first, things seemed very promising. But the complexity was mind-blowing.

Because Javascript’s prototypal inheritance doesn’t work like C#, I would find myself writing console.log(this) on a daily basis. If you didn’t do everything exactly right, it was a nightmare. Private methods and values had to be prefixed with underscores or, even worse, wrapped in closures.

Not only did OO Javascript come with all the problems of OOP, but it added many new ones on top of it.

Then I discovered functional programming

I didn’t get it at first. I would see the code and understand it, but I didn’t get why. Eventually, I forced myself to learn it. I took an introductory course on functional programming on EDX with the intent of applying those techniques to Javascript.

Functional programming gave me a new perspective; it made me see programming in a different way.

It was hard for me to get used to at first. Everything was backward—immutable, foreign.

What happened?

Object-oriented design is unnecessary

Summary


Stay ahead in Asia’s tech landscape

You've reached your 2 free content limit for the month. Sign up for free to read the full story.

🏄 For casual readers / 👶 Free

Basic

US$0

Free forever

Get instant access to this article and more every month

0 premium content

Unlimited news briefs

5

5 articles

Ad-free reading experience

Just US$0 per day

⌛Sign up in 20s. No payment details needed.

📖 For learners / 👍 Starter

Lite

US$4.92/month

Billed annually at US$59/year

Get instant access to this article and more every month

4

4 premium content

Unlimited news briefs & articles

Ad-free reading experience

Just US$0.17 per day

Cancel anytime

Our subscriber community includes professionals from these companies:

Stay updated on the go with our mobile app.

Get latest insights with smoother, more personalized experience through TIA mobile app.

Community Writer

Joel Thoms