This is Sparta, I Mean CS50

[E] Selena MacIntosh*We try it!5 Comments

wetryit

We’ve been talking a lot recently 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.

That sounded like all I wanted and more, so I signed up.

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.”

tumblr_mf018lYLjp1rnvwt1

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.

Nathan-Fillion-reaction-gif

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. In the screenshot below, you can see the layout.

This image shows the development environment for Scratch.

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.)

It’s not breaking any ground, but it’s week zero, and that robot is really cute.

rainbowhurdles

 

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.

If Space Invaders had unicorns and punctuation marks instead of aliens, it would look like this.

Concept Art.

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.

coffeemurray

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.

babyotter

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.

besttempinchiswick

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.

Avatar of [E] Selena MacIntosh*
Find me on

[E] Selena MacIntosh*

Editor-in-Chief at Persephone Magazine
Selena MacIntosh is the owner and editor of Persephone Magazine. She also fixes it when it breaks. She is fueled by Diet Coke, coffee with a lot of cream in it, and cat hair.
Avatar of [E] Selena MacIntosh*
Find me on

Latest posts by [E] Selena MacIntosh* (see all)

Thanks for rating this! Now tell the world how you feel via Twitter.
What feel do you feel after reading this post?
  • Inspired
  • Smart
  • Tickled
  • Hungry
  • Sad
  • Smash!
[E] Selena MacIntosh*This is Sparta, I Mean CS50

5 Comments on “This is Sparta, I Mean CS50”

Leave a Reply

  1. Avatar of Cody Jackson
    Cody Jackson

    You go! It’s always wonderful to see someone exploring the dark side. I mean programming.

    I’m envious. At my school, the curriculum doesn’t introduce C (and Linux) until the 4th semester, at which point the students are so used to Java they start to seriously freak out. It’s very easy to identify the students in the C class by the sheer panic in their eyes. Darn, we should start with C and Scratch! How come *we* don’t get cute robots?

    You should totally make the Unicorn Space Invaders game someday if/when you have free time. You know you want to. Dooooo itttt!

    Looking forward to the next story in the Unicorn Programming saga.

    1. Avatar of [E] Selena MacIntosh*
      [E] Selena MacIntosh*

      I’m taking Java next, if I live through this. I’m comforted to know it might not kick my ass as hard as C is. My goal is to create an Android Unicorn App Empire. UNICORNS FOR ALL! Tiny American flag pins for some.

      Thanks for the motivation! I’m really having fun with this, and the class is fantastic.

      1. Avatar of Cody Jackson
        Cody Jackson

        If you can live through C, you can live through anything*! C++? Extension of C. Java? C-like syntax, and it holds your hand through everything and kisses the boo-boo when you fall down and scrape your knee (well, sorta, it at least tells you where to look to fix the error, which I guess is like your parents telling you where the box of bandages is so you can get one yourself, because performing first-aid builds character or something) and even is kind enough to tell you if you’re making certain types of mistakes in the programming process (although it does this by refusing to compile and providing cryptic error messages).

        Java also has the distinction of running on a wide variety of devices, including computers, cell phones, cars, refrigerators, and toasters. I am so stoked about the Unicorn Empire. I fully expect to be using it on my toaster in the near future.**

        No pressure.

        Also, what happens if you run Linux inside of the Linux inside of your current operating system? Is that like watching Inception inside of Inception?

        *potentially except Prolog. That stuff is just plain irksome. And the sharkpocalypse. Pretty sure nobody can live through that.

        **I think I need a newer toaster first…

        1. Avatar of [E] Selena MacIntosh*
          [E] Selena MacIntosh*

          I like you, Cody Jackson, I’m glad you swung by Pmag, and I hope you’ll stay. Also, I hope “Cody” is a pun, because it’s brilliant.

          Java controls toasters? THIS CHANGES MY ENTIRE PLAN FOR WORLD DOMINATION. No one will ever suspect the toast.

          1. Avatar of Cody Jackson
            Cody Jackson

            Thanks! I’ll be around.

            Java might run on DVRs and similar devices too. Don’t world-dominating overlord(ese)s usually hijack TV signals to broadcast their Evil Speech(TM) to the world? It’d be eaiser to take over everybody’s DVRs than building a giant television antenna array on the moon or something.

            Just don’t let the power go to your head. Prolonged exposure to C and Java leads to excessive sarcasm and outlandish plans for world domination. I’ve seen it happen!

Leave a Reply