Monday, August 12, 2019

Up, up, and away

Yesterday they welcomed buses back to the TransBay Bus Terminal, aka Salesforce Park.

Here's a nice story in Wired with lots of pictures and fascinating details: How 'Microcracks' Undermined San Francisco's New Bus Terminal

the construction process involved cutting away 8 inches of the flange right where it needed to be strongest. “The problem was the geometry of the weld access hole,” Frank says. “It has this corner on it, and it acts as a stress concentrator.”

The holes weren’t circular—they were rectangular, with rounded edges. And those corners, probably cut with a plasma cutter, acquired “microcracks” just a few hundredths of an inch deep. The investigators know they were cut with something hot, because the surfaces of the cracks were coated with a colored deposit, an oxide that could only have resulted from exposure to high heat. “You can actually see it,” Vecchio says. “It’s a very deep red, as opposed to what regular rusting of steel looks like, which is going to be more orange in color.”

Much of this story has been told before, but the Wired article is well-written and has some great pictures from the forensic studies of the failed girder.

Some bits are quite new to me:

The ability of something—steel, in this case—to resist fracture after it cracks is called “fracture toughness.” It’s measured with what’s called a Charpy impact test, basically a very precise banging on the metal until it breaks. According to spec, the steel in the Transbay Terminal was supposed to absorb 20 foot-pounds of energy before it fractured at room temperature. It did, but testing by LPI showed lower toughness deeper inside the steel. That’s where the pop-in cracks formed

And this new information appears to suggest an explanation for one of the most tantalizing questions: why did the beams fail in one part of the structure, but not in another very similar part:

That may also explain why the girders over Fremont Street cracked, but the ones over First Street did not. “The difference was the sequence of construction,” Engelhardt says. “On First Street, the welds were made first, and the holes were made after. On Fremont Street, the holes were made first. That turned out to be the decisive difference.”

This morning, the buses were again running in the terminal.

Let's hope things continue to work well now.

Thursday, August 1, 2019

Stuff I'm reading, mid-summer edition

Here you go, stuff you might or might not find interesting, too.

  • DMV Strike Team Final Report
    the DMV is facing historic and unprecedented surges in demand. This increased demand has been primarily driven by the following:
    • Stringent federal identification requirements to obtain a REAL ID, which require an in-person visit to a DMV field office.
    • Motor Voter opt-out requirements, which have greatly increased the workload of DMV staff.
    The Strike Team focused its efforts on improving the processes surrounding REAL ID, with the expectation that increased efficiencies in REAL ID transactions would then translate to other areas of the DMV.

    It is clear that changes are essential if the DMV is to meet its most immediate challenge: successfully meeting increased demand for REAL ID driver licenses before the October 1, 2020 federal deadline

  • The Best Refactoring You've Never Heard Of
    We did a four step process to go from the recursive to the iterative version. First, we made it CPS so these functions appeared. And then we defunctionalized those functions. So now we have these two mutually recursive functions passing around this continuation object. We inlined one to the other. Now it's tail recursive; it becomes a loop. But, of course, the inlining is just kind of moving things around, so we can do the tail-recursion elimination. The big insight that made this all possible, the real workhorse of this transformation, was to defunctionalize the continuation!
  • Cryptographic Attacks: A Guide for the Perplexed
    Over the years, the landscape of cryptographic attacks has become a kudzu plant of flashy logos, formula-dense whitepapers and a general gloomy feeling that everything is broken. But in truth, many of the attacks revolve around the same few unifying principles, and many of the interminable pages of formulas have a bottom line that doesn’t require a PhD to understand.
  • Operating a Large, Distributed System in a Reliable Way: Practices I Learned
    This post is the collection of the practices I've found useful to reliably operate a large system at Uber, while working here. My experience is not unique - people working on similar sized systems go through a similar journey. I've talked with engineers at Google, Facebook, and Netflix, who shared similar experiences and solutions. Many of the ideas and processes listed here should apply to systems of similar scale, regardless of running on own data centers (like Uber mostly does) or on the cloud (where Uber sometimes scales to). However, the practices might be an overkill for smaller or less mission-critical systems.
  • Distributed Locks are Dead; Long Live Distributed Locks!
    For the impatient reader, here are the takeaways of this blog post:
    • FencedLock is a linearizable distributed implementation of the java.util.concurrent.locks.Lock interface with well-defined execution and failure semantics. It can be used for both coarse-grained and fine-grained locking.
    • FencedLock replicates its state over a group of Hazelcast members via the Raft consensus algorithm. It is not vulnerable to split-brain problems.
    • FencedLock tracks liveness of lock holders via a session mechanism that works in a unified manner for both Hazelcast servers and clients.
    • FencedLock allows 3rd-party systems to participate in the locking protocol and achieve mutual exclusion for the side-effects performed on them. This is the “fenced” part of the story.
    • FencedLock is battle-tested with an extensive Jepsen test suite. We have been testing its non-reentrant and reentrant behavior, as well as the monotonicity of the fencing tokens. To the best of our knowledge, FencedLock is the first open source distributed lock implementation that is tested with such a comprehensive approach.
  • Making Containers More Isolated: An Overview of Sandboxed Container Technologies
    The main difference between a virtual machine (VM) and a container is that the VM is a hardware-level virtualization and a container is a OS-level virtualization. VM hypervisor emulates a hardware environment for each VM, where the container runtime emulates an operating system for each container. VMs share the host’s physical hardware and containers share both the hardware and the host’s OS kernel. Because containers share more resources from the host, their usages of storage, memory, and CPU cycles are all much more efficient than a VM. However, the downside of more sharing is the weaker trust boundary between the containers and the host.
  • Testing the CP Subsystem with Jepsen
    Running a Jepsen test on a distributed database is like sneaking up on Superman with kryptonite while he is trying to overcome his biggest challenge. Jepsen subjects the database to various system failures while running a test case and checks whether the database is able to maintain its consistency promises. It can create chaos in many ways: make a single node or multiple nodes crash or hiccup, partition the network, or even make clocks go crazy.
  • BPF Performance Tools
    This is the official site for the book BPF Performance Tools: Linux System and Application Observability, published by Addison Wesley (2019). This book can help you get the most out of your systems and applications, helping you improve performance, reduce costs, and solve software issues. Here I'll describe the book, link to related content, and list errata.
  • Why the dockless scooter industry is going after a repossessor and a bike shop owner
    On July 1st, the City of San Diego implemented new regulations to address the scooter complaints. The regulations will require scooter companies to obtain insurance policies, free the city from all legal liability, cap speeds on the boardwalk, and obtain permits for every scooter in circulation. It’s still too early to tell whether the new regulations will make a difference.

    “We are aware that people are still riding on sidewalks, we are aware that people are colliding into people and then taking off,” San Diego Police Department Lt. Shawn Takeuchi says.

  • The Near Impossible 20-Year Journey to Translate 'Fire Emblem: Thracia 776'
    Take one common problem with fan localizations: the sheer efficiency of Japanese. You can say a lot more with fewer characters in Japanese than English. Naturally, the game’s dialogue boxes were specifically programmed with Japanese in mind, not English. When a localizer drops the dialogue translated into English, there A) might not be space for the dialogue to fit, and B) if you go over the programmed character limit, the game could crash.
  • One giant ... lie? Why so many people still think the moon landings were faked
    t took 400,000 Nasa employees and contractors to put Neil Armstrong and Buzz Aldrin on the moon in 1969 – but only one man to spread the idea that it was all a hoax. His name was Bill Kaysing.
  • The 100 Best Movies of the Decade
    Cinema is in a constant state of flux, but it’s never mutated faster or more restlessly than it has over the last 10 years. And while the decade will no doubt be remembered for the paradigm shifts precipitated by streaming and monolithic superhero movies, hindsight makes it clear that the definition of film itself is exponentially wider now than it was a decade ago. Places. Products. Mirrors. Windows. Reflections of who we are. Visions of who we want to be. A way of capturing reality. A way of changing it. If the most vital work of the 2010s has made one thing clear, it’s that movies have never been more things to more people than they are today. And our week-long celebration list of the Best Films of the 2010s has us more excited than ever about what they might be to you tomorrow.
  • Billie Eilish and the Triumph of the Weird
    Eilish has conquered the music world in part by doing everything she’s not supposed to. Her music is darker and weirder than that of most teen pop stars, with a gothy, punkish, vaguely sinister edge and nary a hint of bubblegum. For her core teen-girl fan base, she’s like the cool senior in art class who dresses and acts the way they wish they could: stylish, outrageous, maybe a little dangerous. (As her hit single “Bad Guy” puts it, “I’m the bad type, make-your-mama-sad type. . . might-seduce-your-dad type.” You get the sense that she’d love to be a “Parents Beware” segment on the 11:00 news.) Her vibe is both semi-nihilist and joyously defiant, a perfect soundtrack for a generation facing a half-dozen existential threats before first period. But she’s also playful, mischievous, vulnerable, alienated, melancholy — in other words, a teen.
  • The Ham of Fate
    What he honed in his Brussels years is the practice of political journalism (and then of politics itself) as Monty Python sketch. He invented a version of the EU as a gigantic Ministry of Silly Walks, in which crazed bureaucrats with huge budgets develop ever more pointlessly complicated gaits. (In the original sketch, the British bureaucrats are trying to keep up with “Le Marché Commun,” the Common Market.) Johnson’s Brussels is a warren of bureaucratic redoubts in which lurk a Ministry of Dangerous Balloons, a Ministry of Tiny Condoms, and a Ministry of Flavorless Crisps. In this theater of the absurd, it never matters whether the stories are true; what matters is that they are ludicrous enough to fly under the radar of credibility and hit the sweet spot where preexisting prejudices are confirmed.

Monday, July 29, 2019

Thinking, Fast and Slow: a very short review

Suppose you were to (somehow? I don't know how to do this) compile a list of all the books written by all the Nobel Prize winners.

And then, exclude the ones written by the winners of the Nobel Prize for Literature, because of course they write a lot of books!

And then, exclude the ones written by the winners of the Nobel Peace Prize, because they write a lot of books, too.

I think at that point you're left with a pretty short list of books.

Of those, you'll find the occasional book written by a Nobel Prize winner in the hard sciences, such as James Watson's The Double Helix, or Murray Gell-Mann's The Quark and the Jaguar, but mostly what you'll find are books written by winners of the Nobel Economics Prize.

Because those economists write a lot of books, too.

And I confess that I haven't read most of those books.

But, occasionally, the Nobel Prize in Economics is awarded to somebody who isn't, strictly speaking, an economist, and Daniel Kahneman is one such. Kahneman, who had a long career as a Professor of Psychology at Princeton, takes the opportunity, with Thinking, Fast and Slow, to describe his conclusions about something that might sound trivial, but is actually quite sophisticated: how do we think?

Not, that is, how we think at some sort of physical level, with neurons and transmitters and the like, but how do we make decisions, how do we come to conclusions, how do we form judgments?

Kahneman's fundamental insight is that there are two different mechanisms at play: fast thinking, which is spontaneous and intuitive; and slow thinking, which is deliberate and effortful. In a rather awkward turn of phrase, he calls these System 1 and System 2:

I adopt terms originally proposed by the psychologists Keith Stanovich and Richard West, and will refer to two systems in the mind, System 1 and System 2.
  • System 1 operates automatically and quickly, with little or no effort and no sense of voluntary control.
  • System 2 allocates attention to the effortful mental activities that demand it, including complex computations. The operations of System 2 are often associated with the subjective experience of agency, choice, and concentration.
The labels of System 1 and System 2 are widely used in psychology, but I go further than most in this book, which you can read as a psychodrama with two characters.

When we think of ourselves, we identify with System 2, the conscious, reasoning self that has beliefs, makes choices, and decides what to think about and what to do. Although System 2 believes itself to be where the action is, the automatic System 1 is the hero of the book. I describe System 1 as effortlessly originating impressions and feelings that are the main sources of the explicit beliefs and deliberate choices of System 2. The automatic operations of System 1 generate surprisingly complex patterns of ideas, but only the slower System 2 can construct thoughts in an orderly series of steps. I also describe circumstances in which System 2 takes over, overruling the freewheeling impulses and associations of System 1. You will be invited to think of the two systems as agents with their individual abilities, limitations, and functions.

And the rest of the book, indeed, in quite readable prose and with very evocative and illuminating examples, explains these notions in considerable detail.

I think you can summarize Kahneman's book pretty reasonably as: usually, you let yourself be driven by hunches and knee-jerk reactions; yet usually, your hunches and intuitions are pretty reliable, especially in areas where you have lots of experience; sometimes, though your best guess is really bad, and you need to be aware that this can happen so that you can guard against it.

I know: that sounds pretty dry. But overall, this isn't a dry book. It's a surprisingly interesting and compelling book!

Saturday, July 27, 2019

Comfort Me with Apples: a very short review

Ruth Reichl's marvelous Comfort Me with Apples: More Adventures at the Table somewhat defies categorization.

It's primarily a memoir, part of a longer series that includes her earlier Tender at the Bone and her later Garlic and Sapphires and Save Me the Plums (none of which I've read).

It's also sort-of a cookbook. At least, there are actual recipes in it (none of which I've tried, although I'm itching to try both her approach to asparagus as well as a peculiar little tidbit she calls "Swiss Pumpkin" which sounds absolutely marvelous but must be made in January).

And it's definitely full of wonderful tales about celebrities of the (1980's) food world: private meals in Alice Waters's house, tagging along with Wolfgang Puck behind the scenes as he prepares to open Chinois on Main, etc.

And does she ever have stories to tell! Exciting stories from her trips around the world, hilarious tales and scandalous gossip from the heady world of California grand cuisine, warm and emotional insights into her family and her personal life, all of it written in a comfortable and appealing style that makes every page fun to read.

What struck me most about Comfort Me with Apples, however, was how vividly it arose from a very specific time and place: California in the late 1970's and early 1980's was very distinctive and awash with change. The Vietnam War was over, the oil crisis had passed, Ronald Reagan was elected president, and people were moving to California by the millions, drawn by the state's natural beauty and booming economy, attracted by visions of surfers and skateboarders and popular TV shows like CHiPs, Hart to Hart, Baywatch, and the like.

Meanwhile Berkeley was (and still is) a very unusual place, full of fervor and protest and change, and Reichl's descriptions of her life there capture the time wonderfully:

Doug wanted to make art, I wanted to write, and we moved to Berkeley so we could live cheaply and not become part of what we called the success machine. We steered clear of the stuff of ordinary existence, the clothes and cars and furniture that other people spent their money on. We chose a communal household on Channing Way because the rent was forty-five dollars a month and we could support ourselves with part-time jobs. I cooked in a restaurant; Doug did carpentry. We bought our clothes in thrift stores, borrowed our books from the library, and thought of a night at the movies as a major treat.

I'm not sure if I'll ever find the time to read Reichl's other books, but I certainly enjoyed every page of Comfort Me with Apples.

Friday, July 26, 2019

Go East, very Far East

I suspect that most people, overwhelmed by the noise and churn of the mass media, don't realize quite what a big deal an announcement like this actually is: Driving Customer Success With Alibaba

today Salesforce announced a strategic partnership with Alibaba, an innovation leader that helps its customers transform the way they market, sell, and operate through businesses like Alibaba Cloud and Tmall. Alibaba will become the exclusive provider of Salesforce to customers in mainland China, Hong Kong, Macau, and Taiwan, and Salesforce will become the exclusive enterprise CRM product suite sold by Alibaba.

Together, Salesforce and Alibaba will bring Salesforce’s #1 CRM platform — including Sales Cloud, Service Cloud, Commerce Cloud, and Salesforce Platform — to customers in mainland China, Hong Kong, Macau, and Taiwan. Alibaba’s advanced, secure infrastructure and knowledge of these markets will empower our global customers with a solution that meets local business needs.

Most Americans, and even many people elsewhere in the world, are completely unaware of how rapidly the world's center of (financial) gravity is shifting, and how, increasingly, there's only one country that matters, in global commerce.

And it isn't the United States of America.

Thursday, July 25, 2019

The Last Equation of Isaac Severy: a very short review

Came my way: The Last Equation of Isaac Severy: A Novel in Clues

It's a mystery novel about the unexpected death of a Cal Tech mathematics professor, the patriarch of a Pasadena family of troubled geniuses, and the various enigmatic characters trying to get hold of the secret-of-a-lifetime for which he died.

Which all has something to do with Chaos Theory.

The novel fails miserably at the whole "it's a mathematical secret which would change the world" business.

But if you can overlook that (a bit of a challenge, since it's the core of the plot), Jacobs is an entertaining writer and she crafts a number of entertaining characters, and there's plenty of good old family drama, with lots of those Uncomfortable Family Secrets Revealed that writers love to use to add spice to their mystery novels.

Definitely a fine book for making the commute fly by.