☛ How the smallest programming bugs can be catastrophic

From way back in 1996:

It took the European Space Agency 10 years and $7 billion to produce Ariane 5, a giant rocket capable of hurling a pair of three-ton satellites into orbit with each launch and intended to give Europe overwhelming supremacy in the commercial space business.

All it took to explode that rocket less than a minute into its maiden voyage last June, scattering fiery rubble across the mangrove swamps of French Guiana, was a small computer program trying to stuff a 64-bit number into a 16-bit space.

One bug, one crash. Of all the careless lines of code recorded in the annals of computer science, this one may stand as the most devastatingly efficient.

More links here, and the report of the inquiry into the incident is archived here.

A fascinating, and from a programmer’s perspective chilling, read. This is the stuff of nightmares — an apparently innocuous line of code causing an exception that leads to disaster!


Adios Cassini

A couple of months ago, 15 September to be precise, marked the end of an era in the human exploration of our solar system. The Cassini spacecraft was programmed to crash into Saturn’s upper atmosphere and burn up, thus ending an almost two-decade journey and exploration of Saturn and its moons. I was in middle school when this mission launched in 1997, and at that point, even reaching Saturn in 2004 seemed eons away. Twenty years later, perhaps it’s time to look back at some of the amazing insights we’ve gained.

Cassini is actually a shortened name for the Cassini-Huygens mission, and comprises the main spacecraft — Cassini — designed to travel as a satellite in the Saturn planetary system, and a small lander — Huygens — designed to actually land on Titan, Saturn’s largest moon.

Giovanni Cassini was an Italian mathematician and astronomer, and discovered four of Saturn’s moons — Iapetus, Rhea, Tethys and Dione. The Cassini spacecraft was the first to observe all four of these moons. Christiaan Huygens was, of course, a famous Dutch astronomer and scientist, and discovered — but of course — Titan, then the first known moon of Saturn. (He also invented the pendulum clock, was mentor to Gottfried Leibniz, studied optics and the wave nature of light, and derived the modern formula for centripetal force.)

Saturn by Cassini

Saturn by Cassini (via Wikipedia).

Of the many discoveries made by Cassini, I’ll focus on just two stories: those of Saturn’s largest moon Titan, and Saturn’s hexagon. Both of these fascinate me to no end, and I think reflect the best of Cassini’s contributions.

Saturn's Polar Hexagon

Jupiter is famous for its Great Red Spot; Saturn has its own atmospheric phenomenon that’s equally fascinating. Saturn’s Hexagon was first discovered by the Voyager missions, but now Cassini has had the chance to see it from up close.

Technically, the Hexagon is a persisting cloud pattern formed by jet streams around Saturn’s north pole, but its sheer size and perfect symmetry make it unique. Each side of the hexagon is about 13800km long (to compare, Earth’s diameter is about 12700km), and its winds travel at around 300km/h. It’s been there since the Voyager missions in the 1980s, so we know its long-lived.

Saturn - North polar hexagon and vortex as well as rings (April 2, 2014)

Saturn - North polar hexagon and vortex as well as rings (April 2, 2014) (via Wikipedia).

On Earth, our jet streams are forced to bend and move in response to Earth’s surface features such as mountains. Saturn is much larger than Earth (Saturn diameter is about 116000km) but has a rocky core that’s similar in size to Earth, and so its jet streams have no such problems, and can keep flowing in their own orderly and symmetrical fashion.

The hexagon is essentially a quirk of fluid mechanics. Here on Earth, scientists have been able to create (here, and here) such regular shapes by rotating a circular tank of liquid at different speeds at its center and outer edge. Due to the difference in speeds, a turbulent region is created where such regular shapes can be observed. The regular shape is not always a hexagon (shapes with three to eight sides, i.e. from a triangle to an octagon, are produced) but a hexagon is the most commonly occurring. However, the phenomenon only occurs when the speed differential and fluid properties fall under certain small margins, and therefore the hexagon phenomenon is not observed everywhere where its possible (such as Jupiter, or even the south pole of Saturn).

At the center of the Hexagon, right at the north pole, is a humongous storm, with a definite and easily observed eye wall. The south pole has such a storm as well, although it doesn’t display a Hexagon. In each case, the eye of the storm is about 50 times wider than a hurricane would be on Earth.

As much as the Hexagon is an atmospheric and scientific phenomenon, explained and replicated under lab conditions, it’s one of our solar system’s most beautiful sights, and something I’ll keep looking for in photos of Saturn, now that I know it’s there.

False color image of storms at Saturn's north pole

False color image of storms at Saturn’s north pole (via JPL/NASA).

Titan

Titan is Saturn’s largest moon, and of special interest to us: Titan is the only known moon with an atmosphere, and the only one other than Earth whose atmosphere is majority nitrogen. Moreover, its atmosphere is denser and more massive than ours, and is opaque at many wavelengths of light. This means that, like Venus, we had no idea of what the surface of Titan looks like until we had a probe that could land on the surface of Titan. Thanks to Cassini and Huygens, we know a lot more today about Titan than we did in 2004.

Titan, we know now, has an active weather system, including wind and liquid rain, just like on Earth. Of course, the liquid that rains is different from Earth: it rains liquid methane on Titan. Nevertheless, its nitrogen atmosphere and presence of liquids means that Titan’s methane cycle is analogous to Earth’s water cycle. Titan’s upper atmosphere is also affected by ultraviolet light from the Sun, whereby atmospheric methane is broken down and reconstituted into a diverse mix of complex hydrocarbons.

We’re not done yet with the comparisons with Earth! Titan has lakes and oceans, comprised of methane, ethane, and dissolved nitrogen; this makes Titan only the second object in the Solar System (after Earth) to have stable liquids present at ambient temperatures. It most likely also has volcanoes, and is affected by tidal effects from Saturn’s massive gravity. Titan’s surface, specifically where Huygens landed, looks uncannily like Earth, with ‘globules’ about 10-15cm in size, made probably of water ice.

Huygens' view of Titan's surface

Huygens’ view of Titan’s surface (via Wikipedia).

It’s almost as if Titan is an analogue of Earth— only much colder. In fact, in very specific ways it’s not even colder by much thanks to Titan’s greenhouse effect and tidal heating from Saturn. Cassini has performed numerous gravity measurements of Titan, which reveal that there is a hidden, internal, ocean of liquid water and ammonia beneath Titan’s surface.

So, to summarize, Titan has: an active weather system, large quantities of complex hydrocarbons (Titan is much, much richer in hydrocarbons than Earth), tidal effects from Saturn, and interaction of its atmospheric methane with ultraviolet radiation from the Sun, and even and underground ocean of liquid water and ammonia. A question is begging to be asked at this point: what are the chances of life (past, present or future) on Titan?

Scientists think Titan definitely has the potential to contain habitable environments. Similar to Earth in its infancy, Titan today has the pieces needed for new life to possibly form. Whether it already has, or the extent of future possibility, can only be understood with even better exploration. Indeed, quite a few ideas for future missions dedicated to Titan have been proposed, but none have really gotten off the ground (pun intended) yet.

The most promising of them all is a design to send a submarine to Titan that can explore the seas of Titan, but even this idea is in relatively early stages.

So Much More...

I’ve really just scratched the surface here of how much the Cassini mission gleaned from the Saturn system. There’s so much more: Saturn’s rings and their composition; the moon Enceladus and its jets of icy particles and subsurface ocean of salty water; the moon Iapetus and its equatorial ridge; the moon Mimas and its crater that gives it the Death Star look… trust me, if you don’t take an interest yet, you will once you start reading.

The Cassini-Huygens mission really gave us glimpses into a planetary system that provides great opportunities for scientific discovery, amazing new and diverse worlds, and even — dare we dream? — possibilities of places that can harbor life.

It’s time to say adios to Cassini, but of course, we humans have a long way to go before we can say we know our own solar system.

Saturn's moon Mimas, with the crater Herschel visible prominently

Saturn’s moon Mimas, with the crater Herschel visible prominently (via Wikipedia).

(This piece first appeared in the 2017 edition of Sharod Sombhar, an annual magazine from the Bengali Students’ Association at Virginia Tech.)


Of India’s high-speed rail ambitions, and lazy Indian journalism

India’s plans about building a high speed rail route connecting Mumbai and Ahmedabad have been in the news lately. The project is funded by a low-interest loan from Japan (covering 80% of the cost of the project), and will make use of Japanese high-speed rail technology used for the Shinkansen.

Of course, along with the project being in the news, it is also subject to critique in news articles, as any expensive government venture is bound to (and should!) be. In many of the articles, though, I found one common piece of information mentioned over and over:

According to a study conducted by IIM Ahmedabad, Ahmedabad-Mumbai bullet train will need to make 100 trips daily and carry 88,000-118,000 passengers per day to be financially viable. This figure could well be way above the total number of passengers travelling between the two cities on any given day.

In fact, searching the internet with the name of the article in question (Dedicated High Speed Railway (HSR) Networks in India: Issues in Development) provides a result that looks like this:

Google Search Result

Google Search Result. (Source)

They all mention the same report, and all mention the exact same language about “requiring 100 trips a day”. None, however, actually provide links for the curious reader, nor provide any context or analysis. Well, I was curious, so I tried to find and read the actual report.

This is the the report I found online. It’s co-authored by Prof. G. Raghuram as mentioned in all the newspaper reports, and calls itself “an abridged version of an IIMA working paper with the same title.” Unfortunately, the IIMA working paper link is broken, and the Wayback Machine doesn’t have it archived either. (P.S.: Between the time that I found and read the report, and I finished writing this piece, the webpage hosting the report seems to have gone dead. No matter, the Wayback Machine has it cached. Go read!)

Anyhow, the report is a great read. After reading it, though, I was reminded of how poor India’s average journalism has come to be. What every news article printed is actually in the report being cited, and yet — and yet! — what they printed is a complete misrepresentation of the entire point and view of the report.

Let’s start with the conclusions of the report. The following are direct quotes from the Conclusions section:

  • Given that India is a developing country, the primary concern is whether the funds for such a project could be better utilised in other domains, including in upgrading conventional rail. However, the Japanese funding to the tune of 80% of the project cost may not be available for other uses.
  • there are many positive benefits and externalities of the HSR which would be useful in India’s overall aspirational development. These externalities include technology percolation into other domains, economic development, game-changing sense of connectivity, and national pride due to cutting-edge infrastructure. In such a context, it is a good idea to begin and learn.
  • The Mumbai-Ahmedabad route is a good choice for the first route, since it connects India’s first and seventh most populous cities, with significant economic development in the 500 km corridor between them.
  • The low cost Japanese financing has been a great catalyst. Though it is a tied funding with significant mandatory procurement from Japan, it cannot do much harm since Japan is at the cutting edge of HSR technology with over 50 years of experience.

Evidently, the overarching view of the article is not that “100 trips will be needed per day…”. Let’s talk about that part next, then. Here’s the crucial paragraph from the article:

Assuming that 20% (apart from the 80% Japanese funding at concessional rates) of the total cost of the Mumbai-Ahmedabad route would be funded by the Government of India (GoI) with an expected 8% annual return during the operational phase, the estimated daily financing costs for the route would be INR 106 million from when the repayment of the loan kicks in. We take this to be the 16th year (till when the Japanese loan has a moratorium), by when the ramp-up of traffic should have occurred. The project cost includes the ‘interest during construction’ for seven years. Over the remaining eight ramp-up years, we assume that there would be enough operating surplus to cover the interest payments. Subsequent to this, the GoI portion is treated as an equity with only interest due, but no principal repayment. Taking an average fare of INR 5.00 per km for the route with intermediate stops and for a scenario of 0.4 operating ratio, we arrive at a daily required ridership of 118,000 passengers (which translates to 43 million passengers annually). At an average of 1000 passengers per train, over 100 services per day (50 per direction) would be required.

What this means is that if the financing for the rail route is to be paid from the revenue from the rail route only, then about 118000 passengers, at an average of 1000 per train, over 100 services daily, would need to travel on the route. The newspaper articles only mention the raw number, with a vague notion that this is impractical or impossible to achieve. Two points should be considered, though. First, perhaps it isn’t necessary that revenue from the rail route matches the required financing. Perhaps the government can pay for the financing in the short term, and accrue revenue from the rail route to replenish its coffers in the longer term. Second, what is the context for the “1000 per train, 100 services daily” figure? How does it compare to other high speed rail systems in other countries?

Considering the second point first, here is literally the very next paragraph in the report:

The feasibility report estimates for 2033 with a train configuration of 10/16 cars (750/1200 seats) require 52 trains per day per direction. As of 2016, some of the high-traffic HSR routes like Paris-Lyon (409 km), Shanghai-Nanjing (311 km) and Tokyo-Shin Osaka (552 km), though being parts of bigger networks themselves, have more than 85, 300 and 330 trains respectively running every day.

Well, then! In context, the “100 trains per day” number doesn’t look so bad, does it? Considering this information, perhaps the first point above regarding financing isn’t that big a concern, either? It would seem so from the report, since it makes no further comment regarding this matter, including in its conclusions.

There are other points that the news articles mention, such as the 500km distance of the route, as being detrimental to the success of the project (“Flights only take one hour!”). Even those points are considered and answered in the report. The report really is worth the read.

The pros and cons of a large, time-consuming, and expensive government project should be debated — ernestly. However, the debate is derailed (forgive the pun) right at the beginning if the information being circulated is incomplete, or worse, plain wrong. Please, by all means, have the debate. Would everyone at least read the report that everyone is attempting to cite?

P.S.: Between the time that I found and read the report, and I finished writing this piece, the webpage hosting the report seems to have gone dead. No matter, the Wayback Machine has it cached. Go read!


☛ Radiolab Podcast: Using flickering lights to treat Alzheimer’s Disease

Today, a startling new discovery: prodding the brain with light, a group of scientists got an unexpected surprise – they were able to turn back on a part of the brain that had been shut down by Alzheimer’s disease. This new science is not a cure, and is far from a treatment, but it’s a finding so … simple, you won’t be able to shake it. Come join us for a lab visit, where we’ll meet some mice, stare at some light, and come face-to-face with the mystery of memory. We can promise you: by the end, you’ll never think the same way about Christmas lights again.

I’ve been meaning to post about this particular episode ever since I listened to it. This is the Nature paper about this study. They found that simply flashing light of a certain frequency at a certain interval helps with some of the brain waves that are diminished in mice with Alzheimer’s. It’s absolutely fascinating.

(I’m not going into too much technical jargon here; go listen to the episode!)

If you don’t listen to Radiolab in general, you definitely should; it’s one of the best podcasts there are.


UK Election: Interesting logistics of the Queen’s speech

In light of the recent election in the UK, the Queen, of course, is supposed to make a speech regarding forming the government by the party that has won majority. Now, however, after the interesting results of the election, the Queen’s speech is delayed, and the reason for it is very interesting.

The Telegraph UK reports:

The Queen’s Speech is going to be delayed because it has to be written on goatskin paper and the ink takes days to dry.

Apparently, the British monarchy are more concerned than others would be about the archival qualities of the paper that they use.

[…] goatskin paper is not actually made from goatskin.

The material is in fact high-quality archival paper which is guaranteed to last for at least 500 years.

Well, okay, but still, why the delay?

Well, ink on this special paper takes a few days to dry. And the monarchy had “ready to go” versions of the speech for (a) a Conservative party majority, and (b) a Labour party majority. But the results of the election, that resulted in a hung parliament, has put all pre-made plans into disarray. Since the political parties themselves don’t know yet how the government will be formed, the Queen’s speech isn’t finalized yet either.

Once the details are set in stone they can be committed to the goatskin paper and sent away for binding before being presented to the Queen.

I love how even the most apparently mundane things become fascinating just by being associated with the British monarchy.