Dimitri Glazkov

Making Fiftyeight days beforeThis one will be a bit unusual. Instead of my typical sermons…e-LOC

· 3 min read

Placing and wiring nodes in Breadboard2023This one is also a bit on the more technical side. It’s…I’d like to introduce a metric for developer APIs that I call “e-LOC”. I am not great with names, so it’ll just have to wait until someone gives it a better one. Meanwhile, let’s explore it.

The definition of e-LOC is as follows: e-LOC of a technology is the order of magnitude of lines of code that one needs to write to get to a working product prototype using this technology. Applying the usual metric prefixes, we get ourselves a nice scale: 0-LOC, deca-LOC, hecto-LOC, kilo-LOC, mega-LOC, and so on.

Shadows and Curses2022The second curse can be seen as the interplay between “ 🔮…Developer surface2021I mentioned this concept before, and I feel like it’s worth expanding…Various APIs reside on different parts of this scale. A finished, functioning product is 0-LOC. On the other side of the scale is a developer surface that requires gazillon of lines of code to produce something that we can reasonably offer to our friends and colleagues to try out. Want to build a web-based product prototype? It’s probably going to be hecta-LOC. A brand new Web rendering engine? You’re likely looking at a mega-LOC.

Degrees of Open Source2023I realized that I never captured what I learned about the nature…The order of magnitude serves as a decent measure of developer barrier to entry. For a deca-LOC, it’s just a handful of lines of code, so the barrier is very low. For Web rendering engines, only a skilled, determined, and well-funded team of developers can overcome it.

Four layers2023Every new technological capability usually spends a bit of time in a…Because of this barrier to entry property, the e-LOC can serve as a leading indicator for the amount of innovation that will happen around a given technology. Put differently, e-LOC can be used to measure innovation potential of a technology.

New OSes and rendering engines are one-shot, lonely affairs. They undoubtedly innovate, but the fruits of this innovation are singular and rare. On the other side of the scale, if it takes 60 lines to make a working Discord bot that generates pictures using Stable Diffusion, nearly anyone can do it. Expect a lot of people to be messing around with these APIs and trying to build something interesting with them.

The cost of opinion2022It appears that I’ve been writing this essay since 2012, never quite…Another useful property of e-LOC is that it also indicates how much opinion is contained within the API or technology. More opinionated APIs will tend to have lower e-LOC, while the less opinionated ones will trend higher in numbers. Of course, lower e-LOC doesn’t make the API good. That’s not what this metric measures. Some of the most troublesome, gnarly APIs are deca-LOCs.

Declarative vs. imperative2024Every abstraction layer brings some “declarativeness” with it, shifting the burden of…The opposing directions of opinion and developer barrier to entry present an interesting tension in innovation potential. A 0-LOC technology is fully opinionated and requires zero lines to use. Because of that, it also has zero innovation potential. The innovation potential increases proportionally to the amount of opinion that could still be added, yet the barrier to development tapers it off as the e-LOC scale increases.

The developer funnel2021If I ever chatted with you about developer experience in person, I’ve…Advancing the state of my earlier developer funnel framing, we can draw this as a curve to illustrate the relationship of technology innovation potential and e-LOC. The curve starts at near-zero at the beginning of the scale, then rapidly expands to its maximum value at around deca- and hecto-LOC, then drops off in a power law fashion as the magnitude of lines of code keeps increasing. The near-zero at the start is significant: in my experience, even finished products end up growing APIs, whether they want it or not.

Polarity-based API layering2021While discussing API design, one pattern that caught my eye was polarity-based…r/K selection and innovationthree days afterI’ve been thinking about the different conditions under which innovation emerges, and…Growing dandelionslinks here, 2022Another significant condition is legibility. To allow an idea to spark imagination…No ship umslinks here, 2023Software dandelions are tiny bits of software we write to prototype our…Wandererlinks here, 2023I won’t go into technical details of how that’s done in this…This metric gives us a nice way to orient our thinking around the purpose of the technology we might be building. How much innovation do we want it to spur? If we want to minimize it, we ship only finished products. If we want to maximize it, we must relentlessly drive our APIs to be in deca-LOC range.

Show 2 comments
  1. Growing dandelions – Dimitri Glazkov linked here · October 7, 2022

    […] weighty idea-elephant. A litmus test: can a useful program built with our API fit into a tweet? The deca-LOC framing is useful here, though it’s not just the number of lines of […]

  2. No ship ums – Dimitri Glazkov linked here · January 7, 2023

    […] bits of software we write to prototype our ideas. They might be as small as a few lines of code or deca-LOCs, yet they capture the essence of some unique thought that we try to present to others. If, in a […]