Barack Obama Becomes The First President To Write Code

It’s official: Obama writes code.

He probably won’t be up to debating the merits of Ruby vs. Python any time soon, but the President took the time to crack out a few lines of Javascript as part of the Hour Of Code — an event that encourages students to try just one hour of programming to see if it piques their interest.

obama

While I imagine most TC readers don’t need to hear it, I’ll say it anyway: if you’ve never tried to code, try it! Even if you never intend to do it for a paycheck, learning even the most basic of basics can change the way you look at our increasingly digital world. You don’t have to dedicate your life to carpentry to learn to use a hammer.

Ready to dive in? Here’s Khan Academy’s intro tutorial for absolute beginners, specifically tailored to fit within one hour.

As for what the President coded up: he wrote a ranking algorithm that might just rival Larry and Sergey’s. Wait, sorry, wrong line — he wrote a little blurp of code that renders a square on the screen. Baby steps!