
Obama Becomes First President to Write a Computer Program - keithba
http://www.wired.com/2014/12/obama-becomes-first-president-write-computer-program/
======
karmacondon
This is actually a big deal. Obama's code wasn't very useful or complicated
but that obviously wasn't the point. The point here was that a 53 year old
african american man sat down and learned to write a program, any program.
It's much more unlikely than it sounds. Do you know what it would take to
convince my mother to write a program that draws a square on a screen? We're
talking moving heaven and earth here. If I suggest booking tickets on expedia
instead of calling her travel agent she's like "What am I, some kind of nerd?"

Obama is leading by example. He and his biggest supporters are people who
never in their lives imagined that they would ever write a computer program or
anything close to it. There's a cultural barrier that's hard for most of us to
see, a clear demarcation between most people's daily lives and the idea of
writing even the simplest program. Crossing that barrier is hard, real hard,
and I am surprised and encouraged that Obama took the plunge.

Code literacy is important, not so that the average person can become a 10X
engineer but so that they can understand what's happening in the world around
them on another level. It's the same reason that people should learn physics
or chemistry or biology. Because these processes control our world and a basic
understanding of them, even if we don't use it professionally, can help give
people valuable context. Hopefully this kicks off more interest in learning
the basics so that in ten years the sales guy won't think that coding a full
featured CRM from scratch will take you a couple of hours over the weekend.
We're moving toward a more automated world and the value of understanding it
is increasing exponentially.

~~~
infruset
> 53 year old african american man

How is his "race" (as you guys call it) relevant?

~~~
eloff
The same way his age is relevant. Fewer African Americans code, so he has to
overcome not just his age, busy schedule, and probable fear of computers, but
societal stereotypes as well. It makes it even more of an accomplishment. The
same way it would if he had learned ballet instead (this time for gender,
rather than racial stereotypes.)

~~~
dwild
Is it really a stereotype? I see plenty of African American and I was never
surprised of it.

------
downandout
It's somewhat amazing how far, in 2014, people can get without any tech
expertise at all. It's not just Obama and other prominent politicians. There
are countless incredibly successful business people that are lucky to turn on
a computer.

When I was barely out of high school, I briefly consulted for a guy that had
built a net worth in excess of $100 million from scratch with a very
successful chain of auto body shops. I was first introduced to him after his
son told me that a few days prior, his father's computer came up with a
message box saying that a program had "performed an illegal operation". He
yanked the power cord out of the wall and began contemplating what he would
say to the police when they came.

Last year, Steve Wynn, billionaire casino mogul, was accused of threatening
the life of Girls Gone Wild founder Joe Francis via email over a $2 million
gambling debt. Steve won a defamation lawsuit, with his primary argument being
that he couldn't possibly have done it because he had never sent an email in
his life.

While technology is an integral part of our world, the most crucial skill for
leaders isn't being able to code or necessarily even operate it. It's being
able to identify what needs to be done, then building and managing teams that
can get things done. If you can do that, you can accomplish almost anything.

~~~
Thriptic
> It's somewhat amazing how far, in 2014, people can get without any tech
> expertise at all. It's not just Obama and other prominent politicians. There
> are countless incredibly successful business people that are lucky to turn
> on a computer.

I know of a CEO of a major American company that has his secretary print out
all of his hundreds of daily emails and manually sort them for him. He then
dictates his replies into a dictaphone and has her type them out.

~~~
daveslash
Someone recently told me the exact same story about a company at which they
used to be employed. They didn't tell me the name of the company, but they
referred to it as a "financial institution".

~~~
Thriptic
Interesting. The individual I am referring to oversees a pharmaceutical
company.

~~~
bch
Oh ya, not financial institution, but pharmaceutical company. And the first
letter in their name is in the front half of the alphabet..?

edit s/pharmacy/pharmaceutical/ edit2: this is a joke. I don't know who this
is, am trolling

~~~
arthurcolle
AstraZeneca?

------
jaybuff
He implemented bubble sort:

[https://www.youtube.com/watch?v=k4RRi_ntQc8](https://www.youtube.com/watch?v=k4RRi_ntQc8)

~~~
mikkelewis
"we have some spies", funny :)

~~~
whoisthemachine
ha funny in a kind of sad but true way.

------
pbiggar
A little dissappointed they didn't link to the code. Here's Irish Prime
Minister Enda Kenny's Hour of Code work:

[http://studio.code.org/sh/32532000](http://studio.code.org/sh/32532000)

([http://www.siliconrepublic.com/innovation/item/39544-wit2014](http://www.siliconrepublic.com/innovation/item/39544-wit2014))

~~~
comrh
Here it is:

> moveForward(100);

[https://www.quora.com/What-was-the-one-line-JavaScript-
that-...](https://www.quora.com/What-was-the-one-line-JavaScript-that-
president-Obama-wrote-as-part-of-the-Hour-of-Code-2014)

~~~
niix
He must support the "use semi-colons in javascript" camp.

~~~
oneeyedpigeon
Good on him, he's already using best practises.

------
wyager
Clearly most people are not going to spend a lot of time learning the rigorous
theory behind CS, or how to write really high quality software that's meant to
be reused.

However, I suspect that coding will become the new literacy. It's becoming an
essential life skill, but only a few people need to be really good at it; most
people just need a basic functional knowledge.

~~~
aaron-lebo
I disagree. It is great if more people learn it, but it is nothing like
literacy. The ability to read and write is something that can help you in
every aspect of life, which is why a lot of people pick it up (they use it
over and over again). Keep in mind even with this being the case functional
literacy is often quite low for many people and true illiteracy is still an
issue. Even math past basic arithmetic isn't well-developed, people simply
don't use it, despite required schooling.

Are computers everywhere and do people use them every day? Yes. But mechanical
ability isn't the new literacy and just as many people interact with engines
on a daily basis and would be helped by it in daily life. I think it is much
more useful to think of programming like woodworking, leatherworking, sewing,
soldering, etc. Very useful skills which can improve your life, but not at all
necessary, and "only a few people only need to be really good at it" as you
stated.

~~~
salgernon
I would be satisfied if people were simply able to identify tasks that can and
should be automated. There are many, many, many people / organizations that
have weekly or monthly manual tasks that could be automated if the individual
or organization could recognize it - and hire someone to address the
automation.

Stupid alert: I briefly worked at a startup that did push to production by
remote desktop to the server and manually restarting the IIS server after
copying things into place. They didn't automate it - because "it's the way we
always did it." (Yes, they're out of business now.)

~~~
empthought
You've probably seen [http://www.xkcd.com/1205/](http://www.xkcd.com/1205/)
\-- if you're doing it monthly and it takes less time than an hour, you can't
spend more than three work days trying to automate it, or you're wasting more
time than you're saving.

~~~
fennecfoxen
Meh. Automation in the software industry isn't just about saving a certain
amount of wall-clock time: that's the perspective of a bean-counter without
broader perspective. Having highly skilled people frequently spend time on
boring drudgery has other costs. The cost of the interruption, for instance,
or the annoyance factor alone...

Automation also has the potential to make a task less error-prone and its
output more consistent. A botched or forgotten manual task can be difficult to
clean up after, so there's risk management too. For instance: in one incident,
a coworker at a former employer accidentally ran the "send thousands of people
email about how much we're about to pay them in a few days" script on input
from the wrong year because January had just ended and he had to input a value
containing the last day of the month (e.g. 2013-01-31) by hand.

~~~
taeric
Way to completely miss the point. The point isn't to try and avoid automating
things. But to realize that you can't just dream up benefits in complete
isolation to the costs.

That is, if the benefit is worth the costs.... do so. Otherwise, reconsider.

And few things make as glorious as a mistake as an automated job going out of
control. There is a reason one of the most important questions you should ask
on any automated task is "how do I make it stop?"

------
binarnosp
> "everyone should learn how to code"

Why not "Everyone should learn how to fix a broken pipe" or "Everyone should
learn how to cook" or whatever?

Here is mine: "everyone should follow his own passions"

~~~
babl-yc
I'd assume the majority of modern workers are behind a computer all or at
least some of the day, and chances are part of their job is repetitive and
could be automated. Having the ability to build software for those tasks, or
at least recognize what could be automated, would be very beneficial.

I don't see how learning to fix a broken pipe would be as globally applicable.

------
mfisher87
Is there an editor on staff at Wired?

>Obama wrote his code part of event today organized by Code.org, which brought
brought 20 middle school students from the South Seventeenth Street School in
Newark, New Jersey, to the White House, where they met the president and
worked on Hour of Code tutorials.

>Last year, Obama delivered a YouTube speech last year[...]

~~~
downandout
Are these fluff pieces even worth editing?

~~~
akira2501
If they're worth printing under your masthead, then yes.

~~~
coldtea
If people read this shit even without editing, then, who cares...

------
hoodoof
Is it open source?

Maybe we should fork it and turn it into a bigger project.

"President's work gets forked".

~~~
jacalata
Just like he already did to RomneyCare.

------
sloanesturz
But did he use Vim or Emacs?!

~~~
haney
Come on, he's not going to get mixed up in those politics...

~~~
akiselev
You never know, Goldman Sachs might be a staunch emacs shop.

~~~
tway12345
We aren't.

~~~
akiselev
EVIL emacs shop then?

------
Aloha
I wouldnt be surprised if a president had written VBA before. Excel is
everywhere.

~~~
empthought
Your candidates are Bill Clinton, George W. Bush, and Barack Obama. The
youngest one graduated from school in 1991, and none of them are accountants
or scientists.

I'm thinking not.

~~~
Steko
Helping their kids with homework, you never know.

~~~
coldtea
As if they help their kids, and not an army of nannies...

------
eccstartup
That encourages programmers to become a president.

~~~
mkramlich
I like the inverse challenge: let's try to replace as much of government as we
can with software/hardware. And the simpler, cheaper and more open, the
better.

Not even kidding.

I'm already confident I can replace most/all of the IRS, Treasury, and all the
welfare/safety-net type programs with fairly simple, hard-to-abuse
software/hardware system. Given that the laws were significantly different and
simplified. (And snowball's chance in Hell they'd allow that. Although there
are alternate law/tax/welfare configurations which are both physically
possible and theoretically sustainable.)

~~~
vertex-four
And I'm confident I can write a program to solve world hunger. Provided that
we re-define solving world hunger to mean something simpler.

~~~
mkramlich
that's rude. shame on you. that type of comment is too common on HN. poisons
the community

------
rbanffy
I can almost bet Angela Merkel has written some FORTRAN code before entering
politics. Her job is, however, "Chancellor".

~~~
nandemo
The president of Estonia, Toomas Ilves, can code.

> _Ilves moved to Leonia, a borough of 9,000 people a short trip over the
> George Washington Bridge from Manhattan, when he was three years old. He
> grew up there and learned computer programming at Leonia High School. Ilves
> graduated as valedictorian in 1972 and went on to receive degrees from
> Columbia University and the University of Pennsylvania. (...) Ilves credits
> the programming classes he took at Leonia High School with his work to turn
> Estonia from a country that essentially had no communications infrastructure
> after independence to what is now a European Silicon Valley of sorts. The
> most notable example? Skype was created in Estonia._

[http://www.washingtonpost.com/blogs/post-
politics/wp/2014/09...](http://www.washingtonpost.com/blogs/post-
politics/wp/2014/09/03/estonias-president-came-to-tallinn-by-way-of-the-
jersey-turnpike/)

~~~
IndianAstronaut
Estonia is moving forward quite a bit on getting people to learn to code. Much
better efforts than what we are doing in the US.

------
Maxious
Only 15 years since the first president to send an email!
[http://tech.firstpost.com/news-analysis/laptop-used-
clinton-...](http://tech.firstpost.com/news-analysis/laptop-used-clinton-
first-us-presidential-email-auctioned-60667-222031.html)

------
dnautics
You don't suppose jimmy carter wrote code? He was a nuclear engineer.

------
JackTheBlack
When we started to learn robotics, our first assignment was to teach the robot
to draw a square.

Its actually a good "hello world" exercise:
[http://youtu.be/RmfP2rHV7io](http://youtu.be/RmfP2rHV7io)

------
meritt
I bet his inbox is already filled with tech recruiter spam.

~~~
cozuya
He drew a square on a screen? UI developer position now open.

~~~
mkopinsky
He drew a square on a screen? "I'd like to introduce you to a fast-paced
global-initiative multipowered startup looking for a full-stack Rails on Ruby
rockstar."

(I actually had a guy yesterday try to recruit me for this company, working on
"dot JS node".)

------
uptown
Bloomberg never learned to code, despite his tweet.

------
pknerd
Hmm..hope he will be using his night time to write open source code rather
than thinking of war policies that don't work.

------
BerislavLopac
I have a feeling that moveForward(100) might become a new meme... ;-)

~~~
mkopinsky
He is a _progressive_ politician, is he not?

------
ojn
That's a Chromebook he's doing it on! Acer 11" CB3.

------
dmak
I would like to see his code in github

~~~
sebastianavina
I guess it's something like this:

    
    
          drawline(0,0,0,1)
          drawline(0,1,1,1)
          drawline(1,1,1,0)
          drawline(1,0,0,0)
    

and here we are crazy of his great achievment.

------
erickhill
Gore woulda coulda shoulda been the first. But let's not go there... He
definitely got the internet thing, too.

------
Istof
I hope this is not true and that other presidents gave it a go.

------
finishingmove
Next up: PutinOS

------
adamio
This is the first step towards outsourcing the presidency

~~~
sw00
Underrated comment.

------
richardjordan

      10 PRINT "HELLO WORLD"  
      20 GOTO GUANTANAMO BAY

------
eibrahim
That explains what happened to healthcare.gov

------
monochromatic
Yawn.

------
phkahler
Bummer: "It was a very simple program—all it does is draw a square on a
screen—but that’s the point, says Hadi Partovi" I don't want lawmakers that
think imperative programming is all there is to it. That seems to be how they
make laws - if you don't like something make it illegal, if you like something
offer incentives. They never try to create a simple system with a more
emergent behavior.

------
keithwarren
I expect a publication like Wired to be able to distinguish between writing
code and writing a 'computer program'. If this is the bar then I wrote my
first 'program' when I was in 3rd grade in the 80s doing LOGO.

Don't get me wrong, making programming a core competency is a novel goal and
everyone should do it like everyone should do some chemistry in high school or
do a physics project (I for one built an awesome bridge of balsa wood). It is
an important skill that people should be exposed to at some point but the idea
everyone should 'learn' to do it is a misnomer.

~~~
__david__
> I expect a publication like Wired to be able to distinguish between writing
> code and writing a 'computer program'. If this is the bar then I wrote my
> first 'program' when I was in 3rd grade in the 80s doing LOGO.

Of course you did. Why isn't your 3rd grade logo code a program? Even "Hello
world" is a program!

~~~
daveslash
I wrote my first program when I programmed the radio in my parents car to
change the station. I reached out, turned the knob, and instructed the machine
what to do via instructions that are understandable to "human beings".
Programming is easy.

Bitter sarcasm put aside, I have often, existentially, wondered "what is
programming?" The word "programming" obviously carries a lot of colloquial
meaning, but I'd be interested in hearing where others draw the line between
programming and, er..., data entry.

