<?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>Blog &#124; BenHollis.net</title>
	<atom:link href="http://benhollis.net/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://benhollis.net/blog</link>
	<description>News about BenHollis.net and articles about Ben&#039;s interests</description>
	<lastBuildDate>Fri, 04 Jun 2010 05:39:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Water Heater Cost / Payback Calculator</title>
		<link>http://benhollis.net/blog/2010/06/03/water-heater-cost-payback-calculator-2/</link>
		<comments>http://benhollis.net/blog/2010/06/03/water-heater-cost-payback-calculator-2/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 05:35:53 +0000</pubDate>
		<dc:creator>Ben Hollis</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[cost calculator]]></category>
		<category><![CDATA[payback calculator]]></category>
		<category><![CDATA[water heaters]]></category>

		<guid isPermaLink="false">http://benhollis.net/blog/?p=503</guid>
		<description><![CDATA[For the few months my wife and I have been trying to decide on a new water heater. After moving into our new place, we realized that the existing electric tank water heater wasn&#8217;t working right since the temperature of our showers steadily got colder. It was suggested that one of the heating elements was [...]]]></description>
			<content:encoded><![CDATA[<p>For the few months my wife and I have been trying to <a href="http://benhollis.net/experiments/water-heaters/">decide on a new water heater</a>. After moving into our new place, we realized that the existing electric tank water heater wasn&#8217;t working right since the temperature of our showers steadily got colder. It was suggested that one of the heating elements was busted, but I wasn&#8217;t interested in getting it repaired since the heater was way older than the expected lifetime of an electric heater. However, there are a lot of choices for a replacement. Another electric tank water heater would be cheap, a gas tank heater would be cheaper to run but require running a gas line, and there are tankless water heaters which are much more expensive but are cheaper to operate and don&#8217;t have to keep a whole tank of water heated up all the time for the few times you use it.</p>
<p>There are a number of ways out there for you to figure out how the cost of installation and purchase balance out with the cost of operation over time. You can always make your own Excel spreadsheet to figure it out, or you can use calculators like <a href="http://www1.eere.energy.gov/femp/technologies/eep_waterheaters_calc.html">this one from energy.gov</a>. However, all the web payback calculators I&#8217;ve seen have had clunky 90s interfaces, don&#8217;t take into account all the variables, and most importantly, don&#8217;t let you compare multiple types of heaters at the same time. So, like any good software developer, I built my own.</p>
<p class="blogimage"><a href="http://benhollis.net/experiments/water-heaters/"><img src="http://benhollis.net/blog/wp-content/uploads/2010/06/water-heaters.png" alt="" title="" width="600" height="457" class="alignnone size-full wp-image-511" /></a></p>
<p>My <a href="http://benhollis.net/experiments/water-heaters/">water heater calculator</a> is based on the same calculations used on the Federal Energy Management Program site, with the addition of inputs for your hot and cold water temperature. It&#8217;s also more flexible about how you enter your water usage. But the best part is that you can enter as many different water heaters as you want and they&#8217;ll all be graphed against each other, taking into account the lifetime of the unit. Get multiple bids, try different models, compare gas and electric. By displaying them as a graph of total cost over time, you can see where each heater breaks even with each other, and how much savings you&#8217;re getting by the end. </p>
<p>As a bonus, <a href="http://benhollis.net/experiments/water-heaters/">the calculator</a> will also calculate how much you may be able to claim as part of the <a href="http://www.energystar.gov/index.cfm?c=tax_credits.tx_index">Energy Star Federal Tax Credit program</a>. It&#8217;s smart enough to know the rules about the credits (gas heaters &gte; 0.82 efficiency only, 30% of total cost up to $1500), and you can choose not to use the rebate if you&#8217;ve already used it up this year or don&#8217;t plan on applying it to your heater.</p>
<p>You can get started with the calculator by filling in values for your water usage and resource costs, or accept the defaults. Then add as many heaters as you like, entering in the cost for purchase and installation, the Energy Factor (which should be in the documentation for the heater), and the estimated lifetime of the heater. The more accurate you can make the numbers, the better your cost projection will be. Then check out the graph to see what your total expenditure will be after every year. If you&#8217;re comparing a new heater with the option of keeping your existing heater, just set the Cost to $0 and reduce the lifetime to how long you expect your existing heater to last.</p>
<p>Hopefully this little tool will be helpful to anyone else looking to replace their water heater. I filled it out for a combination of several electric, gas tanked, gas tankless, and heat-pump based water heaters, and it gave me a much better picture of what was worth it and what wasn&#8217;t. In the end, even though the graphs told me that the increased efficiency of a gas tankless heater wouldn&#8217;t ever pay back the cost difference versus an electric tank water heater, we ended up going with one. The promise of infinite hot water (long showers after a hike!) and no chance of burst water heaters outweighed the additional cost. But at least we were well-informed!</p>
]]></content:encoded>
			<wfw:commentRss>http://benhollis.net/blog/2010/06/03/water-heater-cost-payback-calculator-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PNGGauntlet 2.1 with Windows 7 integration</title>
		<link>http://benhollis.net/blog/2010/04/11/pnggauntlet-2-1-with-windows-7-integration/</link>
		<comments>http://benhollis.net/blog/2010/04/11/pnggauntlet-2-1-with-windows-7-integration/#comments</comments>
		<pubDate>Sun, 11 Apr 2010 19:46:48 +0000</pubDate>
		<dc:creator>Ben Hollis</dc:creator>
				<category><![CDATA[PNGGauntlet]]></category>
		<category><![CDATA[compression]]></category>
		<category><![CDATA[image]]></category>
		<category><![CDATA[png]]></category>

		<guid isPermaLink="false">http://benhollis.net/blog/?p=495</guid>
		<description><![CDATA[Last week I pushed a new update to PNGGauntlet, version 2.1. It&#8217;s been almost two years since the last PNGGauntlet update, and 2.1 doesn&#8217;t bring a lot of new stuff &#8211; it&#8217;s mainly bug fixes and optimizations. But there are some cool new bits. My favorite is that PNGGauntlet now integrates with the Windows 7 [...]]]></description>
			<content:encoded><![CDATA[<p>Last week I pushed a new update to <a href="http://pnggauntlet.com">PNGGauntlet</a>, version 2.1. It&#8217;s been almost two years since the last PNGGauntlet update, and 2.1 doesn&#8217;t bring a lot of new stuff &#8211; it&#8217;s mainly bug fixes and optimizations. But there are some cool new bits. My favorite is that PNGGauntlet now integrates with the Windows 7 taskbar to show compression progress on its taskbar icon.</p>
<p class="blogimage"><a href="http://pnggauntlet.com"><img src="http://benhollis.net/software/images/screenshot/pnggauntlet-taskbar.jpg" alt="" title="PNGGauntlet in the Windows 7 Taskbar" width="84" height="80" /></a></p>
<p>It isn&#8217;t a huge feature, but it lets you keep an eye on a big compression job while you&#8217;re doing other things. PNGGauntlet is slightly prettier in other areas, too, especially the list of files, which is also now sortable.</p>
<p>The other neat thing is that PNGGauntlet now registers itself as a handler for compatible image files on install now. This means that you can right-click an image, go to &#8220;Open With&#8230;&#8221; and select PNGGauntlet, and it&#8217;ll open right up with your file ready to go.</p>
<p class="blogimage"><a href="http://pnggauntlet.com"><img src="http://benhollis.net/blog/wp-content/uploads/2010/04/pnggauntlet-open-with.png" alt="" title="PNGGauntlet &quot;Open With&quot;" width="527" height="168" /></a></p>
<p>Beyond that, a couple bugs have been fixed where you could get PNGGauntlet into a weird state or hang. Check out <a href="http://pnggauntlet.com/changelog/">the full changelog</a> for all the features and fixes.</p>
]]></content:encoded>
			<wfw:commentRss>http://benhollis.net/blog/2010/04/11/pnggauntlet-2-1-with-windows-7-integration/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Glowback &#8211; Arduino-powered glowing ceramic creature</title>
		<link>http://benhollis.net/blog/2010/02/04/glowback-arduino-powered-glowing-ceramic-creature/</link>
		<comments>http://benhollis.net/blog/2010/02/04/glowback-arduino-powered-glowing-ceramic-creature/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 07:37:02 +0000</pubDate>
		<dc:creator>Ben Hollis</dc:creator>
				<category><![CDATA[Random]]></category>
		<category><![CDATA[arduino]]></category>
		<category><![CDATA[art]]></category>
		<category><![CDATA[ceramics]]></category>
		<category><![CDATA[creatures]]></category>
		<category><![CDATA[electronics]]></category>
		<category><![CDATA[eva funderburgh]]></category>
		<category><![CDATA[leds]]></category>

		<guid isPermaLink="false">http://benhollis.net/blog/?p=439</guid>
		<description><![CDATA[While I spend most of my time in front of a keyboard and monitor, my wife Eva Funderburgh spends her time sculpting amazing, imaginary ceramic creatures. Her beasts are assembled out of different clays and wood-fired. About a year ago she enlisted my help in building a new type of beast with egg-shaped domes on [...]]]></description>
			<content:encoded><![CDATA[<p>While I spend most of my time in front of a keyboard and monitor, my wife <a href="http://evafunderburgh.com/">Eva Funderburgh</a> spends her time sculpting amazing, imaginary ceramic creatures. Her beasts are assembled out of different clays and <a href="http://www.flickr.com/photos/genkigecko/sets/72157600474448683/">wood-fired</a>. About a year ago she enlisted my help in building a new type of beast with egg-shaped domes on its back. The idea was to have the domes glow and pulse with an organic, bioluminescent light. (Note: This was way before we&#8217;d seen Avatar!) Eva had already built and fired the beast a few months earlier, using thin shells of translucent Southern Ice porcelain for the domes. She left a few of the domes unattached so we could get lights inside after the firing.</p>
<p class="blogimage"><a href="http://www.flickr.com/photos/genkigecko/3289094697/" title="The start of the Glowback by Eva Funderburgh, on Flickr"><img src="http://farm4.static.flickr.com/3510/3289094697_aff0938390.jpg" width="500" height="375" alt="The start of the Glowback" /></a></p>
<p><span id="more-439"></span></p>
<p>We decided to use the open-source <a href="http://www.arduino.cc/">Arduino</a> microcontroller platform to drive LEDs inside the domes &#8211; that way we could have a bunch of independently-controlled lights and set their behavior with software. We chose the <a href="http://www.adafruit.com/index.php?main_page=product_info&#038;cPath=19&#038;products_id=72&#038;zenid=a5c5d30926597b735087248132f9c378">Boarduino</a> Arduino clone from <a href="http://www.adafruit.com/">Adafruit Industries</a> because it&#8217;s cheap, easy to assemble, and much smaller than the full-size Arduinos. Soldering it together only took an hour or so.</p>
<p class="blogimage"><a href="http://www.flickr.com/photos/dalangalma/3116793147/" title="Completed Boarduino by dalangalma, on Flickr"><img src="http://farm4.static.flickr.com/3041/3116793147_80ca2e8f84.jpg" width="500" height="375" alt="Completed Boarduino" /></a></p>
<p>After that we connected a total of 11 superbright LEDs (ordered from <a href="http://www.digikey.com/">DigiKey</a>) to the Boarduino. Since the Boarduino only has 6 <a href="http://en.wikipedia.org/wiki/Pulse-width_modulation">PWM</a> pins (which can be used to &#8220;fade&#8221; LEDs in and out), we put 5 really bright LEDs on their own PWM pins (for the big domes) and wired the remaining LEDs (slightly less blindingly bright ones) in parallel to the 6th pin. The LEDs are unbelievably bright &#8211; even after covering them in an anti-static bag they are tough to look at directly.</p>
<p class="blogimage"><a href="http://www.flickr.com/photos/genkigecko/3210517110/in/set-72157612706914935/" title="Franken Beast, glowing by Eva Funderburgh, on Flickr"><img src="http://farm4.static.flickr.com/3430/3210517110_dfb127fd4d.jpg"  width="500" height="375" alt="Franken Beast, glowing" /></a></p>
<p>At this point we had to sketch up some software to actually control the lights. Eva wanted a random, organic pulsing, so I started by having each light animate through 360 degrees and used trigonometric functions to create a smooth curve of lighting and fading. We tried a whole bunch of different speeds, patterns, brightnesses, and randomization (some different tests: <a href="http://www.flickr.com/photos/genkigecko/3210532398/in/set-72157612706914935/">1</a> <a href="http://www.flickr.com/photos/genkigecko/3209687767/in/set-72157612706914935/">2</a> <a href="http://www.flickr.com/photos/genkigecko/3290779507/in/set-72157612706914935/">3</a> <a href="http://www.flickr.com/photos/genkigecko/3290784971/in/set-72157612706914935/">4</a>) before settling on <a href="http://gist.github.com/290912">the final code</a>. The code is a bit messy because of all the things that got changed around. I ended up using 1 &#8211; abs(sin(&theta;)) as the main brightness function, which gave the lights a sort of &#8220;breathing&#8221; effect.</p>
<p class="blogimage"><img src="http://benhollis.net/blog/wp-content/uploads/2010/02/inv_abs_sin.png" alt="1 - abs(sin(&theta;))" title="1 - abs(sin(&theta;))" width="500" height="77" class="alignnone size-full wp-image-477" /></p>
<p>The 0-1 values from that function got converted into a brightness from 0-255 for the PWM output. Actually, the brightnesses were always between a set minimum and maximum brightness, so they never quite go all the way out. Each cycle the speed of the fade gets randomly modified, so the lights never line up in any pattern &#8211; it&#8217;s pretty hypnotic to stare at.</p>
<p class="blogimage"><a href="http://www.flickr.com/photos/genkigecko/3289968288/in/set-72157612706914935/" title="the belly of the beast. by Eva Funderburgh, on Flickr"><img src="http://farm4.static.flickr.com/3310/3289968288_14aaa1f015.jpg" width="500" height="375" alt="the belly of the beast." /></a></p>
<p>After this Eva had the unenviable task of stuffing the whole works into the beast. She built little foam stoppers for each LED, and pushed one up into each dome. Then she carefully crammed all the wires inside, and the Boarduino, a switch, and the 9V battery. It ended up being way too cramped, resulting in a lot of broken wires, resoldering, and hot glue burns. Lesson learned &#8211; the next glowing beast will be bigger, with more open access to the inside.</p>
<p class="blogimage"><object width="480" height="385"><param name="movie" value="http://www.youtube-nocookie.com/v/KgvbQ0YYFAA&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/KgvbQ0YYFAA&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>
<p>The end result is really captivating. Eva ended up displaying it at Gallery Madeira in Tacoma, WA along with some of <a href="http://www.flickr.com/photos/genkigecko/collections/72157600257525140/">her other creatures</a>. Since we both put a lot of personal attention the two of us put into the Glowback, and the fact that due to all the hairy wiring inside it&#8217;s sort of &#8220;high maintenance&#8221;, we decided to keep it for ourselves instead of offering it for sale. However, Eva&#8217;s not done with the idea of lit beasts containing microcontrollers.</p>
<p>Eva&#8217;s<a href="http://evafunderburgh.com/2010/02/06/glowing-beasts-past-and-present/"> has written up a post on the Glowback</a> from her perspective on <a href="http://evafunderburgh.com/blog/">her own blog</a> &#8211; I suggest checking it out to get more detail on the concept and lineage of the piece.</p>
]]></content:encoded>
			<wfw:commentRss>http://benhollis.net/blog/2010/02/04/glowback-arduino-powered-glowing-ceramic-creature/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Searchable tab switching in Firefox 3.6</title>
		<link>http://benhollis.net/blog/2010/01/31/searchable-tab-switching-in-firefox-3-6/</link>
		<comments>http://benhollis.net/blog/2010/01/31/searchable-tab-switching-in-firefox-3-6/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 02:02:59 +0000</pubDate>
		<dc:creator>Ben Hollis</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[emacs]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[iswitchb]]></category>
		<category><![CDATA[tabs]]></category>

		<guid isPermaLink="false">http://benhollis.net/blog/?p=466</guid>
		<description><![CDATA[As an emacs user, I&#8217;ve found iswitchb (interactive-switch-buffers) to be a huge time saver. Basically, to switch files (buffers) you enter a typically byzantine key combination and then type to search through your open files &#8211; as less and less files match your search, the choices narrow down, and you can choose between them. This [...]]]></description>
			<content:encoded><![CDATA[<p>As an <a href="http://www.gnu.org/software/emacs/">emacs</a> user, I&#8217;ve found <a href="http://www.emacswiki.org/emacs/IswitchBuffers">iswitchb</a> (interactive-switch-buffers) to be a huge time saver. Basically, to switch files (buffers) you enter a typically byzantine key combination and then type to search through your open files &#8211; as less and less files match your search, the choices narrow down, and you can choose between them. This ends up being way faster than switching with a mouse even in tabbed editors, and I&#8217;ve managed to set up a similar thing in Eclipse/Aptana. But until recently I didn&#8217;t have the same functionality for switching tabs in Firefox.</p>
<p>The good news is that Firefox 3.6 has this feature built in, though it takes a bit of work to enable. Apparently <a href="http://jboriss.wordpress.com/2008/07/16/control-tab-a-new-feature-for-firefox/">they&#8217;ve been trying to get this feature into Firefox since 3.0</a>, but there&#8217;s been a lot of different opinions, so even though they finally shipped it with 3.6, it isn&#8217;t on by default. You can turn it on by going to <b>about:config</b> (just type that right into your address bar), then searching for &#8220;ctrlTab&#8221;. Double-click <b>browser.ctrlTab.previews</b> to turn it to &#8220;true&#8221;. Now, when you hit Ctrl-Tab, you&#8217;ll get a tab switcher that looks a bit like the default Windows Alt-Tab window switcher (though with a much lighter glass effect that honestly looks pretty bad compared to Windows&#8217; Alt-Tab). On other platforms you&#8217;ll get a similarly system-integrated look. Unfortunately this popup isn&#8217;t exactly what we&#8217;re looking for &#8211; it doesn&#8217;t show all your tabs and you can&#8217;t search! However, you can navigate down to &#8220;show all X tabs&#8221; at the bottom and you get a search box and a list of every tab. That&#8217;s a real pain to do every time you want to switch tabs, though. Fortunately, there&#8217;s a solution. Instead of hitting Ctrl-Tab, use Ctrl-Shift-Tab, and you&#8217;ll start out right at the big tab switcher with search. From here you can type to narrow down your selection and hit Enter to choose your tab. I wish there was a preference to make this full search show up when you hit Ctrl-Tab, but it doesn&#8217;t look like there is.</p>
<p class="blogimage"><a href="http://benhollis.net/blog/wp-content/uploads/2010/01/ff_ctrlTab.jpg"><img src="http://benhollis.net/blog/wp-content/uploads/2010/01/ff_ctrlTab-400x169.jpg" alt="Firefox Ctrl-Shift-Tab tab switcher" title="Firefox Ctrl-Shift-Tab tab switcher" width="400" height="169" /></a><br />
<em>Switching between tabs (man, that glass effect is a mess)</b></em></p>
<p>Visual issues aside, I wish every program with a tab-oriented UI had a feature like this to make their app faster to use for keyboard users. While we&#8217;re at it, Windows and OSX should add search to their built-in window switchers &#8211; it could really help when I have a lot of windows open and don&#8217;t want to reach for the mouse.</p>
<p>Note: There are a couple extensions for Google Chrome that theoretically give a similar searchable tab switcher, but of the few I tried, none of them could appear with a keyboard shortcut &#8211; you had to click an icon on the toolbar, which seems to defeat the point. Apparently the Chrome Extensions API has known problems with keyboard shortcuts, so maybe things will get better soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://benhollis.net/blog/2010/01/31/searchable-tab-switching-in-firefox-3-6/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Simple expiring caching for Ruby on Rails</title>
		<link>http://benhollis.net/blog/2010/01/30/simple-expiring-caching-for-ruby-on-rails/</link>
		<comments>http://benhollis.net/blog/2010/01/30/simple-expiring-caching-for-ruby-on-rails/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 02:48:35 +0000</pubDate>
		<dc:creator>Ben Hollis</dc:creator>
				<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://brh.numbera.com/blog/?p=367</guid>
		<description><![CDATA[Ruby on Rails has some great caching support built right in, but it&#8217;s most useful when you have MemCacheD or DRb around to serve as a cache store. I don&#8217;t have access to those everywhere &#8211; Dreamhost and other shared hosting providers often prohibit running your own MemCacheD. There&#8217;s a default memory store, but it [...]]]></description>
			<content:encoded><![CDATA[<p>Ruby on Rails has some <a href="http://guides.rails.info/caching_with_rails.html">great caching support</a> built right in, but it&#8217;s most useful when you have MemCacheD or DRb around to serve as a cache store. I don&#8217;t have access to those everywhere &#8211; Dreamhost and other shared hosting providers often prohibit running your own MemCacheD. There&#8217;s a default memory store, but it won&#8217;t share cached info between Rails server processes. That leaves the file store, which just writes cached objects to a file that gets shared between all your Rails processes on the same box. The main problem with the file store is that it doesn&#8217;t support time-based expiration &#8211; you have to set up a <tt>cron</tt> job to sweep out the cache files every once in a while to invalidate your cache.</p>
<p>To get around this, I wrote a tiny, obvious little module that gives a simple syntax for caching objects with the file store. The trick is that it stores the insert time whenever it caches a new object, and compares it with the current time every time it looks it up. If the cached object is too old (or the cache is empty), it throws it away and executes the provided block and caches the new value.</p>
<p><script src="http://gist.github.com/290848.js?file=simple_cache.rb"></script></p>
<p>Be sure to use the same expiration whenever you <tt>fetch</tt> the same object, or things will expire differently depending on where they&#8217;re accessed. You can also do a bit of customization for more complex cache invalidations &#8211; I have a version of <tt>fetch</tt> that caches objects within one calendar day and recalculates them only when the date is different. I suppose I could made <tt>fetch</tt> take an optional <tt>Proc</tt> to control the caching strategy, but I didn&#8217;t really need that much customization. Anyway, this isn&#8217;t exactly brilliant new code, but it has made caching objects from my smaller Rails apps a bit easier.</p>
]]></content:encoded>
			<wfw:commentRss>http://benhollis.net/blog/2010/01/30/simple-expiring-caching-for-ruby-on-rails/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
