Usually, when we computer people turn our minds to errors it is with an undercurrent — sometimes an overcurrent — of horror. We recall the terrible mistakes we’ve made: the servers that went down and never came back up, the deployments that resulted in a blank homepage and an accusing error in the console, the time we deleted our boss’s account or reset everyone’s password to our own.
But I love errors.
Errors can be hilarious. Consider the case of Nuclear Gandhi! In the first Civilization game, for some reason, towards the end of the game, Gandhi would suddenly become incredibly aggressive and threaten to nuke everyone — which is very unlike him. It turned out that aggressiveness was represented with an unsigned byte. When Gandhi’s was set to 1 and the player took an action, like adopting democracy, that would reduce aggressiveness even further, the value wrapped around to 255: MAXIMUM AGGRESSION. Players liked this bug so much that new versions of the game still have Nuclear Gandhi.
Errors can also make us inventive. In Wing Commander, the game threw an error on completion and no one could figure out why. But they had to ship. So they just changed the error message to a message of congratulations! Wontfix; close ticket.
Even more, embracing errors is about embracing all of the great parts of our humanity. In her book, Being Wrong, Kathryn Schulz contrasts ancient understandings of erring with more modern ones. In the former, beloved by philosophical hard hitters like Plato and Thomas Aquinas, errors are the product of a gap between the true world and the flawed human mind as the latter attempts to interpret the former.
This is a view of wrongness that underlies a lot of traditional programming error handling: using types and other types of introspection during specification and compilation to find gaps in understanding so they can be rectified before being sent out into the world. It is a perspective that gives us a yearning for correctness, for perfection.
There is another, maybe more optimistic, view of erring. This more modern view, originating in the Enlightenment, suggests that though this gap is the result of imperfect perception, it can be faced and overcome, as we asymptotically move towards truth. In this way, errors can be an important epistemological tool. By seeing where my understanding fails, I can see where I can be improved. I can embrace the humility of learning to say I don’t know and through this learn to better interpret the universe.
In this view, we still need the same guardrails for errors, but interactive programming tools from REPLs to log-based programming (the poor woman’s REPL) grow in strength. As we err, we are able to encounter where the map and the territory diverge and engage in iterative discovery. We work side-by-side with the machine.
Yet it’s possible that seeing the world perfectly as it is might not even be the right goal. As Schulz notes,
“seeing the world as it is not” is pretty much the definition of erring — but it is also the essence of imagination, invention, and hope.
That is, the gap between what we expect and what is can be a fruitful space. Maybe we should not worry about closing it down but about working with it. This could mean accepting imperfection as opposed to trying to stop it; making our programs more resilient rather than seeking to make them error free.
In the original map-reduce paper, Google engineers mention that if a certain processing iteration failed a number of times, it was set aside and the process proceeded. In your code, it might look like a function returning a data structure that does not conform to the expected data shape instead of throwing a ERRWRONGSHAPE
.
Is it important that all data flowing through a program perfectly meet a pre-ordained shape? This question is vital not just conceptually but socially, as algorithmic decision-making systems unfurl their tendrils across the world, like the dark ending of Little Shop of Horrors.
The data that makes these programs possible is more and more often sourced from surveillance systems, both camera surveillance and data mining. As we strive to perfect these systems, we strive to “perfect” surveillance. The yearning for perfection is revealed as a yearning for controllability. Another way to say this is: You can’t have a surveillance state if you admit that errors are inevitable.
Once we accept the errorability of computing endeavors, the case for these inherently unjust systems unravels. The key idea animating the adoption of machine learning systems is the belief that they are able to see things humans cannot and that because of this, they can be fairer, more insightful, and more objective than flawed humans. If they cannot — and they can’t — their use becomes indefensible. When we embrace them, then, errors become our allies in our determination not to live completely machine-readable lives.
Beyond better understanding our spheres, beyond backing off dark uses for technology, studying error rectification is a potent site for sociological understanding. When computer historian Mar Hicks talks about COBOL and the robustness that means it is still powering unemployment systems years after the maintainers were laid off, my ears prick up at the suggestion that COBOL designers used human language instead of formulas as a model because they wanted to reduce errors. Why do we, as humans, expect sentence-like structures to reduce error overall? Do all humans think this? Does it work? How does this error reduction compare across COBOL and, say, Ruby?
But to start answering these questions, we need to embrace errors — to acknowledge them, to engage them, to love them. In computing, that means accepting them and observing them, rather than trying to stamp them out. Even when that can be scary.
Schulz writes,
We want to turn away from error because it reminds us of our existential despair — that we are separate, from truth, from one another — but also the only true way to engage and to create and imagine is to risk error.
So before you react to a mistake or error by trying to come up with a plan to be sure it never happens again, consider asking instead: How could I have written this so that we could identify and understand the gap without the system itself failing? You’ll make the world a little bit better each time.
Concepts in this essay are elaborated on in Kablooie, a talk I did in 2018. If this article was interesting to you, I recommend checking it out.
You Are Not Lazy
by Christine Cha
"I just can't get myself to start this thing."
"I'm such a procrastinator."
"I'm so lazy."
You, my fellow programmer, have learned languages and built worlds. You have spent countless hours asking questions and answering them. You are a detective, an architect, a designer, a writer, a researcher, an artist. You, my friend, are not lazy.
I reject the idea that when I hit this wall, I must force myself to continue. I reject the idea that it is a personal failure to lose motivation.
The practical suggestions to combat stalled progress often include making lists, inventing deadlines, and something involving sticky notes. I do believe these things can be helpful, especially when looking to improve efficiency or organization.
But when you're really stuck?
Like when you're "staring at your phone or the wall for the past 13 weekends feeling more and more guilty about not working on the thing, causing you to dislike even thinking about it" stuck?
Here's what seems to help me.
- Acceptance. I can stop the cycle of guilt immediately by just deciding not to do this task at all. No more pushing it to next week, no more feeling like I'm behind schedule.
- Indulgence. Instead, I'll focus on whatever I do feel like doing. Something that requires no convincing. Pursue a totally different hobby. Re-binge The Wire. Catch up on some extra, guilt-free sleep. The important parts here are to 1) reset my mind and 2) reclaim that feeling of joy.
- Recovery. The emotional toll of feeling guilty about not doing something is heavy. If I'm not recovered, just thinking about the original project can still overwhelm me with a sinking, deflated feeling. Depending on how deeply I was "stuck", I could need a break for a few days or even years to really heal.
- Analysis & adjustment. Once I feel ready, I can take a critical look at the project I wanted to tackle. What threw me off? What changes could I make that would make it more appealing? Some common types of changes include:
- Scope. This task might be too large for me in my current circumstances. I'm far likelier to commit to a smaller, well-defined task (ex: "make a 3d sphere appear in the browser") than a large, ambiguous one (ex: "start building a 3d game"). I can always (and very often do) expand it as I go.
- The right level of challenge. If it's very similar to work I've done before, it might feel boring. On the other hand, if there are too many unknowns, I might not know where to even start. The delicate balance of familiarity vs. novelty is key to sparking motivation.
- Subject matter. Why am I doing this work? Because it's fascinating? Beautiful? Hilarious? Impactful? If I find myself having trouble answering this — or having to convince myself it's interesting — it's often because I've chosen work I ”should be doing" rather than what I want to be doing.
- Repeat. Sometimes I'm able to go through these steps, pinpoint a change, and the inspiration seems to just flow back. But usually — especially when I'm already at reduced capacity (maybe due to a global pandemic?) — I find that one round of this process doesn't quite get me there. So I put the laptop down again. Cut the scope down again. Think of some new ideas. Play some video games. Try again next weekend.
I mentioned this could take years. It's particularly difficult after having practiced a skill for a long time without spending time on why, like many things we pick up as kids. I've played piano since I was three years old; now, as an adult, it's tough to enjoy without negative thoughts (frustration, guilt, shame) flooding in at the first wrong note. I still haven't pinpointed exactly what I love about playing after all these years, but I'm working on it.
In contrast, I remember trying to learn how to code a few times, with zero success. It was always somehow boring yet impossible at the same time, and I dropped the idea of ever becoming a developer. Years later, I wanted to improve my skills as a designer by learning "how to change the color of a button" and, well, now I'm a software engineer.
So far, I still love writing code. I attribute a large portion of that to how clear — and limited — my initial intent was. When I saw my button change color for the first time, I was absolutely thrilled. It wasn't a career goal, or a self-imposed obligation. I was (and am still!) just chasing that excitement.
When I'm feeling stuck, it's not because I'm lazy. It's because that excitement isn't there. It's because there's some sort of conflict; something isn't right. So let's do our programming duty and start debugging.
Dear Zu
Dear Zu is an advice column where anyone can pose a question to our community and get a taste of what it’s like to participate in RC. You submit questions (about code, tools, systems, jobs, or anything related to life as a programmer), we put them on Zulip (our internal chat system), and then we publish some of the most interesting responses from our community of over 1700 really nice programmers!
We have a fun (literally) question for Dear Zu this week, from Matt Payne!
Please describe a fun programming thing you've done (or seen) recently! e.g. filter/map/reduce are fun. Transformation matrices are fun. Socket programming is fun. The list goes on and on. What's on your list?
It turns out that people take pleasure in many different aspects of programming! Among them: fixing bugs, setting themselves unusual creative constraints, making custom themes for favorite tools, and adding emojis to absolutely everything.
Anja: Whenever I think that I am not cut out for programming, I spend an evening joyfully fixing bugs in VisiData. There is something about:
- a small contained task
- in a software that I am deeply familiar with, but still have stuff I am excited to learn about
- that has debugging + visibility tools that I am familiar with
- that brings people a lot of joy to have solved
that fills me with deep warmth and satisfaction. It is really fun for me.
Shae: I spent this past weekend making a utility to predict how long a command will take based on past completion times. All because I want to know if I have enough time to make a sandwich while I wait. https://github.com/shapr/sandwatch
Shean: A detour from actual coding: learning how to make custom themes for Sublime Text, zsh, and iTerm2 (including finally utilizing the status bar feature). For the first time in forever, I have everything exactly how I want it to look, which makes using those tools feel pretty good.
Mindy: I recently watched the first part of "'Hello, world' from scratch on a 6502" by Ben Eater and there were tons of fun things in it, but the part that struck me hardest was using an Arduino MEGA to snoop on all the 6502 signals 😍 It made me want to play breadboards!
Maren: Lately I've been having fun with various projects that have artificial constraints.
Writing a shell script that needs to parse markdown? There's a markdown parser implemented in shell, but you've established "no dependencies" as an artificial constraint -- time to learn some awk!
Other potentially fun artificial constraints are "it can't use a database" or "page size must be less than N kilobytes" or "it must be XYZ-compliant."
These kinds of projects are fun for me because you can get going quickly with tools you already know, but you learn new things about them by having to use them in new, unusual, or even unreasonable ways.
Shae: A friend of mine wrote an IRC bot in awk! It plays Uno! https://github.com/brimstone/awk-gir
Ryan: I've been putting a lot of emojis in my scripts and program outputs lately. It's not specifically a programming thing like map/filter/reduce but it adds joy and personality!
Have a question for Dear Zu? Send it to us at stillcomputing@recurse.com.
If you have thoughts about Still Computing – comments, questions, or quibbles of any kind – please reply to this email. We would love to hear from you.
We’ll be back on July 14th with a bilingual issue featuring reflections on teaching incarcerated youth to program in Peru and a deep dive into reaction diffusion systems — in both English and Spanish — plus more music, art, and Dear Zu!