Journey to the Center of an Espresso Machine

Can I write an interesting blog post about an espresso maker? Here’s a try.

Paul ErdΕ‘s (and other people) said that “a mathematician is a device for turning coffee into theorems.” Along the same lines, some of us believe that a programmer is a machine to turn coffee into bugs. I guess I’m an unusual programmer: for years I was able to create tons of embarrassing bugs without the help of caffeine. In fact, I only started drinking coffee regularly after I turned 40. My preferred coffee drinks are espresso-based: cappuccinos, mochas and lattes. San Francisco has spoiled me in that respect, because the quality and variety of coffee and coffee shops here is outstanding. Over the past couple of years having a cappuccino has become the second thing I do after I wake up. The first one is checking email. The third one is getting dressed, unless I have to go outside to get coffee. In that case I have to swap 2 and 3 because it’s cold outside.

A couple of years ago I found a good deal on Craigslist: a Gaggia MDF burr grinder and a Gaggia Deluxe espresso maker for a couple hundred bucks. A few weeks after that I moved into a furnished house that had a beautiful La Pavoni in the kitchen. I kept the grinder for home, and took the Gaggia Deluxe to the office. I used it there for a while, until IndexTank moved to Valencia street in the Mission neighborhood. It turned out that our new office space was a few doors down from Four Barrel Coffee in San Francisco. Of course I couldn’t even begin to compete with their sophisticated machinery and barista wizardry, so I became a regular at the place and abandoned the Gaggia. Months went by, and I don’t know if anyone else used it in the meantime. For all I know the poor Gaggia must have felt abandoned like Andy’s toys in Toy Story 3. Except for Woody. He took Woody to college with him, right?

Gaggia

Fast forward to a month ago, when I moved out of the furnished house to a new place. Naturally I rescued the Gaggia from the office to have it provide my morning cappuccino. The first time I tried to use it I found out it wasn’t working. I saw that the flow of water from the grouphead (the bottom of an espresso maker where you insert the portafilter) was a pathetic drip. What to do? I tried cleaning everything that was reachable, letting steam out of the machine, no dice. As a software guy I tried turning it on and off several times, of course that didn’t work either πŸ™‚ Unlike most of our modern appliances this machine is purely electromechanical, and it contains no software. It doesn’t even have a power supply, it works with AC power.

I decided to search coffee enthusiast forums for help. The first advice I found was to descale the machine. It seems that if you use hard water to brew your coffee, minerals build up inside. Once in a while you’re supposed to run some chemicals to clean it up, so I bought some descaling powder. I dissolved it in water as instructed, and spent a long time running it through the machine. Alas, it only made things worse. At this point I was almost ready to kick the Gaggia to the curb, and then a sudden realization came to me: “HeyI’m an electrical engineer! I studied this stuff in school! I should take it apart and see what’s going on inside.” So I did.

Gaggia_open

There are two main components that you can see in the picture: the pump (top right) and the boiler. The working principle is very simple: the pump sucks water from a reservoir and injects it into the boiler. The boiler heats the water electrically until it’s close to the boiling point. There is a temperature sensor attached to the boiler that shuts off electricity then. The water has two ways out of the boiler: either as steam through the golden valve at the top (which leads to the frothing wand), or as hot water through the grouphead at the bottom.

First of all I disconnected all the cables you see in the picture. A decade ago I would have taken notes, but now I have this convenient pocket computer that takes pictures worth dozens of words. Next, I took out the boiler.

Gaggia_boiler

I took apart the boiler and gave it a thorough cleaning. There was one nut that I couldn’t undo because I didn’t have a wrench handy, but I didn’t think that would be a big deal. It was the one holding part #58 in the figure below.

Gaggia_parts

I put everything back together, still not working. Could it be the pump? I took it out, it was an Invensys CP3A that isn’t made anymore. I gave it a good old cleaning and put it back in.

Invensys

I tested the Invensys pump on its own (detached from the boiler), and it pumped water into a glass with significant pressure. At this point I was puzzled and almost ready to give up. As a last resort I took the boiler apart once again, only this time I got a wrench to unscrew the nut that held part #58 together with part #46 (a copper pipe). I assume the purpose of that pipe is to collect water from near the top of the boiler, where it will be hotter. I tried to blow through the pipe but I couldn’t, which seemed weird. Bingo. The clog was in this copper pipe in the heart of the boiler. I gave the little pipe a “floss” with a tiny allen wrench and put everything back together.

By now I had probably spent several hours over the course of three nights tinkering with this machine, so there was a lot of tension and anticipation as I fastened the last few screws. I turned on the pump. Seven seconds went by, but they seemed more like nine to me. At that point a torrent of hot water came gushing out of the grouphead. Success. Happiness. COFFEE!!!!!1 Of course I had a celebratory shot, even though it was bedtime. Bad idea of course.

So here are my conclusions after this little journey:

1) In some ways this machine is the complete opposite of the Macbook Air I’m using to write this post: it’s designed to be tinkered with. It’s not built to become obsolete. I can’t remember the last time I found an appliance that was so easy to understand and fix.

2) Both the Macbook Air and the Gaggia Deluxe are beautiful, only in different ways. There are design details inside the Gaggia that make it very clear that these people know what they’re doing. It’s very hard to mess it up. For example, there are several live 110v electrical wires very close to water, but you’d have to try hard to get them wet. There is enough space inside the machine to insert wrenches or screwdrivers as needed. The pieces of rubber and wire retainers used were chosen for functionality, durability and convenience.

3) This machine is not that expensive, and I could have thrown it away on day one. If I do the math, I probably put more billable hours into this machine than its retail price. However, I really wanted to tinker with it for fun. I figured that if I could fix it I’d value it more because of the “IKEA Effect.” No surprise there, I love this machine now. The delicious espresso that comes out of it tastes better to me than anything I can get at a coffee shop.

4) Italians know how to build beautiful machines. Does any reader have a Ferrari Testarossa that I could take apart? I’m pretty confident I’ll be able to put it back together.

Still with me? Follow me on Twitter just ’cause.

I Always Expected Hindsight Bias from the Financial Press

Today the Federal Reserve of the US released transcripts of 2006 meetings. The financial press, always avid for filler and faux outrage, pounced on them. How is it possible that the almighty Fed didn’t see the 2008 recession coming? 

From the NYTimes:

The transcripts of the Fed’s Open Market Committee meetings in 2006, released after a standard five-year delay, suggest that some of the nation’s pre-eminent economic policy makers did not fully understand the basic mechanics of the economy that they were charged with supervising. The problem was not a lack of information; it was a lack of comprehension, born in part of their deep confidence in models that turned out to be broken.

“It’s embarrassing for the Fed,” said Justin Wolfers, an economics professor at the University of Pennsylvania. “You see an awareness that the housing market is starting to crumble, and you see a lack of awareness of the connection between the housing market and financial markets.”

“It’s also embarrassing for economics,” he continued. “My strong guess is that if we had a transcript of any other economist, there would be at least as much fodder.”

The Wall Street Journal, in turn, has these articles:

Little Alarm Shown at Fed At Dawn of Housing Bust and

 Governor Cautioned Fed About Mortgages. From the latter:

History may show that Susan Bies’s concerns didn’t get enough attention at Federal Reserve policy meetings in 2006.

All the above is a fine example of hindsight bias. Why? Because nobody could have foreseen the magnitude of the crash. Look at the S&P 500 chart for the past five years:

If you click on the chart, you will see that the stock market peaked in October of 2007. Between then and the low of February 2009, it fell close to 50%. This means that the collective intelligence of all the financial analysts did not see the crash coming in 2006 and 2007. If you dig into the archives of the above newspapers and others, the opinions were very divided back then. Some people expected a soft landing, others even thought it would be a good thing for houses to go down in value. From the New York Times itself: Don’t Fear the Bubble That Bursts (March 2006).

Moral of the story: do not pay attention to anything you read in the financial press. Nobody knows anything about the future, nobody can predict it. Of course the pundits will tell you that “they saw it all coming.” Hey, it’s their job.

The Seven Habits of Awesome Dolphins

Whenever I see an article that tries to extract patterns from a limited study of successful or failed companies, my BS detector goes off. I just read this abomination on Forbes: The Seven Habits of Spectacularly Unsuccessful Executives.

I remember back in 1997 when I first heard of some friends reading “The 7 Habits of Highly Effective People.” My first reaction was “if I studied the 7 habits of awesome dolphins, could I become one?”

 This article is worse than that because it’s plagued by hindsight bias and dishonest language. Let’s dissect the “habits” one by one:

Habit # 1:  They see themselves and their companies as dominating their environment

I wonder how many successful executives also do this. The question is whether you are right or wrong! If you are Larry Page and you see Google as dominating the online advertising market, you are successful. On the other hand, if you are an AOL executive… The key “ability” here is realizing when there is an up-and-coming threat, and acting accordingly. This is not always possible at the time, but it’s trivial in hindsight.

Habit #2:  They identify so completely with the company that there is no clear boundary between their personal interests and their corporation’s interests

Two words: Steve Jobs. Of course if you had this habit and you failed, you were not Steve Jobs. A more interesting question would be: of all executives with this trait, how many succeeded and how many failed? Of course, that’s not addressed.

Habit #3:  They think they have all the answers

Hmm… what if they happen to be right? How many successful companies have executives who think they have all the answers? Also, this could be rephrased in a more positive way: they are extremely confident. Both mean essentially the same thing, except one is a criticism in hindsight.

Habit #4:  They ruthlessly eliminate anyone who isn’t completely behind them

Of course, successful executives don’t do this. Instead, “they do not hesitate to fire those who won’t align themselves behind the company vision.” or something equally positive.

Habit #5: They are consummate spokespersons, obsessed with the company image

That’s probably true of most high-profile CEOs, whether successful or not.

Habit #6: They underestimate obstacles

Of course, this can only be true in hindsight. If you succeeded, then you took smart and calculated risks. This statement is just unadulterated stupidity.

Habit #7: They stubbornly rely on what worked for them in the past

Again, successful CEOs learn from experience. They know what worked and what didn’t work. They are not stubborn, instead they possess resolve and determination. They “stay the course.”

The article is a collection of cognitive biases. It also falls prey to a basic trick of the human brain: creating a story to explain what may be the result of an intractable set of interactions including timing, market, and luck. Investment analysts want to believe in a world of easy explanations and prescriptions for success (or at least, avoidance of failure). They need to be called out more often when they put out this kind of drivel.

Oh well. So long and thanks for all the fish.

Don’t Do Whatever It Takes

Once in a while I meet an enthusiastic startup founder who says he “will do whatever it takes to make his company successful.” If I were a potential investor I would grill such a founder like this:

Me: Are you willing to do whatever it takes to make the company successful?
Founder: Yes, of course!
Me: How about cutting off your right hand?
Founder: *nervous laughter*
Me: Ok, let’s be reasonable. How many hours would you go without sleep in order to meet a deadline?
Founder: Well, maybe two or three nights… Let’s say 72.
Me: Good, I’ll hold you to that. What if your significant other gave you an ultimatum: it’s either me or the company?
Founder: Hmmm…

The point of this snarky post is that Silicon Valley is a place of hyperbole and bullshit. People build “insanely great” apps and hire “rock stars” every day. There are tons of post-facto stories of brave founders who did “whatever was necessary.” It may work as a marketing strategy, but you don’t have to believe it. Here’s an exercise for a prospective startup founder:

– Write down all the things you *think* you’d be willing to do to make your company successful, and those you *think* you’d never do. How much would you push your health? Would you fall prey to the sunk cost fallacy?

Give it a good hour. Make a list of things, write it down and file it away. It will come in handy some day. You may be surprised about the things you’re willing to do when the going gets tough and you’re operating in a “less rational” mode. To put it in a different perspective: as a startup founder, you are making a very risky and non-diversified investment. Act like an investor: make a rational plan and try to stick to it. Trust me, your future self is a bit of a stranger. Communicate with him/her now that you can πŸ™‚

Amazon Has Drastically Changed the Way I Read

Since I got my first Kindle my reading habits started to change. That was a few years ago, so the change has been very gradual. Here are some differences:

– A few years ago I might finish a book and not have another one in the pipeline. I would start watching a TV series, which would occupy my spare time for a while. The Wire was the last one, I downloaded all seasons and watched them in a couple of months. Now my Kindle is filled with unread books, so when I finish one I naturally start another one. As a result I haven’t watched TV in a couple of years. I don’t think there’s anything wrong with watching TV, it just turns out that I find reading more relaxing.

– The Kindle is not a device; it’s a platform. Besides the device itself, I use Kindle for Android, for the Mac, and even for the iPad sometimes. A great feature of the platform is that it synchronizes to the last page you’ve read on any connected device. Of course I prefer to read on the Kindle, and on a rainy day like today I may spend several hours with it in bed or the couch. If I’m at work and a meeting finishes early, I may stay in the room and continue reading a book on my laptop. When my wife goes to the bathroom at a restaurant, I can either check Twitter or read a couple of pages on the phone. As a result, I go through books much faster than I used to.

– I’m starting to buy books based on their availability on the Kindle store. Last week I was trying to choose my next book. The one I wanted the most only had a hardcover version, so I “postponed” reading it. I can’t wait for all books to have electronic versions. Obviously for some the printed medium matters, but for the vast majority (in my opinion) it doesn’t.

– I’ve begun to see printed books as deadweight, a burden to carry. I do not have a bookcase anymore, and during my last move I gave away all but a few of my printed books. It used to be very rare for me to re-read a book. It’s happening more often now that I see them on the home page of my Kindle!

– I don’t pirate books unless there’s absolutely no alternative. An ebook typically costs $5 to $15. I’m going to spend hours reading it, and I value my time highly. I also value the enjoyment I expect to get out of the book. With Amazon’s one-click delivery to my Kindle, paying for it is a no-brainer. The only reason to pirate a book is when I want to read it NOW and nobody sells an e-version. I’ll spend a couple of minutes searching for an “unofficial” e-copy. If the quality is acceptable, I’ll read it. Publishers please take note: printed books are going the way of CDs. I have bought mp3 albums a few times in the past year; I have no idea when I bought music in a physical container for the last time.

– The Kindle is so cheap that I see it as a “physical app”, just like the iPod Shuffle. I couldn’t care less about the object itself. I don’t have a case for it, and when it breaks I’ll order a new one overnight without thinking twice about it.

This “future” that we live in is a mixed bag, and this is one of the good things about it.

My New Year’s Resolutions

I never do this, but I thought I’d give it a try. Here are my New Year’s Resolutions for 2012. Because it’s my first time I’ll go easy and see how it turns out. I’m shooting for at least five.

  • Tweet once a week or more.
  • Wait at least a week before buying the new Apple gadget.
  • Solve one interesting differential equation (interesting to me, of course).
  • Memorize the NATO phonetic alphabet, and use it when I spell words on the phone.
  • Not let the milk in the fridge go bad.
  • Turn off all electronic devices before takeoff. No airplane mode, no cheating.
  • Resist the constant impulse to buy a Boeing 767.
  • Take a picture of a tourist taking a picture of other tourists. The more meta, the merrier.
  • Wait until the last beep of the microwave before opening it.
  • Stay the course. Keep flossing.
  • Read one random book from the Gutenberg project. If possible, enjoy it.
  • Stay hungry, stay foolish until lunchtime.
  • Learn a new programming language, write “Hello World!” in it, and promptly forget about it.
  • Honk at a stranger for no reason on the 4th of July.
  • Avoid climbing Mount Everest. It’s dangerous, and I already have plenty of conversation topics for cocktail parties.
  • Wash the car once, and celebrate it with a shot of the best wheatgrass money can buy.
  • Live every day to the fullest extent of the law.

VCs Also Succumb to Cognitive Biases

I was just reading Fred Wilson’s post Mocked And Misunderstood

When people ask me, “how do you know which companies and services are going to be the biggest successes?”, I usually tell them to look for the companies and services that are mocked and misunderstood. For some reason, that correlates highly with the biggest breakout successes.

Fred Wilson is obviously a very smart guy, but that doesn’t make him impervious to cognitive biases. The above article shows a few of them. Let’s start.

1) Survivor bias. Gandhi Nicholas Klein said: “First they ignore you, then they laugh at you, then they fight you, then you win.” Wilson is skipping the companies that are ignored. Twitter was mocked because it was already standing out. Nobody mocked Twttr back when it started. That’s when you wanted to invest in it. Mocked and misunderstood implies that a company has a ton of media attention.

2) Hindsight bias. Think about companies that are mocked and misunderstood. Misunderstood is a loaded word. Do Webvan or Pets.com make that list? They were mocked, but were they misunderstood? Misunderstood implies a time sequence. At first you mocked the company, but then you thought “oh, maybe I misunderstood something.” Or it means that those who mock the company are not the same as those who misunderstanding. In any case, you can only realize that something *was* misunderstood at the time, not that it is misunderstood right now.

3) Availability bias. Can you think of successful companies that were not mocked or misunderstood? Of course, but it takes more effort. Why? Because the vast majority of companies are not mocked or misunderstood. On the other hand, unsuccessful companies that were mocked and misunderstood are no more, and you have forgotten them.

You can try this experiment: list all the startups that launched in 2007. Pick a sufficiently large random set (say 100). Find all relevant press articles for that year. How many “mocked and misunderstood” companies went on to be successful compared to companies with an equal amount of coverage that were not mocked or misunderstood?

Fred Wilson, I strongly recommend that you read Daniel Kahneman’s Thinking, Fast and Slow. Every investor should read this.

If you enjoyed this post, follow me on Twttr πŸ™‚

Killer phone app: taking pictures FAST

I just did the following experiment:

I have a clock in front of me. I imagined that the start of a new minute was an unforeseen event that I wanted to capture. I had my Samsung Galaxy S2 in my pocket. At the start of the minute I pulled it out, unlocked it, navigated to the camera icon, opened it and took a picture of the clock. The whole thing took ten seconds.

Ten seconds is a lot of time. Someone’s purse gets snatched, a car hits someone and drives away, etc. in much less. Why couldn’t phones have a mechanism to take a picture in the time it takes to point it to the object? In my case, it’s two seconds. It shouldn’t be that hard, all you need is two or more buttons that are hard to press by accident, but that you could press quickly in an emergency. Perhaps that combined with an accelerometer. It’s definitely possible to have a phone recognize the gesture “pulled it out of my pocket and pointed the camera at something, holding still now.”

Of course it doesn’t need to be an emergency. It could be your baby’s first step, a stranger proposing to another, a spontaneous smile. How many of those images are lost every day?

Apple, Samsung, anyone? Bueller?

Think Like a VC

The intent of this post is to save you time. Pitching to VCs takes a lot of energy, and it’s easier if you prepare correctly. More importantly, you must know whether it makes sense to do it given what you have to offer.

Suppose you’re a VC. Your job is to maximize the return of an investment fund over a period of time. The whole premise of a VC fund is that as an asset class it’s riskier than diversified funds, and it should outperform them in the long run. Let’s not argue whether that actually happens, let’s assume the premise make sense and keep going.

A typical VC fund is in the hundreds of millions. That means that over the course of the investment horizon (say, ten years) it must generate a return in that order of magnitude. A VC fund will invest in tens or even hundreds of companies, usually amounts in the order of millions to tens of millions. Some (probably most) of these companies will produce a negative return, some will generate modest returns and a few will be “home runs.” These home runs are the head of the distribution, and they make or break the fund. 

Why is it important to know this? Because VCs need home runs, they care deeply about whether an investment has the potential to be one.

This has several implications. The first one should be obvious but I found out that it isn’t to many entrepreneurs.

– When you first meet a VC, he/she will be trying to assess whether you are looking for a home run, or would be content with an early exit. If you are a first-time entrepreneur for whom a few million dollars would be life-changing, VCs would want you to be slightly irrational and overly ambitious. They would want you to be in it to change the world. When they ask you questions such as “how does your company get to make tens of millions a year” they want to know that you are seriously considering building something big. They don’t care so much about the response. They are interested in your reaction, your body language, and the fact that you’ve spent brain cycles on this.

Other implications:

– An already successul entrepreneur is more aligned with a VC’s goals. If you have millions of dollars in the bank, making a few more won’t change your life just like it won’t make a huge difference to the investment fund. If Evan Williams goes to raise money, you can be sure he’s trying to build a world-changing company that would generate billions of dollars in value.

– The flipside of this: if you are a first-time entrepreneur and you’d be happy with an “early exit” that would give you enough money to not worry about bills, you must seriously consider whether you want VCs involved in your company. A VC will accept an early exit if the company looks very unlikely to become a home run. If you are close to running out of cash and not making revenue, they will take the “base hit” and move on. But if your company looks like it has a chance to become huge, a VC will be very reluctant to sell. A 10% chance of 100M in two years is better than a 100% chance of 5M now to a VC. This lack of alignment between entrepreneurs and VCs is not uncommon, and it shouldn’t be a surprise.

– Single founders are also slightly less attractive to VCs because they have more equity than each of two or more co-founders. I would expect a team of three first-time cofounders to be happy with an exit that’s 3x what a single founder would take.

Here’s an interesting exercise: spend an hour pretending to be a VC. You have 1B dollars and you need to turn it into 3B over 10 years. Would you consider your own company? What companies would you invest in? What do they have in common? Would you want your company to be more like one of those? If so, can you do it?

Isn’t this a fun game.

Search Engines Cannot Be Objective

Over the years I’ve heard people repeat the idea that Google is an “objective search engine” because they allow their algorithms to reflect “the voice of the web.” This sounds great in theory, but in practice it implies two things:

  • There is such a thing as “the voice of the web.”
  • Google can be a perfect mirror of such voice.

Here’s a video in which a few Google insiders talk about how Google Search works. At one point the moderator (Danny Sullivan) asks if Google ever manually tweaks results. He brings up one time when the top result for the query “Jew” was an antisemitic site. Amit Singhal (head of Google’s ranking algorithm) responds: (jump to minute 41)

 

 

Singhal refers to a principle that Google holds dear: they would not manually (emphasis mine) promote, demote or remove results even if their judgment is saying that their algorithms are doing the wrong thing. However, he proceeds to explain how in that case the algorithm was clearly wrong, so they fixed it.

 

Think about this for a second. What does it mean for the algorithm to be wrong? In this case, Google was in the spotlight because of a controversial query. It so happens that they agreed with those who complained about the result. Are those people the voice of the web? He then moves on to other cases in which the judgement is not so “black and white.” In those cases, they just let the algorithm do its thing and not privilege one point of view over the other.

 

Here’s the catch: what’s described above could be done manually. Putting the algorithms in charge is a cop-out. What this accomplishes is removing responsibility from any single human being. As we all know though, human beings are behind the algorithms, and they (we) are able to steer them. We can justify our algorithm’s settings by announcing to the world that they were automatically optimized to maximize the satisfaction of human judges. Well then, who are those human judges and how were they chosen? How do you choose a set of human judges who perfectly represent the “voice of the web”? Moreover, could you (even inadvertently) prime those humans to choose the parameters you agree with?

 

Even if you could have a perfectly fair process to maximize the satisfaction of a representative set of individuals of all ethnicities, languages, geographies and beliefs, it all goes out the window when you decide that your algorithm is “wrong” because it doesn’t agree with your core values. It raises the question: is the algorithm wrong for a huge number of queries that nobody at Google feels strongly enough about?

 

Google knows that their search results reflect their opinion, and they publicly admit it. It’s interesting to see someone like Amit Singhal being disingenuous about it many months after that admission. He’s trying to play up the fact that nobody does anything manually as a dearly held principle. The implication is that if you have an algorithm to “decide what’s right”, then it’s all good. Even if you have to “fix it” once in a while when its “obviously wrong.” I believe that Singhal has no intention to mislead the public, and that this is just a blind spot in the engineering mind.

 

Those of us who work in search must be honest with ourselves about issues like this one. Whether we like it or not search results influence public opinion enormously, perhaps more than any other source of information in the world. This is the great responsibility that comes with great power.