I’ve seen so many articles on not writing clever code that I began to wonder if being clever when programming is bound to eventually be considered an “anti-pattern”. Is that really the direction development is heading? Do we really want all software to be written in a way that’s easy for virtually any programmer to read?

I get it. There are developers out there who are writing complex or hard-to-understand code for no good reason. This is bad. On this point, I think we can all agree. …


You probably think I’m going to open one of these by broaching this subject. I decided to write this article because I have a particular project I’m working on, and I suddenly found myself incredibly annoyed because of the difficulties involved in using modules. The project itself is a Node-based web application. As always, I’m experimenting with new ideas as I write it.

The Annoyance

I know it’s probably somewhat sacrilegious in this day to do so, but I’m trying to write a new Node-based website without using any frameworks outside of what’s provided by NodeJS and the browser. Calm down. I’m…


When I first encountered JavaScript not too long after it was first released in Netscape Navigator, it was very much just a toy language. It’s whole and sole purpose was to do a few simple calculations and/or DOM rearrangements. Since then, the language has blossomed to the point that we can actually create reasonably responsive applications and 3D games. That’s a lot of growth.

However, despite all of that growth, JavaScript (or more accurately ECMAScript (ES)) still has a lot of room to grow. It hasn’t been that long since support for the class keyword was added. …


I didn’t originally intend to write a second part to this article, but I thought I’d be being remiss if I didn’t come back with more information. It’s about that foot-gun: the object-on-the-prototype problem. In that last article, my advice was simply “Don’t Do That!”. I feel like that doesn’t help very much. This time, let me show you a good way to follow that advice without having to chance too much about how you would use the code in the last article.

Shoot The Foot-Gun

If you haven’t already, you’re going to want to go back and read “Data in Javascript Classes”…


I’m going to follow the pattern I’ve seen in many other articles of this type and give you a little peek into my experiences that led to this article before we get into the meat and potatoes. However, if that sounds like a bad case of TL;DR to you, just jump down to the next section and spare yourself the drowsiness. I promise, I don’t mind.

A Little History

Before the release of ES6, I had grown accustom to using ES5-style pseudo classes. It was as simple as writing a constructor function, setting up a prototype with all the default data and functions…


When developers these days hear or read about Object-oriented programming, or OOP as it is commonly abbreviated, the cringe factor is more than palpable. Even if you don’t fully understand what people are talking about, you can still feel the disdain this paradigm has garnered. But why? What’s wrong with OOP to make so many developers run back to functional programming (FP) en mass? Yes, “back to”. FP has been around for quite some time, but it didn’t always have a name.

So what’s really going on with OOP? Why is it receiving so much hate? Honestly, I don’t know…


Class Fields

A Little History First…

Ever since TC39 (the board controlling ECMAScript) released the class keyword to the public, many of us were excited by how easy it suddenly became to write semi-classical classes in Javascript. No more manually wiring up prototypes. No more fears that someone will change <classname>.prototype and break places where we’ve ill-advisedly used instanceof. And of course, we finally have an easy way to inherit from native types that doesn’t break the native member functions! But something was missing.

Where was the ability to declare data members in class? The closest we could get was accessor properties. But even then, how…

Ranando King

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store