-
Dec 6, 2024 • Permalink
Miscellaneous coding preference: return early rather than nesting business logic inside a conditional.
Bad:
function example() { const optional = returnOptional() if (optional) { // all business logic, // including additional nestings } // implicit `return undefined` }
Good:
function example() { const optional = returnOptional() if (!optional) { // explicit return value, // good for clarity and intentionality return null } // all business logic, // starting at the top-level of nesting! }
-
Nov 23, 2024 • Permalink
My review of the movie Trap:
Just like Jaws, if the humans had said “We gonna get this shark. We’re going to set a trap it can never escape. We’re going to trap it in the Atlantic Ocean. We’ll check every fish that comes out. There’s absolutely no way it can escape.”
-
Nov 22, 2024 • Permalink
If a taco is made in the woods, and nobody is around to eat it, does it taste good?
-
Nov 21, 2024 • Permalink
“These _____ times” has to be one of my least favorite phrases. “These changing times”, “These trying times”, “These dystopian times”. I dislike it because it makes such a massive assumption about the reader. It’s like a nudge and a wink, saying “we feel the same way”. But you don’t know me, and you don’t know how I feel. It also avoids naming the things which we are talking about. We might both believe that our modern era is dystopian, but we may believe that for completely different reasons. Is it useful to find common ground over ambiguous declarations of what our modern times are like? I say no. It’s bad writing, please stop.