Info

Ben is Vice President of Mobile Engineering at Walmart.com, where he works closely with his long-time friend Dion Almaer.

Some time ago I found myself on a United Airlines flight and flipped through their on-flight magazine, Hemispheres:

hemispheres

I found this particular ad immensely amusing:

myvu1

There are so many things to love about this ad, but the lower left-hand corner is the best part:

myvu2

Yes, they do.

I think we all have experience with this little gem: the handy JavaScript-based field focus advancer which when poorly coded merrily forces you on to the subsequent field, even when you actually do want to go back and make changes. Observe in this video, embedded below for those whose feed readers don’t omit it:

But even better. After filling out the entire “Register Now” Comcast form to sign up for an account, I’m given this little bit of news:

comcast

No warning before-hand that if I didn’t have this code I was wasting my time. Nice.

golden gate bridge, alcatraz & farallon islands at night

Recently, I moved my family from Utah to the Bay Area for my new job at Mozilla. It’s a homecoming for me; I grew up in the East Bay. To keep my commute times down, we decided to rent a place on the west side of the San Francisco Bay, called simply “the Peninsula”.

As with most major metro areas, the best way to find a rental these days is on Craigslist. In my searching for housing, I thought it would be interesting to analyze the listings on Craigslist to get a feel for the differing rental prices of each of the various Peninsula cities. Because I’ve got quite a few kids, I didn’t bother looking at listings with less than three bedrooms.

As I did my analysis, I worked out the average price of rentals with at least 3 bedrooms in all of the major areas of the Peninsula that Craigslist covers; here’s the data as of November 2008 in graph form:

rental3

One problem with this approach is that it combines rental units with different numbers of bedrooms; here’s a graph with the price of the rental divided by the number of bedrooms:

rental4

For a little context, it might also be helpful to share the total number of rentals by area:

rental5

Declining Rental Prices?

Out of curiosity, I decided to re-run the analysis on the rental market as of last week. No surprise, there was a general mild decline across the entire peninsula. In terms of rent, the combined average went from $3,562 to $3,500 (~1.75%); by room, that’s $1,046 down to $1,019 (~2.5%).

You can see that the characteristics of each area is quite different:

rental6

Note that I had to leave out a few areas where there simply wasn’t enough data to compare; I probably should have thrown out Atherton, Portola Valley, and Woodside as the number of listings was few and their prices varied greatly, as you can see from the graphs.

Obviously, to draw any real conclusions from this data, I’d need to do more work to extract duplicate listings (folks often re-list the same property before a listing expires to keep it at the top), include 1 and 2 bedroom properties, and look at the data for a longer period of time.

Still, it is relatively safe to say that there is a very small price decline, but it is probably just as likely to be explained by the slower winter market than the macro-economic conditions.

I’m going to keep capturing data periodically and analyzing it, and if I see any interesting trends, will post again.

I noticed an interesting bug today while working on a browser-based user interface rendered with the HTML 5 <canvas> element. A little rectangle was appearing fuzzy:

nib4

Let me zoom in a bit:

nib3

Whereas it should have appeared crisp, as in this:

nib2

My first thought was that it would be due to fractional coordinates. I have years of experience with drawing APIs that force integer coordinates, so I’m used to having the fractional part of a coordinate whacked off and making up the difference when necessary in a second pass. Canvas, on the other hand, supports fractional coordinates, which I’m told is the fancy thing to do these days. (How the fraction is converted to an actual pixel is depenendent on whatever drawing system is doing the heavy lifting somewhere down the stack.) When your coordinates are fractional, you can get this kind of fuzziness.

Because the interface I’m working with involves a few layers of rendering code, ensuring that integers ruled the roost took some time. (I did this by wrapping the various canvas functions with versions that dumped their parameters before calling back to the real functions.) But after quite a bit of poking around, I found no evidence of fractional coordinates. It was around this time I saw Vlad (Mozilla’s graphics guru) walking around the office and asked for some help.

We started looking for evidence of transforms that would introduce fractional coordinates–but ultimately came up empty handed. As we went through this process, he pointed out that the <canvas> context instances are reused, so it’s a really good idea to save() and restore() when obtaining a canvas to avoid polluting the context:

var ctx = canvas.getContext("2d");
ctx.save();
// painting here
ctx.restore();

I had assumed each call to getContext() produced a fresh, stateless context, so this was welcome news indeed.

But, we didn’t find a source for the fractional coordinates. And then we noticed when right-clicking and selecting “View Image” from the context menu, the resulting image that was physically smaller than the browser window.

And that’s when we noticed that I had zoomed in a click using Firefox 3′s fancy full page zoom feature, which was causing the image the be scaled up, and the blurriness.

May you avoid a similar fate.

Rise and Fall of the Third Reich

For as long as I can remember, my family has spent time each year in Cedaredge, a small little town in western Colorado. During our most recent visit, I was caught unprepared in a rain shower and, seeking cover wherever it could be found, I stumbled upon a library book sale. The combination of ridiculous prices, an eclectic selection, and nothing else to do with the rain about me conspired to fill many bags with good old books. Among them was an old edition of William Shirer’s classic Rise and Fall of the Third Reich.

At over 1200 pages, it’s not a quick read–but it’s not a difficult one, either. The author is a journalist rather than a historian, and to the great credit of the book, he was a first-hand witness of many of the events chronicled in the book. The result is a rather interesting account of a pivotal period of the past century.

But then, there is a natural drama and grandeur to these events that transcends the pages. We see Hitler’s rise from a penniless wretch on the streets of Vienna to the most powerful man in Europe; we witness the shame of Nevill Chamberlain’s “leadership” contrasted with the breathtaking courage and splendor of Winston Churchill; we marvel as Fate herself seems to conspire to keep Hitler alive against all odds as he survives many would-be assassins only to topple from power due to countless bungled decisions for which only he can take blame.

As I plowed through the book as fast as I could manage, I was fascinated by how much of the history was readily applicable to our own time and place. Let me share some of the points that most resonated with me.

Religion and Wars

Some make the argument that religion is the primordial source of conflict in the world and were we but unshackled from our silly delusions of God’s existence, peace and harmony would break out across the land. (In an era of terrorists blowing up thousands of innocents under the banner of religion, it’s easy to be sympathetic to that position.)

The horrors of the war waged by the Nazis should give pause to that assertion. While not as hostile towards religion as the Communists, the Nazi Party’s leadership openly disdained organized religion and crushed any religious leaders unwilling to support the Party. To replace religion as the moral core of society, the Nazis established a new set of values anchored in the faux-science of their philosophers–and managed to get a significant portion of the populace to embrace them.

The sheer evil of the Nazis is breath-taking. The holocaust, of course. Their half-executed plan to simply starve the Russians and Ukranians–to ship their food to Germany and let them all die. Their reign of terror over all of their occupied territories.

And then, there was Stalin who had guns mounted behind his own front lines to shoot any of his men who retreated; who interned his own country’s POWs when they were liberated because he expected them to fight to the death; who killed thousands of his own people as they fled Moscow when it seemed clear that the Nazis would occupy the city (he wanted them to stay as a show of support).

Religious extremists have no monopoly on evil.

Media Propaganda

The Nazi’s exploited a basic human flaw with great success: we are heavily influenced by repetition. In a particularly memorable passage, the author describes how he personally witnessed countless people from educated backgrounds adopting the silly and baseless ideas of the Nazi party only because they were repeated so constantly through every medium. Even otherwise respectable, credentialed scientists and academics fell victim to the echo chamber.

Are there shared beliefs in our zeitgeist based on shabby science oft-repeated that we no longer question, that even our men-and-women-of-letters champion or fail to challenge? How much original research is in place before the media machine takes over, repeating it a thousand times until many or all believe?

We must question everything and have an anchor in something more than the fashion of the moment.

Deception in Foreign Relations

It is tempting to believe President Ahmadinejad of Iran when he asserts publicly that his government is seeking for nuclear technology only to provide power for his people. Especially when he is courteous and photogenic.

The Nazis bluntly lied shamelessly to any member of the press or foreign statesmen they could find. The sheer audacity of their deception is impressive. They lied about invading every country they eventually crushed. If rhetoric was not enough, they created fake events upon which to base their rhetoric. Yet their actions betrayed their true intentions; it was only the world’s willingness to accept seemingly innocent explanations for their war preparations and their troop movements and their alliances, etc. that led to disaster.

Effective foreign policy must simply ignore rhetoric and focus relentlessly on action.

Records of History

Rise and Fall would have been impossible to write had it not been for the voluminous records kept by the Nazis–the same records that contributed so well to their executions and imprisonments at the trials at Nuremberg. Some of the most interesting revelations were made possible by the odd memo here or the random piece of correspondence there. These threads would have been impossible for history’s actors to have seen as they were woven in time; historians had to discern the pattern. All thanks to meticulously filed and archived documents, preserved for us.

There is something about the Truth that is larger than any of us, or all of us. We owe it to our successors to clearly present their legacy. As tempting as it may be to manipulate facts and control the narrative–to emulate the totalitarian regimes in their absolute control of the facts–we cannot indulge in this desire.

We need to work out how to effectively archive digital information and how to balance the need for Truth with the right to avoid self-incrimination. I hope we get that figured out before many of us succumb to the temptation to shred a part of our society’s story.

Justice

The man at the head of the machine which caused the deaths of countless millions and further hardships upon most of the entire world never had to face justice. Hitler died on his own terms, so completely that his remains were never recovered. He left behind his belief that the Third Reich fell because the German people did not deserve him.

Some others in positions of authority were executed after the war following the various Nuremberg trials, but so many of these oversaw or directly committed mass murders. To kill one who has killed another is itself hardly justice–for the second killing cannot begin to undo the first–but it has a certain symmetry that feels to some like justice. But you cannot kill such criminals more than once. How do you extract justice from such monsters? Of course, you cannot.

And yet, shortly after sentencing many such to jail terms and executions, the sentences were commuted and the criminals were set free. Men who killed defenseless prisoners of war. Men who burned little children. Terrible people.

Still, the Nazi regime had a gangster element to it–via the SS and its derivatives–that successfully prevented dissent. Had these men refused to fulfill their dreadful orders, they would have reason to fear brutal torture of themselves and their families. Of course, the right thing to do is take a moral stand regardless of the outcome, but then, thanks to the propaganda built on “science” mentioned above, on what moral ground do you stand? Moral relativists at this point must eat their cake as we realize that, without immutable moral anchors, there can for some be no stand to take.

There is no justice in this world, though we try our best.

Ben and Brendan

Dion and I have been wanting to do a podcast series for a long time that is a more casual “Charlie Rose-ish” format–just chatting with some of the luminaries in tech about their careers and such. We collected some content quite a ways back and have finally gotten around to releasing some of it over on TechLuminaries.com.

In our first episode, we interview Brendan Eich, Mozilla’s CTO. We recorded this long before we ever considered coming to Mozilla, which casts a weird perspective on the interview. Hope you enjoy it.

Since May of this year, I’ve been trying to snap screenshots and videos of those special moments when my software (or hardware) interactions have been… less than stellar.

Would you believe Microsoft bits have accounted for more than a few of these? Sure, but you have to go way back in time to find them. All the way back to Excel 2008 for the Mac, in fact.

I opened a spreadsheet and was treated to this modal dialog:

Excel File Error

Genius.

My friend Dion Almaer and I started Ajaxian.com a few years back out of an intense enthusiasm to track the nascent Ajax movement, a community-driven discovery of new techniques to wring better user interfaces out of old browser technologies. Our earliest role at Ajaxian was to help spread the word that whole new worlds of experiences were possible with the current browsers; as time passed, this role has largely evolved into tracking the latest news in the Ajax community.

In parallel with these efforts, Dion and I have had separate careers, in each of which we’ve had the opportunity to use the techniques we’ve covered at Ajaxian (and in some cases do entirely different kinds of development work). As we compared notes along the way (with ourselves and others in the industry), both of us noticed ample opportunities to make Web development more productive than it is today. Eventually, the size of this opportunity became so distracting that we started exploring how we might pursue efforts to address it full-time.

To make a long story short, we’re announcing today that Mozilla has hired both of us to lead an initiative to create Web development tools–to make life better for Web developers. Over the coming weeks, we’ll be building up a team and sharing more details with the community.

I have immense respect for the crew at Moz; I couldn’t be more thrilled that they’ve invited us to join them and for the opportunity at hand.

Read more at:
- Ajaxian.com
- Mozilla Labs

Follow

Get every new post delivered to your Inbox.