Are you thinking of joining the exciting world of computer programming?
Well, it’s a terrible time. I hear it’s murder out there for entry level positions.
Still, since computers are everywhere, I thought I’d write this guide on how to be a computer programmer. To be a programmer, there are two things you need to know.
Here’s the first thing:
That’s zero. Round and pleasant. You don’t have to worry about him.
And here’s the other you have to know:
That’s one. Sharp and pointy. I do not trust that guy. But you can’t avoid him.
Programming is all about putting ones and zeroes in different places on your computer known as memory locations. Sometimes you’ll take some ones and zeroes from one memory location and then some ones and zeroes from another memory location, add them together, and then put them in a third memory location. And that’s as complicated as it gets. So once you understand how to do that, you’re good to go.
But remember: It’s only ones and zeroes. But that makes a lot of the math easy. For instance:
Zero plus Zero equals Zero
And…
One plus Zero equals One.
And…
One plus One… well, that’s where it gets complicated. We’ll save talking about that for advanced programming.
So anyway, you have your ones and zeroes, but there are some shorthand we use for when they’re in groups. Like if you have four ones and zeros together like this:
0110
We use a single digit to represent that group.
6
But we don’t have enough number digits for all the things those four bits can be, so we don’t just use the numbers 0 through 9 but also the letters A through F.
So for
1011
We use the digit:
B
Easy peasy. Except we never use just one digit. In fact, it’s freaking me out just looking at that B all by itself as you never see that in programming and they will kick you out if you do that.
Instead, we always talk about eight ones and zeroes at once and use two digits to represent that. So if you have:
1101 0101
You’d call that:
D5
And what we call these eight bits represented by two digits is a byte. This is most important unit in programming. We don’t like to work with individual bits — that’s way too inefficient. Instead we work with bytes at a time which is eight times more efficient.
So now in programming, we’ll take a byte from one memory location and a byte from another memory location and adding those together and putting that in another memory location. But how do you add these bytes? Like what does 1C + 2D equal? I have no idea. But I don’t need to know; the computer does that adding. And you just have to tell it what memory location you want it in, which is done with an address. But this isn’t done with an address like of our houses; instead it’s just a bunch of those weird digits so it looks something like this:
D2C6D28E66752DC853F054E9885D04EE
So in programming, you’re basically going:
Hey, Mr. Computer, take a byte from 8A9BBBD8B052B9E4CB875626EC88C334 and a byte from 9768749F992E2766D50520DC80F9996A and add it together and put it into 2B796B0F09E8DE4f5E906D940CDCC698.
And that’s all of programming. You just tell the computer to do that, and it does it like a billion times a second, and that’s how it calculates your military missile trajectory or the web page you're accessing or the shadowing on your video game character as he hijacks a car.
I hope this had been informative. But seriously, don’t get into coding now; it’s a slaughterhouse out there.
Waaaay back in my Intro to Computer Systems class, we had an assignment where we had to code Hello World in binary for an LC3 simulator (a fake processor used for learning). It was a pain. We had to look up the opcodes and make sure the operands were in the right bit locations. If a bit was flipped somewhere that it shouldn’t be, finding it was maddening.
The next several assignments let us use assembly, and we were thankful.
"Like what does 1C + 2D equal? I have no idea. But I don’t need to know; the computer does that adding"
Well then how do you know it's right? You ALWAYS gotta check your work! See this is how the AI will take over, because we don't check our work! They're probably adding together numbers like 20 and 30 and getting 450 and no one catches it. Random math!