Published on

In Praise of Blackboxes When Learning to Code

Authors
  • avatar
    Name
    Ben Goldstein
    Twitter

When you're learning to code, it is absolutely fine -- and I would argue, critical -- to leave some stones unturned.

Blackbox

Blackboxes are a great way to stay productive while you learn.

Many years ago, when I was still very early into my journey learning to code -- which is to say, I could copy and paste without knowing what I was doing (whereas now I can hit CMD+C /CMD+V like a pro) -- I would ask every software engineer I came across the same question: How would you recommend I learn to code?

It's a good question, and one that I hope to help you answer here at I Can Learn to Code. But there is a caveat. Experts tend to really suck at teaching beginners. Their daily experience is so far removed from that of a newbie that it makes it difficult for them to relate the struggles of starting out.

It was a sunny day in San Francisco when I asked one of my coworkers, let's call him Will, my favorite question: _So, Will, what do you recommend? How should I learn to code? _ He smiled, and without missing a beat, responded: "Oh, you should implement Memecached from scratch." And then he put his headphones back on and returned to cranking code.

Memecached? From scratch? Um, OK. What? I had no idea what Memecached was, what it did, what it was for, and I certainly hadn't the foggiest about how I would go about building something like that. Cue a few hours of staring blankly at the Wikipedia page, which begins:

Memcached (pronounced variously mem-cash-dee or mem-cashed) is a general-purpose distributed memory-caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.

Wikipedia Source

There are 48 words in this first sentence, 43 if you exclude the pronunciation. Here is that same definition, but I've bolded all the words I was able to understand at that point.

Memcached (pronounced variously mem-cash-dee or mem-cashed) is a general-purpose distributed memory-caching system. It is often used to speed up dynamic database-driven websites by caching data and objects in RAM to reduce the number of times an external data source (such as a database or API) must be read.

That's 20/48 for a paltry 41.6% reading comprehension. And let's be real -- most of the words I could 'understand' are filler. Everything that's actually important in explaining what the hell this thing is are hidden away behind inscrutable technical jargon.

I felt like Will had led me down a rabbit hole. Of course, he didn't mean to -- he meant to be helpful. And perhaps, had I taken his advice then (I didn't), maybe I would have learned things faster. But at the time, I was already struggling with impostor syndrome. I needed immediate, tangible progress more than I needed a technical deep dive on a system whose purpose I couldn't fathom.

So I moved onto other, easier to understand projects. Things that I could quickly see results from, and that were significantly simpler to both execute and learn from. I left Memecached for another day.

Alright, so what's the point? When you are learning to code, or frankly, learning anything new, much of the content you consume will fall into roughly two buckets. There are basic things, like changing some colors on a webpage, and then there are advanced things, like our frenemy Memecached.

When you are ready for the advanced stuff, you'll know. But before that, you are risking frustration and wasted time by going too deep on something too soon.

Computers and software are complicated! They involve hundreds of interconnected systems, concepts layered on top of other concepts on top of yet more concepts. It can be overwhelming to say the least.

This is why I think you need to be strategic when you're starting to learn. It's like a student driver -- you start off in abandoned parking lots and empty side streets; you don't sally forth your first time behind the wheel into Manhattan at rush hour.

I use the term blackbox to help think about this. In my definition, a blackbox is something that you are maybe aware of, maybe not, but that you certainly don't understand. A student driver knows that there are freeways, of course, though they may not yet know how to navigate one. Similarly, a beginning programmer might know there is such a thing as Memecached, but nothing more. And that's OK!

When you're learning to code, it is absolutely fine -- and I would argue, critical -- to leave some stones unturned. You don't have to open every blackbox right away. Focus on small chunks that you can understand. Write a bunch of "Hello, World" programs. Make a simple website. Print your name to the console a hundred times.

Sticking with things that are within your grasp will help you stay focused, and most importantly, keep up your momentum. So, for now, while you're learning -- leave the blackboxes unopened. Memecached will be there waiting for your new implementation when you're ready.

I've still yet to implement Memecached from scratch, and well may never do so. But after years of learning, I can certainly understand that first sentence in the Wikipedia definition. And soon enough, so will you.