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.

twitter.com/rands/sta…

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.


It is I, who dwells at coffee shops, who sometimes reads paper books instead of a glass display, who prefers Apple Pay over card swiping when possible.Greater Good Coffee Roasters interior


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!


Advocacy = empathy + speaking to someone else’s conceptual framework. When I’m trying to convey an idea from my head to someone else’s head, the biggest challenge is converting from my conceptual framework and values to theirs. Hence, The words that work:

For example, one partner in a conversation might use concepts like power and tradition and authority to make a case, while the other might rely on science, statistics or fairness. One person might argue with tons of emotional insight, while someone else might bring up studies and peer reviews.

Rare is the success of advocacy that doesn’t involve a lot of empathy, understanding your conversation partner, and letting go of the little details to reach a new local maximum of mutual understanding.


It's dangerous to go alone, take dotfiles

Yesterday I was handed a fresh, nifty new laptop. This is, for me, mildly terrifying. Last time I did a clean operating system install was seven years ago. I’ve carried an idiomatic mixtape of dotfiles, macOS preferences, files, and cruft with me on my personal laptop ever since.

A brand-new, stock laptop is a shock to my highly acclimated and particular system.

I started contemplating how exactly I could get setup relatively quickly. At the same time, I want to pay down a little bit of automation debt. By the next time I’m faced with this situation (when I buy my own computer, if a disk is struck by lightning, etc.) I shouldn’t feel so much like a deer in headlights.

At first I thought I’d attempt to transmogrify my current lightsaber into something like Gina Tripani’s dotfiles. I like how this is structured, and that the initial setup of apps and Unix-y things is bootstrapped by Homebrew. But, then I remembered Thoughtbot’s laptop and dotfiles and convinced myself this was the way to go.

Indeed, laptop helped me cut the Gordian knot of setting up my new machine so I can write code and feel at home on it. I highly recommend it if you have the means.

New dotfile repo forthcoming!


I’m starting a new job tomorrow. I decided to take a week off in-between jobs, mostly to make a quick trip to Disney Land.

I hid most social media apps away, stopped paying attention to news, and caught up on reading. I gave myself a 3-day weekend before our trip to decompress, we went to Disney Land for 3 days, and had a 3-day weekend to relax before I start the next thing. I’ve done a fair bit of writing, watching movies, tinkering with Ableton, and playing games too. A great vacation sandwiched between two stay-cations, in the lexicon of our times.

My mind feels like it’s had a chance to reset and get back to a neutral state. I’m hoping this will help me keep my frame-of-mind looking forward as I start the next job. This was a great decision and I highly recommend you do something like this (granted, Disney Land isn’t everyone’s thing) yourself, if you have the means.


Scribbling through TensorFlow.js

I’ve been trying to wrap my head around machine learning lately. Today I worked through the TensorFlow.js tutorial on recognizing handwritten numbers with a neural network. Herein, my notes and scribbles.

[caption id=“attachment_4714” align=“alignnone” width=“1537”]Hand-written notes on machine learning TensorFlow: it’s about turning linear algebra into models built of layers built of math[/caption]

My previous forays into machine learning left me a little frustrated: I could tell there was language, pattern, and notations to this, but I couldn’t see them from the novelty of new-to-me words like sigmoids, convolution, and hidden layers. Turns out those are part of the language.

But the really handy idioms are encoded in TensorFlow’s high-level model-and-layer API. A model encapsulates a chunk of machine learning that can be trained to classify inputs (images, texts, etc.) based on a mess of training data (pre-classified stuff). Every model is built from a network of layers; layers use linear algebra to transform numbers into classifications.

Once you’ve built a model, you feed it a bunch of training data so that it can learn the coefficients and other number-stuff that goes inside the math-y network. You also provide it with an optimizer and loss function so that as the model is trained, it can know whether its getting better or worse at classifying data.

A really cool thing is you run this training process on your computer’s GPU. GPUs, like machine learning models, are big networks of fast math-y stuff. Beautiful symmetry! On the other hand, you usually can’t fit your training data set into GPU memory, so you end up batching your test data and submitting it to the GPU in loops.

Once all this runs, you’ve got a trained model that can take image inputs (in this case, hand-written digits) and classify them to decimal numbers (0-9). Magic!


Code minutiae, October 23, 2017

For some reason, identifier schemes that are global unique, coordination-free, somewhat humanely-representable, and efficiently indexed by databases are a thing I really like. Universally Unique Lexicographically Sortable Identifier (ulid, for humans) is one of those things. Implementations available for dozens of languages! They look like this: 01ARZ3NDEKTSV4RRFFQ69G5FAV.

Paul Ford’s website is twenty years old. For maybe half that time I’ve been extremely jealous of how well he writes about technology without being dry and technical. When I grow up, I’ll write like that!

How Awesome Engineers Ask For Help. So much good stuff there, I can’t quote it. There’s something in there for new and experienced engineers alike. In particular: don’t give up, actively participate in the process of getting unstuck, take and share notes, give thanks afterwards.

The best time to work on your dotfiles is on weekends between high-intensity project pushes at work. No better time to do some lateral thinking and improving of your workflow. Feels good, man.


You must be this tall to ride the services

If I were trying to convince myself to extract a (micro)service, today, I’d do it like this. First I’d have a conversation with myself:

  • you are making tactical changes slightly easier at the expense of making strategic changes quite hard; is that really the trade-off you're after?
  • you must have the operational acumen to provision and deploy new services in less than a week
  • you must have the operational acumen to instrument, monitor, and debug how your applications interact with each other over unreliable datacenter networks
  • you must have the design and refactoring acumen to patiently encapsulate the service you want to build inside your current application until you get the boundaries just right and only then does it make sense to start thinking about pulling a service out

I would reflect upon how most of the required acumen is operational and wonder if I’m trying to solve a design problem with operational complexity. If I still thought that operational complexity was worthwhile, I’d then reflect upon how close the code in question was to the necessary design. If it wasn’t, I would again kick the can down the road; if I can’t refactor the code when it’s objects and methods, there’s little hope I can refactor it once its spread across two codebases and interacting via network calls as API endpoints, clients, data formats, etc.

If, upon all that reflection, I was sure in my heart that I was ready to extract a service, it’d go something like this:

  • try to encapsulate the service in question inside the current app
  • spike out an internal API just for that service; this API will become the client contract
  • wrap an HTTP API around the encapsulation
  • make sure I have an ops buddy who can help me at every provisioning and deployment step, especially if this sort of thing is new and a monolith is the status quo
  • test the monolith calling itself with the new API
  • trial deploy the service and make some cross-cutting changes (client and server) to make sure I know the change process
  • start transferring traffic from the monolith to the service

In short, I still don’t think service extraction is as awesome as it sounds on paper. But, if you can get to the point of making a Modular Monolith, and if you can level up your operations to deal with the demands of multiple services, you might successfully pull off (micro)services.


How methodical and quality might keep up with fast and loose

I’ve previously thought that a developer moving fast and coding loose will always outpace a developer moving methodically and intentionally. Cynically stated, someone making a mess will always make more mess than someone else can clean up or produce offsetting code of The Quality.

I’ve recently had luck changing my mindset to “make The Quality by making the quantity”. That is, I’m trying to make more stuff that express some aspect of The Quality I’m going for. Notably, I’m not worrying too much if I have An Eternal Quality or A Complete Expression of the Quality. I’m a lot less perfectionist and doing more experiments with my own style to match the code around me.

I now suspect that given the first two developers, its possible to make noticeably more Quality by putting little bits of thoughtfulness throughout the code. Unless the person moving fast and loose is actively undermining the quality of the system, they will notice the Quality practices or idioms and adopt them. Code review is the first line of defense to pump the brakes and inform someone moving a little too fast/loose that there’s a Quality way to do what they’re after without slowing down too much.

Sometimes, I’m an optimist.


A strange world of mathematical and computational complexity

Over the past few weekends, I’ve been reading on two topics which are way out of my technical confidence. I’ve spent the majority of my software development career building web applications and neither of these are very coincident with web apps right now:

  • blockchains, cryptocurrencies, and autonomous contracts
  • machine learning, neural networks, general purpose GPUs, deep learning

With blockchain stuff, there are very interesting fundamentals underlying a sprawling system of hype and information asymmetry. Every time I go in, it’s “shields up!”, time to defend myself from people trading reputation for short-term speculation or actively spreading inaccurate information. In other words, here comes the snake oil salesmen!

That said, there are cool ideas in there. Solidity is a language built into Ethereum for writing programs that run alongside the blockchain. You wouldn’t want to build a normal application this way, but if you want some degree of confidence in a system, like voting or accounting, a system inside Ethereum and Solidity might make sense. Even more strange, to a web developer, you have to pay for the compute time that program requires in Ethereum itself. Strange and intriguing!

By comparison, machine learning is equally hyped but has little speculation. They both involve about the same level of mathematical and computational complexity. Which is probably how I’ve managed to avoid both so far: I’m far better at social reasoning, which is a big deal in web applications, than I am at math. But I’m trying to change that!

I found deeplearning.js and it seems like a nice gateway into the domain of building neural networks for machine learning, computer vision, etc. And it utilizes your GPUs, if present, which is pretty neat because GPUs are strange little computers we seem to have increasingly more of as the days go on.

No idea where this line of thinking is going. All I know is it’s more fun than reading about yet another client or server side framework. ;)


Just keep writing, October 16, 2017

I watched pal Drew Yeaton work in Ableton briefly and it was pretty incredible. He laid down a keyboard and drums beat, fixed up all the off-beat stuff, and proceeded to tinker with his myriad of synthesizers and effects rack with speed. I had no idea what his hands were doing as he moved from MIDI keyboards, mouse, and computer keyboard like a blur. Seems pretty cool!

I talked myself into and out of porting this website to Jekyll three times over the past week. Hence, the writing dropped off, which is silly because I just blogged about not tinkering with blog tools in the last month. WordPress.com doesn’t quite do the things I want it to and its syntax highlighting is keeping the dream of the nineties alive. I’m writing these short form bits in lieu of a sidebar thing for now. No idea how I’ll make do with the code highlighting.

The Good Place is an amazing show. Ted Danson, Kristen Bell, and the rest of the cast are fantastic. There is an amazing-for-a-comedy twist. Do not read the internet until you watch the first season of this show. It’s just started season two, get on board now!


One step closer to a good pipeline operator for Ruby

I’ve previously yearned for something like Elm and Elixir’s |> operator in Ruby. Turns out, this clever bit of concision is in Ruby 2.5:

object.yield_self {|x| block } → an_object
# Yields self to the block and returns the result of the block.

class Object
  def yield_self
    yield(self)
  end
end

I would prefer then or even | to the verbosely literal yield_self, but I’ll take anything. Surprisingly, both of my options are legal method names!

class Object

  def then
    yield self
  end

  def |
    yield self
  end

end

require "pathname"

__FILE__.
 then { |s| Pathname.new(s) }.
 yield_self { |p| p.read }.
 | { |source| source.each_line }.
 select { |line| line.match /^\W*def ([\S]*)/ }.
 map { |defn| p defn }

However, | already has 20+ implementations, either of the mathematical logical-OR variety or of the shell piping variety. Given the latter, maybe there’s a chance!

Next, all we need is:

  • a syntax to curry a method by name (which is in the works!)
  • a syntax to partially apply said curry

If those two things make their way into Ruby, I can move on to my next pet feature request: a module/non-global namespace scheme ala Python, ES6, Elixir, etc. A guy can dream!


Heck yeah, October 09, 2017

Simon Willison returns to blogging, in peak form nonetheless. Heck yeah!

Janet Jackson, “Rhythm Nation”, posted by Billy Eichner. Heck yeah!

A rocket engine made of nuclear fission. Note the “poison rod” in the schematic. Heck yeah engineering, heck no they actually tested this on Earth, heck yeah they never flew it!


Strange Loop 2017

I was lucky enough to attend Strange Loop this year. I described the conference to friends as a gathering of minds interested in programming esoterica. The talks I attended were appropriately varied: from very academic slides to illustrated hero’s journeys, from using decomposed mushrooms to create materials to programming GPUs, from JavaScript to Ruby. Gotcha, that last one was not particularly varied.

In short, most of the language-centric conferences I’ve been to in the past were about “hey look at what I did with this library or weird corner of the language”, though the most recent Ruby/Rails conference are more varied than this. By comparison, Strange Loop was more about “I did this thing that I’m excited about and its a little brainy but not intimidating and also I’m really excited about it.”

Elm Conf 2017

I started the weekend off checking out the Elm community. I already think pretty highly of the language. I would certainly use it for a green-field project.

Size, excitement, and employment-wise, Elm is about where Ruby was when I joined the community in 2005. Lots of excited folks, a smattering of employed folks, and a good technical/social setup for growth.

A nice thing about the community is that there is no “other” that Elm is set against. Elm code often needs to interface with JavaScript to get at functionality like location or databases, so they don’t turn their nose up at it. It’s a symbiotic relationship. Further, most Elm developers are probably coming from JavaScript, so its a pretty friendly relationship. This is nice shift from the tribalism of yore.

It’s also exciting that Elm is already more diverse than Ruby was at the same point in its growth/inflection curve. Fewer dudes, more beginners, and none of the “pure Ruby” sort of condescension towards Rails and web development.

Favorite talks:

  • “Teaching Elm to Beginners” (no talk video), Richard Feldman. Using Elm at work requires teaching Elm to beginners. Teaching is a totally different skill set, disjoint from programming. When answering a question, introduce as few new concepts as possible. Find the most direct path to helping someone understand. It’s unimportant to be precise, include lots of details, or being entertaining when teaching. You can avoid types and still help students build a substantial Elm program.
  • If Coco Chanel Reviewed Elm, Tereza Sokol: Elm as seen through the lens of high and low fashion. Elm is a carefully curated, slow releasing collection of parts ala Coco Chanel. It is not the hectic variety of an H&M store.
  • Accessibility with Elm, Tessa Kelly: Make accessible applications by enforcing view/DOM helpers with functional encapsulation and types. Your program won’t compile if you forget an accessibility annotation. A pretty good idea!
  • Mogee, or how we fit Elm in a 64x64 grid”, Andrew Kuzmin: A postmortem on building games with Elm. Key insight: work on the game, not on the code or engine. Don’t frivolously polish code. Use entity-component-system modeling. Build sprite/bitmap graphics in WebGL by making one pixel out of two triangles.

The majority of the talks referenced Elm creator Evan Czaplicki’s approach to designing APIs. He is humble enough that I don’t think this will backlash like it did with DHH’s opinions did with Rails.

By far the biggest corporate footprint in the community and talks was NoRedInk. Nearly half of the talks were by someone at the company.

Most practical talks from StrangeLoop

Types for Ruby: it seems like they’ve implemented a full-blown type system for Ruby. It’s got all the gizmos and gadgets you might expect: unions, generics, gradual typing. It applies all its checks at runtime though, and they didn’t say if it does exhaustive checking, so I’m not sure how handy it would be in the way that e.g. Elm or Flow are. On my list of things to check out later.

Level up your concurrency skills with Rust. Learning Rust’s concepts for memory and concurrency safety, i.e. resources, ownerships, and lifetimes, can help you program in any language. Putting concurrency into a system is refactoring for out-of-orderness and most likely a retrofit of the underlying structure. Rust models memory like a resource, ala file handles or network sockets are modeled by the operating system. Rust resource borrowing in summary: if you can read it, no one else can write it; if you can write it, no one else can read or write it; borrows are checked at compile time so there is no runtime overhead/cost.

GPGPU programming with Metal. Your processor core has a medium sized arithmetic logic unit and a giant control unit (plus as much memory/cache as they can spare). A GPU is thousands of arithmetic logic units. Besides drawing amazing pictures, you can use all those arithmetic logic units to train/implement a neural network, do machine vision or image processing, run machine learning algorithms, and any kind of linear algebra or vector calculus. Work is sent to the GPU by loading data/state into buffers, converting math instructions to GPU code and load that into GPU buffers, and then let the GPU go wild executing it.

Seeking a better culture and organization of open source maintainership (no talk video). Projects are getting smaller, more fragmented, and attracting no community (ed. the unintended consequence of extreme modularity?) Bitcoin and Ethereum have very little backing despite the astronomical amounts of money in the ecosystem. We need a new perspective on funding open source work. Consumption of open source has won, but production of open source is still in a pretty bad place.

How to be a compiler. Knitting is programming; you can even compile between knitting description pseudo-languages. Implemented Design by Numbers, a Processing predecessor, as transpiler to SVG.

Random cool things people are really doing

Measuring and optimizing tail latency. Activating instrumentation and “slow-path” techniques on live web requests that run so long they will fall into the 99th percentile. Switch processor voltage to “power up” a processor that’s running a slow request so it will finish faster, e.g. switch a core from low power/500MHz mode to high power/2GHz mode.

Really using functional ideas of composition and state in production, consumer-facing applications (e.g. the NY Times) and using ML-style type checkers with JavaScript (e.g. Flow and Elm).

My two favorite talks by far: Making digital art with JavaScript, WebGL, vdom and immutability. Scraping/querying/aggregating image data from various space missions (e.g. Jupiter and Pluto flybys).

Facebook stopped using datacenter routers and started building their own servers that program the networking chips a router would use from CentOS, basically giving them programmable routers that deploy like you would update infrastructure like Nginx or memcached. I wonder when/if treating network devices as software will scale down to your typical large company?

Strange Loop takeaways

  • a conference of diverse backgrounds and experiences is a better one
  • my favorite talks told a hero’s journey story through illustrations
  • folks in this sphere of technology are taking privacy and security very seriously, but the politics of code, e.g. user safety and information war, were not particularly up there in the talks I went to (probably by self-selection)
  • way more people are doing machine learning applications than I’d realized; someone said off-hand that we’d “emerged from the AI winter in 2012” and that struck me as pretty accurate
  • everyone gets the impostor syndrome, even conference speakers and wildly successful special effects and TV personalities like Adam Savage

If you get the chance, you should go to Strange Loop!