President Barack Obama told the world that everyone should learn how to code. And now he’s putting his money where his mouth is.
Earlier today, to help kick-off the annual Computer Science Education Week, Obama became the first president ever to write a computer program. It was a very simple program—all it does is draw a square on a screen
I think it depends how we define "write a program". He appears to have used a Code.Org tutorial that I often use with my students (I'm an elementary computer teacher.)
As you can see in the tutorial, you "write" code by dragging pieces and attaching them to the "program". You can see the code that you have "written" by clicking the "show code" button in the top right hand corner. There is no way to manually type in any code in this tutorial, it is purely dragging pieces (with behind-the-scenes code attached to them) to the correct spot.
So it is highly unlikely that the president typed in "moveForward(100);", or typed in anything for that matter, because there is nowhere to type anything in during that tutorial. What he probably did do, however, is place the correct piece in the correct spot (mind you at this level it is not very difficult as there are only two other pieces to choose from), and Code.Org created the code to execute his "program" for him behind the scenes.
Does that count as writing code? You tell me.
As for whether he was the first to do this or not, admittedly I have no idea. I'm not sure there is any way to prove that a previous president didn't "write" code short of asking all of the presidents who have lived since code was a thing.