So I’m a BIG fan of Andy Weir’s The Martian. The book is beyond excellent and because he originally published it chapter-by-chapter, he had many fans and scientists check the science. It’s pretty much all correct. As a fan of sci-fi but also TRUE SCIENCE, I appreciate this. Also, he has some clutch JPL and Caltech shout-outs in there, so I have to be a fan. Needless to say, when the movie came out in 2015 I geeked out.

Yes, I had the twin take a pic of me in front of the ad when we saw it in NYC.

Now what does this have to do with teaching and my programming class? Well, there’s a very crucial moment when the main character, Mark Watney, must use an ASCII table and decode hex messages from NASA. My students have already learned hexadecimal representations of numbers. It’s a quick jump to see the relationship to letters, and after this, we’re going to start some more intense cryptography tasks. I wanted to start the new semester off with something fun, so I used The Martian scenario as inspiration.

Before I describe the task I ultimately assigned my students, I want to tell you a very real fear that crossed my mind while creating this project: am I officially an “old” teacher? I’m 28 and I started teaching when I had just turned 22. Some of my students at the time were 19. It was weird, but also nice because we had a lot in common. I know 6 years of teaching isn’t that long, but I’m now a solid decade older than my students. When I started creating this task based on The Martian, I was struck by an instant of fear, and thought to myself, “Am I that old teacher who’s using outdated references I think are cool but really aren’t?” If my students thought so, they didn’t say it! But enough about these new worries, let’s talk code!

So we primed the task by watching the trailer and then the ASCII scene. I then had the students decode NASA’s ASCII messages without aid of the internet, just an ASCII table showing the decimal, hex, and alphabet equivalencies. I wanted the students to really imagine they were in Mark Watney’s shoes – stranded alone on Mars with the aid of an internet decoder. I wanted the students to ask themselves, “Are my programming skills good enough to let me survive on Mars!?” After we did this by hand, I then had them create Python code to make a faster decoder.

Now, you may recall I have some second year programming students in this class, so I also made some extension tasks for them. I based the tasks off of’s Asteroid Watch project – I highly recommend using this website for programming project inspiration. Then I extended their use of NASA’s APIs to have my students attempt more complicated projects.

We haven’t finished our projects yet in class, but I am optimistic about the results – well, I should mention one student already named his code file “No I would not survive on Mars,” so we’ll see!!

“Bring him home”,


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s