Hosting and hosted API design perspectivestwo days beforeWhen discussing API design strategies, I keep running into this distinction. It…
Heuristics will be discerned and codified
Polarity-based API layering2021While discussing API design, one pattern that caught my eye was polarity-based…
Shadows and Curses2022The second curse can be seen as the interplay between “ 🔮…
Here’s another developer experience pattern that I’ve noticed. When designing APIs, we are often not sure how they will be used (and abused), and want to leave room for maneuvering, to retain a degree of agency after the API is in widespread use. One tempting tool we reach for is the use of heuristics: removing the explicit levers to switch on and off or knobs to turn from the developer surface and instead relying on our understanding of the situational context to make decisions ourselves. Unfortunately, when used with developer surfaces, heuristics tend to backfire. Developers who want those levers and knobs inevitably find ways to make them without us. And in doing so, they remove that agency that we were seeking in the first place.
Becoming a setting2022For a less made-up example, let’s look at Midjourney. If asked to…
Hosting and hosted API design perspectives2021When discussing API design strategies, I keep running into this distinction. It…
Because heuristics are so tempting, this pattern is very common. Here’s the most recent example I’ve stumbled upon. Suppose you are a Web developer who wants to create an immersive experience for their users and for that, you want to make sure that their device never goes to sleep while they are in this experience. There’s an API that enables that, called the Wakelock API. However, let’s imagine that I am a browser vendor who doesn’t want to implement this API because I might be worried that the developers will abuse it. At the same time, I know that some experiences do legitimately call for the device screen to stay awake. So I introduce a heuristic: stay awake if the Web site contains a playing video. Great! Problem solved. Except… You want to use this API in a different scenario. So what do you do? You discern the heuristic, of course! Through careful testing and debugging, you realize that if you put a tiny useless looping video in the document, the device will never go to sleep. And of course, now that you’ve discerned the heuristic, you will share it with the world by codifying it: you’ll write a tiny hosted API library that turns your hard-earned insight into a product. With the Web ecosystem being as large as it is, the library usage spreads and now, everyone uses it. Woe to me, the browser vendor. My heuristic is caught in the amber of the Web. Should I try to change it, I’ll never hear the end of it from angry developers whose immersive experiences suddenly start napping.
Build a thing to build the thing2023Sometimes, building a thing to build the thing is clarifying like that.…
Making cross-cutting investmentstwo days afterOver the last few weeks, I’ve been thinking about approaches to influencing…
Developer surfacelinks here, 2021In mature developer-facing products, the developer surface becomes far more than just…
It’s not that heuristics are a terrible tool we should never use. It’s that when we decide to rely on them in lieu of developer surface, we need to anticipate that they will be discerned and codified — sometimes poorly. This means that if we wanted to rely on heuristics for some extra flexibility in our future decisions, we’re likely to get the opposite outcome — especially in large developer ecosystems.
Show 1 comment
Developer surface – Dimitri Glazkov linked here · October 18, 2021
[…] samples along with the library? Yep, these are part of the developer surface, too. Got some clever heuristics deep in your code? Or maybe just bugs? Hyrum’s Law captures beautifully the spirit of this […]