Home twitter


038

Catching Up On Long Over-Due Reading

June 1, 2020

Looking at some of the dependencies in the Passport library, it appears that there is little to no maintenance happening. While this may not be particularly problematic in terms of Passport's operation now, it could prove to be so as the tools we use to operate servers (Node and Express) continue to evolve. Yes, yes, JS doesn't include breaking changes as it gets updated, but it does produce far better ways of writing code, and Node grows right along with it. And while I can understand maintaining support for legacy systems, some shit has just got to go. Modern browsers support better security systems, and computers don't last forever.

I was looking at the util module, specifically util.inherits, in Node and came to realize that this was nothing more than a base system for inheritance. In fact, the docs recommend using class and extends and discourages the use of util.inherits altogether.

Classes, classes, classes.

What I need to do is sharpen my skills on classes. I can completely refactor and modernize the code in some of these libraries to make them far more legible, as well as eliminate a number of dependencies in doing so. I know I'm repeating myself a bit from Day 037, but I feel it's worthwhile to do so--minimizing dependencies means less of a chance of breakage in programs. If I can't get around eliminating a dependency that isn't very well maintained or particularly active, then I'll write the necessary parts of that code into what I'm working on and be done with it.

Or figure out a different solution entirely.

Anyway, all that to say that as a result of realizing I needed to up my chops with classes, I returned to Kyle Simpson's (twitter) 'You Don't Know JS, Yet: Scopes and Closures' with the intention of completing it before moving on to the first edition of 'You Don't Know JS: this & Object Prototypes' (because the second edition, Objects & Classes isn't out yet). Once I get a decent grip on class creation, instantiation, constructors, super constructors, and this, it's over for these libraries.