<?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>rineysoft.com/blog &#187; Uncategorized</title>
	<atom:link href="http://rineysoft.com/blog/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://rineysoft.com/blog</link>
	<description>Making, photography, music, cosplay, gaming, nerdery. That&#039;s me!</description>
	<lastBuildDate>Tue, 10 Apr 2012 02:03:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Retro computer fiesta, part 1</title>
		<link>http://rineysoft.com/blog/2012/04/retro-computer-fiesta-part-1/</link>
		<comments>http://rineysoft.com/blog/2012/04/retro-computer-fiesta-part-1/#comments</comments>
		<pubDate>Tue, 10 Apr 2012 02:00:11 +0000</pubDate>
		<dc:creator>riney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[8-bit]]></category>
		<category><![CDATA[800xl]]></category>
		<category><![CDATA[atari]]></category>
		<category><![CDATA[basic]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[mc-10]]></category>
		<category><![CDATA[radio shack]]></category>
		<category><![CDATA[retro]]></category>
		<category><![CDATA[tandy]]></category>
		<category><![CDATA[trs-80]]></category>

		<guid isPermaLink="false">http://rineysoft.com/blog/?p=1478</guid>
		<description><![CDATA[I&#8217;ve been on a retro computer buying spree! Watch this. Writing Conway&#8217;s Life for the MC-10 was an interesting exercise &#8211; it&#8217;s complex enough to not be trivial, to exercise a fair set of the language features, and to bump &#8230; <a href="http://rineysoft.com/blog/2012/04/retro-computer-fiesta-part-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been on a retro computer buying spree! Watch this.</p>
<p><iframe width="480" height="360" src="http://www.youtube.com/embed/Nfi8yxdZyQo" frameborder="0" allowfullscreen></iframe></p>
<p>Writing Conway&#8217;s Life for the MC-10 was an interesting exercise &#8211; it&#8217;s complex enough to not be trivial, to exercise a fair set of the language features, and to bump up against some of the machine&#8217;s limitations. It works pretty nicely, although holy CRAP does it need some optimization. You can download it, formatted for running on both emulators and real hardware here:</p>
<p><a href='http://rineysoft.com/blog/2012/04/retro-computer-fiesta-part-1/mc_life/' rel='attachment wp-att-1480'>mc_life.zip</a></p>
<p>And here&#8217;s the Microcolor BASIC source code, for your interest.</p>
<p><code><br />
10 REM MC-LIFE (C)2012 RINEY<br />
20 CLEAR<br />
30 W=63:H=31:AC=2:CX=1:CY=1:NC=0:PX=0:PY=0<br />
35 INPUT "GRID SIZE(W,H - MAX IS 63,31)";IW,IH<br />
36 IF W>=IW THEN W=IW<br />
37 IF H>=IH THEN H=IH<br />
40 DIM GR(H,W)<br />
50 CLS<br />
51 PRINT "RETICULATING SPLINES..."<br />
55 GOSUB 7000<br />
56 CLS<br />
60 PRINT@237,"MC-LIFE"<br />
70 PRINT@266,"PRESS ANY KEY"<br />
80 A$=INKEY$:IF A$="" GOTO 80<br />
90 CLS 0<br />
110 GOSUB 2000<br />
120 GOSUB 3000<br />
130 GOTO 90<br />
1000 REM INIT<br />
1010 FOR Y=1 TO H<br />
1020 FOR X=1 TO W<br />
1025 A = RND(11)<br />
1030 IF A>9 THEN GR(Y,X)=AC:GOTO 1040<br />
1035 GR(Y,X)=0<br />
1040 NEXT X,Y<br />
1050 RETURN<br />
1100 REM ZERO<br />
1110 FOR Y=1 TO H<br />
1120 FOR X=1 TO W<br />
1130 GR(Y,X)=0<br />
1140 NEXT X,Y<br />
1150 RETURN<br />
2000 REM DRAW<br />
2010 FOR Y=1 TO H<br />
2020 FOR X=1 TO W<br />
2025 IF GR(Y,X)=AC THEN SET(X,Y,AC)<br />
2040 NEXT X,Y<br />
2999 RETURN<br />
3000 REM UPDATE<br />
3010 FOR CY=1 TO H<br />
3020 FOR CX=1 TO W<br />
3030 GOSUB 4000<br />
3040 IF POINT(CX,CY)=AC THEN 3100<br />
3050 IF NC=3 THEN GR(CY,CX)=AC<br />
3060 GOTO 3900<br />
3100 ON NC+1 GOTO 3200,3200,3300,3300,3400<br />
3200 GR(CY,CX)=0:GOTO 3900<br />
3300 GR(CY,CX)=AC:GOTO 3900<br />
3400 GR(CY,CX)=0:GOTO 3900<br />
3900 NEXT CX,CY<br />
3999 RETURN<br />
4000 REM NEIGHBOR COUNT<br />
4005 NC=0<br />
4010 PX=CX:PY=CY-1:GOSUB 6000<br />
4020 PX=CX+1:PY=CY-1:GOSUB 6000<br />
4030 PX=CX+1:PY=CY:GOSUB 6000<br />
4040 PX=CX+1:PY=CY+1:GOSUB 6000<br />
4045 IF NC=4 THEN RETURN<br />
4050 PX=CX:PY=CY+1:GOSUB 6000<br />
4055 IF NC=4 THEN RETURN<br />
4060 PX=CX-1:PY=CY+1:GOSUB 6000<br />
4065 IF NC=4 THEN RETURN<br />
4070 PX=CX-1:PY=CY:GOSUB 6000<br />
4075 IF NC=4 THEN RETURN<br />
4080 PX=CX-1:PY=CY-1:GOSUB 6000<br />
4999 RETURN<br />
6000 REM WRAPPER<br />
6010 IF PX=0 THEN 6100<br />
6020 IF PX=W+1 THEN PX=1<br />
6030 IF PY=0 THEN 6200<br />
6040 IF PY=H+1 THEN PY=1<br />
6050 GOTO 6300<br />
6100 PX=W<br />
6110 GOTO 6030<br />
6200 PY=H<br />
6300 IF POINT(PX,PY)=AC THEN NC=NC+1<br />
6310 RETURN<br />
7000 REM GLIDER<br />
7005 GOSUB 1100<br />
7010 GR(4,6)=AC<br />
7020 GR(5,4)=AC:GR(5,6)=AC<br />
7030 GR(6,5)=AC:GR(6,6)=AC<br />
7040 RETURN<br />
8000 REM BLINKER<br />
8010 GOSUB 1100<br />
8020 GR(3,3)=AC<br />
8021 GR(3,4)=AC<br />
8022 GR(3,5)=AC<br />
8030 RETURN<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://rineysoft.com/blog/2012/04/retro-computer-fiesta-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tickertweet</title>
		<link>http://rineysoft.com/blog/2011/09/tickertweet/</link>
		<comments>http://rineysoft.com/blog/2011/09/tickertweet/#comments</comments>
		<pubDate>Sat, 01 Oct 2011 00:49:00 +0000</pubDate>
		<dc:creator>riney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[hacking]]></category>

		<guid isPermaLink="false">http://rineysoft.com/blog/?p=1445</guid>
		<description><![CDATA[When the east coast earthquake hit a little while ago, I found out about it first from a tweet, followed up by an IM from a friend in Brooklyn, followed up 10 minutes or so later by Google News. I &#8230; <a href="http://rineysoft.com/blog/2011/09/tickertweet/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When the east coast earthquake hit a little while ago, I found out about it first from a tweet, followed up by an IM from a friend in Brooklyn, followed up 10 minutes or so later by Google News. I thought it would be neat to have a way to call attention to important events. Inspired by old-fashioned ticker tapes, I put together some code to print specified Twitter updates in near-real-time to a thermal printer. More details in the video:</p>
<p><iframe width="560"  height="315" src="http://www.youtube.com/embed/RQrhODI4PVM" frameborder="0" allowfullscreen></iframe></p>
<p><a href="http://www.flickr.com/photos/riney/6198402705/in/photostream"><img src="http://farm7.static.flickr.com/6161/6198402705_eda7e906e0.jpg" alt="sample of the tweet output" /></a></p>
<p>The tweets are fetched using the <a href="http://twitter.rubyforge.org/">twitter Ruby gem</a>, rendered into a PBM image with <a href="http://rmagick.rubyforge.org/">rmagick</a>, and printed via the <a href="http://freelabs.com/~whitis/software/pbm2lwxl/">pbm2lwxl</a> library. I&#8217;ll put the code up on github after a little cleanup. As an upgrade, I&#8217;m setting up the software to run on a NSLU2 single-board computer, so the printer doesn&#8217;t have to be tethered to my desktop. More on that in a bit!</p>
<p>EDIT: the code is now on Github here: <a href="https://github.com/riney/tickertweet-proto">https://github.com/riney/tickertweet-proto</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rineysoft.com/blog/2011/09/tickertweet/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>kick off your shoes</title>
		<link>http://rineysoft.com/blog/2011/01/kick-off-your-shoes/</link>
		<comments>http://rineysoft.com/blog/2011/01/kick-off-your-shoes/#comments</comments>
		<pubDate>Mon, 10 Jan 2011 23:40:56 +0000</pubDate>
		<dc:creator>riney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rineysoft.com/blog/?p=1443</guid>
		<description><![CDATA[Video showing the results of the little Christmas-vacation hackathon Beeland and I did: Code posted here: https://github.com/riney/g35_arduino_marquee Hackaday blog coverage (w00t!) here: http://hackaday.com/2011/01/11/scrolling-marquee-made-from-ge-christmas-lights/]]></description>
			<content:encoded><![CDATA[<p>Video showing the results of the little Christmas-vacation hackathon Beeland and I did:</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/WbtTBSTp0hk?fs=1&amp;hl=en_US"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/WbtTBSTp0hk?fs=1&amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>Code posted here:<br />
<a href="https://github.com/riney/g35_arduino_marquee">https://github.com/riney/g35_arduino_marquee</a></p>
<p>Hackaday blog coverage (w00t!) here:<br />
<a href="http://hackaday.com/2011/01/11/scrolling-marquee-made-from-ge-christmas-lights/">http://hackaday.com/2011/01/11/scrolling-marquee-made-from-ge-christmas-lights/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://rineysoft.com/blog/2011/01/kick-off-your-shoes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>i spell &#8220;w3rd&#8221; with a three</title>
		<link>http://rineysoft.com/blog/2010/10/i-spell-w3rd-with-a-three/</link>
		<comments>http://rineysoft.com/blog/2010/10/i-spell-w3rd-with-a-three/#comments</comments>
		<pubDate>Fri, 22 Oct 2010 06:15:35 +0000</pubDate>
		<dc:creator>riney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[guns]]></category>
		<category><![CDATA[halloween]]></category>
		<category><![CDATA[liquor]]></category>
		<category><![CDATA[rants]]></category>

		<guid isPermaLink="false">http://rineysoft.com/blog/?p=1437</guid>
		<description><![CDATA[Saying &#8220;hello, abandoned blog&#8221; seems kind of stupid when my post ratio is approximately one post every year and a half, so let&#8217;s just skip past that. Some notes: I went to Bass Pro Shops today, looking for a suitable &#8230; <a href="http://rineysoft.com/blog/2010/10/i-spell-w3rd-with-a-three/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Saying &#8220;hello, abandoned blog&#8221; seems kind of stupid when my post ratio is approximately one post every year and a half, so let&#8217;s just skip past that. Some notes:</p>
<ul>
<li>I went to Bass Pro  Shops today, looking for a suitable holster for my <a href="http://realdealbrazil.com/zombieland-tallahassee-costume.asp">Halloween costume</a>. That store might just be the best reason I&#8217;ve found so far for Texas to exist at all. They are <em>incredibly</em> enthusiastic to throw a gun in your hand. No exaggeration; upon approaching the handgun counter, the gentleman behind it said &#8220;Well, howdy, tall feller! What can I put in your hand?&#8221;
<p>This is a line that is only appropriate at either gun shops or gay bathhouses.</p>
<p>I&#8217;m actually a pretty big gun fan. I find them technically interesting &#8211; you get to hold, in a convenient, handheld package, the cumulative result of several thousand years of applied technological development. Plus, shooting is fun &#8211; you have to relax, concentrate, and zone out a bit to shoot well, which is oddly similar to coding&#8230;</p>
<p>Anyway, I looked at a few <a href="http://en.wikipedia.org/wiki/M1911_pistol">M1911 pistols</a>. There was a Taurus, which was <a href="http://www.taurususa.com/product-details.cfm?id=608&#038;category=Pistol&#038;toggle=&#038;breadcrumbseries=19">attractive but cheaply made</a>, and a Sig Sauer, which was <a href="http://www.sigsauer.com/Products/ShowCatalogProductDetails.aspx?categoryid=25&#038;productid=99">far, far nicer</a>. I was hoping to get a look at a <a href="http://www.springfield-armory.com/armory.php?model=7">Springfield Armory Mil-Spec</a> and <a href="http://www.smith-wesson.com/webapp/wcs/stores/servlet/Product4_750001_750051_764907_-1_757754_757752_757751_ProductDisplayErrorView_Y">Smith and Wesson&#8217;s version</a>, but no luck. Both of those are far closer to the original GI version, which strikes me as a good thing &#8211; why add rails and gizmos to a fantastic design that has survived since WWI&#8230;</li>
<li>What&#8217;s also fun? Booze. Know where I&#8217;m never going to get any again? <a href="http://maps.google.com/maps/place?um=1&#038;ie=UTF-8&#038;q=dallas+liquor+store&#038;fb=1&#038;gl=us&#038;hq=liquor+store&#038;hnear=Dallas,+TX&#038;cid=44692828281361112">Dallas Liquor Store</a>, located at 2121 Main St # 102, just past the new Main Street Garden park. When I went in, there were two homeless people sitting on crates INSIDE THE SHOP harassing customers (i.e. me). And the guy working there didn&#8217;t seem particularly bothered by this. FAIL.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://rineysoft.com/blog/2010/10/i-spell-w3rd-with-a-three/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>why i hate apartment living</title>
		<link>http://rineysoft.com/blog/2010/08/why-i-hate-apartment-living/</link>
		<comments>http://rineysoft.com/blog/2010/08/why-i-hate-apartment-living/#comments</comments>
		<pubDate>Mon, 16 Aug 2010 05:23:55 +0000</pubDate>
		<dc:creator>riney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apartment]]></category>
		<category><![CDATA[rant]]></category>

		<guid isPermaLink="false">http://rineysoft.com/blog/?p=1433</guid>
		<description><![CDATA[It&#8217;s 12:15 AM. I&#8217;m hungry. I&#8217;m hungry because I&#8217;ve been working on DragonCon stuff for hours, and I&#8217;ve forgotten to eat. So I go to toss together some basic subsistence food (pasta, canned sauce, mystery meat from the freezer, and &#8230; <a href="http://rineysoft.com/blog/2010/08/why-i-hate-apartment-living/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s 12:15 AM. I&#8217;m hungry. I&#8217;m hungry because I&#8217;ve been working on DragonCon stuff for hours, and I&#8217;ve forgotten to eat. So I go to toss together some basic subsistence food (pasta, canned sauce, mystery meat from the freezer, and frozen vegetables). Fine. Here&#8217;s the problem, though. Last time I cooked, I used some oil. If you cook with oil, some of the oil gets on stuff, like your other stove burners. Normally you don&#8217;t give a damn. You can try to clean it off, but no amount of scrubbing will keep the burners from smoking, at least a little bit, when you turn them on. Normally, again, you don&#8217;t give a damn. But the smoke detectors in my apartment are so hyper-sensitive that making toast is enough to set them off.</p>
<p>Not burning toast. Making toast. And my toaster&#8217;s clean, don&#8217;t ask.</p>
<p>So now what I&#8217;m doing is, with all the windows open, and with every fan I can find blowing toward them, gently throttling each burner, one at a time, for brief intervals, and hoping that the slight tendrils of smoke generated aren&#8217;t enough to start the screeching wail of the alarms. We&#8217;re not talking a kitchen full of smoke, here. We&#8217;re talking wisps. WISPS! I know it&#8217;s an old building and all, but jeez. If the alarms don&#8217;t clear in a minute or so, the whole BUILDING&#8217;S alarm goes off, the fire department comes out, everybody evacuates. It&#8217;s happened five or six times since I&#8217;ve been here. Not caused by me, thank goodness.</p>
<p>So I wait, daring the alarms to go off.</p>
<p>And I&#8217;m really really hungry, dammit!</p>
]]></content:encoded>
			<wfw:commentRss>http://rineysoft.com/blog/2010/08/why-i-hate-apartment-living/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>never as complicated as I wanted to be</title>
		<link>http://rineysoft.com/blog/2010/06/never-as-complicated-as-i-wanted-to-be/</link>
		<comments>http://rineysoft.com/blog/2010/06/never-as-complicated-as-i-wanted-to-be/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 02:56:38 +0000</pubDate>
		<dc:creator>riney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dragoncon]]></category>
		<category><![CDATA[gaming]]></category>
		<category><![CDATA[nintendo]]></category>
		<category><![CDATA[vlog]]></category>

		<guid isPermaLink="false">http://rineysoft.com/blog/?p=1425</guid>
		<description><![CDATA[Dear abandoned blog, here are some videos: This is the video I made at DragonCon last year. I never posted it here. It might give you an idea what a big science fiction convention is about. Or it might give &#8230; <a href="http://rineysoft.com/blog/2010/06/never-as-complicated-as-i-wanted-to-be/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Dear abandoned blog, here are some videos:</p>
<p>This is the video I made at DragonCon last year. I never posted it here. It might give you an idea what a big science fiction convention is about. Or it might give you an idea how weird my friends and I are. Or it might give you some other ideas altogether! Best of luck with that. It&#8217;s probably what you&#8217;d call &#8220;not safe for work&#8221;, mostly due to cussin&#8217;.<br />
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/9t1ZqiqRex8&#038;hl=en_US&#038;fs=1&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/9t1ZqiqRex8&#038;hl=en_US&#038;fs=1&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>Second, here&#8217;s a neat video wherein I play with thermal conduction. It&#8217;s just *slightly* more interesting than it sounds.</p>
<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/F8Cgkdm9tZk&#038;hl=en_US&#038;fs=1&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/F8Cgkdm9tZk&#038;hl=en_US&#038;fs=1&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>From E3 today, a teaser trailer from Portal 2:<br />
<object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/Y-AeHxUbDn0&#038;hl=en_US&#038;fs=1&#038;hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Y-AeHxUbDn0&#038;hl=en_US&#038;fs=1&#038;hd=1" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
<p>Something that always blows my mind about Valve games is the excruciating emphasis on storytelling. The *first line* of this trailer tells you a number of things about the game &#8211;  &#8220;It&#8217;s been a long time.&#8221; GLaDOS, as we all know, is <a href="http://www.youtube.com/watch?v=-8JatlRwd0s">Still Alive</a> &#8211; and she sounds dark. Angry. Serious. This is gonna be a helluva game.</p>
<p>Other E3 goodness &#8211; a new <a href="http://kotaku.com/5564377/kid-icarus-3ds-screenshots/gallery/">Kid Icarus</a>! A new <a href="http://kotaku.com/5564422/star-fox-returns-on-the-3ds/gallery/">StarFox</a>! A new <a href="http://kotaku.com/5564546/pilotwings-returns-on-the-3ds">PilotWings</a> for crap&#8217;s sake! By any definition, Nintendo killed it in their announcements today. Epic Mickey, alone, might sell me a Wii.</p>
]]></content:encoded>
			<wfw:commentRss>http://rineysoft.com/blog/2010/06/never-as-complicated-as-i-wanted-to-be/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>snowpocalypse: dallas</title>
		<link>http://rineysoft.com/blog/2010/02/snowpocalypse-dallas/</link>
		<comments>http://rineysoft.com/blog/2010/02/snowpocalypse-dallas/#comments</comments>
		<pubDate>Thu, 11 Feb 2010 19:55:56 +0000</pubDate>
		<dc:creator>riney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[snow dallas vlog]]></category>

		<guid isPermaLink="false">http://rineysoft.com/blog/2010/02/snowpocalypse-dallas/</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/grp81sISSW0&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/grp81sISSW0&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://rineysoft.com/blog/2010/02/snowpocalypse-dallas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>no-one flies around the sun</title>
		<link>http://rineysoft.com/blog/2010/01/no-one-flies-around-the-sun/</link>
		<comments>http://rineysoft.com/blog/2010/01/no-one-flies-around-the-sun/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 06:58:21 +0000</pubDate>
		<dc:creator>riney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apartment]]></category>
		<category><![CDATA[dallas]]></category>

		<guid isPermaLink="false">http://rineysoft.com/blog/?p=1416</guid>
		<description><![CDATA[Almost, almost there. Posted some pics of the ongoing apartment organizational project. It&#8217;s made easier by the fact that it&#8217;s not, for example, raining in my bedroom (many sympathies to @DarthRachel). But it still has far, far to go.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/riney/sets/72157623286118440/"><img src="http://farm5.static.flickr.com/4003/4305187347_17ef55e3d0.jpg" alt="IMG_0643" width="500" height="375" border="0" /><br />
</a><br />
Almost, almost there. Posted some pics of the ongoing apartment organizational project. It&#8217;s made easier by the fact that it&#8217;s not, for example, raining in my bedroom (many sympathies to @DarthRachel). But it still has far, far to go.</p>
]]></content:encoded>
			<wfw:commentRss>http://rineysoft.com/blog/2010/01/no-one-flies-around-the-sun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>untrustworthy hashes in ruby</title>
		<link>http://rineysoft.com/blog/2010/01/untrustworthy-hashes-in-ruby/</link>
		<comments>http://rineysoft.com/blog/2010/01/untrustworthy-hashes-in-ruby/#comments</comments>
		<pubDate>Fri, 08 Jan 2010 23:02:50 +0000</pubDate>
		<dc:creator>riney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://rineysoft.com/blog/?p=1394</guid>
		<description><![CDATA[I ran into one of those annoying bugs where a couple different things conspired to have an annoying result. We use GMail at the moment as our SMTP server, and we put all sorts of automated notifications through it. GMail &#8230; <a href="http://rineysoft.com/blog/2010/01/untrustworthy-hashes-in-ruby/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I ran into one of those annoying bugs where a couple different things conspired to have an annoying result. We use GMail at the moment as our SMTP server, and we put all sorts of automated notifications through it. GMail has a well-documented <a href="http://www.labnol.org/internet/email/gmail-daily-limit-sending-bulk-email/2191/">500 message limit</a> &#8211; that&#8217;s per-account, per-day. Upgrading to Premier bumps that to 2000, but we really don&#8217;t need to upgrade everybody on the domain just to get the extended limits for a system account. Ordinarily, we don&#8217;t send anywhere near that much email, but a bug that got our asynchronous mail-sending queue a little clogged up led to a glut of mails that needed to go out. Which put us over the limit. Bleh.</p>
<p>We&#8217;ll be switching to a sturdier mail provider soon enough, but for the time being, I decided to rig ActionMailer to load-balance between four accounts. So there&#8217;s a few different ways you could pull this off.</p>
<ul>
<li>Monkeypatch ActionMailer. I try to avoid patches like this if at all possible.</li>
<li>Randomize ActionMailer&#8217;s user_name setting before each use. Well, AM&#8217;s settings hash is a class global. Changing it every time, especially when others might be poking at it, seems in poor taste.</li>
<li>Something else.</li>
</ul>
<p>&#8220;Something else&#8221; turned out to be hacking the settings hash itself. Ordinarily, when you set it up, it looks like this:</p>
<pre>
ActionMailer::Base.delivery_method = :smtp

ActionMailer::Base.smtp_settings = {
   :address => "smtp.gmail.com",
   :port => 587,
   :domain => "mydomain.com",
   :authentication => :plain,
   :user_name => "somebody@mydomain.com"
   :password => "mypassword"
}
</pre>
<p>Instead, I did:</p>
<pre>
ActionMailer::Base.delivery_method = :smtp

smtp_settings = {
   :address => "smtp.gmail.com",
   :port => 587,
   :domain => "mydomain.com",
   :authentication => :plain,
   :password => "mypassword"
}

SYSTEM_ACCOUNTS = %w[system@mydomain.com system2@mydomain.com system3@mydomain.com system4@mydomain.com]
ActionMailer::Base.smtp_settings = Hash.new { |h, k| SYSTEM_ACCOUNTS[rand SYSTEM_ACCOUNTS.size] if k == :user_name }.merge!(smtp_settings)
</pre>
<p>The useful part is the employment of the version of Hash.new that takes a block. If a key lookup fails, the block is invoked, and is passed the hash and the requested key. It&#8217;s basically &#8220;method_missing&#8221; for hashes. So, when ActionMailer looks for :user_name, the block picks a random entry out of the SYSTEM_ACCOUNTS array. For lack of a better name, I called this approach an &#8220;untrustworthy&#8221; hash &#8211; as one generally expects to get the same key-value mapping from a hash every time.</p>
<p>This wouldn&#8217;t work in all cases &#8211; for example, has_key?(:user_name) would fail. I&#8217;ve got a more generic solution in mind, that being an add-on for Hash that lets you insert key/proc pairs as well as key/value pairs. More on that soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://rineysoft.com/blog/2010/01/untrustworthy-hashes-in-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>take only what you need from it</title>
		<link>http://rineysoft.com/blog/2009/09/take-only-what-you-need-from-it/</link>
		<comments>http://rineysoft.com/blog/2009/09/take-only-what-you-need-from-it/#comments</comments>
		<pubDate>Thu, 03 Sep 2009 02:26:07 +0000</pubDate>
		<dc:creator>riney</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[vlog studio]]></category>

		<guid isPermaLink="false">http://rineysoft.com/blog/?p=1391</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="560" height="340"><param name="movie" value="http://www.youtube.com/v/_cNvIUmZeUI&#038;hl=en&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/_cNvIUmZeUI&#038;hl=en&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="560" height="340"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://rineysoft.com/blog/2009/09/take-only-what-you-need-from-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

