This is an archived article that was published on sltrib.com in 2015, and information in the article may be outdated. It is provided only for personal research purposes and may not be reprinted.

West Jordan • Twelve-year-old Spencer James and his 10-year-old brother, Matthew, watched with rapt attention as, with a few tweaks to the code, the computer game before them suddenly changed.

Instead of firing his normal, rapid-fire pink energy blasts, their cosmonaut was using a special sword attack.

Josh Sutphin — the programmer of the game, "Legacy of the Elder Star" — wondered as a boy how video games worked. So he taught himself, completely. And this week, he opened the hood and showed another generation of children, including the James boys, how it's done.

The Hackathon event at West Jordan Library on Wednesday evening was meant to excite children about computer programming and robotics.

"When they play with video games, it may not cross their mind that they can create them themselves," Sutphin said.

And within 10 years, there will be 1 million more programming jobs than there are people to fill them, according to Code.org, a nonprofit that advocates for computer science education.

Within Utah, a state survey discovered, there are currently 500 unfilled positions for people with computer science or engineering degrees — a number that employers expect to grow more than threefold in the next year.

"We have such a rapidly changing society. You have to keep up on that kind of technology," said Carrie Rogers-Whitehead, senior librarian for Salt Lake County Library Services, which helped organize the Hackathon. Her job requires her to know some HTML coding, she said. "Every job uses some technology in their own way."

Utah is trying to keep up, but results are mixed. This past legislative session, lawmakers failed to pass a bill, SB107, that would have required the state to provide computer science "instructional resources" for all grade levels, and to find a way to supply schools with comprehensive coding software. The bill passed the Senate, but failed to make it through the House of Representatives before the session ended.

However, state schools do count the AP computer science course toward graduation — a standard that Code.org's CEO Hadi Partovi likes to see. The Utah Office of Education is even considering expanding that by creating a series of computer science courses, said Sarah Young, the office's science, technology, engineering and math (STEM) liaison.

But that kind of support isn't the norm across the country. Nationwide, half of all schools don't count computer science as a credit toward high school graduation, according to Code.org.

"In school, you learn how a steam engine works, or how electricity works, or how photosynthesis works, even if you don't become an engineer or a botanist," Partovi said. "School is about teaching how the world around you works. But most schools don't teach how the Internet and computers work, and the impact on security and other things around us."

Partovi said it is vital that students be taught about computer science at a young age, when they will realize it's "exciting, it's creative." And, he said, "if you introduce this in college, it's way too late; they've already decided what they want to do."

Spencer's and Matthew's 8-year-old sister, Emmersyn, is already getting introduced to computer programs at her school, Ridgecrest Elementary.

At home, their father has a professional background in programming, and they use an online program, called Scratch, to learn the basics. Emmersyn has created characters and storybooks, and at Sutphin's table at Hackathon, Spencer demonstrated that he was already familiar with at least a couple computer programming fundamentals.

But many children don't have an Internet connection or computers at home. So the library wants to help — not only by continuing to make technology and the Internet available for free at their branches, but also by hosting new events like the Hackathon.

"We've been doing a lot more STEM and tech-related programs in the library in the last few years," Rogers-Whitehead said. "We want to reach populations that don't have access to that kind of technology through the schools."

The larger geek world is stepping in, too, to excite young minds.

Gene Luen Yang — author of "American Born Chinese," a National Book Award finalist and winner of the Michael L. Printz Award — has a new graphic novel due out in September, "Secret Coders," about a girl and boy who find a hidden computer programming school. The comic capitalizes on the medium's visual language to expose middle schoolers to coding, according to Wired magazine, which lauded the book as "Harry Potter, but with computers."

A year and a half ago, Natalie Portman used publicity for "Thor: The Dark World" to encourage teen girls to pursue STEM fields, like her astrophysicist character Jane Foster, through a mentorship program that was framed as a contest. Girls found local women in STEM jobs to interview, and could submit the interview for a chance to see the movie's Hollywood premiere.

In Utah, BYU programmers teamed up with the University of Maryland to launch a free virtual reality game, "Falling Dust," designed to draw more teenage girls and minorities to science and engineering.

Women account for only about 18 percent of undergraduate computer science degrees, according to the National Center for Education Statistics; ironic, considering that the 19th century founder of computer science, Ada Lovelace, was a woman.

Such initiatives address the particular challenge of enlisting more girls into the sciences, including computer science. There are a number of reasons for the lag, such as persisting stereotypes that boys are better at math and science, according to a study by the American Association of University Women.

But girls like Emmersyn don't seem to be aware of the stereotypes.

Neither do Madison Lundquist and Alysia Shaffer. At Wednesday's Salt Lake Valley Science and Engineering Fair, at the University of Utah, the two Liberty Elementary students showed off a video game they created together. They both said they started playing video games in second grade, and hope to work in game design when they are older.

Twitter: @mikeypanda

Reporter Benjamin Wood contributed to this story.