According to a recent Wired article, US President Barack Obama was the first president to write code:
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'm wondering whether that is truth or not.