Islands in the sea: A simple model of a world with endemic coronavirus

TL;DR: The world is likely to soon be an archipelago of coronavirus-free islands in a sea of infection, and will remain so until an effective vaccine or treatment is globally available.

First up, a disclaimer: I’m not recommending any particular course of action, since I don’t claim to have the expertise to do so.  This is based entirely on analysis of the second-order effects of actions already being taken around the world today.

Creating islands

China has demonstrated to the world a simple and brutal but seemingly effective strategy to suppress the coronavirus pandemic. Isolate people in small groups, wait out the incubation period while removing the sick, repeat until everybody is healthy or dead.


Once you have created a coronavirus-free space, you also need to regulate entry to it to ensure no new carriers slip in.   Basically the same approach applies here as well: create an “airlock” by strict quarantine of all would-be entrants for 14 days, after which the healthy can enter.

Stating this in a few sentences is easy.  Actually implementing it with no gaps, meaning every local transmission and every infected visitor is successfully caught and quarantined, is fiendishly difficult, and many will try but fail.  If so, the world can soon be split in two:

  1. Islands, where local transmission of coronavirus is not present and there are strict entry controls to keep it that way.
  2. The rest of the world, or the sea, where coronavirus either is spreading locally or can be reintroduced at any time due to lack of effective controls on population movement internally or externally.

It’s important to note that islands need not be entire countries. A reverse quarantine zone, intended to keep disease outcan be implemented by any polity with control over its territory and the ability to keep out outsiders, be it a state, a province, a city, a farming village or a mountain cabin full of preppers.

So what?

If this pans out, the implications for the next year or two are enormous and complex, but we can draw a few straightforward conclusions:

  • Travel will remain extremely restricted.  Islands, paranoid about becoming infected, will be slow and cautious about opening up to other islands, hostile to anybody entering from the sea, and unwilling to send anybody into the sea themselves.  Would-be islands, trying to prevent new carriers from entering, will also restrict travel and apply quarantine measures.  Truly dysfunctional governments will be unable to restrict travel in or out, but their population will have other priorities.
  • Poor countries are likelier to end up under water.  If they lack the ability to enforce population isolation, keep their borders locked down, detect the inevitable slip-ups and track down their contacts fast, they will not be able to stop transmission.  Premature declarations of victory, followed by lapses back into the sea of community transmission, are likely.
  • Larger nation states may fragment.  If a country-level island is not possible, smaller entities may try to form their own.  For example, the Australian island state of Tasmania has already requiring all arrivals even from the rest of Australia to quarantine for 14 days.
  • Herd immunity in the sea will not end travel restrictions.  The population of the islands is not immune, so they will continue to heavily restrict travel from the outside.
  • Only universal vaccination or an effective early-stage cure will dry up the sea.  These are the only controlled ways to either bring immunity to the islands, or make the risk of getting sick tolerable. Even after islands vaccinate their own, they will continue to restrict travel from infected zones, because no vaccine is perfect or available to all.

 

Mofobikalypse: Mobike is Sydney’s last bike share still standing

Back in February, I prognosticated that despite having the worst bikes to ride, Mobike was going to win Sydney’s bike share war.   Three months later, it’s starting to become clear that they did indeed win… so far.

Four reasons Mobike won

The first reason is simple: they’re the only ones still trying.  In the last few weeks, not only has a fresh flood of Mobikes hit the streets, but some of them are the next-generation Mobike Lite 2nd gen bikes that are much lighter than the old ones and have seat height adjustable up to 180 cm, making them so much more pleasant to ride.  Still no gears, and they feel a lot flimsier since they have a normal, exposed chain transmission instead of the Heavy’s fully encased shaft, so it remains to be seen how they’ll stand up to the mean streets of Sydney, but all in all they’re now almost as good as Ofo bikes used to be.  By comparison, what was the last time you saw a new Ofo or Obike?

On that note, while the few remaining Ofos and Obikes are looking pretty beaten up these days, the indestructibility of Mobikes has served them well and the average Mobike is still perfectly functional, although it’s worth checking the brakes before taking off.  That said, some troglodytes have figured out that if they smash the lock button with something hard enough, like their skull, they can not only pop off the button, but bend the underlying pins so badly that people can’t unlock the bike anymore.  Sigh.

Third, Mobike has much better pricing.  Single rides start from $1.50/hr, which is already better than Ofo/Obike’s $2 minimum, but the killer app is their $7 per month Mobike pass, which gets you unlimited 2-hour rides.  My typical ride is ~1.5km around Darling Harbour between the office and the bus stop, so if I do this twice a day for four weeks, I’m looking at $160 on Ofo… or $7 on Mobike.  Not a hard choice, is it?

Last but not least, Mobike is the only one still restocking helmets: here’s a recent shot of 6 Mobikes in a row, where every single one has a helmet.  (Although I’ll admit this was more like winning the lottery than a daily sight.)  Given that the boys in blue are actually enforcing the law every now and then, meaning you risk a stonking $319 fine if caught without one, you’re a fool to bike without a helmet — and good luck finding one that’s not orange.

…but for how long?

All that said, I’m not sure how long this current happy state of affairs will last.  Restrictions are getting tighter, with the entirety of Darling Harbour (including the bike racks!) being marked as a no-parking zone in the Mobike app despite being possibly the best place to bicycle in the inner city, and those helmets will keep disappearing unless either the law is changed or Mobike comes up with a way to enforce returning.  (Side note to Mobikers who just plonk the helmet in the basket: stop doing that, srsly.  Lock it up.)

But that’s the other nice thing about the $7/month plan: you don’t need to commit too far in advance, and you can always stop when it’s no longer working for you.  In the meantime, I’ll keep Mobiking.

 

Mofobike: A personal comparison of Sydney’s bikeshare programs and why they’re all doomed

For the past half year, I’ve been a regular user of Sydney’s three largest bike share programs, Obike, Ofo and Mobike, riding mostly in and around Darling Harbour.  Here’s my quick review of each and my prognostication of who’ll win the bikeshare war in the end.

Obike

IMG_20180217_115828.jpg

Singapore-based Obike was the first major player in Sydney and I was a regular user for a large part of last year.  First ride deposit is $69 and rides cost $2/30 min, although a steady stream of promotions means that you’re unlikely to have to pay either.

Bike (♥♥♥): Obike’s bicycles are usable, but distinctly unexciting.  The seat is low and can’t be extended very far, making them quite painful to use if you’re tall.  To add insult to injury the adjustment mechanism is flaky, meaning the seat often twists or slowly sinks as you ride.  The bike is kind of heavy and there are no gears, which is not great in Sydney’s hilly terrain.

App (♥♥): The Obike app, at least on Android, fails at its basic tasks: it’s remarkably bad at finding bikes, with the map being essentially useless, and it’s even worse at unlocking bikes, to the point that around 1/3 of my attempts fail.  Add in mangled English and nonexistent support, and it’s a real pain to use.

Availability (♥♥): At least in my neck of the woods, Obikes are getting increasingly hard to find, and when you do find one…

Maintenance (Ø): This is Obike’s Achilles heel.  Horribly mangled Obikes, with wheels bent, seats missing etc are a common sight in Sydney, while Obike helmets are an endangered species.  The locking mechanism is also brittle, with the pin missing on half the bikes and the locking bar itself bent out of shape on the other half.  All this means that it’s increasingly rare to see a usable Obike, and near-miraculous to find one that’s both in shape and has a helmet attached.

Verdict: Doomed.  So in December, despite Obike frantically flinging free credits in my direction with absurd promotions (“take three free rides and we’ll give you ten free rides!”), I gave up completely and got my deposit refunded.  It’s a matter of time before they give up too.

Ofo

img_20180217_115840.jpg

Ofo, originally from Beijing, was the second player in Sydney.   A deposit is not required and while rides would normally be $1/30 min, they are offering unlimited free rides until the end of February.

Bike (♥♥♥♥♥): Ofo has, by a long shot, the best bikes in the game.  Each bike has three gears, so they’re good on both hills and flats, and the seat can be extended far enough to make biking rather pleasant even if you’re tall.

App (♥♥♥♥): Ofo’s app won’t win any awards, but unlike Obike it’s solid: the bike unlocks every single time like clockwork.  There are some minor UI glitches — for example, ticking a broken pedal when reporting damage throws errors — but overall it gets the job done well.  One mildly annoying nit: the bar code under the seat is kinda small and at least my phone’s camera has a hard time focusing on it to scan.

Availability (♥♥♥): Ofos are pretty ubiquitous, although not quite as common as our next competitor.

Maintenance (♥♥♥): Ofo’s bikes are noticeably sturdier than Obike’s, and it’s rare to see a wrecked Ofo.  They seem to get moved around pretty regularly and also restocked with new helmets on occasion, although this seems to be going slowly downhill.

Verdict: My favorite. If there’s an Ofo around, I’ll take it, and I hope they’re going to survive, although odds are they will be crushed by the juggernaut that is…

Mobike

mobike_public

Mobike, also from Beijing, is the world’s largest bike share company.  Only the fourth entrant to the Sydney bike share market, they’ve come in with a bang and have the largest fleet at the moment.  No deposit is required and there’s a 7-day free trial, after which rides start from $1.20/30 min.

Bike (♥♥): Mobikes are built like tanks: they’re super heavy and clunky, but indestructible.  Even the gear chain is entirely encased in a solid block of aluminium.  The obvious flip side is that pedalling one of these monsters up a hill, or really even a slight incline, involves a Tour de France -level workout to your quads, which isn’t helped by the cramped geometry.

screenshot_20180219-090928.pngApp (♥♥♥): For a long time Mobike’s app scored a solid zero, because it would crash every time I tried to open it.  They finally fixed that glitch a few weeks ago, and now it’s mostly usable.  Unlocking is flaky, but whereas Obikes flake out and refuse to physically unlock, Mobike will release the lock bar on the bike and the app will then tell you “unlocking failed”.  Free ride for the win?  At the end, after you lock, the app will first tell you off for “Over-charged” and threaten to freeze your account, only to suddenly remember that you’re in free trial and everything’s actually copacetic.

Availability (♥♥♥♥♥): Mobikes are everywhere.  Seriously, at one point you couldn’t throw a rock in Darling Harbour without hitting three Mobikes.

Maintenance (♥♥♥♥): This is the killer feature of being built like a brick shithouse: Mobikes can take an awful lot of punishment and basically don’t need maintenance.  I’m docking one heart only because helmets are becoming increasingly rare for these guys too.

Verdict: The likeliest survivor. They’re everywhere, and they just work.  It’s hard to compete with that, especially given the rate at which aggro morons seem to take pleasure in wrecking their competitors’ bikes.

Also-rans

Reddy Go was the first entrant in Sydney, but with $99 deposits, $2 rides and a non-existent fleet, why bother?  And I’ve seen a couple of EarthBikes around Rhodes, but they don’t really even seem to be trying to compete.

And the winner is… bureaucracy.

Macau_TriciclosDockless bike sharing may be a killer app, but NSW’s absurd helmet laws are the killer app killer.  In addition to the “yuck” factor of sharing headgear with random strangers, it’s getting really difficult to find a bike of your preferred brand that has a helmet attached.  While quite many people choose to ride without one, the prospect of a $330 fine is going to deter a lot more people.   It’s a huge logistical challenge for bike share companies too: even when bought in bulk, the cost of delivering helmets alone will destroy profit margins, no matter how indestructible the bike.

The other catch is that all bike share companies in Sydney are still operating under the “lose money on every sale, but make it up in volume” business model, but while I’ve thoroughly enjoyed not paying a cent thanks to all the promos, eventually the party will stop.  Perhaps the helmets will stop disappearing quite so quickly when people actually need to pay for their rides, but unless the rideshare companies can work out a way to verify that the helmet has been returned, this seems unlikely to staunch the bleeding.

While I’m at it, a tangent: I’ve often heard the claim that the reason the bikes are free is because the companies are spying on you and can mint millions with the gathered data.  Consider this: Facebook aka Instagram aka Whatsapp knows everything about you, and this is worth about $6/year (revenue, not profit).  The three bike share programs, on the other hand, know that I tend to bike from Town Hall to Pyrmont in the mornings and back in the evenings.  How many helmets do you think they can buy with that info?  Even if they’re being evil and tracking your every move when you’re not using the app?  (Which you can disable.)

The final unsolved problem is parking.  Both Ofo and Mobike half-heartedly try to enforce allowed parking, but enforcement is at best inconsistent and often absurd: Mobike has let me lock a bike and then told me off for doing it, and Ofo has told me I can’t take away a bike parked at a public bike stand because it’s been reported as badly parked.

If bike sharing is ever going to be a first-class citizen for transport in Sydney, the council and state will need to relax the helmet laws, allow cycling on footpaths and set up clearly marked designated areas for parking them in the city center.  I’m not holding my breath.

The rich get richer: Loonie swaps and altcoin airdrops

Castle_CanadaSo I was walking along one day when I was suddenly accosted by a Canadian Mountie in full uniform: red jacket, jaunty hat, the works.  He saluted me smartly and asked: “How about some Canadian dollars, eh?

“No thanks,” I replied and tried to walk away, but he followed.  “Please listen!  I want to give you Canadian dollars!”

“Sorry, I’m quite happy with my American dollars.”

“No, sir, I’ll give them to you for free.  No strings attached.”

I stopped. “For free?”

“That’s right!  All you need to do is prove to me that you have American dollars, and for every dollar you have, I’ll give you a Canadian one.”

“But why?”

“I want you to invest in Canada.  The US has reached its natural limits of growth, but in Canada, we have big blocks of land just waiting to be exploited by investors like you.”

DSC_4268“But aren’t those big blocks mostly useless frozen tundra?”

The Mountie looked irritated.  “Maybe today, but it’s about the potential, an investment in the future.  Look, it’s free money, do you want it or not?”

This smelled like a scam, but I was still intrigued.  “Well, let’s say I do.  How exactly do I prove that I have U.S. dollars?  Do you want me to lend them to you or something?”

“No need!  Let’s go to your bank and ask the teller to show me a bank statement.  I don’t need to know your name, address or anything, just that you have a bank account with money.”

“Huh,” I opened, and eyed the Mountie.  He did look terribly earnest, standing there at attention.  “Fine, let’s do it.”

So we went to the bank, I showed my ID to the teller and told her to give me a paper on bank letterhead showing my bank account and its balance.  The teller did so, and when the Mountie saw I had $10,000 in bank, he opened up his suitcase, took out a stack of $10,000 in Canadian dollars and handed them to me with a flourish.  “Enjoy your loonies!  Gotta run, bye!”  And he took running off after another customer who was just leaving the bank.  “Excuse me, sir, can I give you some Canadian money?  Sir?  SIR!”

“Well, that was weird”, I thought, then turned around to the teller and asked her to convert my shiny new loonies into U.S. dollars.  And now I had $17,900 in my U.S. account.  Ka-ching!

70s-hippie-poncho-3But right after I left the bank I was accosted again, this time by a disheveled hippie in a poncho.  “Hola, dude.  Can I give you some awesome Peruvian soles?”  “What’s a sol?”  “It’s the currency of the sun, man!  They represent solar energy and the pathway to a more inclusive economy!”  “And what do I need to do to get them?”  “Easy: just like us on Facebook, and show me your bank statement!

I was about to give the thumbs up, when out of nowhere a Vietnamese lady in a slinky white ao dai appeared and stepped in front of the hippie, almost impaling his Birkenstock-clad foot with a 5-inch stiletto heel.  “Ignore this man,” she commanded.  “I will give you dong.”

“Pardon?”  “Vietnamese dong.  Excellent currency, great growth prospects, backed by full might of Communist Party of Vietnam.  Just show me your bank statement, and I will give you this magic box that you can install in your home.  Every month, when the full moon rises, the box will print many millions of dong just for you.

“But why do you both want to give me money?  What do you get out of this, and why don’t you just give money away to everybody?”

Sign_BoxDoesTheToilet_LargeThe hippie shuffled uncomfortably.  “Well, these soles, they are real money, but they are hard to use outside Peru.  We want to make soles a strong world currency, like the U.S. dollar.”

A lightbulb went off.  “So if you give away your soles and dong to people who are already rich…”

“…they will become interested in our money, and buy more of it, and we will all be rich!”, said the Vietnamese lady.

“Well, speaking as a rich person, that sounds like an excellent business plan.  Let’s do it.”

Soon enough, I had 3,200 soles and 27 million dong.  I walked back into the bank, converted them to $2,100 U.S. dollars, and looked at my new balance of $20,000.  All in a day’s rent.

~ ~ ~

Sign_CashPit_LargeThis little parable is, of course, patently ridiculous.  Nevertheless, ridiculous or not, it’s also exactly what’s happening in the weird world of alternative cryptocurrencies (altcoins).

In the specific case of Bitcoin Cash, where a single existing chain was forked, there’s an entirely sensible reason for getting “free” coins, although as many observers noted, there is no rational reason for the sum of the old and the new to exceed the value of the old. (US and Canada is an imperfect analogy; imagine instead that California were to split away from the US and launch its own fiat currency.  Would the combined two be stronger than the original?)

So what’s the irrational reason?  Speculation.  And this also explains to the phenomenon of the “airdrop”, where an altcoin simply decides to give away free money to entice users.  The first airdrop, Auroracoin, altruistically handed out equal amounts to all residents of celand, but later drops just hand out their coins to people who already have lots.  Stellar Lumens, without a hint of irony, justifies their reverse welfare as “connecting people to low-cost financial services to fight poverty”, while Byteball takes a more fatalistic “this is what we gotta do to survive” approach and Bitcore doesn’t even pretend to be anything other than a Ponzi scheme (“three percent interest Every. Single. Week”).

Anybody want to take a bet on how long the party lasts?

 

Monaco: Doing the math on an ICO where the house always wins

genting_hotelMonaco has a nifty premise: it’s a debit card that lets you avoid currency conversion fees by the magic of cryptocurrencies. Just swipe your card to pay in local currency, so the pitch says, and it will send some Ethereum (ETH) or Bitcoin from your account to the merchant at “perfect interbank exchange rates without markups or fees”, saving you 6-8% on every $1000 you spend.

That’s a pretty bold claim in itself, and I’ll get back to it later, but the even more interesting thing is that this company’s Initial Coin Offering (ICO) has been backed to the tune of 54,800 ETH, or around US$20 million at time of writing.  (Update: The final number was 71,392 ETH, worth US $73m in January 2018.)  That’s a lot of coin for a debit card, and I became curious: what kind of margins these brave investors can hope to get back?

Revenue and profit

skyway_valleyInvestors in Monaco become holders of Monaco Card Tokens (MCO).  Monaco promises these investors exactly one source of revenue: a flat 1% licensing fee on all debit card transactions paid with cryptocurrencies, which is converted into ETH immediately and added to a pool called the Asset Contract.   This also means that any transactions made using Monaco but funded by fiat, which in Monaco’s own opinion will account for 60% of transactions in the first year, will net investors precisely nothing.

The Monaco whitepaper (PDF, page 24 onward) has “Conservative” and “Optimistic” scenarios that purport to sketch out the vast profits to be made.  Once you puzzle your way through what the numbers mean, three things jump out quite quickly.

First, they assume that Monaco will pick up 165,597 or 281,515 regular users in the first year. That’s a mighty ambitious uptake number given that some estimates for the total number of cryptocurrency users hover around the 1 million mark, meaning 1 in 4 of them would need to start using Monaco within a year (and not competitors like Token or TenX). By the second year, the optimistic model has nearly all of those million on board and churning through $2 billion, and by five years (2022), we’re at 5 million and $16.6 billion. The conservative model, on the other hand, calls for a mere 3 million users and $9.8B by 2022.

Second, there’s a blandly named factor called “Growth in Underlying Assets” which purports to project how ETH will appreciate against the US dollar, and has nothing whatsoever to do with Monaco itself.  The conservative model assumes a mere 40% year, compounded forever, while the optimistic model assumes 100%/year.  This translates to a source of 3200% growth within five years, irrespective of Monaco’s popularity!

Third and most strikingly, while the whitepaper presents lovely big numbers for the value of the pool as a whole, there’s nothing about profit per MCO, the value of each MCO, or the expected return on investment (ROI).

So I did my own math: I computed the ROIs for the whitepaper’s numbers, and I added two models of my own.  In my “optimistic” model, I assume that each of the ~2,000 investors manages to convince 5 other people to get a Monaco and use it with cryptocurrency to the tune of US$2,500 a year, and that ETH stays at its current valuation.  In the “pessimistic” model, I assume that the only people using it are the investors themselves, they only spend $1,000/year, and that ETH prices fall back to $150, a level they last plumbed in the dim antiquity of four weeks ago. Here are the numbers for the first year for all four models (raw data):

Source Gyrovague Monaco
Model Conservative Optimistic Conservative Optimistic
Profit per MCO (USD) $0.0008 $0.0100 $0.0873 $0.1484
Return on investment 0.04% 0.47% 4.07% 6.93%

That’s not looking too great unless you’re hitting the Kool-Aid pretty hard.  But since investors have bought their MCOs at around 140 MCO per ETH, which works out to around $2.14 per MCO at current exchange rates, you might naively assume that after the ICO is over, they can at least sell them back for more or less the same price.  Right?

Not so: all of that sweet, sweet ETH now belongs to a future Swiss company called Monaco GmbH, not the investors.  The MCO Creation Terms section 2.4 helpfully spells out what their investors do get if they sell (“burn”) their MCO:

the right to claim … a pro-rata share of net license revenue (License Revenues) … if – and only if – the Monaco Card Project successfully generates such License Revenues.

In other words, the original price is completely irrelevant.  When measured in USD terms, one MCO is worth only the revenues computed above divided by the number of MCOs, plus, since they’re in ETH, the natural appreciation (or lack thereof) of those revenues.  With an estimated 10 million MCOs sold, here are what the models predict two years in:

Source Gyrovague Monaco
Model Conservative Optimistic Conservative Optimistic
Value of MCO (USD) $0.0008 $0.03 $0.90 $2.20
Profit/loss per MCO -$2.14 -$2.11 -$1.24 $0.05

In other words, if the card goes completely gangbusters and ETH continues to skyrocket, an MCO will be worth slightly more than what it originally cost, whereas if the card is moderately successful, it’s worth about 3 cents.

But I mentioned ETH skyrocketing.   What if our investor had just held onto the original ETH instead of turning it into MCOs?

Source Gyrovague Monaco
Model Conservative Optimistic Conservative Optimistic
Value of original ETH $0.54 $2.14 $4.20 $8.57
Profit/loss per MCO,
compared to holding ETH
-$0.53 -$2.11 -$3.30 -$6.37

Oops.  Perversely enough, it looks like the better ETH itself is as an investment, the worse off you are putting any of it into MCO!

Using the card

skyway_mistSo that’s the deal for investors. How about ordinary users who just want to use the card to realize those great 6-8% savings?

That’s a very good question, since there aren’t any users yet. In fact, Monaco has yet to announce when the cards will be available or what costs like annual fees will be associated with them. Their website also has lots of pretty pictures of their mobile app, but this app, too, remains firmly unreleased.

The other big mystery is the promise of “perfect interbank exchange rates without markups or fees”, since cryptocurrency exchanges do charge fees, which are often quite meaty at that (for example, 4% at Coinbase).  It is unclear how Monaco intends to make these costs go away, and the whitepaper (4.6) handwaves this away as “proprietary”, but one obvious option would be to take a leaf from the credit card playbook and quietly tack it onto the exchange rate itself, which would of course defeat Monaco’s primary purpose.  The currencies themselves also charge for transactions, which particularly for Bitcoin have recently been prohibitively high with fees of several dollars a pop, and as far as I can see Monaco never discloses who pays these.

If you signed up for a regular credit or debit card, details such as these would be found in the terms and conditions of that card. However, despite promising free “Monaco BLACK” cards to the first 500 investors, Monaco has yet to publish such a document.

Conclusion

Monaco looks like a great deal if you are Monaco.  Otherwise, steer clear.

 

The last subway line in Japan

Diorama at the Railway Museum, Saitama, JapanOn December 6, 2015, the Sendai Subway’s Tōzai (East-West) Line opened.   The second line of a provincial Japanese city, this event passed entirely under the radar of the Western media and even Japanese coverage faithfully followed the dulcet tones of the press release (時短 jitan, faster! 楽乗 rakunori, fun to ride!), a few pausing to note that the completion of the line had been delayed by the 2011 Tōhoku Earthquake.  Almost all stories approvingly added that the line uses linear motor technology, the meaning of which is so unclear to the average Japanese that it’s regularly confused with magnetic levitation, but which imparts the sheen of futuristic technology so necessary for a large Japanese infrastructure project.  A future this or any other transport technology lacks in Japan, for the Tōzai line is almost certainly the last subway line Japan will ever build.

This seems a bold claim to make, but the Future Railway DB and Wikipedia agree: in the entire archipelago of 126 million, there are neither any new subways under construction nor any even being seriously planned.  Not just subways, mind you; but new railway lines of any kind, with the notable exception of three that we’ll get to later.

Ueno Zoo Monorail, Tokyo, JapanSo does Japan need more lines? Arguably not, and it’s certainly had a good run.  In the 88 years that elapsed from the opening of Tokyo’s Ginza Line in December 1927 to today, 9 Japanese cities drilled, dug and blasted 750 kilometers of mostly-underground subways, with another 6 opting for more exotic options like monorails.  In central Tokyo alone, in the ten years since my first visit in 1997, great big slabs of the Namboku, Ō-Edo and Fukutoshin opened up, not to mention the all-new suburban Rinkai, Nippori-Toneri, Minato Mirai and Yokohama Green lines.

And then the Leviathan of Japanese public works, grown fat from decades of suckling on the teat of the taxpayer, finally ran out of the inertia that had sustained it all the way from the bursting of the Bubble in 1991 to the 2008 financial crisis.   It ground to a shuddering halt and lay still, and even the twin shocks of Abenomics and Tokyo winning the 2020 Olympics, applied to the heap like defibrillator paddles, threw up only airy bubbles of froth with next to no hope of realization.

The reason why Japan is no longer building lines is twinfold:

  1. Japan’s population peaked in 2010 and is set to decline at -0.7%/year, a figure that masks the gaping trench between the more or less stable cities (although even Tokyo will tip into decline in 2020) and the rapidly collapsing countryside, where some districts have already lost over 90% of their peak population.
  2. Japan’s public debt continues to soar into the stratosphere, with this year’s burden projected to hit 246% of GDP.

It’s a simple, crushing equation: ever more debt to pay back, ever less people to pay it.  In Shrinking-Population EconomicsProfessor Matsutani Akihiko of Japan’s National Graduate Institute for Policy Studies computes that by 2023, Japan’s bill for infrastructure maintenance will exceed its total budget for capital investment.

JR MLX-01 maglev model, Expo 2005, Aichi, JapanMatsutani’s suggested cure is shutting down excess capacity to free up scarce labor, paring back investment, increasing wages and freezing taxes.  Under Abe, Japan has done precisely the opposite, jacking up taxes and encouraging companies to spend, spend, spend on the three prestige rail projects still under way:

  1. In 2016, the first stage of the Hokkaidō Shinkansen bullet train to Hokkaido, Japan’s most rapidly depopulating island, opens at a cost of ¥1.5 trillion (US$12 billion).
  2. By 2022, the Hokuriku Shinkansen will creep down Honshu’s already rattlingly empty Japan Sea coast from Kanazawa to Tsuruga (pop. 68,000) at a cost of ¥700 billion (US$6b), plus another ¥1.4 trillion if they complete the loop back to Kyoto.
  3. Last but certainly not least, the crowning lunacy of them all, the Linear Chūō Shinkansen (there’s that word again!), which is basically 500 kilometres of tunnel duplicating the existing Tokaidō Shinkansen route between Tokyo and Osaka, only lined with superconducting magnets allowing speeds up to 505 km/h and built at a staggering-even-for-Japan cost of ¥9 trillion (US$72 billion).  The line is to be completed by 2045 and hopes to generate a total of ¥5 trillion in profit in the next 50 years, meaning that if all goes according to plan, by 2095 they will have paid back half the construction cost.  Now that is planning for the future.

Toy train, Railway Museum, Saitama, JapanBack in reality, Japan is simultaneously embarking on the equally mammoth task of dismantling its railways; not just the once-extensive rural network, which as elsewhere has been comprehensively obsoleted by cars, but urban transport akin to those recently-built subways.   Over half of Japan’s railways operate at a loss, including virtually all of those serving less than 2000 passengers/km/day, an increasingly unachievable number when ridership has falling faster than the population since 1995.

The first casualty was the Peachliner in 2006, a once-fancy automated line built to service an exurb of a Nagoyan suburb that carried only 6% of the people originally projected (Shinkansen planners, take heed) with operating costs that equalled rebuilding it from scratch every three years.  Next in line may be the Linimo, Japan’s sole operating (slow-speed) maglev line, which stops running when there’s a gust of wind and whose finances, losing ¥1.9 billion/year or nearly $1000 per daily passenger, are on equally shaky ground.

One rural railway managed to resurrect its sagging fortunes for a while by naming a cat as its stationmaster, but the rest won’t be so lucky.  It’s time, long past time, to let the zombies die and invest Japan’s dwindling money and manpower elsewhere.

 

 

Crashes only on Wednesdays

Ants, Gardens by the Bay, SingaporeSit back and grab a drink: it’s time for the story of one of my favorite bugs.

‘Twas my very first IT job, a software developer summer internship at a manufacturer of very serious medical equipment, primarily anesthesia delivery systems and hospital patient monitors. The latter are the boxes you see bleeping next to bed-ridden patients, drawing graphs of pulse, blood pressure, respiration etc and summoning nurses when they flatline.  The office was full of 2-meter cylinders of laughing gas, luxuriously bearded gurus expert in embedded systems, and entire rooms devoted to the documentation needed for the FDA certification of various devices.  Hushed voices still spoke of a bug that had slipped through testing ten years ago in one piece of anesthesia kit and caused the machine to reset in the middle of surgery, and needless to say a teenage greenhorn like myself was kept well clear of all production systems.

Instead I was given a plum prototyping project to test out the hot buzzwords of 1997: build a C++ server that listens to the serial port of a patient monitor and dumps a selection of interesting events to a SQL Server database, then send the data via CORBA to a Java applet, so doctors, relatives etc could see how the patient was doing via the Internet, with both the ability to see realtime data and browse previous records.  Spiffy!  Especially since I had zero practical experience in any of these languages or systems!

After a few weeks of butcherous hackery, much of it spent on inhaling the migraine-inducing Visibroker ORB manual and squishing utterly mundane type conversion bugs, I had my “Simpson” system more or less running, with “Homer” recording and serving the data and “Bart” displaying it.  Along the way I had learned out that CORBA was hopelessly overcomplicated, that AWT was painful (GridBagLayouts, brr), that applets were slow as molasses, and that Java otherwise seemed like a pretty decent language.  But there was a niggling bug: every now and then, the C++ server would crash hard, and I set about figuring why.

Crystal Cave, Cloud Forest Dome, Gardens by the Bay, SingaporeSince patient monitor whose output I was listening to was in another cubicle, I had done most of my development and testing using the handy “Demo” mode where it happily played back simulated cardiac arrests and such in a loop, and as far as I could tell my server never crashed while using this. It did sometimes crash when I or somebody else twiddled with the controls manually, especially during live demos, but for the life of me I couldn’t work out a way to make it crash repeatably, no matter what I did.  I logged all events to disk to try to find out what had happened just before a crash, but slow and careful manual replication of the exact preceding event sequence (“set filter to X, twist control knob exactly three notches to the right, press button…”), complete with running back and forth because I couldn’t see my PC’s logs when using the patient monitor, failed to elicit a crash.  Whatever “the evil event”, as I took to calling it, was, it seemed to cause crashes while eluding all logging.  Was there some sort of serial I/O or hardware issue corrupting the events?  Were cosmic rays flipping bits in my PC?!

After several weeks of frustration, where entire days devoted to experimentation had produced no results, I ended up basically adding printf statements to every single line between receiving the event from the serial port and writing it in the database…  and in the process, as I revisited every line of that code, a sinking realization dawned on me.

When setting up the database schema, in a misguided attempt at saving space, I had made the amateur mistake of using the event timestamp as the primary key — so if two events happened to come in at the same millisecond, the DB would throw a unique key constraint violation.  I noticed this early on, but determined that this only seemed to happen in unusual and uninteresting circumstances like when futzing about in the monitor’s internal configuration settings, so I added a catch block that logged a warning and continued on its merry way.

Sky Trees, Gardens by the Bay, SingaporeBut.  This was old-school code, and the log string was written C-style into a fixed-length 80-character buffer. While the length of the unique key violation message itself was invariable, the log timestamp happened to be formatted so that it used the long-form English weekday name (%E), so the output looked like “Monday, July 17, 1997, 10:38:47.123”.  Turns out English weekday names have an interesting property:

Name Length
Sunday 6
Monday 6
Friday 6
Tuesday 7
Thursday 8
Saturday 8
Wednesday 9

Caught on yet?  On Wednesdays, and only on Wednesdays, if somebody manually twiddled certain bits in the monitor settings in a certain way, two events would occur during the same millisecond and cause the DB to throw an exception, and the error message that logged this would be exactly 81 bytes long including the null terminator, overflowing the 80-char buffer and causing the program to crash!

Cloud Forest Dome, Gardens by the Bay, SingaporeEver since, I’ve made sure to use a dedicated and preferably auto-incremented integer ID as the primary key of every database table I need, and to log everything in ISO format, YYYY-MM-DD, no weekdays needed.  And over the years, I’ve learned that no matter how seemingly random and unpredictable the behavior of the bug, there’s always a logical explanation for it that you can find if you dig deep enough; that “unrelated” errors rarely are; and that it’s almost certainly your own damn fault.

Update: This story is now available in Russian! Когда программа падает только по средам