Yesterday, Barack Obama became the first president to ever "write a computer program" (at least publicly) as part of a White House event. But now that Obama has mastered JavaScript, can we expect him to fix any future bugs on Healthcare.gov? Not quite.Obama didn't actually write a computer program. Instead, he wrote one single line of JavaScript that moved Elsa, a cartoon character from the Disney movie Frozen, forward exactly 100 pixels.
Obama knew that JavaScript is a case-sensitive language. He also apparently knew that if you don't close your parentheses, you tend to screw things up. And if you leave out the semicolon, the computer doesn't know that the line of code is done. Or maybe he didn't know any of that, and is just good at following instructions."The President asked if he needs to type the F in upper-case, and he got the () and the ; right too, he was very precise and didn't make a typing mistake," Partovi wrote.
The code is "not rocket science," Partovi wrote, but that's the point (Obama used an as-of-yet unreleased version of Patovi's coding tutorial, apparently). "That's how computer science starts," he said. "You don't write a fully-fledged game when you write your very first line of code."He's right, of course. And it's probably worth getting children into the the idea that they can code. In general, more people should learn how to code, or at least know how it works. But as for the idea that everyone should learn how to code? Well, Obama should probably keep running the country for the time being, at least.
ORIGINAL REPORTING ON EVERYTHING THAT MATTERS IN YOUR INBOX.
By signing up, you agree to the Terms of Use and Privacy Policy & to receive electronic communications from Vice Media Group, which may include marketing promotions, advertisements and sponsored content.