Skip to main content

­I’m finally learning to code — and I didn’t start with a programming course

Computer monitor showing VS Code.
Willow Roberts / Digital Trends

The urge to learn something new is a great feeling, and if you’re playing around with the idea of learning how to code — consider yourself heartily encouraged to do so. But when it comes to studying, getting started can be a real struggle, and I know that from experience. Some people jump right in and just start hacking stuff together until it works, but that isn’t me.

Opening up VS Code just seemed scary — and more than that, pointless. Sure, I could probably make the computer print “Hello, world” by copying something I saw on Reddit, but what exactly is the point if I don’t have the slightest clue why it works or how it happened? Programming is such an alien topic to a non-techie like me, and diving in without knowing anything about how it or computers work just felt crazy.

Recommended Videos

So, after some general moping and procrastinating, I decided to approach things from a different direction.

The fun way is the best way

I like studying quite a lot, and since it’s a bit of a hobby in my eyes, it’s natural for me to do whatever sounds most fun. It’s quite common for people to go in the opposite direction, however, and want to do only what’s most efficient. In every learning community I frequent, I see these beginner questions all the time about “the best way to learn.”

In my opinion, the fun way is always the best way. The person who succeeds in learning a new thing is never the person who “studies the correct way,” it’s just the person who keeps going. Even if you miss something important in the early stages, as long as you keep going, you’ll hit a point when you need to fill that gap to progress. So you’ll fill it, and you’ll move on — and in the end, the how and when won’t even matter.

When I first thought about learning how to code, I felt more sure about how I didn’t want to do it rather than how I did want to do it. I knew I didn’t want to start writing programs when I had no idea what made those programs work. I knew that the mystery of it would just nag at me and distract me, and I also believed that understanding a bit about computers would help my understanding of programming down the line as well.

So I found a book called “Code: The Hidden Language of Computer Hardware and Software” by Charles Petzold. There were good reviews from both students and experienced programmers, and it seemed to start right at the very beginning, which I liked. But when I looked at the topics covered in the different chapters (binary codes, logic with switches, bytes and hexadecimal, adding with logic gates, registers and busses, CPU control signals, etc), I still felt a little overwhelmed. I knew I wanted to read it, but I still felt like I needed to start somewhere a little more in my comfort zone.

Luckily, there is one subject that is right in my comfort zone and can be applied to just about any topic: history. I enjoyed it in school, I studied it at university, and I love a good history book or historical drama. There are also some pretty well-known figures mixed in with the history of computers who I was already aware of — names like Charles Babbage, Ada Lovelace, George Boole, and Alan Turing. So, I decided to set the Code book aside and ease myself into the world of computer science by reading about its beginnings.

The Universal Computer: The Road from Leibniz to Turing

Book cover the universal computer.
Martin Davis

This book is by Martin Davis and it’s available as an ebook through Amazon. If you’re into history, I thoroughly recommend giving it a read, but there’s also some use in reading it even if you’re not much of a history buff. If you can’t seem to get started with this whole programming thing, picking up a book on the subject is a great way to technically begin studying without really feeling like you’re studying.

The book gets quite mathematical at points since it focuses a lot on the mathematicians whose work eventually became integral to the invention of computers. I’m not a math person at all, I’m quite terrible with numbers really, but math is one of those topics where understanding just how little you understand is kind of useful in itself.

Let’s go off on a tangent here. I think math presents quite a barrier to people when they think about computers and programming. It can certainly feel like a field you shouldn’t even bother trying to get into if you’re not good at math — and there was probably a time when that was true (though it was quite a while ago). Either way, it is not true anymore.

Math and science are what build computers — there’s no doubt about that. But programming is different. When you’re writing programs or designing software, math is more of a choice than a necessity.

The reason for this can be boiled down to one word that you’ll probably hear a lot if you do start studying: abstraction. Understanding computers is all about dealing with different levels of abstraction — which essentially means putting things in boxes and forgetting about them. That sounds like a joke, but it’s true.

For instance, any programming book or computer science course is probably going to start by explaining what binary is — the little 1s and 0s from The Matrix. You’ll learn what they are, why they exist, and what we use them for — and then you’ll put all that knowledge in a box and close the lid. Because when you start typing code, you won’t be thinking about binary. You don’t type it, you don’t do binary calculations, and you’ll really only think in bytes (groups of 8 binary digits) rather than bits (one binary digit).

Working with binary is a super-specialized job that most programmers will never do — so they close the lid of the binary box and focus on other things. Using math in programming is similar — people who are good at it will take care of the math for you and put it in a box called a “function.”

You can peek inside the box and see what’s going on if you want, but you don’t need to. You just “call” the function when you want to use it. Say you want to find out how many characters are in a string of text — it takes a lot more effort to make a computer work this out compared to a human just looking and counting “1, 2, 3.” But you don’t need to think about all that — just call the strlen() (string length) function and it will do the counting for you. That’s what the function is called in C, anyway. In Python it’s len() and in Java it’s length(). Different language, different words.

The point is, the math is taken care of one way or another. It’s hidden away in functions and libraries, and if you suspect you might need something math-y to fix your problem, it’s standard practice to find the information online.

If you really, really hate numbers, you can also just stick to high-level programming. The higher the level, the further away you are from the 1s and the 0s, and the less you have to think about math. All of this is to say — don’t let math scare you away from programming. You can avoid it while coding just like you can avoid it in life!

So, anyway, I read this book about the history of computers. I learned all about these mathematicians and what they achieved — without understanding a thing about the actual math, of course — and I thoroughly enjoyed myself.

Code: The Hidden Language of Computer Hardware and Software

Book cover code the the hidden language.
Charles Petzold

Next, I needed to get a little more down to business — which meant reading the book about how computers work. Like I said before, this book felt a little bit scary at first. It’s big and it’s detailed — and I’m not going to pretend I understood every word I read. But we don’t get anywhere by letting “good” be the enemy of “perfect.” Understanding 80% of a book is way better than understanding 0% because you decided not to read it.

Besides, it wasn’t that bad in the end. It’s written in a friendly, chatty, and humorous way, which really helps make the complicated bits feel easier to get through. It also has a website with interactive diagrams and working versions of the “mini computers” he makes throughout the book. And, most importantly, it doesn’t start with the complicated stuff.

It doesn’t even start with computers — the first chapters cover some pretty random topics like Morse code and braille. Or, at least, they feel random for a while until you get further in and realize Mr. Author has been sneakily drip-feeding you the concepts you’ll need to know later on in the book.

It’s definitely one of those “trust in the process” kind of experiences — but I can assure you it’s a well-written, well-structured book, and no matter how hard the hard bits feel to you, you’ll still come away knowing more about computers than you ever thought possible.

When you’re done, you can get another box out and stuff all the information inside — because we don’t really need to think about “how a computer works” when we’re coding. However, now that you have that information tucked away somewhere, it will come in handy at times. Certain programming concepts will naturally make more sense to you, and when the knowledge is relevant to what you’re doing, it will conveniently pop out of the box for you to make use of.

And the best part? When you start your programming course and it starts talking about binary — you’ll already know what binary is. The course will give you plenty of new information too, but having that existing context in your head will help things feel a little more familiar and manageable. This will help you focus on the programming, rather than getting distracted by every new concept and wondering whether you need to understand it or not.

That’s how it felt for me, anyway, and I’m about as badly built for programming as humanly possible. I sucked at math in school, I studied history and English literature at university, I write for a living, I study Japanese as a hobby, and until recently I had never even owned a desktop PC — and yet it’s kinda going okay. If I can do it then, honestly, anyone can.

Topics
Willow Roberts
Willow Roberts has been a Computing Writer at Digital Trends for a year and has been writing for about a decade. She has a…
Everything Apple didn’t announce at its Apple Silicon M1 event
apple silicon november event everything not announced mac lineup one more thing feature

Apple’s November event was full of Mac news, with the company showing off its new Apple Silicon M1 chips and the Macs they are now powering. But despite going into great depth on this topic, Apple completely omitted many products that were heavily rumored in the lead-up to the show.

If you want to know what did not make the cut -- and which products Apple might be working on but is not yet ready to reveal -- we have rounded up everything Apple is making us wait a bit longer to see.
12-inch MacBook

Read more
ChatGPT now interprets photos better than an art critic and an investigator combined
OpenAI press image

ChatGPT's recent image generation capabilities have challenged our previous understing of AI-generated media. The recently announced GPT-4o model demonstrates noteworthy abilities of interpreting images with high accuracy and recreating them with viral effects, such as that inspired by Studio Ghibli. It even masters text in AI-generated images, which has previously been difficult for AI. And now, it is launching two new models capable of dissecting images for cues to gather far more information that might even fail a human glance.

OpenAI announced two new models earlier this week that take ChatGPT's thinking abilities up a notch. Its new o3 model, which OpenAI calls its "most powerful reasoning model" improves on the existing interpretation and perception abilities, getting better at "coding, math, science, visual perception, and more," the organization claims. Meanwhile, the o4-mini is a smaller and faster model for "cost-efficient reasoning" in the same avenues. The news follows OpenAI's recent launch of the GPT-4.1 class of models, which brings faster processing and deeper context.

Read more
Microsoft’s Copilot Vision AI is now free to use, but only for these 9 sites
Copilot Vision graphic.

After months of teasers, previews, and select rollouts, Microsoft's Copilot Vision is now available to try for all Edge users in the U.S. The flashy new AI tool is designed to watch your screen as you browse so you can ask it various questions about what you're doing and get useful context-appropriate responses. The main catch, however, is that it currently only works with nine websites.

For the most part, these nine websites seem like pretty random choices, too. We have Amazon, which makes sense, but also Geoguessr? I'm pretty sure the point of that site is to try and guess where you are on the map without any help. Anyway, the full site list is as follows:

Read more