« | » Main « | »

Lost finale cake

Sunday 23 May 2010

To enhance our viewing of the Lost finale tonight, Susan and the boys made this cake:

Lost smoke monster cake

It's the scene where Jacob creates the smoke monster by tossing his brother into the cave of the golden light. The smoke monster is a stack of marshmallows, the cave is made of Twinkies. Jacob is a Lego minifig, thrown back by the emerging smoke monster.

Thanks, Lost, it was a great ride!

Coverage.py on Jython

Saturday 22 May 2010

Someone asked me recently whether coverage.py works on Jython. I had never tried it before, so I took a look.

Coverage.py works in two steps: first, execute the code and record line numbers executed. Then analyze the code to identify parts that could have been executed but weren't. It turns out Jython provides the tool needed for the first (sys.settrace), but not the tools needed for the second (code.co_consts, and other internal representations of compiled code).

I was able to measure a Jython execution by running "coverage run" under Jython 2.5.1 to do the first step. Then I ran "coverage html" under CPython to complete the second step and get a report.

But I don't know if the line numbers will match up perfectly if the two steps are run under different interpreters. I'm looking for someone with a real Jython code base who'd like to try this technique and tell me what they find. Take the tip of the bitbucket repository, install it into your Jython and CPython installations, and run the two commands under the two different interpreters.

Drop me a line if you try this out, I'd love to be able to support Jython with coverage.py.

HP's destructive cost-cutting

Wednesday 19 May 2010

An email arrived in my inbox at work yesterday:

To: HP Employees

As a reminder, the HP Audio Conferencing service policy requires a minimum of 4 participants.

[...] Audio Conferencing calls that do not meet this minimum requirement after 15 minutes will be interrupted by a recording, giving callers a 2 minute warning before disconnecting the call. If your meeting has 3 participants or less, please [use your office phone to dial three-way].

Thank you for your cooperation utilizing HP IT resources cost effectively.

Like many companies these days, HP uses a teleconferencing service so that people in disparate locations can have meetings on the phone. It's convenient and ubiquitous. I'm in Massachusetts, and regularly deal with people in San Diego, Vancouver, Utah, Brazil, and India. Being distributed like this is difficult, it requires real effort to stay coordinated. Having a central conferencing service that everyone can use is essential to making it work.

But now, in a cost-saving move, HP has decided to push us to use two different conferencing tools, depending on whether there are three people or four on the call. They estimate they can save $5 million per year by making this change.

There are so many things wrong with this:

  • The great thing about the conference system is that the participants can just dial in to join, and everyone knows the phone number. If I have to coordinate a meeting of three, now I need to collect participant's numbers, and dial them.
  • We often have a group meeting with one or two participants dialing in. Picture a conference room with eight people, all of them waiting while one person fiddles with the phone to dial in the other two.
  • People often drop from calls because of trouble on their end. Now the leader has to be distracted with redialing instead of the person who dropped off.
  • When I arrange a call, I may invite three, but what if only two join? Now we have to switch gears, collect phone numbers, and re-dial.
  • Most importantly, the great thing about the conference system is that it's a toll-free number. Working with India often involves off-hours calls, which means I'm making them from home. It's possible that none of the participants is in an HP office. I'm not sure what HP's answer is to this situation. Am I supposed to dial internationally and then get reimbursed for the call? How much effort are we supposed to expend in order to not "waste" a conference call on only three people?

Adding to the irony, this memo arrived within hours of an email from CEO Mark Hurd announcing our quarterly results, including net earnings of $2.2 billion for the quarter, up 28% from last year. That makes the supposed $5 million saved only .05% of the company's profits, pretty small change.

In fact, I suspect if I came up with a business plan for an idea that would earn the company $5 million per year, I would be told that's too small, not worth the effort of a large company like HP. And yet the telecomm group can impose an inconvenient policy change on the entire company to save only that amount, and is applauded for it.

This is a classic example of making a trade-off while only examining one of the potential costs. We can see where the phone money is being saved. But the change has a corresponding cost on the entire rest of the company. It's just not a cost you can easily estimate or measure.

It's easy to see that this will be a bad move for the company as a whole. It will add frustration for everyone to an already difficult job. Some number of calls, probably more than .05% of them, simply won't get made.

I probably sound like I'm making too big a deal out of this. After all, what's so difficult about dialing phone numbers? It bothers me because it's one more insult in a long stream of changes made to cut costs. Cutting costs is Mark Hurd's super-power, and he does it with zeal. From closing offices (and dictating that half the workers work from home) to penny-pinching IT infrastructure to 5% pay cuts to requiring that employees take vacation days during specified company shutdowns, HP employees are expected to cheerfully accept all manner of dictates designed to save money.

These policies do nothing to improve the mood among HP employees, and they do nothing to make HP products better. Every one of them is a trade off of the visible against the invisible, and the invisible that suffers is everything you want in a company: productivity, morale, loyalty, and innovation. It's hard enough to build great products, I don't need my employer, a giant profitable tech company, nickel-and-diming me to make it even harder.

I think there are three possible outcomes of this phone policy:

  • People will use their cell phones to dial into the conference extra times to get the participant count up to 4.
  • They'll get disconnected and dial in again every 15 minutes, wasting time and interrupting the flow of conversations.
  • They'll invite more people to the meeting to stay above the limit. The new policy encourages less-productive meetings!

In the end, people will do what they have to do to get their jobs done, and the phone group won't see a savings. But there will be yet more ill-will among the employees as they live under tighter and tighter strictures.

I don't understand HP's obsession with costs. Tech companies, especially profitable ones, need to use their money to foster innovation that will allow them to compete. The focus should be, how can we make it easier to build great products, not how can we shave .05% of our profits from the phone budget. HP should be putting out press releases explaining how they spent "only $5 million per year" to improve collaboration among their workers.

HP today seems intent on running the company like people and products don't matter. It's destructive, and it's a shame.

The beginning of love

Tuesday 18 May 2010

From Tim Shriver's letter marking the passing of his mother, a quote from Thomas Merton:

The beginning of love is to let those we love be perfectly themselves, and not to twist them to fit our own image, lest we love only the reflection of ourselves we find in them.

BTW: At first I was simply going to tweet this, but it's 177 characters. I didn't want to have to txt-ify it, or simply link to it shortened-style. There's something wrong with an environment that squelches expressions this pithy for not being pithy enough!

New books and old

Monday 17 May 2010

This is a fascinating time. We're in the midst of a transformation of book technology, from analog to digital. While everyone moans and wails about the downfall of the newspaper, and the book companies do battle with the e-reader manufacturers, I'm interested just to see what happens to the technology of reading.

Aegir Hallmundur writes intelligently On Turning The Page, discussing the absurd lengths digital books will go to slavishly mimic one aspect of printed books (page turning), while simultaneously ignoring other more important aspects (hyphenation). I'm a proponent of hyphenation, and am astounded that so many e-readers completely ignore it. Hyphenation isn't hard to do, and greatly improves the reading experience, so why don't e-readers implement it?

Meanwhile the fancy page-turning animations get center stage. Perhaps it's because people notice page turning. Hyphenation, like many aspects of good typography, fades into the background unnoticed, improving the mechanics of reading without drawing attention to itself.

It's often true that new technology starts out by mimicking the old. It takes a while to figure out the ideal use of new possibilities, and to realize that characteristics that you thought defined a medium (like page turning) are nothing more than outdated uses of old constraints.

The iPad is just the latest e-reader to get scrutinized. For some reason, even Apple, with its Olympus-level design culture, has skipped some of the basic details of making a good reading experience.

Making books is a centuries-old tradition, and much has been learned about how to do it well. Just because we're on the cusp of a revolution in that endeavor doesn't mean that all of the old learning should be forgotten.

Just to cleanse your palate, here's a video of a modern craftsman making books the old-fashioned way:

Big Ideas podcast

Sunday 16 May 2010

I recently discovered a new podcast that I think is a keeper: Big Ideas. It's a series of university lectures, each on a different topic, with no connection to each other. I've listened to three so far, on detecting planets outside our solar system, T. S. Eliot's landmark poem The Wasteland, and a Darwinian consideration of sexual reproduction.

All were fascinating, and all made me think. Having something engaging to listen to is essential for my commuting sanity, and these lectures will be a good source for new material. It can sometimes be a little daunting jumping into some of these, because they aren't created especially for the podcast, they are simply recordings of one lecture in a semester-long university course. So when the biology prof says, "As I said last week, alleles are the blah blah...," I had to just nod and pretend I remembered that stuff from high school.

It seems to me that there must be lots of other university content out there, but a quick search didn't land on any goldmines. Any suggestions?

BTW: I linked to the Apple iTunes page for the podcast above, because the Big Ideas official site is so dreadful. In this day and age, how can people still be making pages like this?

Fossilized hack-arounds

Friday 7 May 2010

A few weeks ago, we had a baffling problem with our web application: some JSON responses were being gzipped incorrectly. I asked about it on Server Fault: Incorrect gzipping of http requests, can’t find who’s doing it.

The final resolution was that Akamai was gzipping the request, and adding a "Content-Encoding: gzip" header. But we'd already put in a "Content-Encoding: identity" header, the browser saw both, only attended to the first (identity), and couldn't interpret the gzipped gibberish it saw in the content.

It turns out we aren't supposed to use "Content-Encoding: identity" on responses, and removing that from our JSON code solved the problem.

But there was a mystery remaining: Akamai also adds an "X-N: S" header to the response. What the heck is that?

A friend has friends at Akamai, and sent them the question. Back came the answer:

A long time ago, when there was a browser called "Netscape", :-) there was a bug that prevented embedded images from rendering if the HTTP headers were exactly some length. (If the terminating \r\n begins on character 256, 257, or 258.) So if the header size is in this range the Akamai server adds that header...

Wow, talk about bug workarounds encased in amber. That's a really old bug and code is still trying to sidestep it. Looking on Google, it looks like other web intermediaries are also adding headers to fix it: Apache used to send X-Pad, and WebSTAR sent X-BrowserAlignment.

I doubt the affected browser is even out there in the wild any more, but Akamai is still adding this header to requests, plugging away a decade later. It's astounding to think of the labyrinth of special checks and bug adaptations in software like this, the extra cycles expended in the name of obsolete components that are no longer even listening on the other end.

The problem of course is that once you've added code like this, how can you be sure it's safe to remove? Who's even checking over the code to consider that it might be safe? Accommodations like this get in the code and generally never come out, though Apache removed theirs.

One last micro-mystery: what do the N and S mean in "X-N: S"? I'm betting on "Netscape Sucks"!

The case of the secured server

Saturday 1 May 2010

When Tabblo was being acquired by HP, we had a bunch of different HP people talking to us about all different aspects of the acquisition. The security guys were a special treat.

We were in a small rented office in Cambridge, and were going to move to a large existing HP facility in Marlborough. But we still had a month or so of being in the Cambridge office, and the security guys wanted to make sure everything was locked down. Our founder Antonio spent a couple of hours on the phone with an HP guy from Australia who wanted all sorts of details about the physical security of the office: when entering from the street, how many different doors are there? How many are secured by locks? What kind of locks? When you get off the elevator, are there ceiling tiles above you? Could you lift the tiles and climb into the offices, etc, etc, etc. We joked that this guy was going to pop out of an air duct as a surprise visit some day.

Ultimately, though, the thing that concerned the security guys the most was our Subversion server. We were a tight-fisted startup, conserving money. That means our office space was the cheapest dump we could find, and our furniture was from Ikea. Our Subversion server was some junky Dell desktop machine stuck in the phone closet.

The security guys were very worried about the safety of this server, more than anything else we had. They asked us how we were going to move the server to the new office.

Us: "We'll put it on the van."

Them: "You can't do that."

Us: "We'll take it in one of our cars?"

Them: "Nope."

They insisted that we use a bonded mover (whatever that is) to move the server. Everything else in the office would be loaded up by regular movers onto vans and driven the 30 minutes or so to the new offices. But the server had to be moved by a bonded mover. You know, for security.

For some reason, we couldn't get a bonded mover for the day of the big move. So the regular movers came and took everything else, and left the server for later.

The next day was our first in the Marlborough office, and much of the morning was taken up with orientation, tours, unpacking and so on. I got there late, and when I did, everyone was all abuzz: the Subversion server wasn't reachable, did I know anything about it? I didn't, and calls were placed to the Cambridge landlord. Security tapes were inspected, theories abounded.

Turns out, the building janitor had taken the server.

Of course he did: put yourself in his place. He comes to the office to clean, sees that the tenants have moved out and taken absolutely everything with them, except for an old crappy computer in the phone closet. They must not have wanted it.

As it happens, we knew the janitor closet in the old building had a child's pink bike in it, so we figured it was where the janitor stashed "found" stuff. Sure enough, our server was in there with the bike. Antonio went back and got the server, put it in his car, and drove it to Marlborough.

The security guys had fits about us unilaterally executing plan B, but what could they do about it?

« | » Main « | »