We don’t have to agree about code style

Will we ever come to agree on writing code?

Ruby folks like short methods. One-liners even; maybe for their concision, maybe to show off their language and code golfing skill.

JavaScript folk like often like a bit more heft in their functions. No matter how good a function name is, logic is easier to understand if it’s all in one place.

Despite the mechanical similarities of this sample size of two languages, programming communities have chosen very different styles. This has been happening for decades, since the beginning. It will probably always happen.

As sure as Keith Richards sounds different than George Harrison or Pete Townsend, developers will disagree on the structure and little details of code. Like music, like code.

Luckily, now we have pretty printers and code formatters like prettier, gofmt, rustfmt, or RuboCop. This is a welcome advance from even ten years ago, when some code reviews could bog down in “there’s an extra whitespace here” or “this function seems too short, can we merge it with its callers?”

We don’t have to agree, we just have to act like professionals when it comes to the little things.

It’s 2019 and I’m signing my jokes like its 2019

A stranger walks into an elevator. I say “how about this weather?!” They smirk, or let out a small laugh. It’s easy to think, “I am funny guy!” But: that’s not a joke, it’s not funny. It’s just small talk and politeness in action. I am not, actually, the funny guy in this scenario.

When I was fourteen, I was really into standup comedy. I managed to find a club above a bowling alley that let me do a 2 minute set. The only constraint was that I couldn’t work blue. So I wrote two minutes of jokes, performed it a couple times, got a few laughs, and that was that. I figured out that I could get in front of people and tell some jokes, and I didn’t need to rely on slapstick cursing to do it.

Also, I was fourteen and surrounded by teenagers. Teenagers make a lot of jokes at each other’s expense, because they’re cruel, don’t know better, and aren’t practiced humorists. I had experienced my share of being the subject of those jokes and decided I didn’t want to be that kind of funny. Eventually, I came to the formulation that the best jokes aren’t at someone else’s expense.

As random things in one’s youth go, these two were pretty formative. I decided that if you can’t get a laugh without cursing or making a joke at someone’s expense by punching down, you weren’t actually funny.

Turns out these principles are pretty handy for the world we live in (and have always lived in, but some the future is not evenly distributed, etc.)

You can work blue, you can demean other people, you can say what’s really on your mind, and you can punch down. You may get laughs, but they’re because people are sympathetic to your anger or cruelty. Or, maybe you’ve been bombing so long they’re just relieved you said something almost decent and the laugh to diffuse the situation. But, that’s not funny.

When a joke misses, when a standup flops, it doesn’t mean we’ve become a humorless or prduce society. None of this means the end of humor or satire. It means we’re going to separate the really excellent humorists from those who are merely humor-adjacent.

Context buckets

Sometimes I ask myself: why did past Adam think this text/link/picture/etc. was important. Increasingly the answer is: put it in a bucket that makes the answer self-explanatory. For example: I have tags in Bear for music, recommendations, notes on The System of the World, Technology, software, Disney, and even for random tweets that I will sometime want to share with someone as proof that I’m not just making this up.

95% endorsed! The exception: I am extremely picky about the size and aspect ratio of windows in relation to how the particular application is designed. I can neither walk into Mordor or simply resize an application to use exactly 50% of my screen.

Pick prolific: quantity, quality, and Chidi’s Dilemma

Prolific is better than perfect, Jared Dees:

“Perfect” is a mirage that no one knows how to reach.

I’m fond of restating this in terms of the quantity/quality trade-off. It’s easy for me to fall into the temptation of creating one essay/pull request/turn-of-phrase that exhibits all of the quality that should exemplify my work. But it’s better for me to create a bunch of things that exhibit some of that quality so I can better learn what is essential to the quality and what is illusory.

To borrow Dees’ model: if I write fifty-two blog posts in a year, several of them will be Not That Great. But after the first dozen or so, I’ll start to figure out what’s important in a story and what I thought was important but doesn’t really matter much. This is quantity creating quality; not a tradeoff!

The flip side is Chidi’s dilemma: spending your whole life trying to write every single thing about your area of expertise, with nuance, and producing something so impenetrable that not even a demigod can make sense of it.

In short: quantity doesn’t reduce quality. Quantity is the feedback loop that creates Quality.

We are now a two robot vacuum family! One for the cats upstairs, one for the dogs downstairs. Courtney loves them both.

The cats and dogs are way smarter than the robots, which just bump around like embodiments of the old Windows logo screensaver. Our floors have never been slightly cleaner and our power strips never in greater threat.

I highly recommend it if you have the means.

How I focus more and worry less about the internet

As a long time Rands fan, I highly recommend you partake of the Rands Information Practices and Rands Slack Protocol. Allow me to add some of my favorite tactics.

Get your browser tab situation under control; I get itchy when I have more than several tabs open! (But if you’re the sort who never has less than a few dozen tabs open, I still like you.) Move your most important and favorite blogs and websites into a feedreader. I like Newsblur plus Reeder macOS/Reeder iOS. You can even put Twitters and email subscriptions into Newsblur, which is some next level distraction management.

Learn the keyboard shortcuts. All of them. Dazzle people with your ability to dance across the keyboard and make computers do things. Bonus tip: picking up a mechanical keyboard will make you sound extra amazing but slightly annoy the people who sit close to you.

Customize your system to remove distractions, allow you to focus, reduce drag, and move faster. If other people sit down at your computer and can’t operate it, that’s okay. But, don’t customize it too much. I want to get stuff done, not produce the ultimate hot rod computer for hot rodding computers.

Speaking of hot rodding, do not go too deep on productivity systems. I need a notebook-like app to think in and write stuff down. I need some kind of souped up todo list. Not much else. They are outboard brains, augmenting my ability to function as an adult and as someone thinking about and/or making things. Its tempting to read about everyone else’s Extremely Awesome Productivity Setup, but they’re doing different stuff and have different responsibilities; it’s entertainment, not education.

I cannot read the entire internet. Get really good at guessing whether something that comes across your desk is going to better your understanding of the world. Skip all the clickbait and tribal rage stuff. I look for stuff that provides insight into how we got here or what the future might look like.

That said, don’t accidentally filter your dear friends out in the process of managing the information onslaught. Put them in a special list or feed folder and look at it daily. Engage with them like its 2008 and the internet is still a promising thing that connects us to our friends.

Finally, I highly recommend you follow Rands’ best bit of advice, which is curiously tucked into the last footnote: replace screens by your bed (as many as possible, at least) with a book.

On decision tables and conditionals

Over the years, I’ve heard a few times about something like Decision Tables (Hillel Wayne):

A decision table is a means of concisely representing branching and conditional computations. In the most basic form, you have some columns that represent the “inputs” as booleans and some columns that represent outputs and effects.

It was usually some variation of teams using something like a truth table to define the logic of their application without using a mess of conditionals. It also turned out that there was a compiler optimization where these tables could be laid out such that figuring out which behavior was appropriate to all the inputs was faster than conditionals would have been.

Wayne doesn’t mention anything like this. But, there is mention of using decision tables with an RSpec macro to verify code behavior with less boilerplate assertion logic. So that’s neat!

If I had to sum up my style of coding, I’d say probably a third of it is about reducing the time I spend reading or writing conditional code. That’s where most of the bugs and frustration are. Pushing them down into the compiler, runtime, or database is a fun exercise too.

My favorite question is “why?”

At some point in elementary or junior high school, we were taught all our essays should answer one of five questions: who, what, where, why, or how. These were, at the time, “the five W’s” of writing.

Why is my favorite because it provides context. Asking why usually gets me to the bottom of the situation. It often encapsulates the who/what/where/how/when. It’s the most open ended, which is probably the best part. Asking why almost always makes the next most important question obvious.

I still like the other ones too. When often yields interesting histories or chronologies. Who can lead to a nice bit of biographical or character background. How is great when I care most about progress over deep context. Where can give me a little bit of backstory about why a certain location or geography is important.

Asking why wraps up all of those. Why are shipping containers a standard size? Who decided it should be that way. How did that drastically change global shipping? When did this occur and what changes can we observe from it?

One word, one question. So much to learn!

The systemic sublime makes our world more legible

My new favorite category on Kottke.org is the systemic sublime, wherein our networked, often inscrutable world is made more legible. The connections between ideas and and their instantiations are not always obvious. The history, and often the path dependence, of how we got here make it a little easier to understand our world.

Other fine purveyors of system sublime include Alexis MadrigalMatt WebbTom ArmitageRibbonfarmSteven Johnson, and Michael Lewis. My favorite thing about these authors is, they are answering “why?” by connecting the dots between “how”, “who”, and “what”. It’s my favorite kind of thinking!