In what looks like a small startup office in a New York financial-district building earlier this year, a roomful of teenagers examined lines of code projected on to a classroom wall. The code made up Beyonce’s Twitter page, and the teens were figuring out how to collect and organize it.

These high-school students gave up four hours each Saturday for three months this past winter to learn how to build web apps at the Flatiron School. Their parents shelled out $2,500 for 12 weeks of lessons. There’s a shortage of coders in the United States, and schools like this are trying to be the solution.

Information technology was one of the science, technology, engineering, and math (STEM) fields with the most job postings in the U.S. in 2013, and job postings requiring coding skills stayed open longer than most. A national non-STEM job opening is filled in about 33 days, compared to 56 days for jobs that require programming skills and 65 days for mobile developing, according to Matt Sigelman, CEO of the career analytics firm Burning Glass.

Ian Aberbach and Sydney Steiner, high school students learning web development at the Flatiron School. (Sonali Kohli)

Simply put, there would be more people to fill these jobs if there were more computer-science graduates, and there’d be more graduates if more people could start the subject in high school. And yet it’s difficult to find a high-quality computer science class in American high schools, let alone a programming one.

Hence the demand for places like the Flatiron School. It works for teens who already know they want to learn programming, or those who have parents nudging them toward it. But the problem with relying on schools like this is the assumption that people who want to code will seek it out and have the money to pay for lessons.

There are many reasons why American schools are poor at teaching coding—so many that the Computer Science Teachers Association (CSTA) published a 75-page report enumerating them. The biggest issue is that the public-school system is decentralized. Most public schools follow national teaching guidelines—the Common Core—and complete standardized tests based on those, but states and local bodies make classroom-level decisions.

Computer science also has a hard time finding a place in schools because it can fall under pretty much any letter of the “STEM” acronym. Some states classify computer science as its own subject, while others lump it into math or science. A Kentucky lawmaker even tried to have programming languages treated as foreign languages.

These umbrella designations influence how the subject is taught. In a 2014 CSTA survey, schools included topics like web development and learning Excel in computer-science classes. Real computer science, the kind tech companies need, is a more rigorous discipline that teaches students to break problem-solving into small chunks.

There have been attempts to standardize computer-science teaching. The CSTA suggests ways to incorporate it into national math standards, and a bill is currently inching its way through Congress to make the subject part of the government’s definition of STEM. That would allow computer-science programs to more easily apply for federal STEM funding.

Yet even if a school district properly identifies computer science or programming classes, more obstacles abound. Schools might not have room in the schedule, or funding, for an additional course. Since computer-science classes are often optional electives, students may choose easier subjects instead. Or—the most basic problem—a school in a poor district may not have enough computers or Internet access to teach a course.

The lack of classes isn’t the only reason for the shortage of computer-science graduates. Another is that the profession is so homogenous. Women and people of color don’t see many of their older counterparts succeeding in it, so they’re less likely to pursue it. For example, girls consistently receive messages—both implicit and explicit—that science and math aren’t for them. Recent research suggests that more women would graduate college with math and science degrees if their middle and high schools employed more women to teach those subjects.

“I think for girls one of the things that’s very important is that they see that the expectation is that they can do it,” said Jane Foley Fried, the head of the private all-girls Brearley School in New York. That’s why she introduced coding classes as electives into the curriculum.

But Brearley is private and doesn’t answer to an education board. Not all schools have its funding and flexibility. Employers and nonprofits recognize this, and are trying to help. Flatiron said in January that about 20 percent of its students attend on a scholarship through partnerships with nonprofits.

Outfits like code.org and Black Girls Code help, as do some employers: Google’s Made with Code aims to bring women into the field, while payments company Square offers high-school code camps. Intel just last week pledged $5 million for computer-science programs at two high schools in Oakland, California.

“If [employers] don’t help nurture this group of students coming through school now, they’re not going to have future employees,” said Deborah Seehorn, the chair of the board of the CSTA and an education consultant for the state of North Carolina.

Apparently, teaching kids computer science looks, to venture capitalists, like a business idea as good as any tech startup. A month ago the Flatiron School completed a $9 million fundraising round, and says it is expanding its high-school courses beyond New York, into individual schools in other cities including Los Angeles and Miami. Still, scholarships for schools like Flatiron, and nonprofit programs like Black Girls Code, can only help a limited number of students.

There are a few attempts to do coding classes at scale. Flatiron is partnering this summer with Teach for America, which places teachers in low-income schools. The goal is to train teachers who have at least two years of experience in another subject to code, and to provide lesson plans so that they can then take the education back to their schools.

The Starter League, a Chicago company offering bootcamps similar to Flatiron, partnered with the city’s public-school system. It trained teachers in web development, then provided support as the teachers added those skills to their own computer -cience classes, said Arjun Venkataswamy, the director of partnerships at the Starter League.



The city’s goal is to make computer science part of the core curriculum for the whole city, said Brenda Wilkerson, who heads computer-science and IT education for Chicago’s public schools. That’s different from the Flatiron and Teach for America model, which leaves teachers in low-income areas to navigate the educational system themselves. It helps that Wilkerson is an engineer by training, and understands the need for more equal opportunity from personal experience. “When I was in engineering school I was the only woman, I was the only black woman,” she said. “Our goal has been to democratize computer science across the district.”

It’s true that high-school classes aren’t essential for learning computer science in college. Students without experience can catch up after a few introductory courses, said Tom Cortina, the assistant dean at Carnegie Mellon’s School of Computer Science.