Enums are both powerful and ubiquitous in typed programming languages.
They enable you to construct easy-to-follow decision paths, based on their set of pre-defined values. Plus, if you have your linter/compiler configured correctly, you can catch non-exhaustive paths pre-runtime.
In programming 101, we learn the importance of good variable names. However, none suffer so greatly and routinely to this rule than enums — happily making it through code-reviews, and causing headaches down the line.
For this post, I’ll use TypeScript to help portray the idea, but the problem is language-independent.
An enum’s name should make it immediately clear what we…
Recently I was writing my first custom stream with NodeJS, and when reading the documentation thought I’d discovered that one of my foundational computer science understandings was incorrect.
Until then I’d taken it to heart that
1 byte === 8 bits.
Reading the documentation, I came across this section analysing the performance of a simple program they had written:
The maximum byte size occupied by virtual memory turns out to be approximately 87.81 mb. [NodeJS]
To me, this implied that Node believes it has the power to decide what size a byte should be at runtime. …
Too many guides start with long speeches. I like my tech fast and my guides short. Let’s go.
Hands down my greatest tip — and I lead with that because I’m nice — is a guide to switching straight to all of your apps with just a single shortcut.
Wanna open Slack?
CapsLock + S
Wanna open Emails?
CapsLock + E
Wanna open iTerm2?
CapsLock + T
Despite loving the career I have chosen, and having a burning desire to learn as much as I can about it – deep down I really hate technology.
I make efforts to cull technology from my life and restrict its presence wherever possible. I want to choose when to interact with technology yet often find myself enraged when I discover I’ve once again developed a dependence on scrolling.
It’s a feeling shared by many within this generation. With the recent release of The Social Dilemma, which talks about Humane – a company focused on human-first tech interactions (a company I…
dubious dev, fintech friend, sloppy skier | he/him