Graphs are the new hierarchies

In the sense that trees of people (managers and reports, ala Taylorism) are the old guard. Data (folders and files) are old sauce and nodes + edges are new sauce.

In the sense that part of the confusion of our modern world is that e.g. the Koch brothers have considerable influence on how the Republican party organizes itself. Thus, money is the speech that organizes our current regime and acts on policy. But the Koch brothers aren’t on the org chart for the government or the Republican party.

In the sense that hierarchical databases are such old sauce that I’ve never used one. People new to software development don’t even realize they were at one time a thing that competed against the idea of relational databases.

In the sense that writing is linear or organized by chapters in books. But, the web is a wild mess of hyperlinked graphs. Maybe writers want to organize by graphs too!

(Spoiler: you can represent strictly hierarchical data with graphs too!)

Whiteboard, even if you’re a distributed team

A lot of us are out here, amongst all the strangeness of the world, trying to figure out how to help our teams adjust to collaborating remotely. It’s long been my observation that nothing beats people in a room together communicating via ad-hoc scribbles on a whiteboard.

Seems like a good time to survey the landscape and see if the situation has improved!

On one end of the spectrum are Google Draw and Jamboard. The former seems better for attempting to draw technical diagrams. I think it’s actually better for ironically creating WordArt. The latter seems like an honest, lo-fi attempt to re-create whiteboards online and collaboratively. I don’t think these tools cut it. But, they have the advantage of ubiquity: a lot of companies use Google Suite, so these could come in handy, in a pinch.

Another wild card is to use design software your team might have in place. Sketch or Figma are inherently about visual communication. If everyone has a license and some patience, this could work! If anyone can put some boxes, arrows, and text together, you can basically whiteboard.

I’ve used Whimiscal to create non-trivial visual communications. It works great, it’s easy to share with people, there is some multi-person editing. It’s easy to get started in Whimsical and it has some depth, but not so much depth that it’s intimidating or overwhelming. Pricing aside, this is where I’d start with my current team.

I have not kicked the tires on Miro, but the concept is intriguing. Looks like there’s real-time, collaborative visual communication/editing. They also brag a lot about their integrations with adjacent project/collaboration tools such that one can embed JIRA cards, mockups, docs, etc. in a whiteboard. If you’re already using this, I’d love to hear your experience with it!

Finally, you don’t need software to share ad-hoc scribbles. You can draw on paper, capture it with a camera, and share that image almost anywhere. You could use sketching/drawing tools to do a fancier version of that. If you have a whiteboard at home, you can draw on it, take a photo, and share it.

It doesn’t matter if the tools aren’t that great or if your company hasn’t adopted any of them. Taking the initiative to collaborate, or having the insight that communicating with words is not cutting it, is much more important.

Wherein the “good old days” are revisited

Remember secretaries and drinking at work? And land-line telephones? And smoking inside? Blech! And an even more unequal society with even more thumbs on the scales?

My wife and I, when we first watched Mad Men:

Oy, Makefiles! And weird preprocessor tricks! And file-scoped variables/memory ownership? And everything is an int, sometimes pretending to be a char.

Me, reading C code, having last written valid, in-anger C code during college

The 1960s and 70s had some nice qualities, but some of them don’t hold up to the nostalgia.

Use as few rules as possible, mostly guidelines

Rules won’t solve your problems, but thinking about them might. To paraphrase a couple well-known quotes:

“Rules are useless, but thinking about rules is indispensable”

Dwight Eisenhower

“No rules survive first contact with a toddler”

Helmuth von Moltke the Elder


It’s folly to think we can generate the exact outcomes we want with rules. Every ruleset leaves more unstated assumptions than it generates clarity. The legalese found in contracts, and its absolute obtuseness, is testament to how hard it is to write clear rules.

That said, thinking about how rules, or a lack thereof, generate outcomes is an essential and worthwhile exercise. I like putting things through the lens of macroeconomic thinking to seek out second order effects, unintended consequences, and perverse incentives that emerge from a proposed rule set. Rules are trade-offs!

In short: humans + rules are a strange, not entirely mathematical thing. Think about how bad actors will abuse rules in their favor and how good actors will be constrained by rules in search of the outcomes you actually want. Then, if you must, write as few rules as possible.

Keep in touch with friends, the littlest CRM that could

This year, I’m trying to better keep in touch with friends, family, and former co-workers. It came to my attention that this is, in many ways, a thing for which you would use a customer-relationship management application. This could work, but seems like a lot to me.

Most software starts life as a) a document/spreadsheet or b) a system of long email threads. In that spirit, I thought I might work backwards from what I normally do: build the littlest CRM I can without writing code or using development tools.

I’ve already got Things and Bear in my workflow. Turns out that duo solves the essential part of the problem. Things reminds me to contact a friend/family/co-worker periodically. I keep notes on what folks are up to, what we talked about, when the last time we talked, etc. as unstructured notes in Bear.

That’s it! I’m only one month into this experiment, but I’ve contacted, at least once, most folks I wanted to. 📈

Enforce system consistency at the boundaries & meditations on run-time type systems

(…continuing a Twitter thread)

io-ts caught my attention a while back and I finally had the chance to read through it. I’m glad folks are experimenting in this area, particularly with the potential reach into multiple communities and ecosystems that TypeScript affords.

We use dry-rb extensively at work and I was curious how a TypeScript expression of the same idea (define type-like structures at your runtime boundaries) looks.

The flippant response to runtime type systems for dynamic languages is: if you love types so much, why aren’t you using Haskell, Scala, Swift, etc.? That is, a type system over JavaScript or Ruby is a relatively new/unconventional choice.

Gradual type checkers: it works for Facebook and Stripe. Maybe it scales down for much smaller teams and codebases? Weird flex, but okay.

In reality, a runtime type system is easy to adopt and, when paired with some kind of Either/Result abstraction, can be built incrementally by composing types, data coercions to types, and validations of coerced data.

Having spent a year and change working with dry-rb’s runtime types/validations, I’m looking forward to introducing Sorbet. I like the idea of writing types and function signatures for development-time enforcement, but having the option to use some of them at runtime for boundary enforcement.

dry-rb has served us well, but the development experience that I crafted is highly coupled to using a Result/monad-ish idiom. Lots of combinator-envy. Most developers don’t crave this sort of thing.

Even if it’s successfully sold, it’s an uphill battle of education and FP/OO adaptation the whole way. If I were doing it over I’d look to Go’s tedious but easy to teach idiom of checking for errors after nearly every non-trivial operation.

I think dry-rb and io-ts will succeed or fail in very similar ways. Teams that know an ML-like language but are for some reason using JS or Ruby will take quickly to it. Otherwise, there’s an impedance mismatch to manage as they teams their own idioms on top of runtime types.

I’d pitch this to front-end developers as similar to React’s PropTypes, but better.

PropTypes give you greater confidence that you’re passing the right properties to a component and that a refactoring didn’t break things. Type-asserting data structures, like io-ts, give you confidence that the boundaries of your system, e.g. the XHR request/responses and persisting data to local storage, are either well-formed or immediately kick over to failure handling.

Enforcing object shapes (keys and nesting), type correctness (the value for key X is type Y), and validity (values declared as an “age” are always positive integers) at the boundary of your application and between components means you can more code on the “happy path” in your application logic. Conditionals and error handling are largely, but not entirely, pushed outwards to prop types or the boundary type system. This is, in my opinion, living the dream!

The gift and the curse of io-ts and dry-rb’s design is the use of combinators as the center of their design.

The skill ceiling for composing functions to handle network/database requests, type/shape assertions, coercions, and validations is very high. There’s lots to learn about combinators and the more you know, the more you can do. The downside is that the skill floor is also high. The less you know about combinators, the more mysterious, intimidating, and math-y they are.

It’s an unfortunate reality that developers rarely rave about how great a library or language’s error model is. Mostly people put up with exception handling and try to live in a blissful world of error-avoidance and happy paths.

Result types – e.g. Rust’s Result, io-ts’ Either, Haskell’s monads, dry-rb’s Result and monads, Elm’s Result and Maybe – are promising. Function return types that are explicit about whether the thing succeeded or failed (without stack manipulation hijinks) is something we really should have put in practice some time ago. io-ts and dry-rb are existence proofs, to me, that you don’t need an extremely sophisticated type system to make these work in practical, runtime-typed languages like Python, Ruby, or JavaScript. But they can quickly send you down the road of combinators. I’ve found this is not a road developers are enthusiastic about traveling.

Go and Erlang take a different, utterly unsophisticated, road and I wonder if it’s more promising. Functions that can fail (any kind of IO, some kinds of math, etc.) return a success value and error value as an array or tuple. Developers are expected to always check for an error before proceeding; linters and peers will complain if you don’t.

If a linter does it, so can a compiler or gradual type system can too. Maybe the middle ground between the status quo of exceptions and the promised land of result types is compiler-enforced checking of success/error pairs. The advantage is, no invention or re-learning is needed. It’s an array and a conditional. Granted, I’d prefer to get rid of the conditional. But, I’ll take the ease of training developers on the approach as a trade-off.

In short: my new hypothesis is “run-time enforcement of types/values/rules around the boundaries of your system, gradual/static types inside your system to prevent programmer errors”. If you can go further and use a static type system like Rust or Elm to reach the point your software is “correct by design”, that seems like living the mega-dream. 🌈

The Beautiful Ones

Prince’s unfinished memoir, The Beautiful Ones is a quick, but awkward, read. The preface is the most coherent, the story of how the editor, Dan Piepenbring, ended up being chosen by Prince to realize his autobiography. It shines an interesting light onto what it was like to be in Prince’s orbit, if only briefly.

Of course, Prince passed away shortly after the book was announced. He had started providing material to his writer in the form of notes and guidance, but only a few chapters worth covering his youth and early career. These notes, in their idiomatic manner of writing, e.g. “👁️ love u”, form the bulk of the book. The rest of the material are photographs and other notes collected with the help of Prince’s estate. They’re insightful, but not particularly coherent.

I’m relatively new to the deep Prince mythology. I suspect I got more out of the book than those already steeped in purple mystery would. There are probably better starting points for those who want to know everything about Prince or who are enitrely new to the Prince mythos.

I watched the various Watchmen

I just finished reading the Watchmen graphic novel and it is amazing. I was drawn in by the HBO series last year, which amplified my enjoyment of the original story. It might end up in my top five works of fiction.

The story is of its time: the Cold War, superheroes as saviors. Even better, it has timeless themes that feel relevant in our weird contemporary situation: growing authoritarianism and nihilism towards overcoming the status quo to tackle other looming problems.

I saw the Watchmen movie first, several years ago. The movie, as I remember it, holds to the first few issues surprisingly well. The ending of the comic is far superior to the one used in the movie. The comic has more space to expand minor storylines and even introduce a whole other comic within the graphic novel. The comic stands head and shoulders above the movie.

I still feel like the Watchmen HBO series was one of, if not singularly, the best shows on television/streaming last year. The graphic novel is the perfect chaser. Lots of plot points make more sense through the lens of the graphic novel: the whole squid attack, Looking Glass being slightly off, Robert Redford as president.

If it turns out they don’t produce more seasons in the HBO series timeline, at least there will always be the comic. (And Westworld, for the time being).

Get a cute credit card and overtip

Highly recommend: get a BB-8 or similarly lovely icon from your favorite mythology on the credit/debit card you most frequently use. I have a couple lovely bonus conversations with folks per week because of it. Sometimes it’s “like your card” but sometimes it’s full “did you see the latest thing?” and it’s nice to talk to people outside my normal routines.

Of note, I get as many comments about BB-8 on my card in a week as I did for Darth Vader in a month. QED the fandom is wrong, bring more fun stuff and less super-serious Skywalker stuff. And don’t be cowards, let Chewbacca and Maz resolve their romantic tension!

ps. tip everyone you can until our country’s terrible treatment of people in service jobs improves. They work hard, get paid too little, have basically zero safety net, and serve on the front lines of the “may I speak with the manager” wars.