I Tried to Teach Myself to Code (and Failed Spectacularly)
It was a dark and stormy night…
No wait, come back! It really, honestly, swear-on-my-life was.
It was November 2017 and I was sat in a fisherman’s cottage in St. Ives, Cornwall, UK.
The rain was pummelling the windows as the wind rattled the roof tiles, and I was huddled in front of my laptop, staring incredulously as an ominous warning typed itself across my screen.
“Edwin is corrupted”
And a chill most certainly went down my spine.
However, this particular stormy night was not to be the beginning of a shlocky horror story.
“Edwin” was not the name of a long-dead victorian fisherman back from his watery grave to wreak havoc on the living. It was the name of a Text Editor for the arcane programming language, Scheme.
And to be honest, after several hours of increasingly ludicrous attempts to get it to work, I’d have taken my chances with a nautical ghost instead.
I had decided to learn to code, but I’d made a fatal mistake, one that seems clear now with the benefit of two and a half years of hindsight.
I had chosen a task that was beyond my abilities.
I had fallen foul of hubris.
But what is hubris? 🤔
The easy route out of here would have been to copy-paste a Webster’s Dictionary definition of ‘hubris.’ Since this is supposed to be an insightful Medium article rather than a half-hearted high school essay, I will resist the temptation.
Instead, I’ll point you towards this episode of the podcast, Stuff to Blow Your Mind:
It’s a fantastic, wide-ranging discussion on hubris that uses an excerpt of Ovid’s Metamorphoses as a jumping-off point into a discussion around modern psychological studies on overconfidence.
If you have 58 minutes and 59 seconds to spare (and if you currently find yourself without a commute for the foreseeable future, you may well!) I would highly recommend checking it out.
It includes an example of everyday overconfidence, namely the better-than-average effect, whereby the majority of people presume that they are better than the median of a given task or attribute.
The most striking example is:
90% of people think they are better than average drivers.
Which, given that there must be 50% of people both above and below the median, cannot possibly be true.
Having never had a driving lesson in my life, I can safely say that I am in the 10% of people who are confident they are worse than average at driving!
However, that doesn’t mean I’m free from overconfidence in other areas.
In fact, while the entire podcast is engaging and informative, I found it painful listening in parts because it forced me to consider whether I was guilty of overconfidence.
Now there are many moments in my life that I could point to as exceptional examples of hubris, but there was one in particular that stood out.
It was when I thought I could teach myself to code in a week.
Let’s return to that fateful night in November 2017.
It was the culmination of a five-day stay on the Cornish coast. In the morning I would be on a train, trundling the 300 or so miles back to London and my regular life.
Despite the occasional cliffside stroll and Cornish pasty, this was not a trip exclusively for leisure.
My girlfriend and I had booked the trip so that she could work on her novel. She had been tasked by her agent to add a further 20,000 words before it could be sent to publishers, and so I was faced with a week of idly twiddling my thumbs — or worse still, working.
I decided to see if I could use the break, refreshing sea air and gorgeous views to learn a new skill, and had decided I would learn to code.
In 5 days.
As if the brevity of this self-imposed deadline weren’t enough of a challenge I had also eschewed the more obvious and well-trodden routes for learning to code.
My most successful serious learning in my life up until this point had consisted of reading old, foundational texts in a given subject.
(I didn’t realize at the time that this view was espoused by Naval Ravikant, but if I had it would have only emboldened me further.)
At university, I had read Plato’s The Republic as my introduction to Philosophy. I had skimmed Mathematical Principles of Natural Philosophy to better understand my Physics lectures, and so felt assured that the same approach could be applied to learning to code.
And so, rather than opt for the dozens of contemporary online courses, I had instead chosen to plow through a book, the intimidatingly titled Structures and Interpretations of Computer Programs.
It was first published in 1985.
It is highly regarded amongst people who write software for a living, who also frequently point out that it is a serious challenge for beginners.
The fact that reviews in praise of the book mention that it is valuable only “ If you have a solid understanding of the fundamentals of computer science” should have made me think twice, given I was a rank beginner.
Still, I thought I was pretty smart, and that I could pick it up.
Even when, 3 days into the trip I started to flounder and had to turn to the accompanying recorded lectures on YouTube, I was still confident I would stay the course.
In fact, when I noticed the drop off in views from Lecture 1 to Lecture 2 I was inwardly smug that I had made it through the gauntlet that others had failed, a feeling seemingly shared by some of the comments on said video.
Yet here I was, on the eve of departing back to London, completely flummoxed by what should have been a straightforward task.
Executing a single line of code.
I had been directed to this rather intimidating looking page in an attempt to install the software in which I could actually write code.
It was described as a self-installing executable and that
“Installation of the software is straightforward”.
This would prove to be a questionable statement at best.
After an agonizing 14 minute download time which I blamed on the rural Cornish Wifi, I opened the program.
And I couldn’t get it to work.
I could enter a line of code, but I couldn’t get it to do anything.
At all.
What was I doing wrong?
When I finally figured out the key to press for the tutorial, I hit it and a message filled the screen stating:
“Edwin is corrupted”.
Was it broken? Am I broken? I felt like I was in my first drawing lesson, and had finally been handed a pen and paper and was tasked with drawing a simple shape. The pen wouldn’t draw, but I had no idea if it was because it was out of ink, or if I was holding the pen the wrong way round.
I felt very, very dumb.
I decided to turn to Reddit for answers and found a kindred spirit who had asked a similar question. I rejoiced!
I too was learning SICP from MIT. I too had downloaded their “scheme thing.” How had (username deleted) faired? Had they cracked the vagaries of the dreaded scheme thing?
Sadly the first couple of answers, for me, asked more questions than they answered.
A day may come where the following sentence strikes me as sound advice:
“You should look up emacs and slime for scheme swanks if you want an idea of how much easier it is to just get racket.”
But in that moment it was nonsense. Terrifying, unhelpful nonsense.
Finally, I found respite in the answer I had been seeking:
If you’ve just typed some code into Edwin, and you want to execute it: position the blinking cursor just past the closing parenthesis; then, while holding down the control key, press “x” and then “e”. You’ll see the result in the bottom line of the window (called the “mini buffer”). — GeoKangas, Reddit circa 2014
I held control, pressed x followed by e, and it worked!
I had learned how to write one line of code and successfully execute it.
In a week.
I thought I could learn to code in a week.
I was wrong.
In fact, I was so spectacularly wrong that the entire episode serves as a brilliant example of not one, not two but all three of the classical types of overconfidence
And to dive into what those types are, we’ll need to return to the aforementioned episode of Stuff to Blow Your Mind.
Among the discussion of Icarus and Daedalus, they present the results of a 2017 study, The Three Faces of Overconfidence — Moore, D. A., & Schatz, D.
It sketches out a model of the three most common forms of overconfidence, namely
- Overestimation: thinking that you are better than you actually are (Thinking that I’m 6'9" when really I’m 6'3")
- Overplacement: thinking you are better than you actually are relative to others (Thinking I’m taller than LeBron James. I’m not)
- Overprecision: the excessive faith that you know the truth (Being absolutely certain that LeBron has 2 rings. He has 3.)
Looking back on that confusing week in 2017 and my first failed attempt to learn to code, it’s clear I had ticked off all three failures.
I had overestimated my ability to pick up coding: I thought that by the end of the week I would be able to fully code in Scheme, while in reality, it took me almost an entire day to figure out how to use the Text Editor
I had overplaced my ability to learn SICP: despite the evidence that only 50,000 out of 704,000 people made it past the first lecture, I was confident I was at least as good as everyone in that 50,000, erroneously placing myself in at least the top 7% of people who watched the first lecture.
I was overprecise in my belief that the best way to learn something is to read an old foundational text on the subject. The material was way too inaccessible for me, and I still struggled even when switching to the recorded lectures.
I didn’t learn to code in a week.
I did learn that I don’t want to learn to code in Scheme.
And that hubris is a thing
And that choosing what you want to learn isn’t enough: you need to choose the right way to learn.