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 dont 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 humanitys finest scientific achievements, is largely controlled by JavaScript files. Oh, and its based on a software development kit from 2002.
According to a manuscript (PDF) for the JWSTs 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 (NASAs 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. Diagram: NASA
The manuscript and the paper (pdf) JWST: Maximizing efficiency and minimizing ground systems, written by the Space Telescope Science Institutes Ilana Dashevsky and Vicki Balzano, describe this process in great detail, but Ill 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 isnt running a web browser where JavaScript directly controls the Mid-Infrared Instrument its 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 theyre 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 werent born when the software controlling some of the JWSTs 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 thats not particularly known for being robust.
After thinking about it for a second, though, the softwares 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 wouldve only been around two years old, having launched in 2002. Thats 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.
Its worth noting that, like the project itself, these documents that describe the JWSTs 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.) Its always possible that NASA couldve changed the scripting system since then, but that seems like a pretty big undertaking that wouldve been mentioned somewhere. Also, while NASA didnt reply to The Verges 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 telescopes 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 telescopes solid state drive has around the same capacity as the one that was available in the original 2008 MacBook Air.
Anyways, were not here to talk about the JWSTs storage. I feel like the big question at this point is why Javascript? Sure, theres probably a bit more angst about the language now than there was in the time when the projects engineers were selecting tech for the project, but NASA is famous among some programmers for its strict programming guidelines whats the point of going with web-like scripts instead of more traditional code?
Well, NASAs 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, NASAs 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. Its certainly easier (and therefore likely less error-prone) than if every program was written in arcane code that youd have to recompile if you wanted to make changes.
A simplified diagram of the architecture from the Maximizing Efficiency paper. Image: Space Telescope Science Institute
If youre still worried, do note that the Space Telescope Science Institutes document mentions that the script processor itself is written in C++, which is known for being... well, the type of language youd want to use if you were programming a spacecraft. And its 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 youre 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.
Go here to read the rest:
The James Webb Space Telescope runs JavaScript, apparently - The Verge
- The Loop: Djokovic defeats Kyrgios in Wimbledon final, Steve Bannon reportedly agrees to testify at January 6 hearing, first James Webb Space... [Last Updated On: July 11th, 2022] [Originally Added On: July 11th, 2022]
- James Webb Telescope's first 'stunning' science images set to be revealed - Welland Tribune [Last Updated On: July 11th, 2022] [Originally Added On: July 11th, 2022]
- President Biden will reveal the first James Webb Space Telescope image today at 5PM ET - Yahoo! Voices [Last Updated On: July 11th, 2022] [Originally Added On: July 11th, 2022]
- James Webb Space Telescope's 1st photos | Space [Last Updated On: July 11th, 2022] [Originally Added On: July 11th, 2022]
- Video Puts into Perspective How Powerful the James Webb Telescope Is - PetaPixel [Last Updated On: July 11th, 2022] [Originally Added On: July 11th, 2022]
- NASA says the James Webb Space Telescope will be hit by meteorites - TweakTown [Last Updated On: July 11th, 2022] [Originally Added On: July 11th, 2022]
- NASA's James Webb Space Telescope: Here's What You'll See in the First ... [Last Updated On: July 11th, 2022] [Originally Added On: July 11th, 2022]
- First James Webb Telescope photo to be unveiled by Biden [Last Updated On: July 11th, 2022] [Originally Added On: July 11th, 2022]
- James Webb Space Telescope images expected at White House unveiling ... [Last Updated On: July 11th, 2022] [Originally Added On: July 11th, 2022]
- The 10 biggest telescopes on Earth - Space.com [Last Updated On: October 19th, 2022] [Originally Added On: October 19th, 2022]
- You don't have to be an astronaut to explore space, Mozilla Hubs can take you there - Mozilla & Firefox [Last Updated On: October 19th, 2022] [Originally Added On: October 19th, 2022]
- How the James Webb Space Telescope will power the search for aliens - Inverse [Last Updated On: October 19th, 2022] [Originally Added On: October 19th, 2022]
- Behold the 1st images from NASA's James Webb Space Telescope! [Last Updated On: October 19th, 2022] [Originally Added On: October 19th, 2022]
- Mock lava worlds will help the James Webb Space Telescope understand exoplanets - Space.com [Last Updated On: October 19th, 2022] [Originally Added On: October 19th, 2022]
- James Webb telescope first images of our galaxy's evolution are ... - BGR [Last Updated On: October 19th, 2022] [Originally Added On: October 19th, 2022]
- Webb Space Telescope GSFC/NASA [Last Updated On: October 19th, 2022] [Originally Added On: October 19th, 2022]
- Science Caf invites community discussion on James Webb Telescope, technology advancement - The Michigan Daily [Last Updated On: October 27th, 2022] [Originally Added On: October 27th, 2022]
- Webb Offers Never-Before-Seen Details of Early Universe James Webb Space Telescope - NASA Blogs [Last Updated On: October 27th, 2022] [Originally Added On: October 27th, 2022]
- NASA Drops Stunning New James Webb Image of a Star Being Born [Last Updated On: November 20th, 2022] [Originally Added On: November 20th, 2022]
- Experts Excoriate NASA Report Claiming James Webb Wasn't Homophobic [Last Updated On: November 20th, 2022] [Originally Added On: November 20th, 2022]
- Why new James Webb Space Telescope images have scientists excited about clouds on Saturns moon Titan - Fox Weather [Last Updated On: December 6th, 2022] [Originally Added On: December 6th, 2022]
- James Webb Telescopes Unparalleled View of the Ghostly Light in Galaxy Clusters - SciTechDaily [Last Updated On: December 6th, 2022] [Originally Added On: December 6th, 2022]
- Webb Telescope Pictures of Titan Help Start an Alien Storm Forecast - The New York Times [Last Updated On: December 6th, 2022] [Originally Added On: December 6th, 2022]
- James Webb Discovery Helps Date Birth of Very First Galaxies - TIME [Last Updated On: December 14th, 2022] [Originally Added On: December 14th, 2022]
- Who Is James Webb - Webb/NASA [Last Updated On: December 30th, 2022] [Originally Added On: December 30th, 2022]
- The Launch - Webb/NASA [Last Updated On: December 30th, 2022] [Originally Added On: December 30th, 2022]
- James Webb Space Telescope reveals alien planet's atmosphere like never ... [Last Updated On: December 30th, 2022] [Originally Added On: December 30th, 2022]
- Webb Image Release- Webb Space Telescope GSFC/NASA [Last Updated On: December 30th, 2022] [Originally Added On: December 30th, 2022]
- What Is the James Webb Space Telescope? - NASA [Last Updated On: December 30th, 2022] [Originally Added On: December 30th, 2022]