Ever since she was a 10th grader in Seattle, Annalice Ni wanted to develop software for a tech company like Google. So she went to great lengths to meet the internship and other resume criteria that make students attractive hires to the biggest tech firms.

In high school, Ni took computer science courses, interned at Microsoft and volunteered as a coding teacher for younger students. She majored in computer science at the University of Washington, earning software engineering internships at Facebook.

After graduating from college this year, she moved to Silicon Valley to start her dream job as a software engineer at Meta, Facebook’s parent company.

Then last month, Meta laid off more than 11,000 employees — including Ni.

“I did feel very frustrated and disappointed and maybe a bit scared because all of a sudden, I didn’t know what to do,” Ni, 22, said. “There’s not much I could have done, especially in college, more than I already did, better than I already did.”

Over the last decade, the prospect of six-figure starting salaries, perks like free food and the chance to work on apps used by billions led young people to stampede toward computer science — the study of computer programming and processes like algorithms — on college campuses across the country.

The number of undergraduates majoring in the subject more than tripled from 2011 to 2021, to nearly 136,000 students, according to the Computing Research Association, which tracks computing degrees at about 200 universities.

Tech giants encouraged the computing education boom, promoting software jobs to students as a route to lucrative careers and the power to change the world.

But now, layoffs, hiring freezes and planned recruiting slowdowns at Meta, Twitter, Alphabet, Amazon, DoorDash, Lyft, Snap and Stripe are sending shock waves through a generation of computer and data science students who spent years honing themselves for careers at the largest tech companies.

Tech executives have blamed a faltering global economy for the jobs slowdown.

The cutbacks have not only sent recent graduates scrambling to find new jobs but also created uncertainty for college students seeking summer internships at consumer tech companies.

There are still good jobs for computing students, and the field is growing.

Between 2021 and 2031, employment for software developers and testers is expected to grow 25%, amounting to more than 411,000 new jobs, according to projections from the Bureau of Labor Statistics.

But many of those jobs are in areas like finance and the automotive industry.

Some students are applying to lesser- known tech companies.

Others are seeking tech jobs outside the industry, with retailers like Walmart or with government agencies and nonprofits.

Graduate school is also an option for many seeking jobs.

As for Ni, she now views losing her dream job as an opportunity to broaden her career horizons.

Over the last month, she has applied to midsize tech firms and startups that she finds innovative — potential employers she had not previously considered.

“I’m exploring opportunities that I didn’t before,” Ni said. “I feel like I’ve already learned some things.”