<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en" xml:base="http://moreblinktag.com/wp-atom.php">
	<title type="text">Needs More Blink Tag</title>
	<subtitle type="text">The cowbell of the Interwebs</subtitle>

	<updated>2010-04-20T22:02:59Z</updated>

	<link rel="alternate" type="text/html" href="http://moreblinktag.com" />
	<id>http://moreblinktag.com/feed/atom/</id>
	

	<generator uri="http://wordpress.org/" version="3.2.1">WordPress</generator>
	
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/moreblinktag" /><feedburner:info uri="moreblinktag" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://moreblinktag.com/?pushpress=hub" /><entry>
		<author>
			<name>Grant</name>
						<uri>http://moreblinktag.com</uri>
					</author>
		<title type="html"><![CDATA[The Inaugural Seattle MongoDB Meetup]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/moreblinktag/~3/nXj9mVWa_6c/" />
		<id>http://moreblinktag.com/?p=40</id>
		<updated>2010-04-20T22:02:59Z</updated>
		<published>2010-03-26T22:35:18Z</published>
		<category scheme="http://moreblinktag.com" term="Uncategorized" />		<summary type="html"><![CDATA[ [...]]]></summary>
		<content type="html" xml:base="http://moreblinktag.com/2010/03/the-inaugural-seattle-mongodb-meetup/"><![CDATA[<p>It seems there&#8217;s a fair amount of interest in MongoDB in the Seattle area, so a few of us are getting together to talkshop next Wednesday.  Here&#8217;s the skinny:</p>
<ul>
<li>When: Wednesday, April 14, 6-8:00 PM</li>
<li>Where: Blue Box Group, 206 1st Avenue South #300, Seattle, WA</li>
</ul>
<p>You can check out all the details <a href="http://plancast.com/a/289l">on Plancast</a>.</p>
<p>Thanks to Jesse over at <a href="http://blueboxgrp.com/">Blue Box Group</a> for hosting!</p>
]]></content>
		<link rel="replies" type="text/html" href="http://moreblinktag.com/2010/03/the-inaugural-seattle-mongodb-meetup/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://moreblinktag.com/2010/03/the-inaugural-seattle-mongodb-meetup/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://moreblinktag.com/2010/03/the-inaugural-seattle-mongodb-meetup/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Grant</name>
						<uri>http://moreblinktag.com</uri>
					</author>
		<title type="html"><![CDATA[Testing Disqus]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/moreblinktag/~3/MfcuUK2wEMY/" />
		<id>http://moreblinktag.com/?p=38</id>
		<updated>2010-03-19T18:46:41Z</updated>
		<published>2010-03-19T18:46:41Z</published>
		<category scheme="http://moreblinktag.com" term="Uncategorized" />		<summary type="html"><![CDATA[ [...]]]></summary>
		<content type="html" xml:base="http://moreblinktag.com/2010/03/testing-disqus/"><![CDATA[<p>Trying out a new disqus install.  Please to be ignoring.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://moreblinktag.com/2010/03/testing-disqus/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://moreblinktag.com/2010/03/testing-disqus/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://moreblinktag.com/2010/03/testing-disqus/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Grant</name>
						<uri>http://moreblinktag.com</uri>
					</author>
		<title type="html"><![CDATA[How to migrate from MysqlSessionStore to MemCacheStore]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/moreblinktag/~3/QMCSy16BQ7w/" />
		<id>http://moreblinktag.com/?p=34</id>
		<updated>2009-06-10T00:14:51Z</updated>
		<published>2009-06-10T00:14:51Z</published>
		<category scheme="http://moreblinktag.com" term="ruby" /><category scheme="http://moreblinktag.com" term="memcached" /><category scheme="http://moreblinktag.com" term="ruby on rails" />		<summary type="html"><![CDATA[ [...]]]></summary>
		<content type="html" xml:base="http://moreblinktag.com/2009/06/how-to-migrate-from-mysqlsessionstore-to-memcachestore/"><![CDATA[<p>At <a href="http://www.reqall.com">reQall</a> we started out using the standard ActiveRecordStore for web session data, but switched along the way to MySQLSessionStore.  Lately we&#8217;ve been trying to reduce DB load and decided to move our sessions into memcached (they&#8217;re soft state, after all).  So, easy enough to do in Rails 2.x right?  Switch your session container, restart your thins and you&#8217;re off to the races.</p>
<p>The catch is, we didn&#8217;t really want to force all our users to re-log into the app.  We could, and most probably wouldn&#8217;t notice, but that&#8217;s not how we roll.  So, we decided to migrate all the existing sessions from MySQL to Memcached.  Turns out it&#8217;s pretty easy.  MySQLSessionStore  keeps everything in a data column in the sessions table, which contains the base64-encoded output of Marshal.dump(&lt;your session hash&gt;).   The built-in logic in memcache-client handles the marshaling and unmarshaling when creating the new sessions, so migrating looks something like this on the console:<br />
<script src="http://gist.github.com/126921.js"></script><br />
Simple, no?  A word to the wise, though &#8211; do it in batches of 1000.  Session.all would be bad.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://moreblinktag.com/2009/06/how-to-migrate-from-mysqlsessionstore-to-memcachestore/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://moreblinktag.com/2009/06/how-to-migrate-from-mysqlsessionstore-to-memcachestore/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://moreblinktag.com/2009/06/how-to-migrate-from-mysqlsessionstore-to-memcachestore/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Grant</name>
						<uri>http://moreblinktag.com</uri>
					</author>
		<title type="html"><![CDATA[Testing exception handling]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/moreblinktag/~3/02AKHLbMTFs/" />
		<id>http://moreblinktag.com/?p=23</id>
		<updated>2009-03-11T08:54:15Z</updated>
		<published>2009-03-11T08:53:40Z</published>
		<category scheme="http://moreblinktag.com" term="ruby" /><category scheme="http://moreblinktag.com" term="exceptions" /><category scheme="http://moreblinktag.com" term="tattletale" />		<summary type="html"><![CDATA[ [...]]]></summary>
		<content type="html" xml:base="http://moreblinktag.com/2009/03/testing-exception-handling/"><![CDATA[<p>You know the drill:<br />
<script src="http://gist.github.com/55300.js"></script> Or: <script src="http://gist.github.com/55301.js"></script><br />
Or even:<br />
<script src="http://gist.github.com/55303.js"></script><br />
I know, I know.  &#8220;But I don&#8217;t do that!&#8221;  Sure, <em>you</em> don&#8217;t.  But what about that person in the Duluth office?  You know, the one who still thinks that the whole project should be written in JSP and can&#8217;t wait to get all this done so he can go back to working on his port of &#8220;Leisure Suit Larry&#8221; for HP printers?  I bet if you look hard, you&#8217;ll find a few exception handlers that are overly broad in scope, don&#8217;t provide sufficient context in their error message or just plain hide problems.</p>
<p>&#8220;But my tests!&#8221; you cry.  &#8220;Surely the finely crafted specs I&#8217;ve been working on will save me!&#8221; The problem is that overly aggressive exception handling in your code will mask the true cause of errors, resulting in a false sense of security.  Sure, <code>assert_nothing_raised</code> and <code>should_not raise</code> never fire: your code is consuming the warnings and continuing blithely on its way.</p>
<p>This is why most ActiveRecord reference material emphasizes the user of <code>find</code> (vs. <code>find_by_id</code>), save! and the like, but doesn&#8217;t include <code>begin</code> and <code>rescue</code> blocks – it&#8217;s often better to have things blow up on you than guess at what error conditions might arise and attempt to handle them as you&#8217;re writing the code.  You can write tests around the exceptions, insuring that your code errors out in the appropriate manner when faced with bad input or exceptional conditions.</p>
<p>On the other hand, when something unexpected happens in production and your site starts giving everyone an eyeful of  your funny 500 page you&#8217;re unlikely to be so happy with all those uncaught exceptions.  Ah, the usual tension between development and production.  Enter <code><a href="http://github.com/ggoodale/tattletale">tattletale</a></code>.</p>
<p><code>tattletale</code> is your hall monitor, your prison snitch: it tattles on all the exceptions raised during a particular test run, including messages, backtrace and the test that raised it.  All of your existing exception handlers will work as expected, so your code doesn&#8217;t change.  I&#8217;ve written a Tattler for Test::Unit for starters; extending to your favorite test framework should be as easy as writing your own Tattler.  Grab the gem off github and take back your exception handling.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://moreblinktag.com/2009/03/testing-exception-handling/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://moreblinktag.com/2009/03/testing-exception-handling/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://moreblinktag.com/2009/03/testing-exception-handling/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Grant</name>
						<uri>http://moreblinktag.com</uri>
					</author>
		<title type="html"><![CDATA[The inaugural Ruby post]]></title>
		<link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/moreblinktag/~3/94bXqcVC-qA/" />
		<id>http://moreblinktag.com/?p=3</id>
		<updated>2009-01-28T01:15:09Z</updated>
		<published>2009-01-14T01:58:05Z</published>
		<category scheme="http://moreblinktag.com" term="ruby" /><category scheme="http://moreblinktag.com" term="default value" /><category scheme="http://moreblinktag.com" term="method" /><category scheme="http://moreblinktag.com" term="syntax" />		<summary type="html"><![CDATA[ [...]]]></summary>
		<content type="html" xml:base="http://moreblinktag.com/2009/01/the-inaugural-ruby-post/"><![CDATA[<p>Ah, the <code>&lt;blink&gt;</code> tag.  The internet&#8217;s version of the cowbell. In an effort to start giving back more to the Ruby community (big fan!), I&#8217;ve decided to start a more technical blog and talk a bit about programming languages, software development with distributed teams and sundry other topics.  As this blog&#8217;s title might imply, I will endeavour to entertain as well as elucidate.</p>
<p>As a way to kick off my new year&#8217;s resolution to blog more about technical matters, I thought I&#8217;d share this nugget of Ruby syntax fun.  Say you&#8217;ve got the following code:<br />
<script src="http://gist.github.com/46411.js"></script><br />
 Simple enough, no?  Well, then this is exactly what you&#8217;d expect:</p>
<p><script src="http://gist.github.com/46413.js"></script><br />
Hold on.  Why does calling foo with nil as an argument result in &#8216;nil&#8217; being printed out?</p>
<p>The answer is actually spelled out in the <a href="http://www.rubycentral.com/pickaxe/tut_methods.html">Pickaxe book,</a> though it&#8217;s rather subtly worded:</p>
<blockquote><p>Ruby lets you specify default values for a method&#8217;s arguments&#8212;values that will be used if the caller doesn&#8217;t pass them explicitly.</p></blockquote>
<p>In the first case, we&#8217;re explicitly passing the value <code>nil</code>, so our default parameter value isn&#8217;t used.  In the second case, we&#8217;re passing no arguments to the method, so we get the default.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://moreblinktag.com/2009/01/the-inaugural-ruby-post/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://moreblinktag.com/2009/01/the-inaugural-ruby-post/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://moreblinktag.com/2009/01/the-inaugural-ruby-post/</feedburner:origLink></entry>
	</feed>

