<?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>Big Dave's Blog</title>
	<atom:link href="http://davedupre.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://davedupre.com</link>
	<description>Some random thoughts - Go big or stay home!</description>
	<lastBuildDate>Fri, 29 Jan 2010 22:22:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Software Lifespan</title>
		<link>http://davedupre.com/2010/01/29/software-lifespan/</link>
		<comments>http://davedupre.com/2010/01/29/software-lifespan/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 22:22:49 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://davedupre.com/?p=451</guid>
		<description><![CDATA[How long should our software last? I&#8217;m sure that there are software packages out there that were built decades ago, but I&#8217;m talking about packages still being actively updated and sold. Personally, I figure if I get 5-7 years out of system before a major refactor of some part of it, then I&#8217;m doing great. [...]]]></description>
			<content:encoded><![CDATA[<p>How long should our software last? I&#8217;m sure that there are software packages out there that were built decades ago, but I&#8217;m talking about packages still being actively updated and sold. Personally, I figure if I get 5-7 years out of system before a major refactor of some part of it, then I&#8217;m doing great. Even if you continuously refactor, you will eventually get to the point where the cost of new features in legacy code become prohibitive. Shortcuts are taken or information is lost, and the result is code that is tough to maintain and update.</p>
<p>How long do you think code lasts before it&#8217;s too expensive to update?</p>
<p>The recent Mars Lander story made me think about this. Talk about a huge pat on the back to those NASA engineers. They built a system meant to last 90 days that ended up lasting almost 2000 days. Who knows? If it can survive the Martian winter, it may be able to keep going. The Devil&#8217;s Advocate in me might say that they grossly over-engineered it, but mostly I&#8217;m supremely impressed the a group of engineers built a machine that survived in a very hostile environment for 5+ years.</p>
<p>From http://xkcd.com/:</p>
<p><a href="http://davedupre.com/wp-content/uploads/2010/01/500x_mars-xkcd.jpg"><img class="alignnone size-full wp-image-452" title="500x_mars-xkcd" src="http://davedupre.com/wp-content/uploads/2010/01/500x_mars-xkcd.jpg" alt="Mars Lander Chronicles" width="500" height="674" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://davedupre.com/2010/01/29/software-lifespan/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>YAGNI and the Crystal Ball of Software Architecture</title>
		<link>http://davedupre.com/2009/11/11/yagni-and-the-crystal-ball-of-software-architecture/</link>
		<comments>http://davedupre.com/2009/11/11/yagni-and-the-crystal-ball-of-software-architecture/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 23:00:16 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[yagni]]></category>

		<guid isPermaLink="false">http://davedupre.com/?p=439</guid>
		<description><![CDATA[YAGNI and the Crystal Ball
How often have you been involved in a project, and someone starts a statement with &#8220;It would be really cool if &#8230; ?&#8221; The second I hear that, I find myself evaluating what comes next with high degree of skepticism. First of all, it usually would be &#8220;really cool,&#8221; but that [...]]]></description>
			<content:encoded><![CDATA[<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">YAGNI and the Crystal Ball</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">How often have you been involved in a project, and someone starts a statement with &#8220;It would be really cool if &#8230; ?&#8221; The second I hear that, I find myself evaluating what comes next with high degree of skepticism. First of all, it usually would be &#8220;really cool,&#8221; but that doesn&#8217;t mean we should do it. Too often these ideas solve a problem that you won&#8217;t ever have or will not have in the foreseeable future.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">YAGNI = You&#8217;re are not going to need it</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Sure, it would be pretty cool to have a full plugin architecture, but do you really need it now? Let&#8217;s gain some traction, iterate, and then we&#8217;ll determine if it&#8217;s really necessary. Doing it because it&#8217;s cool only wastes time if you figure out that the users don&#8217;t really care. YAGNI.</div>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden;">Always design for current needs, leaving yourself open for the foreseeable future. Forget about the using the crystal ball to guess what your users will want a year from now. It&#8217;s far better to get something in front of your users sooner and find out what they really want. Even if a year from now you have to do a major refactor because something in the crystal ball came true, you will have a user base now and a good reason to make the change. You did iterate to get there, didn&#8217;t you?</div>
<p>How often have you been involved in a project, and someone starts a statement with &#8220;It would be really cool if &#8230; ?&#8221; The second I hear that, I find myself evaluating what comes next with a high degree of skepticism. First of all, it usually would be &#8220;really cool,&#8221; but that doesn&#8217;t mean we should do it. Too often these ideas solve a problem that you won&#8217;t ever have or will not have in the foreseeable future.</p>
<p>YAGNI = You&#8217;re are not going to need it</p>
<p>Sure, it would be pretty cool to have a full plugin architecture, but do you really need it now? Let&#8217;s gain some traction, iterate, and then we&#8217;ll determine if it&#8217;s really necessary. Doing it because it&#8217;s cool only wastes time if you figure out that the users don&#8217;t really care. YAGNI.</p>
<p>Always design for current needs, leaving yourself open for the foreseeable future. Forget about using the crystal ball to guess what your users will want a year from now. It&#8217;s far better to get something in front of your users sooner and find out what they really want now. Even if a year from now you have to do a major refactor because something in the crystal ball came true, you will have a user base now and a good reason to make the change. You did iterate to get there, didn&#8217;t you?</p>
]]></content:encoded>
			<wfw:commentRss>http://davedupre.com/2009/11/11/yagni-and-the-crystal-ball-of-software-architecture/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Thinking Sphinx</title>
		<link>http://davedupre.com/2009/09/27/using-thinking-sphinx/</link>
		<comments>http://davedupre.com/2009/09/27/using-thinking-sphinx/#comments</comments>
		<pubDate>Sun, 27 Sep 2009 19:50:23 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://davedupre.com/?p=420</guid>
		<description><![CDATA[I recently had an instance where I wanted to add full-text search to an application. I&#8217;ve used Lucene, Solr, and a few others in past lives, but this time I wanted something just as functional but a little more lightweight. After looking around I settled on Sphinx, and so far it&#8217;s worked great. By itself, [...]]]></description>
			<content:encoded><![CDATA[<p>I recently had an instance where I wanted to add full-text search to an application. I&#8217;ve used Lucene, Solr, and a few others in past lives, but this time I wanted something just as functional but a little more lightweight. After looking around I settled on <a href="http://www.sphinxsearch.com/">Sphinx</a>, and so far it&#8217;s worked great. By itself, Sphinx is not hard to use, but since I&#8217;m in Rails, I figured someone must have a gem or plugin for this. Sure enough, I found <a href="http://freelancing-god.github.com/ts/en/">Thinking Sphinx</a>. Now, it&#8217;s <em>really </em>simple.</p>
<p>Let&#8217;s get things installed.</p>
<p>To install Sphinx on Linux (See <a href="http://www.sphinxsearch.com/docs/current.html">doc</a> for others):</p>
<ol>
<li><a href="http://www.sphinxsearch.com/downloads.html">Download</a> Sphinx 0.9.8</li>
<li>tar xzvf sphinx-0.9.8.tar.gz</li>
<li>cd sphinx</li>
<li>./configure</li>
<li>make</li>
<li>sudo make install</li>
</ol>
<p>To install Thinking Sphinx:</p>
<p>First, install the gem. There is a plugin available, but I prefer the gem.</p>
<pre>sudo gem install freelancing-god-thinking-sphinx \
  --source http://gems.github.com</pre>
<p>Add to your config/environment.rb:</p>
<pre>config.gem(
  'freelancing-god-thinking-sphinx',
  :lib         =&gt; 'thinking_sphinx',
  :version     =&gt; '1.1.12'
)</pre>
<p>Finally, to make all the rake tasks available to your app, add the following to your Rakefile:</p>
<pre>require 'thinking_sphinx/tasks'</pre>
<p>Now, we need to use it, but before we do that a brief introduction to some Sphinx terms is necessary. Sphinx will build an index based on fields and attributes. Fields are the actual content of your search index. Fields are always strings. If you want to find content by keywords then it must be a field. Attributes are part of the index, but they are only used for sorting and grouping. Attributes are ignored for keyword searches, but they are very powerful when you want to limit a search. Unlike fields, attributes support multiple types. The supported types are integers, floats, datetimes (as Unix timestamps – and thus integers anyway), booleans, and strings. Take note that string attributes are converted to ordinal integers, which is especially useful for sorting, but not much else.</p>
<p>Thinking Sphinx adds the ability to index any one of your models. To setup an index, you simply add a define_index block. For example:</p>
<pre>class Company &lt; ActiveRecord::Base
  define_index do
    indexes [:name, sym], :as =&gt; :name, :sortable =&gt; true
    indexes description
    indexes city
    indexes state
    indexes country
    indexes area_code
    indexes url
    indexes [industry1, industry2, industry3], :as =&gt; :industry
    indexes [subindustry1, subindustry2, subindustry3], :as =&gt; :subindustry

    has fortune_rank, created_at, updated_at, vendor_updated_at, employee_bucket, revenue_bucket
    has "reviewed_at IS NULL", :as =&gt; :unreviewed, :type =&gt; :boolean

    set_property :delta =&gt; WorklingDelta
  end
end</pre>
<p>Most of this should be pretty self explanatory. To index content (fields), you use &#8220;indexes&#8221; keyword. As you can see, you can have compound fields by using an array. Note that :name and :id must be symbols or Thinking Sphinx will get confused. You can also use some SQL in your indexes statement.</p>
<p>To add attributes, you use the &#8220;has&#8221; keyword. Thinking Sphinx is pretty good about determining the type of an attribute, but sometimes you need to tell it using :type.</p>
<p>I will explain the set_property :delta =&gt; WorklingDelta later.</p>
<p>To build your index, simply run:</p>
<pre>rake thinking_sphinx:index</pre>
<p>After processing each model, you will see a message like the one below. Ignore it. Everything is working fine. Really.</p>
<pre>distributed index 'company' can not be directly indexed; skipping.</pre>
<p>However, if you have made structural changes to your index (which is anything except adding new data into the database tables), you’ll need to stop Sphinx, re-index, and then re-start Sphinx – which can be done through a single rake call.</p>
<p><span style="font-family: monospace, Monaco, 'Courier New', Courier, monospace; line-height: 17px; font-size: 12px; white-space: pre;">rake thinking_sphinx:rebuild</span></p>
<p>Once you have your index setup, you can search really easily.</p>
<pre>Company.search "International Business Machines"</pre>
<p>This will perform a keyword search across all the indexes for Company. If you want to limit your search to a specific field, use :conditions.</p>
<pre>Company.search :conditions =&gt; { :description =&gt; "computers" }</pre>
<p>To use your attributes for grouping and such use :with.</p>
<pre>Company.search :conditions =&gt; { :description =&gt; "computers" },
                                :with =&gt; { :employee_bucket =&gt; 2 }</pre>
<p>With can also accept arrays and ranges. See the <a href="http://freelancing-god.github.com/ts/en/searching.html">doc</a> for more information.</p>
<p>Back to the set_property above. One issue with Sphinx vs. Solr or Lucene is that the Sphinx index is fixed. If you update your model, the change will not be reflected in the index until you rebuild the entire index. To get around this, Sphinx supports <a href="http://freelancing-god.github.com/ts/en/deltas.html">delta indexes</a>. A delta index allows you to make a change and have it show up in searches without rebuilding the entire index. Although, rebuilding an index is not a big deal with Sphinx. For example, I can rebuild the Company index defined here in under 2 minutes (1.6 million records).</p>
<p>What does set_property :delta =&gt; WorklingDelta do? First, it adds an after_save callback to your model that will use WorklingDelta to perform the delta index step. Given that Workling is in the name you&#8217;re probably guessing that I hooked this up to use Workling so delta indexing happens asynchronously.</p>
<p>Add lib/workling_delta.rb:</p>
<pre>class WorklingDelta &lt; ThinkingSphinx::Deltas::DefaultDelta
  def index(model, instance = nil)
    return true unless ThinkingSphinx.updates_enabled? &amp;&amp; ThinkingSphinx.deltas_enabled?
    return true if instance &amp;&amp; !toggled(instance)

    doc_id = instance ? instance.sphinx_document_id : nil
    WorklingDeltaWorker.asynch_index(:delta_index_name =&gt; delta_index_name(model), :core_index_name =&gt; core_index_name(model), :document_id =&gt; doc_id)

    return true
  end
end</pre>
<p>Add app/workers/workling_delta_worker.rb:</p>
<pre>class WorklingDeltaWorker &lt; Workling::Base
  def index(options = {})
    logger.info("WorklingDeltaWorker#index: #{options.inspect}")
    ThinkingSphinx::Deltas::DeltaJob.new(options[:delta_index_name]).perform
    if options[:document_id]
      ThinkingSphinx::Deltas::FlagAsDeletedJob.new(options[:core_index_name], options[:document_id]).perform
    end

    return true
  end
end</pre>
<p>Now, whenever a Company object is created, updated, or destroyed, the WorklingDeltaWorker will be called to update the delta index.</p>
<p>If you have a need to perform powerful searches over hundreds of thousands (or even millions) of records give Sphinx and Thinking Sphinx a try. There are some minor feature omissions, but I think the trade-offs for most applications more than make up for them. BTW, scale is not one of the omissions. The largest Sphinx installation, <a href="http://boardreader.com">boardreader.com</a>, uses Sphinx to index over 2 billion records. <a href="http://craigslist.org">Craigslist.org</a> is probably the biggest with 50 million queries per day.</p>
]]></content:encoded>
			<wfw:commentRss>http://davedupre.com/2009/09/27/using-thinking-sphinx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apollo 11 &#8211; Could we do it again?</title>
		<link>http://davedupre.com/2009/07/15/apollo-11-could-we-do-it-again/</link>
		<comments>http://davedupre.com/2009/07/15/apollo-11-could-we-do-it-again/#comments</comments>
		<pubDate>Thu, 16 Jul 2009 02:03:44 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[apollo]]></category>
		<category><![CDATA[space]]></category>

		<guid isPermaLink="false">http://davedupre.com/?p=393</guid>
		<description><![CDATA[July 16, 2009 marks the 40 year anniversary of the Apollo 11 launch. Four days later, July 20, the Eagle landed on surface of the moon. It all started with the famous speech by President Kennedy. It&#8217;s still one of my favorite presidential quotes.
&#8220;We choose to go to the moon in this decade and do [...]]]></description>
			<content:encoded><![CDATA[<p>July 16, 2009 marks the 40 year anniversary of the <a href="http://en.wikipedia.org/wiki/Apollo_11">Apollo 11</a> launch. Four days later, July 20, the Eagle landed on surface of the moon. It all started with the famous <a href="http://en.wikipedia.org/wiki/Apollo_program#Background">speech</a> by President Kennedy. It&#8217;s still one of my favorite presidential quotes.</p>
<blockquote><p>&#8220;We choose to go to the moon in this decade and do the other things, not because they are easy, but because they are hard, because that goal will serve to organize and measure the best of our energies and skills, because that challenge is one that we are willing to accept, one we are unwilling to postpone, and one which we intend to win, and the others, too.&#8221;</p></blockquote>
<p>If you are at all interested, be sure to check out <a href="http://wechoosethemoon.org/">We Choose the Moon</a>. This site will be doing a real-time replay of the entire mission. They will include all the transmissions as well as a lot of great information. I know I will be checking the site out often. There also are a few Twitter feeds to follow:<a href="http://twitter.com/AP11_SPACECRAFT"> @AP11_SPACECRAFT</a>, <a href="http://twitter.com/AP11_EAGLE">@AP11_EAGLE</a>, and <a href="http://twitter.com/AP11_CAPCOM">@AP11_CAPCOM</a>. [update: sorry, I needed to fix the Twitter links]</p>
<p>I was too young to really remember the early landings when they happened, but throughout my life, I read and watched everything I could on Apollo, Gemini, and Mercury programs. I can&#8217;t get enough of it. It&#8217;s one of the things that got me into science and computers.</p>
<p>Now, 40 years after the launch and a lot of software projects under my belt, I often ponder whether we could land a man on the moon in same amount of time. Kennedy made his speech on May 25, 1961, and Neil Armstrong stepped foot on the moon July 20, 1969 &#8212; a little over 8 years. Never mind the political climate and government project differences between now and then, I&#8217;m thinking about whether having all the computing power available today would have helped or hurt. Think about it. Apollo worked because thousands of very smart people did the work computers would do today (ironically, today it&#8217;s in an effort to use fewer people). The problem is that all that smarts would require mountains of code and would be nearly untestable for all possible cases. As an example, Boeing&#8217;s 777 has 2.5 million lines of code to deal with one aircraft. Add in the 3rd party code, and you&#8217;re talking about 4 million lines of code. That software project took 4.5 years to complete. The problem is that as complicated as the the 777 is, it&#8217;s nothing compared to a moon mission. The number of contingencies to handle in software would be crazy. So, you can try to build a brain to handle everything, or you can park a very smart brain in front of a computer and let them make a decision. Which is going to be more flexible?</p>
<p>Now, don&#8217;t get me wrong. A project like this would be a dream, but I also understand that if you wanted to do it in 8 years, you would not be able to automate everything. Too much code, not enough time to test it. As another example, the <a href="http://en.wikipedia.org/wiki/F-22_Raptor">F22 Raptor</a> project started in 1981, and the plane did not go into service until 2005. 24 years &#8212; ouch. I still would LOVE to see it happen though. Maybe this time Mars will be the goal.</p>
<p>Let me leave with one of my favorite calculations done for Apollo. Obviously, to step foot on the moon, you have to get there first. It&#8217;s close to 250,000 miles from Earth, but thanks to space you don&#8217;t have to run your engine the whole way. All you need to do is complete a forward pass from one moving object to another, but be sure to take into account the gravitational affects of at least 3 celestial objects. Newton would be proud.</p>
<p><img class="alignnone size-full wp-image-403" title="Apollo" src="http://davedupre.com/wp-content/uploads/2009/07/apollo1.png" alt="Apollo" width="481" height="84" /></p>
<p>You&#8217;re in orbit around the Earth, start your engine and get yourself to what speed? What direction? Once you turn off the engine, you will coast for about 3 days, and if everything goes right you will be in lunar orbit. Too fast or wrong direction, and you miss and go off into space. Too slow and you end up a pancake on the moon. With not much more than a slide rule (anyone even know how to use one of these things?), the Apollo scientists calculated lunar orbit to the exact <em>second</em>. Not bad. I know it impresses the hell of me every time I think about it.</p>
<p>Thoughts? BTW, anyone know the equations?</p>
]]></content:encoded>
			<wfw:commentRss>http://davedupre.com/2009/07/15/apollo-11-could-we-do-it-again/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Government honours veterans of Bletchley Park at last</title>
		<link>http://davedupre.com/2009/07/11/government-honours-veterans-of-bletchley-park-at-last/</link>
		<comments>http://davedupre.com/2009/07/11/government-honours-veterans-of-bletchley-park-at-last/#comments</comments>
		<pubDate>Sat, 11 Jul 2009 12:13:09 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://davedupre.com/?p=391</guid>
		<description><![CDATA[Government honours veterans of Bletchley Park at last &#8211; V3.co.uk &#8211; formerly vnunet.com
The surviving staff from Bletchley Park will finally(!!) be recognized, nearly 70 years later. Their work was thought to have shortened the war by 2 years and saved millions of lives, but until the 1970&#8217;s they weren&#8217;t even allowed to reveal what they [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.v3.co.uk/v3/news/2245801/government-honours-veterans">Government honours veterans of Bletchley Park at last &#8211; V3.co.uk &#8211; formerly vnunet.com</a></p>
<p>The surviving staff from Bletchley Park will <em>finally(!!)</em> be recognized, nearly 70 years later. Their work was thought to have shortened the war by 2 years and saved millions of lives, but until the 1970&#8217;s they weren&#8217;t even allowed to reveal what they did.</p>
<blockquote><p>“After many years of having to keep their critical wartime work top secret, it is tremendous that this contribution has finally achieved recognition.”</p></blockquote>
<p>All I can say is that it is about time the people that helped develop computing get some recognition.</p>
]]></content:encoded>
			<wfw:commentRss>http://davedupre.com/2009/07/11/government-honours-veterans-of-bletchley-park-at-last/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Checkout Hoptoad by thoughtbot, inc.</title>
		<link>http://davedupre.com/2009/06/15/checkout-hoptoad-by-thoughtbot-inc/</link>
		<comments>http://davedupre.com/2009/06/15/checkout-hoptoad-by-thoughtbot-inc/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 11:00:12 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[errors]]></category>
		<category><![CDATA[hoptoad]]></category>
		<category><![CDATA[workling]]></category>

		<guid isPermaLink="false">http://davedupre.com/?p=370</guid>
		<description><![CDATA[ I&#8217;ve been using Hoptoad for about two months now, and I&#8217;m sold. Hoptoad is a product by thoughbot, inc. Previously, I&#8217;ve always used the excellent exception_notification plugin. The exception_notification plugin is easy to use, and it works great. However, there are a couple of problems with it.

You could flood your inbox if there is [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://hoptoadapp.com/welcome"><img class="alignnone" title="Hoptoad Logo" src="http://hoptoadapp.com/images/logo.png" alt="" width="252" height="94" /></a> I&#8217;ve been using <a href="http://hoptoadapp.com/welcome">Hoptoad</a> for about two months now, and I&#8217;m sold. Hoptoad is a product by <a href="http://www.thoughtbot.com/">thoughbot, inc</a>. Previously, I&#8217;ve always used the excellent <a href="http://github.com/rails/exception_notification/tree/master">exception_notification</a> plugin. The exception_notification plugin is easy to use, and it works great. However, there are a couple of problems with it.</p>
<ol>
<li>You could flood your inbox if there is a bad problem on a popular page.</li>
<li>It&#8217;s difficult to collect all the emails and track errors.</li>
</ol>
<p>Enter Hoptoad. Hoptoad solves both problems, and it is super simple to use and setup. It&#8217;s free for one project and two users. If that isn&#8217;t enough for you, the premium services are very reasonable.</p>
<p>How does it solve both problems? First, Hoptoad will still send you an email when there is an error. However, it won&#8217;t flood your inbox if there are hundreds of the same email. Second, Hoptoad provides a simple web-based system that groups your errors by exception class. That makes it easier to track down problems. Finally, you can mark errors resolved so you don&#8217;t have to wade through noise to solve the real problems.</p>
<p>Hoptoad installation:</p>
<p><strong>REMOVE EXCEPTION_NOTIFIER</strong></p>
<ol>
<li>In your ApplicationController, REMOVE this line:include ExceptionNotifiable</li>
<li>In your config/environment* files, remove all references to ExceptionNotifier.</li>
<li>Remove the vendor/plugins/exception_notifier directory.</li>
</ol>
<p><strong>INSTALL HOPTOAD_NOTIFIER</strong></p>
<p>From your project&#8217;s RAILS_ROOT, run:</p>
<p>script/plugin install git://github.com/thoughtbot/hoptoad_notifier.git</p>
<p><strong>CONFIGURATION</strong></p>
<p>You should have something like this in config/initializers/hoptoad.rb.</p>
<pre>HoptoadNotifier.configure do |config|
  config.api_key = '1234567890abcdef'  # You get your key when you sign up
end</pre>
<p>(Please note that this configuration should be in a global configuration, and is <strong>not</strong> enrivonment-specific. Hoptoad is smart enough to know what errors are caused by what environments, so your staging errors don&#8217;t get mixed in with your production errors.)</p>
<p>Once you do the above, any Exception not caught by your controllers will be sent to Hoptoad where where they can be aggregated, filtered, sorted, analyzed, massaged, and searched.</p>
<p>Now, if you have read anything I&#8217;ve done before, you know I do a lot of asynchronous processing with <a href="http://davedupre.com/2008/03/25/ruby-background-tasks-with-starling/">Workling</a>. By default, Hoptoad will not log errors from anything outside of your controllers. Fear not. Hoptoad provides a webservice API to send errors. Here is an example.</p>
<p>In workling/lib/workling/base.rb:</p>
<pre>    # takes care of suppressing remote errors but raising Workling::WorklingNotFoundError
    # where appropriate. swallow workling exceptions so that everything behaves like remote code.
    # otherwise StarlingRunner and SpawnRunner would behave too differently to NotRemoteRunner.
    def dispatch_to_worker_method(method, options)
      begin
        self.send(method, options)
      rescue Exception =&gt; e
        raise e if e.kind_of? Workling::WorklingError
        logger.error "Workling Error: runner could not invoke #{ self.class }:#{ method } with #{ options.inspect }. error was: #{ e.inspect }\n #{ e.backtrace.join("\n") }"
        # DND: Let HopToad know of the issue
        params = options || {}
        HoptoadNotifier.notify(
          :error_class =&gt; "Workling Error - #{e.class.name}",
          :error_message =&gt; "Workling Error(#{e.class.name}): #{e.message}",
          :request =&gt; { :params =&gt; params.merge(:worker_class =&gt; self.class.name, :worker_method =&gt; method) })
        # DND: end of change
      end
    end</pre>
<p>Now, any error not caught by your workers will be sent to Hoptoad for processing. You can use a similar method from Rake tasks or any scripts that run outside of controllers. Remember, Hoptoad will collect errors by :error_class, so you can use different classes to separate errors into bins based on where they came from.</p>
<p>Give Hoptoad a try. You will not be disappointed.</p>
]]></content:encoded>
			<wfw:commentRss>http://davedupre.com/2009/06/15/checkout-hoptoad-by-thoughtbot-inc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bargaining for Advantage</title>
		<link>http://davedupre.com/2009/06/14/bargaining-for-advantage/</link>
		<comments>http://davedupre.com/2009/06/14/bargaining-for-advantage/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 13:33:39 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[bargain]]></category>
		<category><![CDATA[negotiation]]></category>

		<guid isPermaLink="false">http://davedupre.com/?p=364</guid>
		<description><![CDATA[It&#8217;s not a programming book, but I recommend &#8220;Bargaining for Advantage&#8221; by G. Richard Shell. You may not be making multi-million or multi-billion dollar deals (yet!), but the techniques described here work just as well when negotiating an architectural detail or project. Plus, it&#8217;s pretty interesting to read about how some of the big players [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.amazon.com/gp/product/B000QBYEX2?ie=UTF8&#038;tag=bidasbl04-20&#038;linkCode=as2&#038;camp=1789&#038;creative=9325&#038;creativeASIN=B000QBYEX2"><img class="alignleft size-full wp-image-365" title="Bargaining for Advantage" src="http://davedupre.com/wp-content/uploads/2009/06/bargaining_for_advantage.jpg" alt="Bargaining for Advantage" width="240" height="240" /></a>It&#8217;s not a programming book, but I recommend &#8220;Bargaining for Advantage&#8221; by G. Richard Shell. You may not be making multi-million or multi-billion dollar deals (yet!), but the techniques described here work just as well when negotiating an architectural detail or project. Plus, it&#8217;s pretty interesting to read about how some of the big players made and lost their deals.</p>
<p>Check it out. You may find that you have a different strategy when you negotiate your next deal. Remember, deals are made all the time, and it&#8217;s not always a big business deal.</p>
<p>Good stuff.</p>
]]></content:encoded>
			<wfw:commentRss>http://davedupre.com/2009/06/14/bargaining-for-advantage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>June 6, 2009 &#8211; 65th Anniversary of The Great Crusade</title>
		<link>http://davedupre.com/2009/06/06/june-6-2009-65th-anniversary-of-the-great-crusade/</link>
		<comments>http://davedupre.com/2009/06/06/june-6-2009-65th-anniversary-of-the-great-crusade/#comments</comments>
		<pubDate>Sat, 06 Jun 2009 04:10:55 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[normandy]]></category>
		<category><![CDATA[ww2]]></category>

		<guid isPermaLink="false">http://davedupre.com/?p=329</guid>
		<description><![CDATA[OK, I know I&#8217;m a little off my usual topics again, but today is an anniversary.
In the early morning hours on a Tuesday morning 65 years ago today, D-Day paratroopers began jumping into the French countryside. At first light, six divisions of soldiers from the United States, Britain, and Canada began landing on the beaches [...]]]></description>
			<content:encoded><![CDATA[<p>OK, I know I&#8217;m a little off my usual topics again, but today is an anniversary.</p>
<p>In the early morning hours on a Tuesday morning 65 years ago today, D-Day paratroopers began jumping into the French countryside. At first light, six divisions of soldiers from the United States, Britain, and Canada began landing on the beaches of <a href="http://en.wikipedia.org/wiki/Normandy_Landings">Normandy</a>.  The beaches all had code names Omaha, Utah, Gold, Juno, and Sword. The United States landed on Omaha and Utah. The British took care of Gold and Sword, and the Canadiens landed on Juno.</p>
<p>Just prior to the invasion, General Eisenhower read what is now an historic passage:</p>
<blockquote><p>&#8220;You are about to embark upon the great crusade, toward which we have striven these many months.&#8221;</p></blockquote>
<p>Obviously, you can read about the Normandy invasions everywhere, so I&#8217;m not going to describe all the events again here. I will, however, talk a little bit about my experiences touring the area as well as introduce you to <a href="http://en.wikipedia.org/wiki/Charles_Durning">Charles Durning</a>.</p>
<p>Who is Charles Durning? You probably know him by his movies. His film career began in 1965. Some credits include &#8220;The Sting&#8221;, &#8220;Dog Day Afternnon&#8221;, &#8220;North Dallas Forty&#8221;, &#8220;The Best Little Whorehouse in Texas&#8221;, &#8220;O Brother, Where Art Thou?&#8221;, and dozens of others. What you may not know about Charles Durning is that he survived two most horrific periods in WWII. You wouldn&#8217;t know because like many veterans of that era, he rarely spoke about it until years later when asked.</p>
<p>Durning was awarded the Silver Star and three Purple Hearts. He was among the <a href="http://www.theatlantic.com/doc/196011/omaha">first wave of troops that landed on Omaha Beach</a>. Suffice to say, the nickname of &#8220;Bloody Omaha&#8221; is descriptive because of the more than 2,200 casualties suffered on 6 JUN 1944.</p>
<p>By 17 JUN 1944, Durning was back in England recovering from  shrapnel wounds in the left and right thighs, the right hand, the frontal region of the head, and the anterior left chest wall. He was pronounced fit again on 6 DEC 1944, just in time for the <a href="http://en.wikipedia.org/wiki/Battle_of_the_Bulge">Battle of the Bulge</a> and his second historical experience.</p>
<p>In 2008, Durning received France&#8217;s National Order of the Legion of Honor (each year France honors 100 veterans that served with distinction in France). At the ceremony, he described his experiences during the Battle of the Bulge. Early in the battle, Durning was stabbed 8(!) times during a hand-to-hand fight with a young German soldier. The fight did not end until Durning was able to reach for a rock and bludgeon the German soldier to death. He said when it was over he wept with the dead German soldier in his arms.</p>
<p>Soon after, Durning was taken prisoner and would have been shot on the spot were if not for an english speaking German officer that accepted his surrender and had his wounds tended to (the 8 stab wounds &#8211; one to the chest). As a prisoner now, Durning was led to a small town called Malmedy. It is here that the infamous <a href="http://en.wikipedia.org/wiki/Malmedy_massacre">Malmedy massacre</a> took place. At Malmedy, some 150 prisoners were rounded up and dozens were executed. Durning and two others of his group managed to escape the carnage. There were many incidents in an around Malmedy, resulting in 72 bodies being discovered.</p>
<p>Durning was on the TV show &#8220;Rescue Me&#8221; this year. It was here that I was reminded of his service and felt the urge to talk about it. I&#8217;m thankful for men like Charles Durning and thousands of other&#8217;s like him. Like most veterans, I agree that the true heros are the ones that didn&#8217;t make it back.</p>
<p>I was lucky enough to pay a short visit to Normandy many years ago. The visit was far too short, but I was able to stand on Omaha and Utah beaches and see what men like Durning faced. Think about 2-3 football fields of open beach to cross with an amphitheater of cliffs all around. Unlike what you see in the movies, it&#8217;s not the machine guns right in front of you that are the most dangerous. It&#8217;s those to the side. This is one of the reasons some units saw casualty rates of over 50% in the first few minutes of the landings. Powerful stuff.</p>
<p>In this time of <a href="http://davedupre.com/2009/02/20/navy-says-combat-robots-multiplying-fast-need-battlefield-ethics-pronto/">robots</a> and smart bombs, we will thankfully never again see mass invasions and infantry action. I only hope it isn&#8217;t replaced with something far worse. So today, while you are enjoying a wonderful Saturday, send a &#8220;Thank You&#8221; to those men and women that started the Great Crusade to clear Europe of Nazi tyranny 65 years ago today.</p>
]]></content:encoded>
			<wfw:commentRss>http://davedupre.com/2009/06/06/june-6-2009-65th-anniversary-of-the-great-crusade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Platform Engineers or Rock Star Engineers</title>
		<link>http://davedupre.com/2009/06/03/platform-engineers-or-rock-star-engineers/</link>
		<comments>http://davedupre.com/2009/06/03/platform-engineers-or-rock-star-engineers/#comments</comments>
		<pubDate>Thu, 04 Jun 2009 03:14:07 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[engineer]]></category>

		<guid isPermaLink="false">http://davedupre.com/?p=340</guid>
		<description><![CDATA[I&#8217;ve hired a lot of engineers over the years, and one of the first things I&#8217;m always asked to add to the job description is &#8220;must have experience in XXXX platform.&#8221; I sometimes put it on there to make people happy, but I rarely will disregard an engineer because they do not have a lot [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve hired a lot of engineers over the years, and one of the first things I&#8217;m always asked to add to the job description is &#8220;must have experience in XXXX platform.&#8221; I sometimes put it on there to make people happy, but I rarely will disregard an engineer because they do not have a lot of experience in a particular platform. Give me a Rock Star, or even a very good/great engineer, and I guarantee you that person will run circles around the average engineer with platform experience. Now, if you can find the Rock Star <em>with </em>platform experience &#8212; BONUS! The only time I deviate from this plan is if the project calls for someone to &#8220;just get it done and fast.&#8221; Then I need to pay more attention to platform experience because I don&#8217;t have time to wait for the new platform to be learned.</p>
<p>I&#8217;ve lost track of how many times this simple fact has been proven to me. The qualities of a great engineer carry over to any platform, and a great engineer will pick up a new platform quickly &#8212; mostly because they love learning new things. If you&#8217;re starting out in software development, concentrate on being a great engineer. That&#8217;s far more valuable than an engineer that knows a platform.</p>
<p>What makes a great engineer? To me, it&#8217;s pretty simple. You have a passion and ability to craft outstanding, maintainable, and testable code. You know your algorithms, design patterns, and data structures like the back of your hand. Finally, you posses the other skills necessary to round things out &#8212; communication, time management, risk assessment, strategic and detailed design, and quick decision making (and sticking to those decisions). You can write a loop in Java? I don&#8217;t really care. You understand dependency injection or how an outer join works. Now we&#8217;re talking.</p>
<p>What do you think?</p>
]]></content:encoded>
			<wfw:commentRss>http://davedupre.com/2009/06/03/platform-engineers-or-rock-star-engineers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bletchley Park Snubbed by British Government</title>
		<link>http://davedupre.com/2009/05/31/bletchley-park-snubbed-by-british-government/</link>
		<comments>http://davedupre.com/2009/05/31/bletchley-park-snubbed-by-british-government/#comments</comments>
		<pubDate>Mon, 01 Jun 2009 01:54:26 +0000</pubDate>
		<dc:creator>Dave</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[bletchley park]]></category>
		<category><![CDATA[computing]]></category>
		<category><![CDATA[enigma]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[ww2]]></category>

		<guid isPermaLink="false">http://davedupre.com/?p=328</guid>
		<description><![CDATA[
UK Snubs Support for Home of WWII Enigma
Here we go again. Bletchley Park continues to get little love. Here we have what is basically one on of the birthplaces of modern computing. On top of that, the group of people that worked here, along with their US partners in Building 26, did more to shorten [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.boingboing.net/2009/05/22/bletchley-park-snubb.html"></a></p>
<p><a href="http://www.eweekeurope.co.uk/news/uk-snubs-support-for-home-of-wwii-enigma--939">UK Snubs Support for Home of WWII Enigma</a></p>
<p>Here we go again. <a href="http://davedupre.com/2008/11/06/bletchley-park-update/">Bletchley Park</a> continues to get <a href="http://davedupre.com/2008/07/24/neglect-of-bletchley-condemned/">little love</a>. Here we have what is basically one on of the birthplaces of modern computing. On top of that, the group of people that worked here, along with their US partners in <a href="http://davedupre.com/2009/02/05/the-secret-in-building-26/">Building 26</a>, did more to shorten WWII and save countless lives than just about any other group. Makes your life as a military leader a whole lot easier when you know what your counterpart is up to.</p>
<p>It seems now that the UK will not give Bletchley Park the same status as Imperial War Museum.</p>
<blockquote><p>&#8220;We have no plans at present to associate it with the Imperial War Museum,&#8221; Lord Davies said. &#8220;The House is all too well aware of the significance of designating any area in association with a museum of that rank, but I want to give an assurance that Bletchley Park will continue to develop under the resources made available to it.&#8221;</p></blockquote>
<p>OK, I know I&#8217;m a little biased because I&#8217;m a history buff, but I&#8217;m also aware of the history of my profession. Without these two groups of scientists, we might not have the same level of computing we have today. This is where <a href="http://en.wikipedia.org/wiki/Alan_Turing">Alan Turing</a> (of <a href="http://en.wikipedia.org/wiki/Turing_machine">Turing Machine</a> fame) cut his chops.</p>
<p>Let&#8217;s not forget about these people and what they did. I know it was super-secret, but it was almost 70 years ago now. </p>
<p> </p>
<p><a href="http://www.boingboing.net/2009/05/22/bletchley-park-snubb.html"> </a></p>
]]></content:encoded>
			<wfw:commentRss>http://davedupre.com/2009/05/31/bletchley-park-snubbed-by-british-government/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
