<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Tim Trueman</title>
	
	<link>http://timtrueman.com</link>
	<description>A tagline? What am I…a super hero?</description>
	<lastBuildDate>Tue, 14 Jul 2009 00:19:47 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/timtrueman" type="application/rss+xml" /><feedburner:emailServiceId>timtrueman</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Why do you think it’s called Chrome OS?</title>
		<link>http://feedproxy.google.com/~r/timtrueman/~3/GQUhE40ifgQ/</link>
		<comments>http://timtrueman.com/2009/07/09/why-do-you-think-its-called-chrome-os/#comments</comments>
		<pubDate>Fri, 10 Jul 2009 07:16:30 +0000</pubDate>
		<dc:creator>Tim Trueman</dc:creator>
				<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://timtrueman.com/?p=620</guid>
		<description><![CDATA[Google isn&#8217;t Apple. This isn&#8217;t the next big thing. It&#8217;s not a stab at Windows.
What is it?
Google has one very obvious strategy. Get more people to use the Internet&#8230;which leads to to more searches&#8230;which leads to more ad revenue&#8212;lots of revenue.
Google&#8217;s browser, Chrome, is supposed drive forward the technological limit of browsers. This lets developers [...]]]></description>
			<content:encoded><![CDATA[<p>Google isn&#8217;t Apple. This isn&#8217;t the next big thing. It&#8217;s not a stab at Windows.</p>
<p>What is it?</p>
<p>Google has one very obvious strategy. Get more people to use the Internet&hellip;which leads to to more searches&hellip;which leads to more ad revenue&mdash;<em>lots</em> of revenue.</p>
<p>Google&#8217;s browser, Chrome, is supposed drive forward the technological limit of browsers. This lets developers build newer and cooler products. New products lead to users spending more time on the web which leads to more searches and therefore more revenue for Google.</p>
<p>There&#8217;s one thorn in the side for all web developers today: Internet Explorer. It&#8217;s popular simply because anyone that wants a computer just so they can surf the web, listen to music and IM their friends has no realistic option except Windows. And the average user isn&#8217;t going to bother with anything but Internet Explorer.</p>
<p>That&#8217;s right, Chrome OS has Chrome in its name because it&#8217;s sole purpose is to replace Internet Explorer with Chrome. It&#8217;s not an attack on Windows; It&#8217;s an attack on Internet Explorer.</p>
<p>I could be terribly, horribly wrong but it seems the only logical reason to me given the naming scheme. Am I crazy?</p>
<img src="http://feeds.feedburner.com/~r/timtrueman/~4/GQUhE40ifgQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://timtrueman.com/2009/07/09/why-do-you-think-its-called-chrome-os/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://timtrueman.com/2009/07/09/why-do-you-think-its-called-chrome-os/</feedburner:origLink></item>
		<item>
		<title>Execute Javascript when you can’t</title>
		<link>http://feedproxy.google.com/~r/timtrueman/~3/LoMTInQxEp8/</link>
		<comments>http://timtrueman.com/2009/07/03/execute-javascript-when-you-cant/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 22:03:19 +0000</pubDate>
		<dc:creator>Tim Trueman</dc:creator>
				<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://timtrueman.com/?p=519</guid>
		<description><![CDATA[This is a rather sneaky trick I picked up from a former co-worker and the best Javascript hacker I know, Jeremy. All credit goes to him.
This trick is for when an Ajax call grabs the response, blindly dumps it into the DOM and doesn&#8217;t allow for any Javascript to be executed from the response.
Clever, eh?
]]></description>
			<content:encoded><![CDATA[<p>This is a rather sneaky trick I picked up from a former co-worker and the best Javascript hacker I know, Jeremy. All credit goes to him.</p>
<p>This trick is for when an Ajax call grabs the response, blindly dumps it into the DOM and doesn&#8217;t allow for any Javascript to be executed from the response.</p>
<script src="http://gist.github.com/140334.js"></script>
<p>Clever, eh?</p>
<img src="http://feeds.feedburner.com/~r/timtrueman/~4/LoMTInQxEp8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://timtrueman.com/2009/07/03/execute-javascript-when-you-cant/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://timtrueman.com/2009/07/03/execute-javascript-when-you-cant/</feedburner:origLink></item>
		<item>
		<title>Through the Looking-Glass</title>
		<link>http://feedproxy.google.com/~r/timtrueman/~3/x5_t50TXX9M/</link>
		<comments>http://timtrueman.com/2009/02/04/through-the-looking-glass/#comments</comments>
		<pubDate>Thu, 05 Feb 2009 06:21:29 +0000</pubDate>
		<dc:creator>Tim Trueman</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://timtrueman.com/?p=344</guid>
		<description><![CDATA[&#8220;&#8216;Would you tell me please which way I ought to walk from here?&#8217; &#8216;That depends a good deal on where you want to get to,&#8217; said the Cat. &#8216;I don&#8217;t much care where&#8211;&#8217; said Alice. &#8216;Then it doesn&#8217;t matter which way to walk,&#8217; said the Cat.&#8221;&#8211; Alice&#8217;s Adventures in Wonderland
I&#8217;ll live and die by a [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>&#8220;&#8216;Would you tell me please which way I ought to walk from here?&#8217; &#8216;That depends a good deal on where you want to get to,&#8217; said the Cat. &#8216;I don&#8217;t much care where&#8211;&#8217; said Alice. &#8216;Then it doesn&#8217;t matter which way to walk,&#8217; said the Cat.&#8221;<br/>&#8211; Alice&#8217;s Adventures in Wonderland</p></blockquote>
<p>I&#8217;ll live and die by a single text file. At the top are my current goals. Short-term, long-term, even ones I&#8217;m not sure I want to shoot for. I add/edit/remove goals sometimes as often as every few days. As the Cheshire Cat points out to Alice nothing matters if we&#8217;re not sure what we want or where we want to go. This quote has inspired me to always align and realign myself with my goals constantly so I can actually get somewhere. Of course if that quote is too long for you to remember there&#8217;s always this somewhat catchy quote that reminds us to chase after our goals that Dwayne gives us in <a href="http://www.imdb.com/title/tt0449059/">Little Miss Sunshine</a>:</p>
<blockquote><p>Do what you love, and fuck the rest.</p></blockquote>
<div class="media"><a href="http://flickr.com/photos/ttrueman/2296028428/"><img src="http://farm4.static.flickr.com/3053/2296028428_12ccb61803.jpg" alt="Naked juice"/></a></div>
<p>I realize I missed the convenient New Years resolution boat. I just don&#8217;t care though. So here are my <strong>goals for the next 12 months</strong> boiled down to just three.</p>
<ol>
<li>Take care of myself</li>
<li>Be a better citizen</li>
<li>Startup</li>
</ol>
<p><strong>Take care of myself</strong><br />
This has to be the foundation for everything you do. Forming good habits&mdash;even small ones&mdash;build momentum and motivate you for bigger, harder tasks. Like fixing IE 6 bugs.</p>
<p>For a few weeks now I&#8217;ve been making my bed every morning. It&#8217;s a tiny task that takes me about 15 seconds but pays huge dividends. I&#8217;m sure there&#8217;s research on this sort of thing; Cleaning up anything for 5-10 minutes (or less!) seems to give me a huge rush of motivation, endorphines or something. Really. I promise it rocks. Try it now.</p>
<p>Like everyone (and your mom&mdash;OH SNAP), I&#8217;d like to take care of myself a little better by improving my habits regarding food. I read somewhere keeping a food diary really helps improve your diet, so at some point this year I&#8217;d like to give that a try.</p>
<p>I&#8217;d really like to figure out sleeping this year&hellip;I don&#8217;t know how much I need or how much is too much or too little. I end up running around being an insomniac for a few days until it catches up with me and I binge on unconsciousness.</p>
<p>What habits do you form that have helped you in subtle ways?</p>
<div class="media"><object width="475" height="358"><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=2964012&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" /><embed src="http://vimeo.com/moogaloop.swf?clip_id=2964012&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=0&amp;show_portrait=0&amp;color=00ADEF&amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="475" height="358"></embed></object><br /><a href="http://vimeo.com/2964012">First real AI takeoff</a> from <a href="http://vimeo.com/user1212365">Tim Trueman</a> on <a href="http://vimeo.com">Vimeo</a>.</div>
<p><strong>Be a better citizen</strong><br />
I&#8217;d like to get more involved and really reach out to people in the communities around the things that I do or interest me. I plan on giving back by writing, commenting and sharing code/examples. My eventual goal&mdash;although probably a bit selfish&mdash;is to get into a math or compsci textbook.</p>
<p>What meetups/communities are you actively involved with or wish you were involved with?</p>
<p><strong>Startup</strong><br />
For a very long time I&#8217;ve wanted to do a startup. Last year I toyed with tons of ideas ranging from mere thoughts to sketches to actual prototypes. I&#8217;ll probably write about the problems I think still need to be solved that I just don&#8217;t have the motivation or time to do myself.</p>
<p>If you ever watch the news you&#8217;ve probably seen segments done on Unmanned Aerial Vehicles. They are obviously a major part of the future of the military and a few other industries. There&#8217;s already lots of players involved in the development and manufacture of UAVs. That said I still think current UAVs miss the mark. They don&#8217;t deliver much on their promised benefits: reduced costs, less people to operate, and keeping humans out of harm&#8217;s way (at least on one side).</p>
<p>Current UAVs are little more than remotely flown aircraft. There&#8217;s (almost) always at least one human pilot involved. Why? There&#8217;s always a huge trailer with a banks of computers and equipment. Why? The software for controlling the UAVs is always hugely complex and requires training and certification. Why? Because Jonathan Ive works at Apple not Lockheed Martin.</p>
<div class="media"><a href="http://flickr.com/photos/ttrueman/303191913/"><img src="http://farm1.static.flickr.com/111/303191913_5cd5c03580.jpg" width="475" alt="Stanley"/></a></div>
<p>On a different note, I&#8217;m convinced the best strategy is one adopted by <a href="http://en.wikipedia.org/wiki/Sebastian_Thrun">Sebastian Thrun</a>, the development lead on Stanford&#8217;s <a href="http://en.wikipedia.org/wiki/DARPA_Grand_Challenge_(2005)">DARPA Grand Challenge</a> entry, Stanley (pictured on the right). He philosophy is to shove as much as you can into software as opposed to hardware. As Stanford&#8217;s results can attest to, that philosophy seems to work quite well. They ended up with a more innovative, more flexible, and cheaper design. If I succeed in pushing as much as I&#8217;m hoping into software I&#8217;ll be able to develop, test, and launch new features much more quickly than any possible competitor (I&#8217;m guessing nobody runs unit tests on UAVs simply because they can&#8217;t).</p>
<p>The video you see is actually the first successful flight my software made. I know why it steers off the runway, it&#8217;s actually trying to go straight down the runway but the rudder is doing what it should in the air which is the opposite of what it should do on the ground. It&#8217;s fixed now. It&#8217;s amazing to see how quickly I can make progress with its capabilities. More to come on this subject later&hellip; <img src='http://timtrueman.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>That&#8217;s it for my goals. What are yours?</p>
<img src="http://feeds.feedburner.com/~r/timtrueman/~4/x5_t50TXX9M" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://timtrueman.com/2009/02/04/through-the-looking-glass/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://timtrueman.com/2009/02/04/through-the-looking-glass/</feedburner:origLink></item>
		<item>
		<title>A pause to reconsider</title>
		<link>http://feedproxy.google.com/~r/timtrueman/~3/YgUKouqglYM/</link>
		<comments>http://timtrueman.com/2009/01/31/a-pause-to-reconsider/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 00:03:45 +0000</pubDate>
		<dc:creator>Tim Trueman</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://timtrueman.com/?p=371</guid>
		<description><![CDATA[So as you&#8217;ve probably noticed if you&#8217;ve been here before, I&#8217;ve redesigned quite a bit. I wanted to address a host of issues with my last design.
My main goal with this site was to practice writing and become better at it. I find writing forces me to think in a deep way I don&#8217;t normally [...]]]></description>
			<content:encoded><![CDATA[<p>So as you&#8217;ve probably noticed if you&#8217;ve been here before, I&#8217;ve redesigned quite a bit. I wanted to address a host of issues with my last design.</p>
<p>My main goal with this site was to practice writing and become better at it. I find writing forces me to think in a deep way I don&#8217;t normally think in, which I find rewarding and challenging. I&#8217;ve done pretty poorly at forming the writing habit but I figure I can change that right now if I put my mind to it. I&#8217;m hoping this redesign sparks some extra motivation for me to build that habit. Right now I have about 30 regular readers, so I&#8217;ll set a ridiculous goal of increasing that number by an order of magnitude in the next 12 months. It&#8217;s not going to happen. I mean, I&#8217;m pretty damn lazy.</p>
<p>The reason I removed full article text from the homepage is I kept seeing an extremely high bounce rate on users who landed on my homepage from a search query because the post they were looking for was buried in the middle or at the bottom. The simple solution was remove full posts from the main page.</p>
<p>I really wanted to reduce the complexity of the page and focus on making the experience of the reader as easy and enjoyable as possible. I wanted to keep the text relatively narrow as it&#8217;s hard to go to the next line if it gets excessively wide. The problem this posed was integrating photos and video into the text. Large images looked good but disrupted the flow; Small images were just too small but they at least kept the flow going. In the end I decided to keep large images but push them out so they were overhanging on the right so the flow of the text wasn&#8217;t interrupted for each image.</p>
<div class="media"><a href="http://flickr.com/photos/ttrueman/303191667/in/set-72157594387176949/"><img src="http://farm1.static.flickr.com/120/303191667_bfee150983.jpg" width="475" alt="Racing Viper in the factory in Detroit, MI"/></a></div>
<p>I&#8217;ve removed pretty much every element that wasn&#8217;t needed. No unrelated links everywhere and no unrelated Twitter status. Even the number of pages was simplified. The home pages serves two purposes: an archive of everything I&#8217;ve written and an about me description that&#8217;s short and to the point. There&#8217;s a <a href="http://timtrueman.com/404">404 page</a>. And there&#8217;s the single article page. That&#8217;s it.</p>
<p>I&#8217;ve been sitting on this design since November so I just wanted to ship it. So I did. There&#8217;s a couple major issues I&#8217;m aware of, but haven&#8217;t finalized what I&#8217;m going to do about it. The single article page has a very heavy header while home page is very light in comparison. I need some sort of branding or consistent header for both pages and that should solve this issue. The RSS version will be a little weird since the images won&#8217;t be positioned out of the flow of the article. I&#8217;m not sure how I can solve this, maybe I should just add some code to strip out images from the RSS feed?</p>
<p>Also, I&#8217;m painfully aware comments only barely work. I really need to fix them. I didn&#8217;t really consider them in my design, so suggestions are welcome!</p>
<p>I&#8217;m still thinking through the design of the actions box at the end of each article. I figure if someone made it through an entire article I can probably get a high probability of getting them to follow me on Twitter, subscribe to RSS, comment, or read a related article by me. I can&#8217;t seem to find a good article that&#8217;s studied various designs for this and sadly I don&#8217;t have enough readers to produce any serious research into this&hellip;</p>
<p>On the homepage I want to do something to highlight new articles and maybe put stars next to popular or recommended ones. I&#8217;ll get to it eventually&hellip;</p>
<p>I&#8217;m curious what you guys think of the redesign and I&#8217;d love to hear suggestions!</p>
<p>As for future posts I&#8217;ve got a few ideas, feel free to voice your vote for one or another as well as add anything you&#8217;d like to read.</p>
<ul>
<li>How to write a simple neural network in Python</li>
<li>A few other how-to&#8217;s on machine learning topics</li>
<li>Some thoughts on Windows 7 user interface changes</li>
<li>Book review (perhaps Gödel, Escher, Bach?)</li>
<li>A little research and analysis into the writing styles of my favorite writers (and what we can learn from them)</li>
<li>Product/startup ideas I looked at over the last year and need to be done but I&#8217;m passing on for now (probably individually written up)</li>
</ul>
<img src="http://feeds.feedburner.com/~r/timtrueman/~4/YgUKouqglYM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://timtrueman.com/2009/01/31/a-pause-to-reconsider/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://timtrueman.com/2009/01/31/a-pause-to-reconsider/</feedburner:origLink></item>
		<item>
		<title>Understanding solid-state drives</title>
		<link>http://feedproxy.google.com/~r/timtrueman/~3/h6Xt3AhOLVg/</link>
		<comments>http://timtrueman.com/2008/12/07/understanding-solid-state-drives/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 04:20:20 +0000</pubDate>
		<dc:creator>Tim Trueman</dc:creator>
				<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://timtrueman.com/?p=191</guid>
		<description><![CDATA[It seems I&#8217;ve forgotten about writing for a few months. I miss writing to be honest and I think it&#8217;s time to end the hiatus by writing a little something about a package I received a few weeks ago.

It seems the Intel X25-M solid-state drive has been turning a lot of heads. I&#8217;m not sure [...]]]></description>
			<content:encoded><![CDATA[<p>It seems I&#8217;ve forgotten about writing for a few months. I miss writing to be honest and I think it&#8217;s time to end the hiatus by writing a little something about a package I received a few weeks ago.</p>
<div class="media"><a href="http://flickr.com/photos/ttrueman/3020922011/"><img src="http://farm4.static.flickr.com/3067/3020922011_ce730bf0e1.jpg" width="475" alt="Unboxing the Intel X-25M 80GB SSD"/></a></div>
<p>It seems the Intel X25-M solid-state drive has been turning a lot of heads. I&#8217;m not sure very many people really understand the implications of both Intel&#8217;s advances and solid-state technology in general. They look at the benchmarks and the two orders of magnitude lower seek time. They smile and nod and that&#8217;s it&hellip;end of story. Not so fast.</p>
<p><strong>SLC versus MLC</strong><br />
Solid-state drives are usually classified into two categories: Those made from single-level cells (SLC) and those made from multi-level cells (MLC). The difference is SLC stores 1-bit per transistor and MLC stores 2-bits per transistor. The implications are realized in performance, reliability and cost.</p>
<p>Performance-wise MLC typically takes twice as long to read, the same amount of time to erase, and usually more than three times longer to write than SLC. Keep in mind that athough MLC is significantly slower to write to than SLC it&#8217;s still faster than a rotational disk.</p>
<p>SLC&#8217;s biggest advantage is lifespan not performance: SLC cells can be erased and reprogrammed 100,000 times versus 10,000 for MLC. The reason this difference is important is write amplification. Write amplification is the actual size of the write versus the requested write size; This occurs when saving a file that is smaller than the page/block size on an SSD. SSDs have traditionally had a write amplification of 20-40x.</p>
<p>Price-wise it&#8217;s much more expensive to build SLC SSDs over MLC because you need twice the number of transistors to store the same amount of data. If you thought MLC was out of your budget SLC is <em>way</em> out of your league.</p>
<div class="media"><a href="http://flickr.com/photos/ttrueman/3021753718/"><img src="http://farm4.static.flickr.com/3018/3021753718_86c6079ff9.jpg" width="475" alt="Installing the Intel X-25M 80GB SSD in a MacBook"/></a></div>
<p>AnandTech does a <a href="http://www.anandtech.com/cpuchipsets/intel/showdoc.aspx?i=3403&#038;p=2">great job</a> of explaining the technical details of how NAND flash memory works if you&#8217;re even more curious.</p>
<p><strong>What makes the Intel X-25M better than other SSDs?</strong></p>
<p><strong>1. Reduce write amplication</strong><br />
The Intel drive has reduced the write amplification to 1.1 or less which is hugely impressive. This contributes to massively improving the lifespan of the device.</p>
<p><strong>2. Build a better controller</strong><br />
Intel&#8217;s excellent implementation of a controller makes a pretty big difference. Other SSDs have done a really weak job in this aspect. Intel nails it with their controller. It improves caching, queuing and running concurrent operations, improves the lifespan and provides additional information specific to SSDs.</p>
<p><strong>3. Better wear-leveling</strong><br />
The Intel controller takes advantage of the fact that read performance is the same anywhere on the disk, so deleting a file, and redownloading it will write it to another part of the SSD; This is called wear leveling. Intel&#8217;s wear leveling has a difference of 1.1 or less between maximum wear and average wear versus the traditional difference of ~3x. This also helps improve drastically the lifespan of the device.</p>
<div class="media"><a href="http://flickr.com/photos/ttrueman/3051697418/"><img src="http://farm4.static.flickr.com/3249/3051697418_53ac378a73_o.png" width="475" alt="Intel X-25M 80GB SSD benchmark"/></a></div>
<p><strong>4. Revolutionary improvements to reliability</strong><br />
Intel promises you can write 100GB per day for 5 years before the drive fails but it should last much longer than that. Intel does that by keeping 7.5-8% (6-6.4GB on the 80GB drive) in reserve so that as blocks fail it can switch the reserve blocks. The drive supports two additional SMART attributes, one that says how close to the rated cycling limit you are, and one that says when you&#8217;ve run out of (or are about to run out) reserve blocks. This means you&#8217;ll know exactly when your drive is about to fail. That&#8217;s frickin&#8217; awesome!</p>
<p><strong>Results</strong><br />
These are <a href="http://db.xbench.com/merge.xhtml?doc1=317043&#038;doc2=317407">my Xbench disk results</a> before and after on my unibody MacBook 2GHz with 4GB of RAM. Real-world increase of 5.1x in disk performance. Everything just feels&hellip;<em>instant</em>. Pinwheels are an extremely rare occurrence.</p>
<p>I can&#8217;t even imagine the scary performance Intel can wring out of their upcoming <a href="http://www.intel.com/design/flash/nand/extreme/index.htm">SLC drive</a>. It&#8217;s going to be a monster, and a game changer quite possibly (in server environments).</p>
<p>What Intel has done is raise the bar for everyone by showing them what&#8217;s really possible with solid-state drives. Honestly after weeks of use and comparing this to my daily use of a faster MacBook Pro without an SSD at work, I can say it&#8217;s the single best upgrade you can do to any computer to make your computing life better&hellip;if you can afford one. It&#8217;s a night and day difference.</p>
<p>The best part is the drive&#8217;s already dropped over $100 since I bought it; It&#8217;s <a href="http://www.amazon.com/gp/product/B001F4YIYY?ie=UTF8&#038;tag=timtru-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B001F4YIYY"><span style="text-decoration: line-through;">$539</span> $399 on Amazon</a>.</p>
<img src="http://feeds.feedburner.com/~r/timtrueman/~4/h6Xt3AhOLVg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://timtrueman.com/2008/12/07/understanding-solid-state-drives/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://timtrueman.com/2008/12/07/understanding-solid-state-drives/</feedburner:origLink></item>
		<item>
		<title>AT&amp;T Uverse: buyer’s guide</title>
		<link>http://feedproxy.google.com/~r/timtrueman/~3/g6ZCUFUwmhc/</link>
		<comments>http://timtrueman.com/2008/12/07/att-uverse-buyers-guide/#comments</comments>
		<pubDate>Mon, 08 Dec 2008 00:09:04 +0000</pubDate>
		<dc:creator>Tim Trueman</dc:creator>
				<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://timtrueman.com/?p=195</guid>
		<description><![CDATA[
So you&#8217;re thinking about getting AT&#038;T Uverse. You thought you&#8217;d look up what people thought about it and you ended up here. I&#8217;ll break it down as simply as I can.
Pros

Internet occasionally mostly works for a few hours albeit at DSL speeds (~5Mbps)

Cons

More expensive than competitors
Slower than competitors (although on the plus side, it&#8217;s slightly [...]]]></description>
			<content:encoded><![CDATA[<div class="media"><a href="http://flickr.com/photos/ttrueman/3067622703/"><img src="http://farm4.static.flickr.com/3168/3067622703_cd5d688768.jpg" alt="airport 737 morning" /></a></div>
<p>So you&#8217;re thinking about getting AT&#038;T Uverse. You thought you&#8217;d look up what people thought about it and you ended up here. I&#8217;ll break it down as simply as I can.</p>
<p><strong>Pros</strong></p>
<ul>
<li>Internet occasionally mostly works for a few hours albeit at DSL speeds (~5Mbps)</li>
</ul>
<p><strong>Cons</strong></p>
<ul>
<li>More expensive than competitors</li>
<li>Slower than competitors (although on the plus side, it&#8217;s slightly faster than DSL that costs less than 20% of what Uverse costs)</li>
<li>More than 50% of the time something isn&#8217;t working (DNS issues or just down totally)</li>
<li>DNS issues are frequent&#8211;usually at least 30% DNS lookups time out (Akamai domains frequently failed to resolve so major websites would have no CSS, JavaScript or images) </li>
<li>Terrible device that gives you no control and doesn&#8217;t offer the latest tech (802.11n)</li>
<li>Awful tech support (Uverse technicians are worse than regular AT&#038;T technicians&#8211;intelligible as well as totally incompetent, e.g. they seemed to think I change settings on my Mac by clicking &#8220;start&#8221; and then &#8220;control panel&#8221;)</li>
<li>They charged me roughly a $1 for a few months after I cancelled the service for who knows what reason</li>
<li>Charged me $487.14 (I didn&#8217;t chose to pay this, they charged me without asking&#8211;after I cancelled autopay at least a couple months before) for not returning the equipment which apparently I can&#8217;t get an address to ship it to and they refuse to send me the boxes they promise even after &#8220;verifying&#8221; my address twice</li>
<li>Their website is totally unusable (maybe it works in IE 6, but I wasn&#8217;t able to try it since I was already on IE 7) (I should have read the sign and never used a service with a shitty website but then again what option did I have)</li>
<li>There apparently aren&#8217;t any managers on the Uverse program that know how to return phone calls (and all the managers are always busy so you can&#8217;t talk to them directly)</li>
<li>Uverse&#8217;s ticketing system seems to automatically close any ticket I request they open without any action whatsoever being done</li>
<li>If you ever need help, you&#8217;ll dial the &#8220;Uverse&#8221; number that magically connects you to the regular AT&#038;T technicians in Texas (who don&#8217;t know anything about Uverse and transfer you back to the same line&#8211;this process happens over and over until you&#8217;ve wasted about 30 minutes on hold and going through the same menus over and over and somehow it magically breaks out of the loop)</li>
</ul>
<p>Seriously AT&#038;T, $487.14? What the FUCK?! I&#8217;ve got your expensive hardware sitting by my door in hopes you&#8217;ll refund me for your criminally awful &#8220;service&#8221; (I&#8217;d normally expect interest as well as a refund for the percentage of time your service wasn&#8217;t working but you&#8217;ve buried the bar so low it doesn&#8217;t matter at this point).</p>
<p>Basically if you&#8217;re considering AT&#038;T Uverse&#8230;don&#8217;t do it. If it&#8217;s your only option&#8230;I&#8217;m not kidding even a bit&#8230;MOVE somewhere else. Am I bitter? Yes. I admit it. But I&#8217;m trying to save others the agony.</p>
<p>I&#8217;m now with Comcast. I pay 30% less now and I get ~30Mbps downstream and 3-4Mbps up. It&#8217;s been down twice in the last six months both times for about 30 minutes, which isn&#8217;t too unreasonable. And any future place I consider living in I&#8217;m definitely checking to make sure something other than Uverse is available.</p>
<p><em>Sorry for the negative post, I just wanted to put this out there so others don&#8217;t make the same mistake as me.</em></p>
<img src="http://feeds.feedburner.com/~r/timtrueman/~4/g6ZCUFUwmhc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://timtrueman.com/2008/12/07/att-uverse-buyers-guide/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://timtrueman.com/2008/12/07/att-uverse-buyers-guide/</feedburner:origLink></item>
		<item>
		<title>90 second review: Razer Lachesis</title>
		<link>http://feedproxy.google.com/~r/timtrueman/~3/AjGuAjPKP44/</link>
		<comments>http://timtrueman.com/2008/09/21/90-second-review-razer-lachesis/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 02:49:02 +0000</pubDate>
		<dc:creator>Tim Trueman</dc:creator>
				<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://timtrueman.com/?p=173</guid>
		<description><![CDATA[
If you&#8217;re reading this via email or RSS you might have to view it on my site to see the embedded video. Click here.
This was inspired by the awesome review Garrett Murray did of the MacBook Air.
I forgot to mention the mouse is $60-75 depending on where you get it. If you want to buy [...]]]></description>
			<content:encoded><![CDATA[<div class="media"><object type="application/x-shockwave-flash" width="475" height="267" data="http://www.flickr.com/apps/video/stewart.swf?v=60247" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="flashvars" value="intl_lang=en-us&amp;photo_secret=8733b380ed&amp;photo_id=2877055999"></param><param name="movie" value="http://www.flickr.com/apps/video/stewart.swf?v=60247"></param><param name="bgcolor" value="#000000"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/video/stewart.swf?v=60247" bgcolor="#000000" allowfullscreen="true" flashvars="intl_lang=en-us&amp;photo_secret=8733b380ed&amp;photo_id=2877055999" height="267" width="475"></embed></object></div>
<p>If you&#8217;re reading this via email or RSS you might have to view it on my site to see the embedded video. Click <a href="http://timtrueman.com/2008/09/21/90-second-review-razer-lachesis">here</a>.</p>
<p>This was inspired by the awesome review Garrett Murray did of the <a href="http://flickr.com/photos/garrettmurray/2675499866/">MacBook Air</a>.</p>
<p>I forgot to mention the mouse is $60-75 depending on where you get it. If you want to buy it I recommend <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2FRazer-Lachesis-Laser-Gaming-Mous-Banshee%2Fdp%2FB000WU35JQ&#038;tag=timtru-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=9325">Amazon&#8217;s $61.88 price</a>. The Razer Destructor mousepad is <a href="http://www.amazon.com/gp/redirect.html?ie=UTF8&#038;location=http%3A%2F%2Fwww.amazon.com%2FRazer-Destructor-Gaming-Mouse-Case%2Fdp%2FB0016M4F16&#038;tag=timtru-20&#038;linkCode=ur2&#038;camp=1789&#038;creative=9325">$39.99</a> (also a little pricey).</p>
<p>Let me know what you think of the 90 second video review format. Just figured I&#8217;d try something new.</p>
<img src="http://feeds.feedburner.com/~r/timtrueman/~4/AjGuAjPKP44" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://timtrueman.com/2008/09/21/90-second-review-razer-lachesis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://timtrueman.com/2008/09/21/90-second-review-razer-lachesis/</feedburner:origLink></item>
		<item>
		<title>Character encoding confusion</title>
		<link>http://feedproxy.google.com/~r/timtrueman/~3/pc1k8G5o1IA/</link>
		<comments>http://timtrueman.com/2008/09/15/character-encoding-confusion/#comments</comments>
		<pubDate>Mon, 15 Sep 2008 13:58:25 +0000</pubDate>
		<dc:creator>Tim Trueman</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://timtrueman.com/?p=126</guid>
		<description><![CDATA[
As you can see above my photography skills have gone up, although this has been at a negative correlation to my programming skills. And that&#8217;s what this is about. My inexperience with the clusterfuck that is character encoding (we haven&#8217;t come a long way sadly since ASCII was invented in 1963).
Alright so there I was [...]]]></description>
			<content:encoded><![CDATA[<div class="media"><object type="application/x-shockwave-flash" width="475" height="350" data="http://www.flickr.com/apps/slideshow/show.swf?v=59913" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="flashvars" value="&#038;offsite=true&#038;intl_lang=en-us&#038;page_show_url=%2Fphotos%2Fttrueman%2Fsets%2F72157607260944531%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Fttrueman%2Fsets%2F72157607260944531%2F&#038;set_id=72157607260944531&#038;jump_to="></param><param name="movie" value="http://www.flickr.com/apps/slideshow/show.swf?v=59913"></param><param name="bgcolor" value="#000000"></param><param name="allowFullScreen" value="true"></param><embed type="application/x-shockwave-flash" src="http://www.flickr.com/apps/slideshow/show.swf?v=59913" bgcolor="#000000" allowFullScreen="true" flashvars="&#038;offsite=true&#038;intl_lang=en-us&#038;page_show_url=%2Fphotos%2Fttrueman%2Fsets%2F72157607260944531%2Fshow%2F&#038;page_show_back_url=%2Fphotos%2Fttrueman%2Fsets%2F72157607260944531%2F&#038;set_id=72157607260944531&#038;jump_to=" width="475" height="350"></embed></object></div>
<p>As you can see above my photography skills have gone up, although this has been at a negative correlation to my programming skills. And that&#8217;s what this is about. My inexperience with the clusterfuck that is character encoding (we haven&#8217;t come a long way sadly since ASCII was invented in 1963).</p>
<p>Alright so there I was at <a href="http://hackday.org/">Open Hack 2008</a>. I work for Yahoo! so I wasn&#8217;t allowed to compete, but I just figured I&#8217;d keep everyone company and work on a personal project. It&#8217;s a simple service I will be releasing shortly (I hope). I copied the code I had already over to my laptop using my Linux desktop&#8217;s http server.</p>
<p>I started coding and after a few minutes I went to run my project. I was met with a friendly <code>unexpected T_CONSTANT_ENCAPSED_STRING</code>. In the dozen lines of code I had, I couldn&#8217;t see the issue. I figured I was just missing something stupid so I posted to <a href="http://twitter.com/timtrueman/statuses/919861937">Twitter</a> asking for help. I got a quick reply and headed downstairs to take a look at the issue. We tried to isolate the issue on the line throwing the error:</p>
<p><code>$ php -r "$subject = $argv[1];"<br />
Parse error: syntax error, unexpected &#8216;=&#8217; on line 1</code></p>
<p>What the hell? I&#8217;ll give you a million dollars* if you can spot the issue (ignore <code>$argv[1]</code> being undefined, that&#8217;s not it). About an hour and a dozen engineers later (including <a href="http://lerdorf.com/bio.php">Rasmus</a>) we solved the issue. Here&#8217;s what the code really looked like after I opened it in TextEdit.</p>
<p><code>$ php -r "$subject&not;=&not;$argv[1];"<br />
Parse error: syntax error, unexpected &#8216;=&#8217; on line 1</code></p>
<p>Note the negation symbol before and after the equals sign. What amazes me is that none of the editors I had used before (TextMate, vim, nano) had caught the invisible gremlins.</p>
<p>Here&#8217;s what I <em>think</em> happened (I&#8217;m still not 100% sure). I wrote the original code in gedit which I verified saved in the default of <a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a> (as it should). I then transfered the code to my laptop via an http server on my desktop. Since I didn&#8217;t set a charset Safari chose one for me: Latin-1 or its more catchy name, <a href="http://en.wikipedia.org/wiki/ISO/IEC_8859-1">ISO-8859-1</a>. Above the first 127 character values most charsets differ and this conversion produced gremlins that I could see when I pasted my code into a new document and saved it as UTF-8. Anyone who&#8217;s had to work with double-byte languages such as Chinese are already aware of this. They&#8217;ve probable have seen more <a href="http://en.wikipedia.org/wiki/Mojibake">mojibake</a> then they&#8217;ve wanted to.</p>
<div class="media"><a href="http://flickr.com/photos/ttrueman/2401845451/"><img src="http://farm3.static.flickr.com/2363/2401845451_b58d216d90.jpg"/></a></div>
<p><strong>The core problem</strong></p>
<p>Back in the day I read Joel Spolsky&#8217;s <a href="http://joelonsoftware.com/articles/Unicode.html">&quot;The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!)&quot;</a>. I was young and naive; I promptly brushed it off as if it would never apply to me.</p>
<p>My mistake&hellip;</p>
<p>The root of the problem is this: most web developers are unaware of the character encoding issues. So they forget to specify one. So it&#8217;s up to the software you&#8217;re running to pick a character encoding for them.</p>
<p>For email, most clients support UTF-8 finally and if they don&#8217;t they should be taken out back and shot. Then stabbed with a spork. If I don&#8217;t see this in the header I&#8217;m sure somewhere in the world a tiny, cute, fuzzy kitten dies:</p>
<p><code>Content-Type: text/plain; charset="UTF-8"</code></p>
<p>On the web, you should <em>always</em> specify your charset, like this:</p>
<p><code>&lt;meta http-equiv="Content-Type" content="text/html; charset=utf-8"&gt;</code>.</p>
<p>Use UTF-8, if you want to save cute kittens. I&#8217;m sure a few years ago most documents that didn&#8217;t specify a charset were Latin-1 but today I hope that&#8217;s not the case. Here&#8217;s how to change the default charset in your browser:</p>
<p><strong>(Mac) Safari</strong><br />
Preferences > Appearance > Default Encoding<br />
Western (ISO Latin 1) => Unicode (UTF-8)</p>
<p><strong>(Windows/Linux) Firefox</strong><br />
Edit > Preferences > Content > Fonts &#038; Colors > Advanced > Default Character Encoding<br />
Western (ISO-8859-1) => Unicode (UTF-8)</p>
<p>I still can&#8217;t believe how much time charsets can cause you to lose. There should be some sort of awareness campaign with charity runs and those plastic yellow bracelets. At least I had a great time at Hack Day and I learned a ton of awesome command line and <a href="http://www.carbonsilk.com/development/vim-diff/">vim tricks</a> (thanks James).</p>
<p>*Did I say a million dollars? I meant grains of sand.</p>
<img src="http://feeds.feedburner.com/~r/timtrueman/~4/pc1k8G5o1IA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://timtrueman.com/2008/09/15/character-encoding-confusion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://timtrueman.com/2008/09/15/character-encoding-confusion/</feedburner:origLink></item>
		<item>
		<title>NASC 2008: Principia takes 2nd!</title>
		<link>http://feedproxy.google.com/~r/timtrueman/~3/bnEcXhifwJI/</link>
		<comments>http://timtrueman.com/2008/07/22/nasc-2008-principia-takes-2nd/#comments</comments>
		<pubDate>Wed, 23 Jul 2008 06:38:07 +0000</pubDate>
		<dc:creator>Tim Trueman</dc:creator>
				<category><![CDATA[Articles]]></category>

		<guid isPermaLink="false">http://timtrueman.com/?p=57</guid>
		<description><![CDATA[
Ra 7 cruising on the open highway
Photo credit: Missouri University of Science &#038; Technology / Bob Phelan
After a grueling ten day endurance race similar to the Tour de France, solar cars rolled into Calgary in Alberta, Canada. The alien cars are hand built by teams of students from around the world. The stark contrast between [...]]]></description>
			<content:encoded><![CDATA[<div class="media"><a href="http://flickr.com/photos/sdelc/2665718613/sizes/l/"><img src="http://farm4.static.flickr.com/3027/2665718613_10e6d4274f.jpg" alt="Ra 7" width="475" /></a><br />
Ra 7 cruising on the open highway<br />
Photo credit: Missouri University of Science &#038; Technology / Bob Phelan</div>
<p>After a grueling ten day endurance race similar to the Tour de France, solar cars rolled into Calgary in Alberta, Canada. The alien cars are hand built by teams of students from around the world. The stark contrast between a solar car and a normal road car highlights the difference in goals. Roads cars possess the comfort and capabilities to transport several people and their cargo; Solar cars are designed with absolute and total efficiency in mind, a reminder that solar panels can only provide so much energy.</p>
<p>It might be hard to imagine just how comprehensively different a solar car is, so here are the biggest differences between a Prius for example and Ra 7, my alma mater&#8217;s solar car:</p>
<ul>
<li>Ra 7 uses the same amount of power as a toaster (30x less than a Prius)</li>
<li>Prius has four wheels, Ra 7 has three for less <a href="http://en.wikipedia.org/wiki/Low_rolling_resistance_tires">rolling resistance</a></li>
<li>Prius weighs 2,921 lbs, Ra 7 weighs 375 lbs</li>
<li>The aerodynamics are almost 90x better on Ra 7</li>
<li>Tire pressure is 3x higher on Ra 7 (the ride is a bit bumpier)</li>
<li>There&#8217;s no A/C on Ra 7</li>
<li>Prius costs $22,000+, Ra 7 costs around $200,000</li>
<li>Prius can take 5 passengers, Ra 7 only fits the driver</li>
<li>Prius can drive without service for years, Ra 7 requires a pit crew</li>
<li>Both have rear view cameras although only Ra 7 has no mirrors</li>
</ul>
<div class="media"><a href="http://flickr.com/photos/ttrueman/307809618/in/set-72157594422453517/"><img src="http://farm1.static.flickr.com/103/307809618_01268d36f1.jpg" alt="MomentUM" width="475" /></a></div>
<p>Clear, sunny skies provide the solar array with enough power to cruise at 55-60 MPH without touching the 5 kilowatt-hour battery pack made from 55 lbs of lithium polymer battery cells (similar to laptop batteries). The pure efficiency of every system in the car makes for one slick, stealth-fighter-looking machine as you can see.</p>
<p>The arrays on these solar cars are very costly, very fragile, and very powerful. The best solar cars use <a href="http://en.wikipedia.org/wiki/Multijunction_photovoltaic_cell">triple-junction gallium arsenide solar cells</a> meant for military satellites and Mars rovers. Even the most expensive of these solar arrays provide limited power for a vehicle to propel itself at speed. This necessitates a slender, aerodynamic shape that with maximum surface area facing toward the sun for the array. To illustrate the extremities these design goals are taken to, I submit this photograph taken from the front of the University of Michigan&#8217;s solar car.</p>
<div class="media"><a href="http://timtrueman.com/wp-content/uploads/pict2859.jpg"><img src="http://timtrueman.com/wp-content/uploads/pict2859-466x350.jpg" alt="Ra 7 getting prepped for the starting line in Plano, TX. Credit: Heidi Trudell" title="Ra 7" width="466" height="350" /></a></div>
<p>Not counting the canopy, the car is ten inches thick at its thickest point. Not much space for the driver and the plethora of electronics needed for driving and racing the car. Racing an experimental car requires strategy and safety, two factors contributing toward a series of sensors and computers on the car recording and transmitting temperatures, voltages, amp draws, speed, GPS coordinates, and pressures back to the team racing the car. A battery protection system (BPS) vigilantly watches for electrical problems that could harm the car or its driver. A fraction of a second is all it takes for the BPS to detect problems and take action.</p>
<p>Having raced in the 2005 North American Solar Challenge, I eagerly followed the <a href="http://www.americansolarchallenge.org/">2008 North American Solar Challenge</a>. Today concluded 2400 miles of racing between over a dozen teams from around the world. My team, the <a href="http://www.principiasolarcar.com/">Principia Solar Car Team</a>, placed second behind the <a href="http://www.engin.umich.edu/solarcar/">University of Michigan</a> and ahead of <a href="http://www.hochschule-bochum.de/solarcar.html">FH Bochum University</a> from Germany. By far, this was the best result my team has ever accomplished, and considering Principia is a liberal arts college with 500 students and no engineering department, it&#8217;s an impressive feat!</p>
<p>Since I no longer build and race solar cars, I am forced to <a href="http://timtrueman.com/2008/03/23/explaining-my-addiction/">feed my addiction</a> with something else: Formula 1. The <a href="http://www.formula1.com/news/technical/2007/780/455.html">technical details</a> satisfy my inner engineer who misses solar car racing.</p>
<img src="http://feeds.feedburner.com/~r/timtrueman/~4/bnEcXhifwJI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://timtrueman.com/2008/07/22/nasc-2008-principia-takes-2nd/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://timtrueman.com/2008/07/22/nasc-2008-principia-takes-2nd/</feedburner:origLink></item>
		<item>
		<title>Sniffing packets using BPF</title>
		<link>http://feedproxy.google.com/~r/timtrueman/~3/rahHm2zZIQc/</link>
		<comments>http://timtrueman.com/2008/06/06/sniffing-packets-using-bpf/#comments</comments>
		<pubDate>Sat, 07 Jun 2008 06:35:59 +0000</pubDate>
		<dc:creator>Tim Trueman</dc:creator>
				<category><![CDATA[Asides]]></category>

		<guid isPermaLink="false">http://timtrueman.com/?p=54</guid>
		<description><![CDATA[
I&#8217;m insatiably curious. It&#8217;s hard for me to not wonder how something works. If I see even a hint of something interesting, I will find out how it works.
One of the few pieces of software I keep running 24/7 is a Perl script called MySQL query sniffer. It watches your network interface of choice and [...]]]></description>
			<content:encoded><![CDATA[<div class="media"><a href="http://flickr.com/photos/ttrueman/3226993903/"><img src="http://farm4.static.flickr.com/3123/3226993903_3fef065ce9.jpg" alt="nerdy books" /></a></div>
<p>I&#8217;m insatiably curious. It&#8217;s hard for me to not wonder how something works. If I see even a hint of something interesting, I <em>will</em> find out how it works.</p>
<p>One of the few pieces of software I keep running 24/7 is a Perl script called <a href="http://iank.org/querysniffer/mysqlsniff-0.10.html">MySQL query sniffer</a>. It watches your network interface of choice and dumps out the query from any packet containing a MySQL query. This is a very handy trick for debugging database issues when your software says it&#8217;s execute a query but you want to know exactly what that query looks like to the database. I find it much more convenient for a few reasons:</p>
<ul>
<li>Figuring out which queries are mine on a shared dev database is challenging</li>
<li>I may not have permission to turn on query logging</li>
<li>Query logging slows down the database</li>
<li>Query logging can take up quite a lot of space</li>
<li>Sometimes the MySQL server restart required to turn on query logging isn&#8217;t an option</li>
</ul>
<p>I usually leave this script running in the background on my MacBook Pro at work all day long. Starting the script though not using sudo give the following error:</p>
<p><code>durandal:~ ttrueman$ ./mysqlsniff-0.10.pl en0<br />
(no devices found) /dev/bpf0: Permission denied</code></p>
<p>I thought I told mysqlsniff to listen on en0, what the hell is this bpf0 device? Curiosity got the better of me, so you&#8217;re going to hear from me just what this bpf0 really is.</p>
<p>The <a href="http://www.gsp.com/cgi-bin/man.cgi?section=4&#038;topic=bpf">Berkley Packet Filter</a> is an abstraction that sits between the raw network interface and application software. It allows applications to access the raw interface if they want or just see relevant packets. The real win with the Berkley Packet Filter is its speedy filtering can allow an application to just see packets relevant to itself. The benefits of this are two-fold: lower CPU overhead from less packets to handle and less packets in the device buffer, which means the buffer is less likely to fill up and drop packets. Wikipedia actually has a <a href="http://en.wikipedia.org/wiki/Berkeley_Packet_Filter">short but helpful article</a> on it actually.</p>
<p>If you&#8217;re really curious about the benefits of using the Berkley Packet Filter <a href="http://www.tcpdump.org/papers/bpf-usenix93.pdf">this relatively old but not too long research paper</a> does a good job of elaborating just how expensive it is to process packets with a CPU. Just imagine a few dozen instructions per packet times a gigabit Ethernet and try not to cringe.</p>
<p>What kind of things have you just <em>had</em> figure out how they worked?</p>
<img src="http://feeds.feedburner.com/~r/timtrueman/~4/rahHm2zZIQc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://timtrueman.com/2008/06/06/sniffing-packets-using-bpf/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://timtrueman.com/2008/06/06/sniffing-packets-using-bpf/</feedburner:origLink></item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 1.456 seconds --><!-- Cached page served by WP-Cache -->
