95% of Programming Isn’t Hard
Usually I sit down and write these in one pass. This month I kept iA Writer open in a window for a while and just took notes on thoughts, in in sort of a Matt Levine -esque style .
The pareto principle for engineering difficulty
Once you’re settled in, 95% of programming isn’t hard. It doesn’t involve algorithms, hard design problems, performance or storage constraints. It isn’t worth blogging about.
5% or less of programming is hard: it’s the stuff that interview questions refer to. You might need to think about algorithms , might need to try out multiple strategies before deciding on the one.
It’s easy to screw up the 95%, though - by bad day-to-day engineering practices, by overcomplicating problems, and lots of other ways. It’s common to screw up the 95%, and the numbers work out that you have plenty of bugs in systems that are doing ‘easy’ things.
We should balance our attention for the majority of easy tasks and the minority of hard ones. Why do interviews only ask about knowledge that you need a few times a year, and not about habits you need every day? Should we use a language or platform that makes the routine code convenient, or the impressive code more impressive?
Reading
We are all sufferers from history, but the paranoid is a double sufferer, since he is afflicted not only by the real world, with the rest of us, but by his fantasies as well.
I finally read The Paranoid Style in American Politics, the famous 1964 piece by Richard Hofstadter .
It’s still relevant but I think two things have changed about the paranoid style:
- The paranoid people are winning. In Hofstadter’s time they were a marginal viewpoint: now they’re the default. The radius of QAnon and other fringe theories is staggeringly large right now. Even folks who don’t identify with Q casually accept many of its idiotic theories.
- The obsession with citing facts in paranoid literature that Hofstadter mentions is no longer a thing: modern paranoia is untethered.
Here is a mild take on JavaScript
Using objects for data is one of the worst things about JavaScript. It’s really nice in other languages that you have one kind of object that’s part of your application and another that’s used for representing data. Ruby’s Hash, Python’s Dictionary, Java’s many datatypes, etc. JavaScript, traditionally, uses the same basic idea to represent all kinds of objects.
Basically every time that someone tries to use JavaScript objects for data, they write a security vulnerability by way of prototype pollution. The Map
and Set
datatypes help with this, but their relative unpopularity and inability to be directly serialized into JSON - and the fact that most developers are late to learn about them - means that a lot of people are just using objects for everything. And that’s, really often, a problem.
The core cool idea
My usual advice for finishing side projects includes some variation on “be relentless about simplicity,” which translates into avoiding feature creep. The inverse is more instructive, though: know what the cool part is. For example, this month I made a small multiples visualization of a YouTube channel that the internet generally liked. I made the project in one sitting and spent the last 45 minutes trying to make it interactive, so that you could click on the videos or hover over them and hear audio from each one. I was annoyed at this process because I was trying to implement it in a simple and lightweight way, and there was none. But I decided to avoid it: because making the thing interactive was too much work, but because I knew that what I had already made was the cool part. The interactivity might make it 10% cooler, but I had already done was the embodiment of the driving question, the implementation of the core cool idea.
Know what the core cool idea is. Side projects need one. If the core idea isn’t cool, you won’t be able to make the project cool by adding more stuff.
Politics
I’m working through Henry George’s Progress and Poverty as a free audiobook , which has influenced my political-economic leanings from a distance for a while.
I think a bit about housing nowadays. I live in a major city with a housing crisis. Every single major American city has a housing crisis. Here’s one of my thoughts that I’m trying to refine:
Housing is both real (it can be used) and capital (it is a store of value). In coastal cities, owning a $1M house is more similar to owning $1M of stock than it is to owning $1M of cars or computers. The real goods depreciate in value quickly, the house is expected to gain value. Buying & selling the car is like buying & selling another real good, whereas the trading in real estate has stock-like tax advantages. But unlike more commonly accepted forms of capital (like stocks or bonds), the appreciation of the house is supposedly natural. When its value decreases, we pity the owner, whereas we tend to see crashing stocks as an ‘expected risk’.
Housing doesn’t have to be have so much like capital, and in many places it isn’t. But in America it does: both the political left and right are attached to the idea of housing being a wealth creation strategy.
The take is: housing can’t simultaneously produce wealth, be a safe investment, and be produced in enough quantity to avert crises. That’s the punchline. We want it to be part of two exclusive categories. It can’t, and most people end up advantaging the investment characteristics over the thing-people-need-to-live-in ‘real good’ characteristics.
To solve the housing crisis, we need to make housing worse, as an investment.
The answer to everything is maybe
Reading types: a programmers compendium really drives home the point that most bright-line definitions in software engineering aren’t real. What a ‘strong type system’ is is really poorly defined. Same with a lot of concepts – things like ‘functional programming’ are more styles than they are categories.
Even ideas about performance aren’t really… real. Many languages have different implementations of, say, sorting, depending on data types and list lengths: saying “sorting is O(n log n)” is really a gamble.
Is HTML a programming language? The answer is sort of ? You can do logic in it, like you can do logic in almost every system: CSS is a programming language. Calling one ‘markup’ and the other… the only mainstream example of its rather peculiar family doesn’t really help anyone understand anything.
It’s hard to find simple technology
I think my biggest disappointment with Rust is that it isn’t simple. It can create simple programs: with the right compiler flags, it’ll produce very small executables with minimal fluff, but the language itself is dramatically complex. The compiler is huge and fiendish. Language features are numerous and subtle.
Other mainstream systems are complicated. V8 is an incredible engineering accomplishment and is really, really sophisticated. Practically every language and its implementation has grown significantly.
There are kind of few reasons to worry about this complexity in the 9-5, but in my free time it has me thinking about things like Tiny BASIC , Forth, and Scheme - though even in the case of Scheme it’s hard to find an implementation that hasn’t grown a JIT or other fancy features.
On the Rust/Go-side of things, I’ve been paying a lot of attention to Zig - I think it’s pretty neat. It isn’t a ‘big idea’ language, just a really cleanly-designed C-like language that seems fix the main problems with C. And it’s really simple: the syntax is simple and it doesn’t have many big theories. It seems like it occupies a tiny portion of the current mindshare but for little CLI tools and systems software, could be really important.
After I started writing this, the ever-interesting Everest Pipkin published a list of tiny tools , which is absolutely incredible - fantasy consoles is chock full of simple-at-their-core systems.
Helping to avert the apocalypse
In almost every way, the world is teetering on the brink. What can you do? It’s tempting to shut off the news and just get some work done when you can focus, and admittedly that’s what I’ve been doing most of the time. But there has to be something else.
In America, obviously part of this is voting for Joe Biden . He’s the ‘anti-apocalypse’ candidate who couldn’t do worse than his predecessor even if he tried. He wasn’t myfirst pick. But we aren’t choosing favorites anymore: we’re trying to avert the apocalypse, and there is no excuse to sit it out. If you don’t vote and the apocalypse happens, I’m blaming you.
Then there are other campaigns: donating to small, competitive candidates throughout the country. The smartest way to do this, I think, is by spreading donations between races that are picked by researchers. Maciej Cegłowski has two such efforts: The Great Slate (four rural house campaigns) and The State Slate (eleven state house campaigns). He researches & interviews candidates, configures an ActBlue page to split donations amongst them, and then you donate: it’s simple. Blueprint is doing something similar - splitting donations between ActBlue campaigns - but has visual polish like a fin-tech company and a more DC-insider staff. Both are ways of efficiently allocating donations to useful campaigns. They’re like value-factor index funds for political change.
When you allocate resources to useful campaigns, they are often Democrats running in conservative areas, so they’re often misaligned from you in one or more ways. It sucks that my donations go to folks with wishy-washy views on immigration policy or transit: but, again, we aren’t picking favorites anymore.
Nostalgia bot
I’ve been following every lot dc for a while and it’s the first time that a Twitter robot has really resonated. I lived in DC from 2009-2017 and seeing a familiar house or restaurant flash by in my Twitter feed made me feel nostalgic, thankful, or sad in turns. DC is a good place.
Content
To try and feel all right: Beginner vs Professional Opera Singer . Jeano & Jeannette . 1st Coffee Shop to mix Lean & Xans .
Relevant things: Why we’re afraid to defund the police (Carlos Maza is doing very good work as an independent). leaving facebook: a critique of fb’s policies, priorities, and ideologies, ft. hannah arendt . Chomsky/Buckley debate , Chomsky’s follow-up .
I would really, really like to stop linking to YouTube. As soon as folks publish anywhere else, I’ll switch. I would highly recommend using VLC to watch YouTube when you can, so you are somewhat protected from their information harvesting and behavioral tinkering.
By the way - if you ever have questions to things I might know, or can help out with, myemail’s on /about. I’ve fielded a few friendly emails recently and it’s sort of nice.
- DJI Mavic 3 Drone
- Broccoli: Syncing Faster by Syncing Less
- TikTok and the Sorting Hat
- Crux SQL
- UFCS for C in Clang
- Boon. Says Goodbye
- I Still Use an Old PowerPC Mac in 2020
- Web apps aren't tech. They're “tech”
- Why I started GigoBooks, and how I got the idea for a startup
- My Custom Payment Implant
- 95% of Programming Isn’t Hard
- Derek Sivers and the Art of Enough
- Silicon MacBook could launch on 27 October and cost $800
- Tech Sector Feeling Covid-19’s Economic Pain
- CurveBoards: Integrating Breadboards into Physical Objects
- Solving the expiring. X.509 root CA certificate-mageddon, partly at least
- Starting your fundraising pitch deck
- Berners-Lee 'Sorry' for Slashes (2009)
- Woodman’s Markets to deploy aisle-roving robots
- The Antitrust Hearing, the Role of Congress, CEO Questions