Skip to main content

The James Webb Space Telescope runs JavaScript, apparently

The James Webb Space Telescope runs JavaScript, apparently

/

It’s in charge of taking the pretty pictures

Share this story

I look to the stars, and I see semicolons.
I look to the stars, and I see semicolons.
Image: NASA, ESA, CSA, and STScI

It turns out that JavaScript, the programming language that web developers and users alike love to complain about, had a hand in delivering the stunning images that the James Webb Space Telescope has been beaming back to Earth. And no, I don’t mean that in some snarky way, like that the website NASA hosts them on uses JavaScript (it does). I mean that the actual telescope, arguably one of humanity’s finest scientific achievements, is largely controlled by JavaScript files. Oh, and it’s based on a software development kit from 2002.

According to a manuscript (PDF) for the JWST’s Integrated Science Instrument Module (or ISIM), the software for the ISIM is controlled by “the Script Processor Task (SP), which runs scripts written in JavaScript upon receiving a command to do so.” The actual code in charge of turning those JavaScripts (NASA’s phrasing, not mine) into actions can run 10 of them at once.

The script processor is what really executes the tasks, but it gets instructions on what to do from the JavaScripts.
The script processor is what really executes the tasks, but it gets instructions on what to do from the JavaScripts.
Diagram: NASA

The manuscript and the paper (pdf) “JWST: Maximizing efficiency and minimizing ground systems,” written by the Space Telescope Science Institute’s Ilana Dashevsky and Vicki Balzano, describe this process in great detail, but I’ll oversimplify a bit to save you the pages of reading. The JWST has a bunch of these pre-written scripts for doing specific tasks, and scientists on the ground can tell it to run those tasks. When they do, those JavaScripts will be interpreted by a program called the script processor, which will then reach out to the other applications and systems that it needs to based on what the script calls for. The JWST isn’t running a web browser where JavaScript directly controls the Mid-Infrared Instrument — it’s more like when a manager is given a list of tasks (in this example, the JavaScripts) to do and delegates them out to their team.

The JavaScripts are just a part of the puzzle, but they’re an important one.
The JavaScripts are just a part of the puzzle, but they’re an important one.
Diagram: NASA

The JavaScripts are still very important, though — the ISIM is the collection of instruments that actually take the pictures through the telescope, and the scripts control that process. NASA calls it “the heart of the James Webb Space Telescope.”

It seems a bit odd, then, that it uses such an old technology; according to Dashevsky and Balzano, the language the scripts are written in is called Nombas ScriptEase 5.00e. According to Nombas’ (now-defunct) website, the latest update to ScriptEase 5.00e was released in January 2003 — yes, almost two decades ago. There are people who can vote who weren’t born when the software controlling some of the JWST’s most vital instruments came out.

This knowledge has been bubbling up on the internet in Hacker News and Twitter threads for years, but it still surprised quite a few of us here at The Verge once it actually clicked. At first blush, it just seems odd that such a vital (not to mention expensive) piece of scientific equipment would be controlled by a very old version of a technology that’s not particularly known for being robust.

After thinking about it for a second, though, the software’s age makes a bit more sense — while the JWST was launched in late 2021, the project has been in the works since 1989. When construction on the telescope started in 2004, ScriptEase 5 would’ve only been around two years old, having launched in 2002. That’s actually not particularly old, given that spacecraft are often powered by tried-and-true technology instead of the latest and greatest. Because of how long projects like the JWST take to (literally) get off the ground, things that had to be locked in early on can seem out of date by more conventional standards when launch day rolls around.

It’s worth noting that, like the project itself, these documents that describe the JWST’s JavaScript system are pretty old; the one written by Dashevsky and Balzano is undated but came out in 2006, according to ResearchGate, and the ISIM manuscript is from 2011. (There does appear to have been a version published in 2010, but the one I read cites papers published in 2011.) It’s always possible that NASA could’ve changed the scripting system since then, but that seems like a pretty big undertaking that would’ve been mentioned somewhere. Also, while NASA didn’t reply to The Verge’s request for comment, this JWST documentation page published in 2017 mentions “event-driven science operations,” which is pretty much exactly how the documents describe the JavaScript-based system.

This knowledge base, by the way, also contains a few more details on the telescope’s 68 GB SSD, saying that it can hold somewhere between 58.8 and 65 gigabytes of actual scientific data. Wait, did I forget to mention that? Yes, this telescope’s solid state drive has around the same capacity as the one that was available in the original 2008 MacBook Air.

Anyways, we’re not here to talk about the JWST’s storage. I feel like the big question at this point is why Javascript? Sure, there’s probably a bit more angst about the language now than there was in the time when the project’s engineers were selecting tech for the project, but NASA is famous among some programmers for its strict programming guidelines — what’s the point of going with web-like scripts instead of more traditional code?

Well, NASA’s document says that this way of doing things gives “operations personnel greater visibility, control and flexibility over the telescope operations,” letting them easily change the scripts “as they learn the ramifications and subtleties of operating the instruments.” Basically, NASA’s working with a bunch of files that are written in a somewhat human-readable format — if they need to make changes, they can just open up a text editor, do a bunch of testing on the ground, then send the updated file to the JWST. It’s certainly easier (and therefore likely less error-prone) than if every program was written in arcane code that you’d have to recompile if you wanted to make changes.

A “simplified” diagram of the architecture from the Maximizing Efficiency paper.
A “simplified” diagram of the architecture from the Maximizing Efficiency paper.
Image: Space Telescope Science Institute

If you’re still worried, do note that the Space Telescope Science Institute’s document mentions that the script processor itself is written in C++, which is known for being... well, the type of language you’d want to use if you were programming a spacecraft. And it’s obviously working, right? The pictures are incredible, no matter what kind of code was run to generate them. It is, however, a fun piece of trivia — next time you’re cursing the modern web for being so slow and wishing that someone would just blast JavaScript into space, you can remember that NASA has, in fact, done that.

Today’s Storystream

Feed refreshed Two hours ago Dimorphos didn’t even see it coming

R
Twitter
Richard LawlerTwo hours ago
A direct strike at 14,000 mph.

The Double Asteroid Redirection Test (DART) scored a hit on the asteroid Dimorphos, but as Mary Beth Griggs explains, the real science work is just beginning.

Now planetary scientists will wait to see how the impact changed the asteroid’s orbit, and to download pictures from DART’s LICIACube satellite which had a front-row seat to the crash.


M
The Verge
We’re about an hour away from a space crash.

At 7:14PM ET, a NASA spacecraft is going to smash into an asteroid! Coverage of the collision — called the Double Asteroid Redirection Test — is now live.


E
Twitter
Emma RothSep 26
There’s a surprise in the sky tonight.

Jupiter will be about 367 million miles away from Earth this evening. While that may seem like a long way, it’s the closest it’s been to our home planet since 1963.

During this time, Jupiter will be visible to the naked eye (but binoculars can help). You can check where and when you can get a glimpse of the gas giant from this website.


Asian America learns how to hit back

The desperate, confused, righteous campaign to stop Asian hate

Esther WangSep 26
E
Twitter
Emma RothSep 26
Missing classic Mario?

One fan, who goes by the name Metroid Mike 64 on Twitter, just built a full-on 2D Mario game inside Super Mario Maker 2 complete with 40 levels and eight worlds.

Looking at the gameplay shared on Twitter is enough to make me want to break out my SNES, or at least buy Super Mario Maker 2 so I can play this epic retro revamp.


R
External Link
Russell BrandomSep 26
The US might still force TikTok into a data security deal with Oracle.

The New York Times says the White House is still working on TikTok’s Trump-era data security deal, which has been in a weird limbo for nearly two years now. The terms are basically the same: Oracle plays babysitter but the app doesn’t get banned. Maybe it will happen now, though?


R
Youtube
Richard LawlerSep 26
Don’t miss this dive into Guillermo del Toro’s stop-motion Pinocchio flick.

Andrew Webster and Charles Pulliam-Moore covered Netflix’s Tudum reveals (yes, it’s going to keep using that brand name) over the weekend as the streamer showed off things that haven’t been canceled yet.

Beyond The Way of the Househusband season two news and timing information about two The Witcher projects, you should make time for this incredible behind-the-scenes video showing the process of making Pinocchio.


R
External Link
Russell BrandomSep 26
Edward Snowden has been granted Russian citizenship.

The NSA whistleblower has been living in Russia for the 9 years — first as a refugee, then on a series of temporary residency permits. He applied for Russian citizenship in November 2020, but has said he won’t renounce his status as a U.S. citizen.


E
External Link
Emma RothSep 26
Netflix’s gaming bet gets even bigger.

Even though fewer than one percent of Netflix subscribers have tried its mobile games, Netflix just opened up another studio in Finland after acquiring the Helsinki-based Next Games earlier this year.

The former vice president of Zynga Games, Marko Lastikka, will serve as the studio director. His track record includes working on SimCity BuildIt for EA and FarmVille 3.


A
External Link
Vietnam’s EV aspirant is giving big Potemkin village vibes

Idle equipment, absent workers, deserted villages, an empty swimming pool. VinFast is Vietnam’s answer to Tesla, with the goal of making 1 million EVs in the next 5-6 years to sell to customers US, Canada and Europe. With these lofty goals, the company invited a bunch of social media influencers, as well as some auto journalists, on a “a four-day, multicity extravaganza” that seemed more weird than convincing, according to Bloomberg.


J
James VincentSep 26
Today, 39 years ago, the world didn’t end.

And it’s thanks to one man: Stanislav Petrov, a USSR military officer who, on September 26th, 1983, took the decision not to launch a retaliatory nuclear attack against the US. Petrov correctly guessed that satellite readings showing inbound nukes were faulty, and so likely saved the world from nuclear war. As journalist Tom Chivers put it on Twitter, “Happy Stanislav Petrov Day to those who celebrate!” Read more about Petrov’s life here.


Soviet Colonel who prevented 1983 nuclear response
Photo by Scott Peterson/Getty Images
J
The Verge
James VincentSep 26
Deepfakes were made for Disney.

You might have seen the news this weekend that the voice of James Earl Jones is being cloned using AI so his performance as Darth Vader in Star Wars can live on forever.

Reading the story, it struck me how perfect deepfakes are for Disney — a company that profits from original characters, fans' nostalgia, and an uncanny ability to twist copyright law to its liking. And now, with deepfakes, Disney’s most iconic performances will live on forever, ensuring the magic never dies.


E
External Link
Hurricane Fiona ratcheted up tensions about crypto bros in Puerto Rico.

“An official emergency has been declared, which means in the tax program, your physical presence time is suspended,” a crypto investor posted on TikTok. “So I am headed out of the island.” Perhaps predictably, locals are furious.


R
The Verge
Richard LawlerSep 26
Teen hacking suspect linked to GTA 6 leak and Uber security breach charged in London.

City of London police tweeted Saturday that the teenager arrested on suspicion of hacking has been charged with “two counts of breach of bail conditions and two counts of computer misuse.”

They haven’t confirmed any connection with the GTA 6 leak or Uber hack, but the details line up with those incidents, as well as a suspect arrested this spring for the Lapsus$ breaches.