The study, published in May by the Brookings Institution’s Hamilton Project, used U.S. Census Bureau data to track the career choices of 1.2 million college graduates, as observed from 2010 to 2013. Among its findings: many people working as computer scientists, software developers, and programmers used their college years not to major in computer programming or software development, but instead to major in traditional sciences or other types of engineering.

Among graduates with degrees in physics, math, statistics, or electrical engineering, as many as 20 percent now work in computing-based fields. At least 10 percent of people who majored in aerospace engineering, astronomy, biomedical engineering, or general engineering have made the same migration.

Even geography, nuclear engineering, and chemistry departments send 3 to 5 percent of their undergraduate majors into software development or similar fields, the Hamilton Project reports.

At Indiana University Bloomington, dozens of math and science majors have been winning software-sector jobs after graduation, reports Joseph Lovejoy, head of the school’s Walter Center for Career Achievement. Bioinformatics companies such as Cerner and Epic Systems have been keen to hire biology majors who picked up coding skills without majoring in computer science, he adds. General Motors has been recruiting math majors for jobs as software testers and software developers.

Math majors are in demand at Microsoft too. Dawn Klinghoffer, who tracks hiring trends for the giant software company, explains that fast-growing areas such as machine learning hinge on the ability to create and fine-tune highly sophisticated algorithms. That’s increased Microsoft’s willingness to consider candidates who learned programming on their own but have a deep mastery of complex math.

More broadly, Klinghoffer says, Microsoft has been “expanding the pool” in its recruiting to help build talent without constantly being caught up in bidding wars against other tech giants trying to hire the same computer-science majors from the same few elite schools. Widening the range of majors also helps create a workforce with more diverse perspectives, Klinghoffer says.

Among the people taking an unusual path is Luke Kanies, who majored in chemistry at Reed College. Unsure what he wanted to do after college, he managed a series of corporate data centers for about five years, before founding Puppet Labs, a software-management company that helps big companies keep hundreds of overlapping programs as up to date and compatible as possible.

Kanies portrays his unorthodox beginnings as an asset. At Puppet Labs, he and colleagues test software the same way chemists test their theoretical models. “You want to find out if your hypothesis can survive your 10 most dangerous experiments,” he says.