On Code Review:

Bias to small, digestible review requests. When possible, try to break down your large refactor into smaller, easier to reason about changes, which can be reviewed in sequence (or better still, orthogonally). When your review request gets bigger than about 400 lines of code, ask yourself if it can be compartmentalized. If everyone is efficient at reviewing code as it is published, there’s no advantage to batching small changes together, and there are distinct disadvantages. The most dangerous outcome of a large review request is that reviewers are unable to sustain focus over many lines, and the code isn’t reviewed well or at all.

This has made code review of big features way more plausible on my current team. Large work is organized into epic branches which have review branches which are individually reviewed. This makes the final merge and review way more tractable.

Your description should tell the story of your change. It should not be an automated list of commits. Instead, you should talk about why you’re making the change, what problem you’re solving, what code you changed, what classes you introduced, how you tested it. The description should tell the reviewers what specific pieces of the change they should take extra care in reviewing.

This is a good start for a style guide ala git commits!

Fewer changes are faster to deploy than fewer changes

Itamar Turner-Trauring, Incremental results: how to succeed at large software projects:

  • Faster feedback…
  • Less unnecessary features…
  • Less cancellation risk…
  • Less deployment risk…

👏 👏 👏 👏 👏  read the whole thing, Itamar’s tale is well told.

Consider: incremental approaches consist of taking a large scope and finding smaller, still-valuable scopes inside of it. Risk is 100% proportional to scope. Time-to-deliver grows as scope grows. Cancellation and deployment risk grow as time-to-deliver grows. It’s not quite math, but it is easy to demonstrate on a whiteboard. In case you happen to need to work with someone who wants large scope and low risk and low time-to-delivery.

TIL: divide by 10 with this one weird number

Running an application across two physical databases is not a straightforward thing. One of the relatively easier ways to do it involves assigning each database instance a shard number and then arranging for all your primary key IDs to end with that number. For example, shard 0 generates IDs like 1230, 40, 482340, shard 1 generates IDs like 1231, 41, 482341, and shard 2 generates IDs like 1232, 42, 482342, etc. all the way up to 9. If you want more than 10 database shards, it gets more involved.

My brain is wired oddly, so I came to wonder how you would quickly get the shard ID for an ID (e.g. shard 1 for 1231). This is really easy with decimal math; you just divide by 10. However, we run our databases on computers that can only do binary math, so its not actually simple.

But it turns out you can do it quite fast! There’s one weird number, expressed as `0x1999999A` hexadecimal, that is very close to multiplying by the fraction 1/10 (plus further binary math and register trickery). Thus you can do this in only a few instructions on Intel processors released in the past twenty years.

I’m really glad someone else figured this out.

If I could imagineer Tomorrowland for a moment

A little bit of fan reflection on Transportation in Tomorrowland and how to revitalize it:

When you visit Disneyland in California, how do you feel when you walk down Main Street, U.S.A. and turn right to enter Tomorrowland? I mostly feel a combination sadness and  frustration when I walk through Tomorrowland–primarily due to the misplaced and pathway– clogging Astro Orbiter and the vacant, rotting PeopleMover track. And while fantasy space travel is well represented in Tomorrowland (Buzz Lightyear Astro Blasters, Star Tours, and Space  Mountain), any semblance of tangible ways of pondering, dreaming about, and honoring humankind’s achievements and the wonders of the future are long gone. It’s as if Disneyland, like seemingly so much of the world, gave up on an optimistic view of the future, too.

Personally, I’d copy/paste the Magic Kingdom People Mover over to Disneyland, keep the monorail as-is, bring back the motor boat cruise as some kind of “see the world from a personal-sized yacht” thing, and reimagine Autopia as pure-electric autonymous cars that are integrated with pedestrian, bicycle, and commercial traffic in a way that is less car-centric as our current world. The five second pitch: the future of transportation is global and interconnected.

JavaScript’s amazing reach

There’s plenty of room to criticize JavaScript as a technology, language, and community(s). But, when I’m optimistic, I think the big things JavaScript as a phenomenon brings to the world are:

  • amazing reach: you can write JS for frontends, backends, games, art, music, devices, mobile, and domains I’m not even aware of
  • a better on-ramp for people new to programming: the highly motivated can learn JS and not worry about the breadth of languages they may need to learn for operations, design, reporting, build tooling, etc.
  • lots of those on-ramps: you could start learning JS to improve a spreadsheet, automate something in Salesforce, write a fun little Slack bot, etc.

In short, JavaScript increases the chances someone will level up their career. Maybe they’ll continue in sales or marketing but use JS as a secret weapon to get more done or avoid tedium. Maybe it gives them an opportunity to try programming without changing job functions or committing to a bootcamp program.

Bottom line: JavaScript, like Ruby and PHP before it, is the next thing that’s improving the chances non-programmers become programmers and reach the life-improving salary and career trajectories software developers have enjoyed for the past decade or two.

Just finished watching Master of None, season 2. What a great show. It’s hilarious without being campy, poignant without being a downer. Aziz Ansari is very good at this. Also, now I just want to listen to old Italian music and eat food.

If I were a producer: DJ Khaled

Actually, I probably wouldn’t change much. But I have questions about this marketing photo:

DJ Khaled posing with a baby human and a baby lion
People, do not pose with apex predators. And especially, don’t keep them as domestic pets. I’m looking at you, oil billionaires.
  1. Just, no. Do not pose with apex predators, even the little ones. Not okay, Mr. Khaled. I know this isn’t a question?
  2. Why doesn’t said apex predator kitty get a matching robe?
  3. Are you, Mr. DJ Khaled, just a catchphrase soundboard? Have you, at any time, been a soundboard? Is this like a Blue Man Group thing where there are multiple, anonymous DJ Khaleds?

Thank you for your time, DJ Khaled. Grateful is actually pretty good pop music.

If I were a producer: Muse

I have feelings about Muse, but let’s talk about this particular song I’m listening to right now: “Big Freeze” off The 2nd Law. In general, I would overgeneralize Muse’s music as “future-prog”. But this song has a) the typical fuzz bass Muse uses, b) nearly chicken grease guitar chords, and c) a distinct U2 vibe. I’m not sure these things all go together. If’d been the producer on this track, I’d have tried to convince them that chicken grease chords are cool as heck, but they don’t belong on any of Muse’s album tracks.