Tuesday, July 26, 2011

Gorgeous minimalist webdesign

In Jeet Kune Do, one does not accumulate, but eliminate.

It is not daily increase, but daily decrease.

The height of cultivation always tends to simplicity.

—Bruce Lee

Thursday, May 19, 2011

Net Neutrality

Many of us who care about freedom on the internet care about particularly contentious policy issue: Network Neutrality. This issue seems to be coming to a head very quickly. I've finally collected some of my thoughts.

Net Neutrality entails legal protection of equality on the internet. It covers a range of policy proposals, few of which of become law so far. They aim to ensure that the internet remains a network of peers, free from any central control over which kinds of traffic it carries or limitation on which nodes are accessible. On the other side of the issue, several internet service providers (notably Comcast and AT&T) have claimed that their networks are suffering under the exploding demand for bandwidth. They must be allowed, they say, to prioritize some types of traffic--such as web browsing--over others, particularly P2P.

This issue arose around the year 2000, as the most common form of internet access switched from dial-up to newer models like DSL and cable. Under the old model, ISPs simply maintained local endpoints on the existing phone network. The barrier to entry was fairly low, and there were thousands of ISPs in the United States. Under the new model, ISPs build and lease new last-mile connections, often bundling internet access with other services such as cable television. The barrier to entry is vastly higher, and as a result large ISPs have local monopolies in many places. (In most of the US,
broadband internet access is at most a duopoly, between the local DSL provider and the local cable internet provider.)

I think that this trend is disturbing. ISPs have already started traffic-shaping, generally without informing customers. In at least one case, Comcast silently inserted RST packets to sabotage BitTorrent connections--preventing their customers from seeding (sharing files) to non-Comcast subscribers. They denied doing this even after a customer discovered the problem and posted about it in online forums, until the EFF ran a series of experiments and published an expose. In this and other ways, the internet's status as an open, egalitarian space largely immune to corporate and political boundaries is being threatened.

I think the cleanest solution would be to establish "common carrier" status for ISPs. Common carrier is a legal doctrine that gives shared infrastructure companies certain protections and responsibilities. They have immunity from libel, slander, copyright, and other laws with regard to the content they carry on their network. (The end-users, of course, remain liable.) In return, the common carrier is prohibited from discriminating against one type of content over another.

Establishing ISPs as common carriers would bring back one important aspect of the status quo during the dialup years. Phone companies were the original "common carriers"--so common carrier law, combined with the large number of ISPs to chose from, ensured that essentially every packet on the internet was treated equally. This is no longer the case. Making ISPs themselves the "common carriers" would fix this. ISPs, I would argue, are currently having their cake and eating it, too. They are already given a variety of implicit and explicit protections against liability for the content they carry. However, they are not being made to treat content equally.

As one user put it in a discussion on BitTorrent throttling,
“P2P applications can cripple a network, they’re like leaches. Just because you pay $49.99 for a 1.5-3.0mbps connection doesn’t mean your entitled to use whatever protocols you wish on your ISP’s network without them provisioning it to make the network experience good for all users involved.”

This attitude seems to be reflected in the ISPs' actions. I would hopefully be able to demonstrate to legislators that "internet access" has a clear meaning. ISPs do not sell "web service" or a "browsing experience". They sell internet access: the ability to send and receive IP packets. I would argue that customers are entitled to use whatever protocols they wish on top of IP, just as phone subscribers are entitled to speak in any language they wish with the person on the other end.

"Common carrier" has significant advantages over writing a new set of laws specifically for ISPs. It simplifies the legal situation and would make Net Neutrality much harder to impinge upon, once passed. It leaves less room for a compromised bill being passed under the guise of "net neutrality", without actually providing strong protection. Common carrier law has a large body of judicial precedent and therefore (hopefully) fewer loopholes.

Net neutrality can be divided into at least two separate goals: equality of content providers and equality of protocols. The first means that ISPs should not be allowed, for example, to make deals with individual companies to treat certain web services preferentially. The situation is complex, since companies like Netflix already rely on a limited form of preferential treatment called colocation--they pay companies like Comcast to set up servers in Comcast data centers all over America, instead of in a few centralized locations, so that the vast majority of their traffic never hits backbone links--it goes from a local "point of presence" directly to users' homes. Such practices are necessary and acceptable. However, restricting or artificially slowing access to individual websites should not be permitted.

Equality of protocols means that all protocols above Layer 2 (IP) shouldn't be controlled by ISPs. This does not strictly mean that traffic may not be prioritized. Latency sensitive apps such as Skype, for example, can use the Type of Service field in the IP header to request special treatment. The user's service contract will determine whether this field is honored. But using deep packet inspection to discriminate against types of traffic should not be allowed.

I'm optimistic that someday, the equality we enjoy on the internet today will mature. Instead of being a matter of convention and serendipity, freedom on the internet will be protected by law.

Monday, May 2, 2011

Software patents

Just wrote this for an online forum in an interesting class I'm taking: CS181, Computers and Ethics in Society. Thought I'd post it here, too. I've written about software patents before. If I had carte blanche to change just one thing about our laws, this would be it.

I think that software should not be patentable for three reasons.

First, software algorithms are inherently abstract and mathematical. One of the core ideas in computer science is the Church-Turing conjecture--that every computable algorithm can be implented on a Turing machine, or, equivalently, written as an expression in the lambda calculus. In that concrete sense, there can be no meaningful distinction between an algorithm and a mathematical expression. Since patent law only deals with "physical inventions", it currently relies on the distinction that software is encoded in a physical medium--for example, as bits on a hard drive. I think that this distinction is silly, since the object being patented is clearly the bits, not the hard drive. Don Knuth himself expressed that sentiment in his letter to the patent office.

Second, the status quo in patent practice provides large software companies with an unfair advantage. In particular, it helps large vendors of closed-source software. Since the Patent Act of 1832, inventors have been required to submit sufficient explanation of their device that another engineer could reproduce it. In the case of mechanical inventions, for example, they must submit detailed blueprints with the application, which become a matter of public record. This gives companies a fundamental tradeoff. They can keep their invention to themselves--as trade secrets. This gives them sole benefit of their R&D, but no legal protection if another inventor independently discovers it. Alternatively, they can file a patent. This makes their invention public, but gives them legal rights. I think that this tradeoff is important to the patent system's goal of promoting innovation: it gives inventors means and incentive to make their discoveries public.

This tradeoff is missing in software. I think that the most natural way to generalize the Patent Act requirements to software would be to require applicants to submit their source code. Instead, large vendors currently have their cake and eat it, too. They build portfolios of patents, often on algorithms defined in surprisingly vague terms. They keep all the associated code--if it even exists--closed, hindering others who would like to create "new or useful improvements thereon".

Third, software should not be patentable because software innovators do not need patents. On the contrary, they are hindered by patents. Patent law was designed for physical devices, under very different economic realities. Its purpose was to foster innovation. Physical inventions, in general, have a vastly longer development cycle than software. They must progress from an idea, to a protoype (at which point they become patentable), to a production run. Scaling to production is often time-consuming and expensive. If a small company is brining the device to market, it may take many years to bootstrap, reinvesting revenue in production capacity, before it achieves mass-market success. Physical devices have significant costs and delays beyond the initial R&D; the primary purpose of patents, as I understand them, is to protect inventors during this period. Larger, better-funded competitors shouldn't be allowed to steal their designs and outcompete them on production.

Software is a different world. The unit costs of software are essentially zero. I believe that being first to market with an idea is more than enough competive advantage to encourage innovation.

Not only do software patents fail to encourage innovation, they actively hinder it. This is primarily because of the risk and costs of patent litigation. How much does a patent case typically cost? This page summarizes the result of several inquiries into this question. While there is no consensus, the lowest estimates are roughly $1million. In the world of mechanical devices, such costs may be incidental. A car company, for example, might spend many orders of magnitude more than $1million setting up a production line. In the world of software, such costs can be overwhelming. Many software companies begin with signicantly less than $1m in funding. Google, for example, famously started with a $100,000 in angel funding from Andy Bechtolsheim. A poorly-timed lawsuit could have probably have destroyed what has since become a beacon of American innovation, even if the plaintiff's case was weak.

I think that the fact that software patents have the same twenty-year protection period as other utility patents is an indication of how out-of-touch the system has become with the realities of the industry. Twenty years ago, in 1991, "minicomputers" were large towers with significantly less power than a modern cell phone. The internet was a research project run by the US government and a handful of universities. Students were typing essays on electronic typewriters or writing them out by hand.

Imagine, for a moment, that Id Software had filed a patent on the world's first first-person shooter, DOOM. "A novel method of electronic entertainment, simulating combat from an individual perspective in a three-dimensional environment." This was a truly novel innovation with a working implementation--and therefore far more patentable, in my opinion, than many software patents which have been granted. GoldenEye, Duke Nukem, Half-Life, Grand Theft Auto, Bioshock, Halo, Call of Duty, Portal and countless other titles would not exist. Eighteen years of fast-paced innovation and relentless competition could have been prevented by a software patent.We could look forward to the second company ever to release a first-person shooter to do so in 2013.

I'll conclude with a quote from Id's founder, John Carmack.

The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.

I think that this summarizes my views nicely. Software innovation would be best served if software algorithms were explicitly excluded from the scope of utility patents, just as mathematical formulae already are.

Sunday, May 1, 2011


Solidworks is seriously cool stuff. It's a general-purpose CAD program--pretty much anything you can machine, you can design in Solidworks. We use it a lot the solar car team.

I'd been wanting to learn how it works for a while. So tonight, I finally decided to sit down and build something. I pulled out a pair of calipers and some longboard parts. Progress was pretty slow at first. With me, the ME force is not strong. Also, there are some random things in Solidworks where "Undo" doesn't work. Eventually, I got a wheel:

The carbon-fiber deck doesn't exist yet, so I had to improvise. I made a sketch with a bunch of lines and angles on it. It said "OVERCONSTRAINED" in big red letters. Our electrical ninja, Greg Hall, told me this was nothing to fear and showed me how to fix it by pretending that my carbon fiber was sheetmetal. Worked beautifully.

Two beers and five hours later, with a little more help from solar car teammates Forest and Greg, I had my assembly. Birds were now chirping outside, which usually means you have to stop OCDing and finish. Four wheels, two trucks, two rubber risers, and a deck.

Then I clicked "render". Solidworks' black magic voodoo code figured out how to set up the lightsources and everything else, did a little raytracing, and came up with this. Nice.

Stay tuned for the real thing, once I get around to building that!

Friday, April 29, 2011

Welcome back, ROTC

“The state that separates its scholars from its warriors will have its thinking done by cowards, and its fighting done by fools”


Thursday, April 28, 2011

Deutschland, in pictures

Just rediscovered the website of Friedrich Lohmüller, raytrace artist extraordinaire. He made a couple of the pictures on the excellent POV-RAY Hall of Fame. (Back in high school, by the way, that gallery inspired me to write a simple raytracer. It was pretty much my first real programming project.)

At first glance, his prints seem to have the simplified geometry, flat planes of color, and "plastic" look characteristic of low-budget CG.

For other artists, those qualities are usually tacky (eg most of the 3D stuff on DeviantArt). Even their "good" renderings often come across as a tech demo, not as art (eg the countless renderings of beams of light hitting a glass ball).

But Lohmüller's prints transcend the kitsch. He uses those same rendering limitations to great effect, conveying order and perfection--utopia, even.

I think he captures the German engineer ethos very nicely... or, at least, my interpretation of it. The detail in the machines, the geometry, the emphasis on solitude, the perfect infinite expanse, it's all there.

That one reminds me of a picture I took of the salt flats in Utah.

One of my favorites, apparently made a very long time ago:

It's a shame art like this isn't more widely known or respected.

Having linked to some of his pictures, I will also link to Mr. Lohmüller's gallery, where he sells a bunch of gorgeous poster prints.

Monday, April 11, 2011

EE108B in one (not-so-)short article

I took a pretty cool hardware class last quarter--EE108B. It's about processor design.

In any case, I just found a surprisingly comprehensive summary of the stuff we learned. A short, readable intro to pipelining, caches, instruction sets, gnarly design tradeoffs, and all that:


Sunday, March 20, 2011

The Sincerest Form of Fail

I'm typing this from my dad's new Win7 phone. On the surface, the interface is what you'd expect: the closest thing to an iPhone you could build without getting sued, plus some Microsoft branding ("Windows 7", "Internet Explorer"; there's an app for mail and another for Hotmail).

The keyboard works similarly to an iPhone's, suggesting words and replacing obvious typos. The home view features a bunch of tiled app icons. The browser handles tabs in exactly the same way. There's even a button right below the screen that always takes you to the home view.

The similarities, sadly, don't include attention to detail. There are a number of usability bugs.
  • There's no cut and paste
  • There are two home screens. Both have buttons that launch apps. The second is a simple list; the first has a subset of the apps with larger icons. But both of them scroll, complete with a mini-scrollbar that fades in and out of view. Also, the first home screen's icons are inexplicably not the same size. Some are rectangles, some are squares. Some are two-tone, others are an... eclectic mix of colors.
  • Positioning the cursor in a textbox is difficult and imprecise. It doesn't work nearly as well as the iOS magnifying glass.
  • When you slide your thumb inside a multiline textbox, it doesn't scroll. Instead, it simply moves the cursor around. You have to hit the scrollbar on the side (which looks like it's straight out of Windows 95, square and gray with a 1px bevel). Then, when you pull the scrollbar down, the page scrolls up, as though you had grabbed part of the page and pulled it downward. This means that the scrollbar right under your thumb is also moving upward. Strikingly unintuitive.
...and those are just the ones that stood out to me. But the single most annoying issue, in my opinion, is the home button. Unlike the iPhone's slightly recessed physical button, the HTC HD7 simply has a printed Windows logo. The touch sensitivity apparently extends below the screen. This makes the button maddeningly easy to hit accidentally, while typing. It's right underneath the bottommost row of keys. In fact, I started typing this post on the HD7, ended up on the home screen at least five times despite being careful, gave up and am now finishing it on a laptop. This issue is especially bad since it can't be fixed with a software update. This is a hardware problem. A quick search on Google Images shows that many Win7 phones--not just the HD7--seem to have this problem.
Now, I wouldn't want you to leave this blog thinking you'd read yet another Apple fanboy rant regarding Microsoft interface design, or lack thereof. In fact, the reason Win7 Phone makes me sad is because I'm the opposite of a fanboy. I love the Nokia N900, with its large battery, gorgeous Carl Zeiss camera and full keyboard, running completely unencumbered Linux. The thought that most of Nokia's phones will soon be Windows 7 Phones means less competition for Apple, frankly, and that is always bad.

Friday, February 11, 2011

Joining Addepar

I'm very excited to join Addepar over the summer. Addepar is an early-stage startup. They're building software for fund managers--private equity types, family offices and perhaps even university or nonprofit endowments. They're solving a bunch of unmet needs for the kinds of customers most companies can only dream they had.

The coolest thing about Addepar, though, is the engineering culture. I've been hanging out with the engineers there and they're all extraordinarily legit. The founder and CEO, Joe Lonsdale, previously cofounded Palantir. So far, he's assembled a team of ~10 engineers and a graphic designer. More news soon.

Tuesday, February 1, 2011

Why startups are cooler

Many of my friends share my gut feeling about startups. That's where the fun is, where the upside is, where you can make the biggest impact. Michael Arrington captured the mentality really well in his article, Are You a Pirate?

Well, now there are some solid statistics to back up the intuition: when a company triples its headcount, on average, it halves employee productivity. This isn't obvious at first--if you graduate Stanford and work for Google instead of that startup you'll have a much smaller role in a much bigger enterprise. Well, multiply the two together and you get something less than one. At least in dollar terms--not my favorite way to measure impact, but certainly the most easily quantifiable--people at smaller companies make more of a difference. I think that this is a lot more pronounced in tech than in other places. Reminds me of "The Mythical Man-Month"--tech has this magic to it where the relationship between man-hours and the amount of win achieved is really weak. Microsoft can sink a billion dollars into Kin. One dude in a basement can make Minecraft.

As if I needed another reason! I've decided. I don't care if I have to live in shipping container like Hiro Progatonist from Snow Crash, with nothing but a box of ramen and fast internet. If I'm broke when I'm 30, it'll be because my startup failed in an epic way. I'm going to find my pirate ship.