Solving the spaghetti problem

I have to say that I needed to read this to learn what the problem was to begin with.If you already know, skip half way down for the solution.

A public service from the very fine Kottke.org