This is historical material “frozen in time”. The website is no longer updated and links to external websites and some internal pages may not work.

Search form

President Obama Is the First President to Write a Line of Code

President Obama became the first president to write a line of code as part of the "Hour of Code" -- an online event to promote Computer Science Education Week.

Watch on YouTube

On Monday afternoon, President Obama became the first president to write a line of code.

As part of the "Hour of Code" -- an online event to promote Computer Science Education Week -- the President and Vice President joined middle-school students from New Jersey for a computer coding exercise.

President Obama spoke about the importance of strengthening STEM education, especially for girls and students underrepresented in STEM fields: "Part of what we're realizing is that we're starting too late when it comes to making sure that our young people are familiar with not just how to play a video game, but how to create a video game."

The President highlighted our country's tradition as innovators, noting that "one of the great things about America is that we invent and make stuff, not just use it."

And what did the Coder-in-Chief write for his first line of code?


The line, written in the computer programming language JavaScript, was part of an online exercise from to help teach young people how to write computer code using the children's movie Frozen.

Vice President Biden Participates in Hour of Code

Vice President Joe Biden visits with students and is taught to write a line of code, during the "Hour of Code" event in the Eisenhower Executive Office Building, in Washington, D.C., Dec. 8, 2014. (Official White House Photo by David Lienemann)

The event followed new commitments announced by the White House to expand and improve computer science education, including:

  • Commitments by more than 60 school districts, including the seven largest school districts in the country, to offer computer science courses to their students. Together, these districts reach over 4 million students in more than 1,000 high schools and middle schools, in partnership with
  • Over $20 million in philanthropic contributions to to train 10,000 teachers by fall 2015 and 25,000 teachers to teach computer science in time for the school year beginning in fall 2016.
  • New partnerships by the National Science Foundation (NSF), including a new Advanced Placement (AP) Computer Science course by the College Board that emphasizes the creative aspects of computing and a focus on real-world applications. Leading partners, including Teach for America and the National Math and Science Initiative, will assist in implementation and scale-up of the course.
  • New steps to increase the participation of women and under-represented minorities in computer science, including a new computer-science classroom design prize and innovative outreach efforts.