<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>while coding &#187; problem solving</title>
	<atom:link href="http://www.youell.com/matt/writing/?cat=6&#038;feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.youell.com/matt/writing</link>
	<description>simplify</description>
	<lastBuildDate>Wed, 31 Oct 2018 04:08:22 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The Hump</title>
		<link>http://www.youell.com/matt/writing/?p=1327</link>
		<comments>http://www.youell.com/matt/writing/?p=1327#comments</comments>
		<pubDate>Tue, 28 Apr 2015 20:38:38 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[problem solving]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.youell.com/matt/writing/?p=1327</guid>
		<description><![CDATA[About 3 years ago I went out and bought a skateboard. The official reason was to model an active lifestyle for my kids. The real reason? I woke up one day and I realized I hadn&#8217;t ridden a skateboard in over 20 years. That killed me a little inside.
One lingering regret is that I never [...]]]></description>
			<content:encoded><![CDATA[<p>About 3 years ago I went out and bought a skateboard. The official reason was to model an active lifestyle for my kids. The real reason? I woke up one day and I realized I hadn&#8217;t ridden a skateboard in over 20 years. That killed me a little inside.</p>
<p>One lingering regret is that I never learned to ollie. After I got comfortable skating again I set my mind to learning how to ollie. Last summer I made a small bit of progress, and this summer I&#8217;m hoping to finally nail the damned thing. </p>
<p>This weekend I shot some footage of myself practicing. Then I wanted to use that footage to make a little movie. For me, on my Mac, that means iMovie.</p>
<p>I&#8217;ve had some modest successes with iMovie in the past, but I&#8217;ve never really understood it. The interface is confusing. I&#8217;m sure they are trying to make things easy, but it&#8217;s like there are so many things to make easy that they make it crazy instead.</p>
<p>I had two and a half minutes of footage of me flubbing around with the skateboard. What I wanted was to grab two portions of the video (where I was actually practicing) and join those together with a modest transition. Then I&#8217;d add a title screen and upload it to YouTube to embarass myself.</p>
<p>Simple, right?</p>
<p>First I had to figure out how to get my video out of Photos and into iMovie. I imagined that I could just export the file and then import it, but that seems like The Hard Way. Apple ships the computer with both programs. There must be a Better Way. Off to Google I went, which is ok because I&#8217;m basically a Professional Google User (uncertified). Much to my consternation, the recommended way to get your movie from Photos to iMovie is&#8230; to export it to a folder and then import it. Stone knives and bear skins!</p>
<p><img src="http://www.youell.com/matt/writing/wp-content/uploads/2015/04/iMovieInAction.jpg" alt="iMovieInAction" title="iMovieInAction" width="480" height="321" class="aligncenter size-full wp-image-1335" /></p>
<p>I did the export/import and created a new project in iMovie. That part went fine. I had a project, I imported my footage, and then I started to make a title. That took a while to figure out (despite the fact that I&#8217;ve done it before) but soon my title was in place. Ah, but I needed to split up my footage into two parts. How do I do that? More googling. It was easy but not obvious. I finally figured out how to split it up, but then realized that I have the opportunity to have a cold open on my video where I walk up to the skateboard. So this will be great. Cold open to establish I&#8217;m doing something with a skateboard, then title, then my two clips. Ah, but what would be <em>really</em> cool is to have the background audio going over the title sequence so there is continuity in my little story. Googling again, I find out how to do this in iMovie 11. (Later I find out I&#8217;m on iMovie 10.) I can&#8217;t find the option I found with Google, but poking around in the right place helps me figure out that I can detach the audio. Perfect! This is great. I mess around a little more and then I have a cold open, a title, and then I&#8217;m on the skateboard. Something is not quite right though. Ah, the title card just pops in. There is a tiny effect but no smooth transitions. I see the option for transitions and pick the simplest and put it in place. Now everything is set up! I sit back and watch. Something is still wrong&#8230;. Ah! The audio is out of sync. Probably by the amount that it is offset during the title sequence. Or maybe I just dragged the wrong slider and screwed something up. I really don&#8217;t know. It&#8217;s all voodoo at this point. I have no idea what is going on and no idea how to fix it.</p>
<p>I gave up. I wasn&#8217;t pissed, just disheartened. I could see nothing but frustration in my future, so I stopped.</p>
<p>And this is The Hump.</p>
<p>The Hump is this point on your learning curve, usually after some early success, where you decide that the effort just isn&#8217;t worth the reward. This is the point where opportunities are lost, where you talk yourself out of victory, and where dreams die.</p>
<p>Seriously.</p>
<p>Look how close I got to success before I gave up! This is common. And then there was my bad attitude. I felt like I was being held back. I blamed the software. I blamed Apple. It wasn&#8217;t until I realized this was just The Hump that my attitude started to change. I stopped thinking about how messed up the situation was. I started to think about how I was going to get my video done. I went from being indignant to resolute. I went from being pissed at tools to being pissed that I was letting little things get in my way.</p>
<p>I tossed out the crappy work I&#8217;d done earlier and stepped back. I started to reframe the problem. I realized that since I now knew how to split footage, I could at least start by breaking things up into clips. With that done it was easy to delete the cruft. I was left with a series of scenes that were keepers. That formed the backbone of my movie. Instead of trying to build the movie from the front to the back, I created a scaffold along the critical path of what I was trying to do.</p>
<p>I eventually got my movie done. It took about an hour more than I thought it would, but <a href="https://youtu.be/Czs8bB54mlA">I shipped</a>. (WARNING: Super-boring single-shot video of 42 year-old legs mostly not ollying. My wife panned it, it&#8217;s that boring.) The movie isn&#8217;t the exciting part. Beating The Hump is the exciting part.</p>
<p>I worry that The Hump is this quiet killer of potential engineering careers. It&#8217;s great to see the energy behind programs to encourage people to learn to code, but it&#8217;s not enough. You can show people how to code all day long and all you&#8217;ll ever create is a bunch of people who can follow instructions. That isn&#8217;t what programming is. Software is a particularly cruel medium. You don&#8217;t just get over The Hump when you learn how to code. The act of building software is a non-stop series of Humps. Even worse, software eats problems. That means today&#8217;s hard problems are always a little harder than yesterday&#8217;s. Meaning the Humps never stop coming.</p>
<p>May you turn your Humps into moguls.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youell.com/matt/writing/?feed=rss2&amp;p=1327</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>My Not-So-Hyper Loop</title>
		<link>http://www.youell.com/matt/writing/?p=1050</link>
		<comments>http://www.youell.com/matt/writing/?p=1050#comments</comments>
		<pubDate>Fri, 03 May 2013 18:22:04 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[physics]]></category>
		<category><![CDATA[problem solving]]></category>
		<category><![CDATA[weird]]></category>

		<guid isPermaLink="false">http://www.youell.com/matt/writing/?p=1050</guid>
		<description><![CDATA[(Some TL;DR love: What I&#8217;m going to talk about is a variation on a Gravity Train. )
Ah, the Hyperloop. Holy crap, it even has its own Wikipedia page.
If you have no idea what I&#8217;m talking about, that&#8217;s okay. No one else does either. Which is why I&#8217;m writing this post. Something as vague and amorphous [...]]]></description>
			<content:encoded><![CDATA[<p><sub>(Some TL;DR love: What I&#8217;m going to talk about is a variation on a <a href="http://en.wikipedia.org/wiki/Gravity_train">Gravity Train</a>. )</sub></p>
<p>Ah, the Hyperloop. Holy crap, it even has its own <a href="http://en.wikipedia.org/wiki/Hyperloop">Wikipedia page</a>.</p>
<p>If you have no idea what I&#8217;m talking about, that&#8217;s okay. No one else does either. Which is why I&#8217;m writing this post. Something as vague and amorphous as the Hyperloop brings out all of the kooks and the cranks, including Yours Truly. This whole episode reminds me very much of the &#8220;<a href="http://en.wikipedia.org/wiki/Segway_PT">Ginger</a>&#8221; hysteria from 2001.</p>
<p>I have no better idea than you what the damned thing is. All I know is that listening to Elon describe it, it started to sound like a crackpot idea I had many years ago. Ordinarily I keep my mouth shut about such things (high school taught me that), but every now and then it&#8217;s fun to share a goofy idea and this seems like a great time to do it. Ready? Cool!</p>
<p>Uh… so… this is where you flat-Earthers are going to get really pissed. Sorry. Here&#8217;s a diagram of the Earth:</p>
<div>
<img src="http://www.youell.com/matt/writing/wp-content/uploads/2013/05/tunnel_600x495.jpg" alt="I couldn&#039;t draw Snappy either." title="I couldn&#039;t draw Tippy the Turtle either." width="600" height="495" class="size-full wp-image-1066" />
</div>
<p>Yeah, I know. Art school really paid off.</p>
<p>The Earth has this curve to it, you know? And if you make a straight tunnel long enough, eventually you&#8217;re going to come out the other side. If you shoot straight through the planet you&#8217;ll hit molten lava or something. Not awesome. But if you limit the distance you&#8217;re trying to go, your tunnel can stay safely inside the earth&#8217;s crust, as shown.</p>
<p>Elon talked specifically about a connection between Los Angeles and San Francisco, so let&#8217;s draw that:</p>
<p><img src="http://www.youell.com/matt/writing/wp-content/uploads/2013/05/la2sf_1000x335.jpg" alt="I have way more respect for Randall Munroe now." title="I have way more respect for Randall Munroe now." width="1000" height="335" class="aligncenter size-full wp-image-1073" /></p>
<p>Aside from the startling reality of the drawing, you&#8217;ll notice some arrows labeled &#8216;g&#8217;. Those indicate the direction that gravity is pulling from different points along the tunnel.</p>
<p>(For some reason the tunnel I drew extends from the Hollywood hills to somewhere around the Mission District.)</p>
<p>What&#8217;s awesome about this tunnel is that it is downhill from both sides. If you are wondering how a tunnel can be downhill both ways, imagine walking through the tunnel in the picture. At first, it&#8217;s downhill. As you walk further, the tunnel has a different angle relative to the Earth&#8217;s center of gravity. Over more and more distance the angle changes enough that by the middle of the tunnel things are flat, neither downhill or uphill. Gravity is pulling straight down. Then as you continue forward it&#8217;s uphill to the other end of the tunnel. While the tunnel seems like a straight line to you, from the perspective of gravity it is shaped more like a <a href="http://en.wikipedia.org/wiki/Half-pipe">half-pipe</a>. In other words, the tunnel is downhill at both ends and is uphill in both directions from the middle. As Einstein once said, &#8220;Gravity be crazy, yo!&#8221;[1]</p>
<p>Anyway, I had the basic idea for a tunnel that you could hurl things through. There were some things I wanted to know. Namely:</p>
<ul>
<li>Would the tunnel stay inside the Earth&#8217;s crust?</li>
<li>How fast could you go, with no additional energy, ignoring friction?</li>
<li>How long would a trip take, with no additional energy, ignoring friction?</li>
</ul>
<p>It&#8217;s about time we had a diagram.</p>
<p><img src="http://www.youell.com/matt/writing/wp-content/uploads/2013/05/diagram_800x602.jpg" alt="Someday I&#039;ll get a Wacom. I&#039;ve been saying that for 18 years." title="Someday I&#039;ll get a Wacom. I&#039;ve been saying that for 18 years." width="800" height="602" class="aligncenter size-full wp-image-1078" /></p>
<p>Of course this is just a conceptual diagram to help think about the problem. The Earth is HUGE and this triangle would be absurdly narrow and deep if we tried to keep things scaled in any way to reality.</p>
<h2>The Details</h2>
<p>Remember that part about Earth having a curve to it? That turns out to be a bit of a hassle. The curve is important to this problem, but the Earth doesn&#8217;t have the same curve everywhere. Seriously, this is the kind of thing people write dissertations about. After many rounds of trying to get super-accurate numbers, I opted to go with &#8220;cocktail napkin&#8221;-quality calculations. This means I&#8217;m using the median radius value of Earth that I found online, not the actual value for the region between LA and SF. Since this is not a project proposal and I am just some random guy on the Internet with a blog, I hope you&#8217;ll allow me this indulgence. My calculations are in the notes below, after the end of the post.</p>
<p>The key piece of information I wanted to know was &#8216;h&#8217;, the depth of the tunnel at the mid-point. That is because I wanted to know how fast you&#8217;d go if you were to slide down this tunnel through the mid-point. I also wanted to know if this tunnel would stay within the Earth&#8217;s crust over its entire length.</p>
<p>The number I came up with was about 6 km. That&#8217;s deeper than I expected. The Earth&#8217;s crust turns out to be between <a href="https://en.wikipedia.org/wiki/Structure_of_the_Earth#Crust">5 km to 70 km thick</a>  depending on where you are. Since I know absolutely nothing about geology, I&#8217;m just going to pretend that the crust is substantially thicker than 6 km in the LA to SF area. </p>
<p>Honestly, given this &#8220;median radius&#8221; I&#8217;m working with, I wouldn&#8217;t be surprised if my numbers are way off. Earlier numbers, where I was trying to be more accurate, put the depth at more like 2 km which is borderline practical. It&#8217;s also way more boring, because the greater the depth, the faster we can go&#8230;</p>
<p>The depth of the tunnel&#8217;s mid-point tells us the velocity for any mass allowed to fall into the tunnel. This is in an imaginary scenario where there is no friction or air resistance and no energy is added to the system. The mass is just &#8220;dropped&#8221; down the tunnel. At first you&#8217;d start off slow, heading down a 4% grade, but my numbers say that you&#8217;d be going about 767 mph (~ 1234.5 kph, interestingly) by the time you reached the mid-point of the tunnel. That&#8217;s around the speed of sound. It&#8217;s also in the neighborhood of &#8220;twice as fast as a plane&#8221;, if you consider typical commercial airspeeds.</p>
<p>I did not end up calculating the trip time. See &#8220;Problems&#8221; and the calculation notes for more on that.</p>
<h2>Interesting Properties of Tunnels</h2>
<p>Tunnels are &#8220;immune to weather&#8221;.</p>
<p>Tunnels work well with maglev. I built a model maglev train for a project in grade school. It didn&#8217;t work too well. My cars wouldn&#8217;t stay on the track. The permanent magnets I was using would flip my cars over. In a tunnel that doesn&#8217;t have to happen &#8211; you have more surface to use than just the ground.</p>
<p>If you build your conveyance (space pod, trolley, what have you &#8211; I&#8217;ll use &#8220;car&#8221;) to work with the tunnel you can have something that never derails. Further, despite those action movies where people dive out of airplanes to save other people who were <i>thrown</i> out of airplanes, falling bodies tend to fall with uniform motion. That is to say, if you pushed a car down this tunnel and then pushed another one down the tunnel shortly afterward, they &#8220;never crash&#8221; into each other because they&#8217;re following the same path and obey the same laws of motion. The number of cars you could have in the tunnel at any one time is determined by the length of the tunnel. If you had a tunnel going in each direction you could keep a continuous loop going so &#8220;there is no waiting for a specific departure time&#8221;.</p>
<h2>Problems</h2>
<p>A few times above I oddly quoted a term or phrase.  Those were various descriptions that Elon has used. Just because something matches a description doesn&#8217;t mean it&#8217;s the same though. Only some of this comparison stands up to close scrutiny. Particularly problematic is the matter of speed. I haven&#8217;t calculated the total trip time yet but the only way I could get my trip time under 30 mins is if the average speed for the entire trip was the maximum speed I calculated at the mid-point of the tunnel. (For the curious, the trip at that maximum speed would be about 27 minutes, &#8220;under 30 minutes&#8221;). Also, friction and air resistance are things that I&#8217;ve completely ignored. The final major problem is cost. He has estimated a $6B project cost. Can you tunnel nearly 550km on $6B? Maybe. I really don&#8217;t know.</p>
<h2>OTOH</h2>
<p>This whole scheme I&#8217;ve described is based on zero external energy and zero initial velocity when cars enter the tunnel. When you add in the costs of friction (even if you do maglev) you have to have some kind of external energy source to at least make up for the losses. And if you&#8217;re going to add extra energy to the system, you might as well add enough to make it interesting. Maybe even get the speed up and bring the travel time down. I&#8217;ve heard some people talk about rail guns. That sounds interesting.</p>
<p>Oh, and one other thing I can&#8217;t help but point out: Elon used the phrase &#8220;average speed&#8221;. You either raised your eyebrows at that or you didn&#8217;t. I know I did.</p>
<h2>What&#8217;s the Point of All of This? Is This the Hyperloop?</h2>
<p>Wouldn&#8217;t that be awesome? But no, I&#8217;m sure I&#8217;m way off the mark. After all, I thought &#8220;Ginger&#8221; was going to be a flying car or jetpack. You know, something cool. For the Hyperloop, the similarities to my idea were too good to pass up. I had to make the comparison. There are probably dozens of other unrelated schemes that could fit the description Elon&#8217;s given so far. </p>
<p>I guess the point is that we can all dream up interesting ideas, and we should play with those ideas more, even if we&#8217;re not Tony Stark. I used to do this all the time when I was 11 or 12 years old. Why don&#8217;t I do that anymore? Playing around with this has been fun!</p>
<p>(<a href="https://plus.google.com/110521673329066426447/posts/1nuBp9gx7pf">A nice conversation about this</a> has popped up in a friend&#8217;s Google+ stream.)</p>
<p><img src="http://www.youell.com/matt/writing/wp-content/uploads/2013/05/inset.jpg" alt="inset" title="inset" width="225" height="300" class="alignright size-full wp-image-1058" /></p>
<hr/>
[1] Or maybe it was Heisenberg&#8217;s lab assistant?</p>
<p>&#8212;-</p>
<p>Cocktail Napkin Calculations</p>
<p>The numbers I started with (all figures approximate):</p>
<table border="1" style="border: 1px solid #000">
<tr>
<td><a href="http://www.geobytes.com/citydistancetool.htm">Surface distance</a> between SF and LA</td>
<td><i>s =</i></td>
<td>550 km</td>
</tr>
<tr>
<td>Median radius of the Earth</td>
<td><i>r =</i></td>
<td>6372 km</td>
</tr>
</table>
<p>Find h:</p>
<p>h = r &#8211; L</p>
<p>To find L, I needed to know &mu;, and to know &mu; I needed to know &theta;, which is the angle between the two cities from the perspective of the center of the Earth. This is where having super-accurate curve info would have been handy. But oh well, on we go with the median radius.  </p>
<p>&theta; = s/r  = 0.0863 radians = 4.945 degrees</p>
<p>&mu; = 0.5 &theta; = 2.47 degrees</p>
<p>L =  r * cos &mu; = 6366 km</p>
<p>h = r &#8211; L = 6372 &#8211; 6366 = 6 km</p>
<p>&#8212;</p>
<p>Maximum velocity v:</p>
<p>v = sqrt(2gh) = sqrt( 2 * 9.8 m/s/s * 6000 m) = 342.9 m/s = 1234 km/h = 767 mph</p>
<p>&#8212;</p>
<p>Time for trip if at max velocity: t = 550 km / (1234 km/h) = 0.445 h = 26.7 mins</p>
<p>&#8212;</p>
<p>Slope of the tunnel at each end would also be 2.47 degrees. </p>
<p>Grade = tan(2.47) * 100 = 4.31%</p>
<p>&#8212;-</p>
<p>I&#8217;ve ignored the gravity of the portion of earth above the tunnel. The ideal shape would probably have some <a href="http://en.wikipedia.org/wiki/Brachistochrone_curve">curve</a> to it. Speaking of which, &#8220;<a href="http://en.wikipedia.org/wiki/Hypocycloid">hypocycloid</a>&#8221; sounds a lot like &#8220;hyperloop&#8221;. Coincidence? Probably.</p>
<p>&#8212;</p>
<p>I didn&#8217;t calculate the travel time through the tunnel because the angle of gravity changes as you go which is different than a first-year physics velocity calculation where g is always straight down. This started to look like a path integral so I ran away! The <a href="http://en.wikipedia.org/wiki/Gravity_train">Gravity Train</a> article suggests that on Earth this time is always 42 minutes, but I&#8217;m not convinced that this is the same problem, as the gravity train notion involves taking some optimal path deep through the earth. Clearly, I have homework to do. If there&#8217;s an easier solution or you&#8217;re handy at this kind of thing, get in touch. Thanks.</p>
<p>Update: Alan Eliasen, creator of the lovely <a href="http://futureboy.us/frinkdocs/">Frink</a> programming language, shared a <a href="http://futureboy.us/fsp/colorize.fsp?f=holeearthfullgradient.frink">program that calculates point-to-point travel times</a> through a more realistic model of the Earth. He&#8217;s seeing a 38 minute travel time rather than 42.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youell.com/matt/writing/?feed=rss2&amp;p=1050</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Fork in the Road</title>
		<link>http://www.youell.com/matt/writing/?p=763</link>
		<comments>http://www.youell.com/matt/writing/?p=763#comments</comments>
		<pubDate>Mon, 16 Aug 2010 03:50:44 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[problem solving]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[software industry]]></category>

		<guid isPermaLink="false">http://www.youell.com/matt/writing/?p=763</guid>
		<description><![CDATA[I got into an interesting conversation the other day with my pairing partner about the approach he and I wanted to take while trying to fix a bug. What followed was something of an existential conversation about software, complexity, and the role of the programmer in managing complexity.
We work with a small but quite tangled [...]]]></description>
			<content:encoded><![CDATA[<p>I got into an interesting conversation the other day with my pairing partner about the approach he and I wanted to take while trying to fix a bug. What followed was something of an existential conversation about software, complexity, and the role of the programmer in managing complexity.</p>
<p>We work with a small but quite tangled system. The system itself is only a few years old but contains many technologies and bears the scars of several smart but inexperienced people learning how to design as they went. I won&#8217;t articulate the details of the bug we were experiencing but I will say that it is something that recently appeared and was troublesome but non-critical.</p>
<p>The difference in our two points of view became apparently very quickly. My desired approach was to try to pin down the bug, deconstruct it to the point of understanding, and then apply a fix. My coworker&#8217;s approach was to make a well-educated guess about the cause of the bug and apply a refactoring to our codebase that would address the anticipated problem.</p>
<p>His reasoning was that our codebase was too complex to spend time trying to understand it in detail, and in the worst-case scenario we would still have completed a useful refactoring that improved the quality of our codebase. I found this a bit hopeless. Is software really so complex that we as programmers now have to act like doctors &#8211; diagnosticians &#8211; making reasoned guesses about the world around us? Is there no more engineering?</p>
<p>10 or 15 years ago I would have considered his approach ridiculous. Now I&#8217;m honestly not sure. Modern software systems contain so much abstraction and layering that it is really hard to judge the level of effort that will be involved in addressing any one problem.</p>
<p>So what option did we choose? We guessed and did the refactoring. I don&#8217;t think I would have agreed to that with just any pair partner, but this particular coworker is a very productive programmer. He had a clear path forward and a clear rationale.  And one thing you don&#8217;t do with a productive programmer is get in their way.</p>
<p>Did it work? No. I almost want to say &#8220;OF COURSE NOT!&#8221; but that would be unfair. It could very easily have worked. What did eventually work? A pair sitting down and tracing through the application stack with <a href="http://www.gnu.org/software/gdb/">gdb</a>. And even that has only located the approximate location of the error. We still haven&#8217;t solved the problem yet. But we&#8217;re much closer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youell.com/matt/writing/?feed=rss2&amp;p=763</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Internet Works Backwards</title>
		<link>http://www.youell.com/matt/writing/?p=171</link>
		<comments>http://www.youell.com/matt/writing/?p=171#comments</comments>
		<pubDate>Wed, 11 Feb 2009 15:00:40 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[not good enough]]></category>
		<category><![CDATA[problem solving]]></category>
		<category><![CDATA[rants]]></category>

		<guid isPermaLink="false">http://www.youell.com/matt/writing/?p=171</guid>
		<description><![CDATA[A few months ago while riding the train through downtown Portland I had a small epiphany: The Internet works backwards. I tweeted about this but didn&#8217;t explain much. I promised to blog about it and then quickly got wrapped up in other things.
This morning I stumbled across this post which comes painfully close to what [...]]]></description>
			<content:encoded><![CDATA[<p>A few months ago while riding the train through downtown Portland I had a small epiphany: The Internet works backwards. I tweeted about this but didn&#8217;t explain much. I promised to blog about it and then quickly got wrapped up in other things.</p>
<p>This morning I stumbled across <a href="http://www.editorandpublisher.com/eandp/columns/stopthepresses_display.jsp?vnu_content_id=1003940234">this post</a> which comes painfully close to what I had in mind. Painfully because it heads in the right direction and yet is still thinking in a limited, old-media way about the nature of content. </p>
<p>We punish the value creators on the Internet. We should reward those who add value to the network. Instead, the more value a site adds to the network, the more fees the site owners have to pay. </p>
<p>What if the internet worked exactly the opposite from the way it works now? Instead of charging someone like YouTube for bandwidth, carriers would indirectly pay to carry that bandwidth. Consumers would still have a flat-rate ISP subscription, with part of that money being distributed to content providers.</p>
<p>In this way, users would quite literally vote with their attention. This is not the same as your cable company deciding what channels to carry. In this scheme, bandwidth is the only commodity that carriers need concern themselves with. Specific details of content would not matter. Consumers buy bandwidth. Then they hit the sites they like. Those sites receive a portion of the money collected from consumers. This is not on an individual basis; it is aggregate. So if 20% of my ISPs bandwidth went to Youtube yesterday, so did 20% of the allocated money for that day. From Youtube&#8217;s perspective, the bandwidth is free and they make money for hosting the content that the Internet values. Ditto for Flickr, Google, Gmail, the New York Times, or any other site that provides value. </p>
<p>This scheme would work much better than micropayments, mainly because it is dirt simple. Certainly people would try to game the system, and there will always be low-value websites and services which might get some trickle of bandwidth. But over time the wrinkles would be ironed out and the sites and services that create value would be the ones that consistently earn money.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youell.com/matt/writing/?feed=rss2&amp;p=171</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Branding</title>
		<link>http://www.youell.com/matt/writing/?p=155</link>
		<comments>http://www.youell.com/matt/writing/?p=155#comments</comments>
		<pubDate>Tue, 03 Feb 2009 00:55:41 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[marketing]]></category>
		<category><![CDATA[problem solving]]></category>

		<guid isPermaLink="false">http://www.youell.com/matt/writing/?p=155</guid>
		<description><![CDATA[For Sale signs have been sprouting for about a year now in my neighborhood. Most go down after a few months, but several  stubbornly persist. One sign in particular has been up for the better part of a year. It&#8217;s a sign from one of those sell-it-yourself kits you can get at Home Depot. [...]]]></description>
			<content:encoded><![CDATA[<p>For Sale signs have been sprouting for about a year now in my neighborhood. Most go down after a few months, but several  stubbornly persist. One sign in particular has been up for the better part of a year. It&#8217;s a sign from one of those sell-it-yourself kits you can get at Home Depot. It&#8217;s not fancy, but it is better than what the owner started out with. Originally he had a cheaper sign with handwriting, advertising &#8220;4 beadrooms&#8221;. Now they have a better sign with no &#8220;beadrooms&#8221; mentioned.</p>
<p>Beadrooms or not, the house has gone unsold. I&#8217;m sure it hasn&#8217;t helped that the owner is selling it himself. I think the old saying about having a fool for a client applies to more areas than just law.</p>
<p>I realized today that this guy&#8217;s For Sale sign is a brand. It&#8217;s not working for him, but it is definitely a brand. After all, what is a brand? It&#8217;s a tool that gets potential customers to stop thinking. Seriously. If you&#8217;re Coke, with an insanely huge brand and market presence, all that your brand does is get people to not think about alternatives. Smaller brands are a variation on this theme.</p>
<p>So here&#8217;s this guy with his For Sale brand. It&#8217;s there every day, rain or shine. And people have stopped thinking about it because it doesn&#8217;t change. It&#8217;s a brand. It&#8217;s sort of sadly fascinating that this guy has accidentally created something many companies pay a lot of money trying to achieve.</p>
<p>Worse, I think the handwritten &#8220;beadrooms&#8221; sign had more draw.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youell.com/matt/writing/?feed=rss2&amp;p=155</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Injection of Failure &#8211; Breaking your code on purpose</title>
		<link>http://www.youell.com/matt/writing/?p=69</link>
		<comments>http://www.youell.com/matt/writing/?p=69#comments</comments>
		<pubDate>Fri, 19 Dec 2008 19:43:42 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[How I Code]]></category>
		<category><![CDATA[problem solving]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://www.youell.com/matt/writing/?p=69</guid>
		<description><![CDATA[I&#8217;ve had a post by Kent Beck sitting in a browser window for a few weeks, waiting to be read. That&#8217;s how I roll: I pile up open browser windows and tabs, promising myself I&#8217;ll take a minute to read whatever new shiny thing I&#8217;ve found, and then maybe a few weeks later I&#8217;ll get [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve had a post by Kent Beck sitting in a browser window for a few weeks, waiting to be read. That&#8217;s how I roll: I pile up open browser windows and tabs, promising myself I&#8217;ll take a minute to read whatever new shiny thing I&#8217;ve found, and then maybe a few weeks later I&#8217;ll get to it. Not the best system, I admit. However, it is about the only way I get things read.</p>
<p>So Kent&#8217;s post is titled &#8220;<a href="http://www.threeriversinstitute.org/HitEmHighHitEmLow.html">Hit &#8216;Em High, Hit &#8216;Em Low</a>&#8220;, and in the post he describes a debugging technique he calls the Saff Squeeze. It is very similar to a technique that I was taught when I was a junior programmer by my good friend and mentor John Petts. Up until now I&#8217;ve just called the technique &#8220;break it on purpose&#8221;. If I knew we were honoring people with names for things I would have given it a better name, like &#8220;the Petts Awesomeness&#8221; or something. Still, a name would be good, and Saff Squeeze isn&#8217;t really working for me (no offense to either Saff or Beck). If we continue Kent&#8217;s football metaphor we might just call it &#8220;Intentional Grounding&#8221;, but I&#8217;d prefer to think of it as &#8220;Injection of Failure&#8221;.</p>
<p>In Kent&#8217;s post he describes the technique in unit-testing and refactoring terms: You have a test that doesn&#8217;t work and you can&#8217;t spot the problem. So you inline your code-under-test which allows you to move your assertion(s) up through the inlined code until you find the error.</p>
<p>This technique is not limited to unit tests and doesn&#8217;t require refactoring. It <em>does</em> require a willingness to break things. That&#8217;s about it. Here&#8217;s all there is to it: </p>
<blockquote><p>If you have an error in your code but you can&#8217;t tell exactly where that error is, create your own error that you understand and try to place it in the code before the error you&#8217;re hunting for.</p></blockquote>
<p>When I was first taught this trick I was a C++ developer trying to troubleshoot a complicated build that had started failing after I pulled in code from another project. But this technique works great in any complicated system. I&#8217;ve used this technique recently to diagnose problems with Django, a Python-based web application framework which can sometimes generate very mysterious error messages. But the place that I&#8217;ve had the greatest success with this technique is diagnosing Javascript errors in the browser, where development is often like eating noodles with one chopstick.</p>
<p>The one refinement to this technique that Kent doesn&#8217;t mention is to use a binary search to find the bug. If there are a 100 lines of code and you know the error is in there somewhere, inject your own error right in the middle of that code. If the error message or program result changes, you know that the bug lives in those last 50 lines. Otherwise it is in the first 50. Then you repeat, moving your injected error halfway through the remaining code each time, until eventually you find the offending line(s) of code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youell.com/matt/writing/?feed=rss2&amp;p=69</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Powell Doctrine</title>
		<link>http://www.youell.com/matt/writing/?p=34</link>
		<comments>http://www.youell.com/matt/writing/?p=34#comments</comments>
		<pubDate>Wed, 03 Dec 2008 05:54:25 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[culture]]></category>
		<category><![CDATA[essays]]></category>
		<category><![CDATA[problem solving]]></category>
		<category><![CDATA[success]]></category>

		<guid isPermaLink="false">http://www.youell.com/matt/writing/?p=34</guid>
		<description><![CDATA[I am not a paragon of punctuality but I have improved dramatically from where I started out. I used to be habitually late for just about everything &#8211; even very important things like job interviews.
Several years ago I finally got tired of this. I wanted to figure out how to be someone who could be [...]]]></description>
			<content:encoded><![CDATA[<p>I am not a paragon of punctuality but I have improved dramatically from where I started out. I used to be habitually late for just about everything &#8211; even very important things like job interviews.</p>
<p>Several years ago I finally got tired of this. I wanted to figure out how to be someone who could be on time. The answer I found isn&#8217;t glamorous or fun, and it may seem obvious to some people. It wasn&#8217;t obvious to me though, which is why I&#8217;m bothering to write about it.</p>
<p>Have you heard of the <a href="http://en.wikipedia.org/wiki/Powell_Doctrine">Powell Doctrine</a>? If you look it up you&#8217;ll find a bunch of boring statesman-speak with bullet points, but the best and most concise summary of the Powell Doctrine that I have heard is this:</p>
<p>You go to war with overwhelming force.</p>
<p>This turns out to be the approach I took. I decided that I would be ridiculously early for appointments. If the doctor expected me at 10 o&#8217;clock I would be in his lobby at 8:30 or 9. I&#8217;d bring a book and wait it out. My overwhelming force was time.</p>
<p>This has worked remarkably well for job interviews. I don&#8217;t necessarily show up for the actual interview an hour early (which might seem desperate or at least odd), but I am not averse to sitting in the company&#8217;s parking lot for 45 minutes beforehand. If the meeting or interview is important enough the time is totally worth it.</p>
<p>A lot of common advice about punctuality talks about being 15 minutes early for your appointments. That shit just <em>doesn&#8217;t work</em>. Most people are smart enough to do the math and say &#8220;oh, I have 15 extra minutes so I can stop at Starbucks&#8221;. Then they stress out when it takes 12 minutes to get their coffee instead of the 5 minutes that they&#8217;d convinced themselves it would take. Since they were already running 10 minutes behind, big surprise, they&#8217;re late.</p>
<p>To make this work you need to stick with the term &#8220;overwhelming force&#8221;. If an hour isn&#8217;t early enough, try three. Seriously. If the appointment is that important, why not? Bring a book or your iPod or your laptop. Or convince a friend to come along and keep you company. Do whatever it takes to create that overwhelming force. Absolutely <em>nothing</em> short of death, serious injury, or a kidnapping will prevent you from being on time for an appointment if you leave for the appointment hours before any sane person would.</p>
<p>This isn&#8217;t just idle talk. I did this recently when meeting a prospective client. I was meeting someone in a new part of town that I wasn&#8217;t too familiar with and I was taking public transit. I planned my trip so that I would be in the area an hour early. All sorts of things went wrong that morning: I got out of the house late, I missed my bus and had to walk a mile down to the light rail station. Then I missed the first train and had to wait for another. Finally I was on the right train, heading in the right direction but incredibly late! The train was taking far longer than I expected. I finally got off the train and walked the rest of the way to the meeting, where I was about two minutes early. I felt like a total failure, but I was <em><strong>on time</strong></em>. If I had planned on being 15 minutes early I would have blown the meeting and probably missed out on a new client.</p>
<p>I should say that I don&#8217;t do this all the time. Just like a nation shouldn&#8217;t always be at war. But when force is required, you want to go all the way. I&#8217;m not always on time for every appointment in my life. But I know how to be on time when it counts.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youell.com/matt/writing/?feed=rss2&amp;p=34</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I Don&#8217;t Use Bookmarks</title>
		<link>http://www.youell.com/matt/writing/?p=30</link>
		<comments>http://www.youell.com/matt/writing/?p=30#comments</comments>
		<pubDate>Mon, 24 Nov 2008 22:27:48 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[humane]]></category>
		<category><![CDATA[problem solving]]></category>

		<guid isPermaLink="false">http://www.youell.com/matt/writing/?p=30</guid>
		<description><![CDATA[I don&#8217;t believe in bookmarking things. I used to bookmark websites in my browser like crazy. Then one day I realized that I was never using those bookmarks. Even worse was the realization that with my bookmarks I was building a private index of the Internet. And there was already this really good index out [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t believe in bookmarking things. I used to bookmark websites in my browser like crazy. Then one day I realized that I was never using those bookmarks. Even worse was the realization that with my bookmarks I was building a private index of the Internet. And there was already this really good index out there called Google&#8230; So I stopped bookmarking. My life became much simpler. My collection of bookmarks dropped to almost zero.</p>
<p>Instead of digging through bookmarks (which I wasn&#8217;t doing anyway) I&#8217;d google for a term that I remembered had given me the results I wanted in the past. If that sounds like more work than using bookmarks, let me assure you that it isn&#8217;t. Once you collect a non-trivial number of bookmarks you have to categorize them and remember that hierarchy. Which is directly equivalent to just remembering what you typed in. If you think of your bookmark category and bookmark name as a key to lookup your desired results, then you can think of your search term in the same way. And generally your search term is easier to remember. In fact, you don&#8217;t even have to remember it: For whatever reason, when I find myself googling for a piece of information I invariably type in the same query or nearly the same query that I typed in last time. Even if months or years have transpired. When your &#8220;key&#8221; is so directly and humanely tied to what you want it works so much better.</p>
<p>My google-not-bookmarks strategy has served me well for about 6 or 7 years. Lately though, I&#8217;ve noticed that Google results have begun to fluctuate dramatically from day to day depending on the topic and the query I provide. So while my search terms haven&#8217;t changed much, the results have changed. Lucky for me that my browser remembers (and highlights) which links I&#8217;ve already visited, otherwise this system may have broken down for me a long time ago.</p>
<p>I don&#8217;t think anything crazy has happened at Google. Instead, the things I tend to repeatedly search for are in a narrow niche of geekdom. I&#8217;m sure this has been a problem for a long time for people who regularly google more popular topics. Only as the size of the Internet has increased &#8211; and therefore the size of the searchable content &#8211; has my neck of the woods finally been impacted.</p>
<p>To some extent this constant change is a good thing. Google offers a hybrid of fresh content and relevant results. So you can watch a topic for changes. You can even google yourself. In fact the how-to-blog crowd widely recommends that you google yourself often to see what people are saying about you online. (They don&#8217;t mention how unsatisfying that act is when no one knows who the hell you are and therefore no one is talking about you. Still, were someone to talk about me, Google would tell me all about it.)</p>
<p>On the other hand, I&#8217;m losing my auxiliary brain a little bit more every day. For instance, I sometimes have trouble remembering how to make a tarball. I don&#8217;t like the two-step process where you make a tar file then you compress it. Instead, I like a nice clean one-liner. Modern <em>tar</em> provides a compression option and will kick out a tidy *.tgz file for you. If only you know the magic command-line options and parameter sequence to get it to do that. Sadly, I never remember. So this is something I google for fairly often. Just in the past week I&#8217;ve had to google for this twice. And I know I googled for it a month or two back. And each time found markedly different results. I don&#8217;t even know where the site I found a few months ago is, but it isn&#8217;t in my search results anymore. At least not on that first page. Sadly, that site from a few months ago had the best instructions for making a tarball.</p>
<p>I guess I should have bookmarked it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youell.com/matt/writing/?feed=rss2&amp;p=30</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wanted for Christmas: The most dreadful, impossible, legacy project from hell</title>
		<link>http://www.youell.com/matt/writing/?p=29</link>
		<comments>http://www.youell.com/matt/writing/?p=29#comments</comments>
		<pubDate>Thu, 20 Nov 2008 22:56:34 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[problem solving]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rants]]></category>
		<category><![CDATA[software industry]]></category>

		<guid isPermaLink="false">http://www.youell.com/matt/writing/?p=29</guid>
		<description><![CDATA[By definition, self-employed software developers are always looking for new projects. But lately something else has been nagging at me. I&#8217;ve enjoyed some of the projects I&#8217;ve worked on this year, but they&#8217;ve only stretched my skills a tiny bit. I&#8217;m not just looking for a new project, I&#8217;m looking for a new kind of [...]]]></description>
			<content:encoded><![CDATA[<p>By definition, self-employed software developers are always looking for new projects. But lately something else has been nagging at me. I&#8217;ve enjoyed some of the projects I&#8217;ve worked on this year, but they&#8217;ve only stretched my skills a tiny bit. I&#8217;m not just looking for a new project, I&#8217;m looking for a new <em><strong>kind</strong></em> of project.</p>
<p>Looking back on my career up to this point, the projects that have entertained me most have been ones with blank slates, using new, cutting edge technologies. That is very common with programmers; we like to be entertained by our work. But entertainment alone turns out to be a poor reason to take a project. I can see now that the projects which have stretched my problem solving skills the most have been the nasty legacy projects. The ones where I&#8217;m asked to do the impossible. To make things happen that otherwise couldn&#8217;t.</p>
<p>Most programmers run away from legacy code and projects. Not me. Legacy code is like sculpting clay to me. And lately I&#8217;ve been wanting to sculpt something. Something mighty. That&#8217;s right, I said mighty.</p>
<p>I want the gnarly project. The one with spaghetti code that has passed from programmer to programmer over the years, both competent and incompetent. The one that has been ported to 5 different platforms and/or languages over 20 years. The one that other programmers have looked at and thrown their hands up and run away from saying &#8220;Fuck <em><strong>that</strong></em>&#8220;. The one that the entire company is running on and dare not be touched for fear of taking down the business. The one that is holding everyone back and requires mindless redundant data-shuffling by humans just to be kept happy. The one that you&#8217;d replace in a heartbeat if only you could pull it off.</p>
<p>That&#8217;s what I want for Christmas. Someone tell Santa.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youell.com/matt/writing/?feed=rss2&amp;p=29</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stockton Syndrome</title>
		<link>http://www.youell.com/matt/writing/?p=6</link>
		<comments>http://www.youell.com/matt/writing/?p=6#comments</comments>
		<pubDate>Thu, 17 Apr 2008 04:41:07 +0000</pubDate>
		<dc:creator>matt</dc:creator>
				<category><![CDATA[conferences]]></category>
		<category><![CDATA[essays]]></category>
		<category><![CDATA[problem solving]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[travel]]></category>

		<guid isPermaLink="false">http://www.youell.com/matt/writing/?p=6</guid>
		<description><![CDATA[I don&#8217;t know about you, but lately I&#8217;ve been seeing lots of ads for conferences here and there. I just missed PyCon &#8216;08 in Chicago. I&#8217;ll probably miss WWDC in SF this summer. And the odds of me making it to another OOPSLA are slim to none these days. Still, I try to be optimistic [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know about you, but lately I&#8217;ve been seeing lots of ads for conferences here and there. I just missed PyCon &#8216;08 in Chicago. I&#8217;ll probably miss WWDC in SF this summer. And the odds of me making it to another OOPSLA are slim to none these days. Still, I try to be optimistic about such things. From time to time a conference will catch my eye and I&#8217;ll give some thought to attending. And so I saw a blurb the other day for the eBay Developers Conference in Chicago this June.</p>
<p>Not being big on flying, I headed over to Amtrak to see how many arms and/or legs they wanted for a ticket.</p>
<p>For the most part I have no real problems with Amtrak. They are running an under-appreciated and underfunded service in an almost non-existent market on tracks they don&#8217;t own and have no control over. Many people I&#8217;ve talked with over the years say they long for a European-style rail system where train travel is widely available, simple, and popular. Amtrak will never be any of these things, sadly. There&#8217;s just too much that needs fixing. But I digress.</p>
<p>Amtrak has a decent website with features and functionality that have steadily improved over time. Like any other travel-industry website there is a small learning curve, but for the most part it is easy and pleasant. That pleasantness even extends to the check-in procedure at the station. If you order your ticket online you can pick it up from a simple automated kiosk that will print out a neat little ticket that is a classic example of how forms should be designed. With it&#8217;s classic 50&#8217;s styling you&#8217;ll feel like Cary Grant in North by Northwest. Bring your own Eva Marie Saint.</p>
<p style="text-align: center"><img src="http://www.youell.com/matt/writing/lib/images/SalemAmtrakStation_400x300.jpg" alt="Amtrak Station, Salem OR" height="300" width="400" /></p>
<p>Don&#8217;t be fooled though. The website, the modern kiosk, and the wonderful ticket design all hide a secret that you probably already know: Amtrak is fucking insane. Like &#8216;Kramer doing stand-up at the Apollo&#8217; insane. Like Cameron Diaz in Vanilla Sky insane. I think you get my point.</p>
<p>Still, the train is the train. Biggest thing I like about the train? It will never, at any point, fly at 30,000 feet. Call me crazy, but I&#8217;ve got a thing about sitting in a fuel-filled aluminum tube 6 miles in the sky. I&#8217;m sure it&#8217;s just me. Whatever.</p>
<p>So I went on the Amtrak site, punched in PDX to CHI, selected June something-or-other for the dates, and presto, here&#8217;s what they gave me:</p>
<p><a href="http://www.youell.com/matt/writing/lib/images/FullSchedule_597x771.png" target="_blank"></a></p>
<p style="text-align: center"><a href="http://www.youell.com/matt/writing/lib/images/FullSchedule_597x771.png" target="_blank"><img src="http://www.youell.com/matt/writing/lib/images/FullSchedule_597x771.png" alt="Amtrak Schedule" height="386" width="296" /></a></p>
<p>Do you see what I see?</p>
<p>In case you can&#8217;t read their time table, this lists four possible trips that I could take to get to Chicago. So far, so good. The first trip looks best: Portland to Chicago, straight through. No muss, no fuss; $245.</p>
<p>The next two are a little more complicated. I can take the train to either Seattle or Spokane. Then I get to dick around for a while before catching a connecting train to Chicago. No savings to be had here. In fact one is mysteriously $26 more.</p>
<p>And then comes my favorite, trip #4. It&#8217;s a chance to save $25! For clarity I&#8217;ll describe the itinerary:</p>
<ul>
<li>I take the train from Portland to Sacramento.</li>
<li>I take a bus from Sacramento to Stockton.</li>
<li>I take another train from Stockton to Bakersfield.</li>
<li>I take the bus from Bakersfield to LA.</li>
<li>I take a final train from LA to Chicago. (Assuming I made my connection in LA. Trust me, I wouldn&#8217;t.)</li>
</ul>
<p>So to sum up, I take trains and buses 1000 miles <em>south</em>, then I take a train 2000 miles <em>northeast</em>. Eventually this gets me 2100 miles <em>east</em> of where I started. Just like Pythagoras said, right?</p>
<p>Here&#8217;s the stats:</p>
<ul>
<li>Total distance: roughly 3000 miles</li>
<li>Total time: approximately 66 hours</li>
<li>Total savings: $25 (No, not priceless. Sorry.)</li>
</ul>
<p>Why the hell would Amtrak even suggest something this inane?</p>
<p>Clearly they are taking the <a href="http://en.wikipedia.org/wiki/Traveling_salesman_problem">Traveling Salesman problem</a> way too far. Actually, I take that back. I have no idea what they are doing algorithmically over there. The real problem &#8211; from a user standpoint anyway &#8211; is that they aren&#8217;t filtering well.</p>
<p>There are very few parameters to this problem: My needs are simple and specific; their abilities are limited and finite. As far as I&#8217;m concerned, there should be no more than three possible trips presented when the parameters are so few. Why three? Because there are only three factors at stake that either customers or Amtrak care about. What are they?</p>
<ol>
<li>Price</li>
<li>Time</li>
<li>Quality</li>
</ol>
<p>Notice I say &#8220;no more than&#8221; three trips. In this particular case there should only have been two shown to me. Let&#8217;s work through it:</p>
<p>Right away we see that Trip #1 is priced lower than Trip #2. Notice that Trip #2 takes almost 4 hours longer. And it has a connection. Connections equal risk, and risk equals lower quality. So Trip #2 is out.</p>
<p>Trips #1 and #3 are the same price, but Trip #3 shaves about an hour off the travel time. The quality is lower because there&#8217;s a connection, but it is only one connection and it is train-to-train. I&#8217;d keep this in the list. You never know who wants to save that hour.</p>
<p>Finally, Trip #4 is cheaper than any of the other trips, but it is over 20 hours longer!! If that isn&#8217;t enough of a reason to shit-can it, there are four connections, alternating between trains and buses. Throw in a plane and some pillows and you&#8217;d have a John Candy movie.</p>
<p>Wait.</p>
<p>Those aren&#8217;t pillows!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.youell.com/matt/writing/?feed=rss2&amp;p=6</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
