We've been talking a lot recently on Pmag about both MOOCs and finding a place to brush up on your code work for free online. Recently, I put chocolate to peanut butter and started an intro to computer science class through EdX.

This is not just any intro class, however. This is Harvard's intro class, and it is kicking my ass. As the big black letters on a crisp white background keep telling me, "This is CS50."

Lifehacker describes the class like so:

In this class you'll learn the basics of computer science, learn to code from the ground up, and study languages like C, PHP, and JavaScript plus SQL, CSS, and HTML. You'll solve real problems in biology, cryptography, finance, forensics, and gaming. It's demanding, but it's an amazing course.

Week Zero

I started off fairly confident, like one does on the very first lecture of a college-level class. The first hour zipped by, I recognized most of the concepts, I picked up some new stuff, and I really liked the pacing of the class.

"I'm going to glide through this class," I smugly thought to myself. "I know my way around a computer. I can write some code. I know what loops are. Cake."


Then we got the the second lecture. Suddenly, much like the anatomy and physiology class I barely survived in college, I realized everything I knew about programming a computer was covered in the very first day.

The first rule of CS50: Humility.

For each week of the course, which can be completed almost entirely at the student's own pace, there are two lectures, a series of shorts (videos covering specific concepts or topics related to that week's subject area), a problem set, a walk through for the problem set, and a video of that week's "sessions," which are break-out groups based on how comfortable the student was/is with programming.


The problem sets are one of my favorite parts of the course, so far. They've been very challenging, but with all the resources available, they've been completely possible. In week zero, we used a graphical programming environment called Scratch, which uses puzzle pieces to visualize the core functions available in the programming language known as C. This is what it looks like:

We were asked to create something with Scratch, using at least one sound, one loop, one variable, one condition, two sprites, and three scripts. I made a happy robot who likes to touch stars. (Turn your sound off, or down, if you don’t want to be surprised by robot sound effects.) Kinja will only embed it in preview, (KINJA!!!!), so here's a link.


The Second Rule of CS50: Code is fun.

Using Scratch made understanding how C works and what C can do much, much simpler than my previous code learning endeavors. I don't know how many note card cheat sheets I've made to help myself remember the difference between For loops and Do While loops, the visuals finally made it stick. Plus, it was a lot of fun. The lecture featured a few demos from previous students, including a really impressive Dance Dance Revolution clone and a dead ringer (no pun intented) for Frogger. My original intent was to make a unicorn based Space Invaders clone, but time and a need to move on motivated me to keep it simple.


Week One

Subtitle: Wherein Auntie Selena learns that Harvard now admits babies as students, learns about functions.


Week one is all about C. C is a programming language from which many other programming languages have been created, so it's a great place to start. In lecture, the instructor, David Malan, made one-to-one comparisons between the puzzle pieces we played with in Scratch and the commands in C. In education, we call this scaffolding, so my worlds collided as a light bulb went on in my head. In my previous attempts to master languages not needed to keep P-Mag running, I've always struggled with retention. With this course, I feel like I'm not only remembering the information, I'm remembering how to apply it.

The third rule of CS50: Persevere.

I needed many more of the supplementary materials for week one. I watched half a dozen shorts, all the walk throughs, and I played most of the second lecture twice. It may have taken a while, but I am finally confident that I understand how and when to use a variety of loops, data types, functions, and libraries. Fairly. I can compile like a boss, however. CS50 has a horde of TFAs, many of whom host the video shorts, and I was struck by the knowledge that many of these TFAs were probably born at the very end of the 1990s, and I briefly felt like a dinosaur. I'll be damned if the baby Harvards aren't all adorable, and really, really, really smart, however, so they won me over in spite of their terrifying youth-ness.


The fourth rule of CS50: That baby otter might want to hire you someday.

Week one's problem set had a few parts, and for the first time it was divided up into two different sets of instructions. The first is the required set, the second is the "hacker" version, designed for students who've already accumulated some programming knowledge. I'm that asshole that loves extra credit, so I went for both. It took a good long while, and a lot of time with Google, but I finished. PS1 is the first time we used the CS50 appliance, which allows us to install a Linux system right inside our current operating system. Too much time has passed to make an Inception joke, but know that I wanted to.

The first problem in both sets has students create either a half or full pyramid out of hashes (#) based on a number between 0 and 23, entered by a user. The second problem in the primary set involves figuring out the fewest number of coins that can be returned, based on a user-entered value. The second part of the hacker set was full of really interesting trivia about the structure of credit card numbers, and asked students to create a program which could determine whether or not an entered credit card number was invalid.


I don't want to tell you how many hours it took to complete all four. (A lot. A lot of hours.) But I did it, and I get it.

The fifth rule of CS50: You can do it.

I've already started week two, and I'm happy to say if that you ever need to know the difference between 32-bit numbers and 64-bit numbers, I'm your unicorn. Will report back in later, with more exciting tales about lurking at Harvard in my pajamas, learnin' about Linux, having some food*.


*None of the TFAs would get that reference.

This originally appeared on Persephone Magazine, tweaked just a little to fit the venue.