Barack Obama just became the first U.S. president to write a line of computer code. The gesture is part of a national push for computer science education. In fact, the White House recently announced a $4 billion "Computer Science for All" initiative that will help educate the next generation of coders.

It couldn't have come soon enough. In addition to playing an increasingly central role in business, computer science know-how is vital to America's economic and national security. 2015 was the worst year ever for cybercrime, with nearly 1,000 major data breaches.

These attacks included the theft of 21.5 million records from the federal government's Office of Personnel Management and a T-Mobile breach that exposed the names, addresses, and Social Security numbers of 15 million customers. Meanwhile, major global enemies, including the Islamic State and North Korea, have developed sophisticated hacking operations to disrupt both commerce and governance.

Efforts to bolster cybersecurity all face the same obstacle: a shortage of talent. Protecting our citizens requires a large-scale effort to attract talented people to the cyber workforce and then train them to meet and thwart modern, unexpected threats.

There are currently 209,000 unfilled positions for cybersecurity workers in the United States, according to a Stanford University report. Worldwide, the figure totals roughly 1 million.

That shortfall is expected to get worse. Global demand for cybersecurity expertise is on track to reach 6 million positions by 2019.

With cybercriminals growing more sophisticated each day, we need a long-term strategy to close the cybersecurity talent gap.

To start, computer science must become a central component of our education system.

According to a recent Gallup survey commissioned by Google, less than one third of K-12 teachers and administrators say that computer science is a top priority for their school. In a survey commissioned by defense contractor Raytheon, 82 percent of millennials reported that no teacher or guidance counselor had ever mentioned the possibility of a job in cybersecurity.

Thankfully, some policymakers are attempting to change the status quo. On top of President Obama's national initiative, New York Mayor Bill de Blasio has committed his city's school system to offering computer science classes to all students within 10 years.

Efforts to ignite a passion for cybersecurity careers should give special attention to young women. According to that same Raytheon survey, men are five times more likely to consider a career in cybersecurity than women. Research from a study I'm conducting with colleagues from Cisco and the wider tech community for an upcoming book called The Internet of Women supports Raytheon's findings.

Another valuable step would be the creation of a cybersecurity scholarship program. The National Science Foundation already offers funding for degrees related to cybersecurity, provided recipients work for the government upon graduation.

What's needed is a more ambitious scholarship program, similar in scope to the GI Bill. All American students should know that if they become qualified cybersecurity professionals, the government will help pay for their education.

Private-sector businesses such as technology firms and military contractors should establish related initiatives, offering to pay off education loans for students who accept in-house cybersecurity positions.

But it won't be enough to simply encourage more Americans to earn degrees in computer science. Students also need access to tech immersion programs to see the practical implications of their studies.

My own university, New York Institute of Technology, has worked with industry leaders to create internships and other real-world experiences and opportunities. And we've dramatically increased our cybersecurity course offerings, hiring expert faculty in biometrics, swarm intelligence, cryptography, data mining and forensics, and network security. We've even added a cybersecurity concentration for undergraduates and a master's program.

America faces mounting cyber threats. And the shortage of professionals who can fend off the hackers is growing. Only through better funding incentives and hands-on immersive training can we hope to attract more young people to the cybersecurity field.