<?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>furtiveCode.com &#187; Development</title>
	<atom:link href="http://furtivecode.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://furtivecode.com</link>
	<description>Chris Lamothe's weblog.</description>
	<lastBuildDate>Mon, 07 Sep 2009 23:37:04 +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>Rails: SQLite Replaces MySQL as Default Database</title>
		<link>http://furtivecode.com/2007/12/28/rails-sqlite-replaces-mysql-as-default-database/</link>
		<comments>http://furtivecode.com/2007/12/28/rails-sqlite-replaces-mysql-as-default-database/#comments</comments>
		<pubDate>Fri, 28 Dec 2007 19:50:18 +0000</pubDate>
		<dc:creator>Chris Lamothe</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://furtivecode.com/2007/12/28/rails-sqlite-replaces-mysql-as-default-database/</guid>
		<description><![CDATA[If you&#8217;ve waited until now before upgrading to Ruby on Rails 2.0 now you may be in for a little surprise.  As of version 2.02 the default database in Rails is SQLite, arguably because there is no need to for grants or the creation of tables, meaning a simpler setup for n00bs.  If you still [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve waited until now before upgrading to <a title="Ruby on Rails" href="http://www.rubyonrails.org/">Ruby on Rails 2.0 </a>now you may be in for a little surprise.  As of version 2.02 the default database in Rails is <a title="SQLite" href="http://www.sqlite.org/">SQLite</a>, arguably because there is no need to for grants or the creation of tables, meaning a simpler setup for n00bs.  If you still want to use <a title="MySQL" href="http://www.mysql.com/">MySQL</a> (or any other database for that matter) you have to provide the following:</p>
<p><code>rails -d mysql appname</code></p>
<p>SQLite3 and the necessary driver gems come preinstalled on OS X Leopard, but if you don&#8217;t have the Ruby bindings installed it&#8217;s as simple as:</p>
<p><code>sudo gem install sqlite3-ruby</code></p>
<p>You can always change which db your Rails app is using by changing your <code>config/database.yml</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://furtivecode.com/2007/12/28/rails-sqlite-replaces-mysql-as-default-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Montreal On Rails 2</title>
		<link>http://furtivecode.com/2007/09/06/montreal-on-rails-2/</link>
		<comments>http://furtivecode.com/2007/09/06/montreal-on-rails-2/#comments</comments>
		<pubDate>Fri, 07 Sep 2007 02:55:04 +0000</pubDate>
		<dc:creator>Chris Lamothe</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://furtivecode.com/2007/09/06/montreal-on-rails-2/</guid>
		<description><![CDATA[So this Tuesday I had the honour of presenting at Montreal on Rails 2, where I demoed the Acts As Authenticated and Role Requirement plugins. I think Marc Andre Cournoyer&#8217;s review impressed me the most, mainly that &#8220;&#8230;[it] is an exploit to be able to code a live app in front of a crowd like [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://furtivecode.com/2007/09/06/montreal-on-rails-2/chris-lamothe-presenting-at-montreal-on-rails-2/" rel="attachment wp-att-26" title="Chris Lamothe presenting at Montreal on Rails 2"><img src="http://furtivecode.com/wp-content/uploads/2007/09/chris_lamothe_montreal_on_rails1_2.jpg" alt="Chris Lamothe presenting at Montreal on Rails 2" style="border: 1px solid black" align="right" height="163" width="217" /></a>So this Tuesday I had the honour of presenting at <a href="http://www.montrealonrails.com/2007/09/05/what-a-great-evening-last-night/" title="Montreal on Rails 2 - What a great night!">Montreal on Rails 2</a>, where I demoed the <a href="http://technoweenie.stikipad.com/plugins/show/Acts+as+Authenticated" title="Acts As Authenticated - A user authentication plugin for Ruby on Rails.">Acts As Authenticated</a> and <a href="http://code.google.com/p/rolerequirement/" title="RoleRequirement - Role-based authentication for Ruby on Rails.">Role Requirement</a> plugins.</p>
<p>I think <a href="http://macournoyer.wordpress.com/2007/09/05/montreal-on-rails-2/" title="Montreal on Rails 2">Marc Andre Cournoyer&#8217;s review</a> impressed me the most, mainly that <em>&#8220;<quote>&#8230;[it] is an exploit to be able to code a live app in front of a crowd like this.</quote>&#8220;</em> It&#8217;s a testament to the power of <a href="http://www.rubyonrails.org/" title="Ruby on Rails">Rails</a> and I&#8217;m just glad the Roles portion didn&#8217;t bomb the way it had during my rehearsals at home.</p>
<p>I was especially impressed by <a href="http://extonrails.com/" title="Chris Scott's Ext on Rails site">Chris Scott</a>&#8216;s demo of the <a href="http://extjs.com/" title="Ext JS">Ext JS framework</a>.  Sorry <a href="http://www.domapi.com" title="DOM API, best of the least known JavaScript frameworks!">Darin</a>, but there are some pretty nice features in Ext that will make me want to take a closer look.  Terje Tjervaag&#8217;s demo of <a href="https://addons.mozilla.org/en-US/firefox/addon/1843" title="Firebug">Firebug</a> was convincing enough to make me wonder why I hadn&#8217;t already installed it yet.  Used it at work today to great effect.  You can  read more reviews of the night <a href="http://jfcouture.com/2007/09/05/montreal-on-rails-second-edition-report/" title="JF Couture's review of Montreal on Rails 2">here</a> and <a href="http://montrealtechwatch.com/2007/09/05/montreal-on-rails-2nd-edition/" title="Montreal Tech Watch review of Montreal on Rails 2">here</a>, while photos have been posted on <a href="http://www.flickr.com/photos/tags/montrealonrails2/" title="Montreal on Rails 2 Photos">Flickr</a> and videos might pop up on <a href="http://www.youtube.com/results?search_query=MontrealonRails2&amp;search=tag" title="Montreal on Rails 2 videos">Youtube</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://furtivecode.com/2007/09/06/montreal-on-rails-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Come see me on Sept 4th</title>
		<link>http://furtivecode.com/2007/08/27/come-see-me-on-sept-4th/</link>
		<comments>http://furtivecode.com/2007/08/27/come-see-me-on-sept-4th/#comments</comments>
		<pubDate>Mon, 27 Aug 2007 17:02:51 +0000</pubDate>
		<dc:creator>Chris Lamothe</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://furtivecode.com/2007/08/27/come-see-me-on-sept-4th/</guid>
		<description><![CDATA[I&#8217;m happy to announce that I will be speaking about user authentication at the next Montreal on Rails meetup, scheduled for Tuesday the 4th of September at the McGill MAASS Chemistry building, room 328. The show starts at 18h45 and I think I&#8217;ll be the first to present, so come early. Although user authentication may [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m happy to announce that <a href="http://www.montrealonrails.com/2007/08/26/speakers-for-montreal-on-rails-2/" title="Montreal on Rails Meetup">I will be speaking about user authentication at the next Montreal on Rails meetup</a>, scheduled for Tuesday the 4th of September at the McGill MAASS Chemistry building, room 328.  The show starts at 18h45 and I think I&#8217;ll be the first to present, so come early.</p>
<p>Although user authentication may sound like an advanced topic, it will be aimed mostly at the novice Rails developer as a showcase of how easy it can be to implement advanced features such as user security and roles in a Rails application.  I hope to touch on a few items including the excellent <a href="http://wiki.rubyonrails.org/rails/pages/Acts_as_authenticated" title="Acts As Authenticated: Rails User Authentication">Acts As Authenticated</a>, roles and salting.  If there&#8217;s anything in particular you would like to see, <a href="mailto:chrislamothe@gmail.com">drop me an email</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://furtivecode.com/2007/08/27/come-see-me-on-sept-4th/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>BASH: How to strip the last character of a word.</title>
		<link>http://furtivecode.com/2007/08/16/bash-how-to-strip-the-last-character-of-a-word/</link>
		<comments>http://furtivecode.com/2007/08/16/bash-how-to-strip-the-last-character-of-a-word/#comments</comments>
		<pubDate>Thu, 16 Aug 2007 18:25:02 +0000</pubDate>
		<dc:creator>Chris Lamothe</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://furtivecode.com/2007/08/16/bash-how-to-strip-the-last-character-of-a-word/</guid>
		<description><![CDATA[The integrators at work had a problem recently with a shell script that generates SQL deployment and rollback scripts on the fly based on SQL patches submitted by developers. The problem was that sometimes the name of an object would include a &#8220;(&#8221; at the end of it (e.g. &#8220;FN_RESET(&#8221; instead of &#8220;FN_RESET&#8220;). Here&#8217;s a [...]]]></description>
			<content:encoded><![CDATA[<p>The integrators at work had a problem recently with a shell script that generates SQL deployment and rollback scripts on the fly based on SQL patches submitted by developers.  The problem was that sometimes the name of an object would include a &#8220;(&#8221; at the end of it (e.g. &#8220;<code>FN_RESET(</code>&#8221; instead of &#8220;<code>FN_RESET</code>&#8220;).  Here&#8217;s a quick solution I whipped up for them:</p>
<p><code>#if $TEST_END doesn't become an empty string,<br />
#then OBJECT_NAME ends with "(" so we strip it<br />
TEST_END=$(echo "$OBJ_NAME" | grep \($)<br />
[ -z "$TEST_END" ] || OBJ_NAME=$(echo ${OBJ_NAME%\(})<br />
echo "OBJ_NAME is : $OBJ_NAME"</code></p>
<p>The sharp eye amongst you will notice that this works for <code>FOO(</code> but not for <code>FOO(NANY</code>. If you want to strip everything after the ( and including the ( the you want this:</p>
<p><code>TEST_END=$(echo "$OBJ_NAME" | grep \()<br />
[ -z "$TEST_END" ] || OBJ_NAME=$(echo "$OBJ_NAME" | awk '{split($0,a,"(");print a[1]}')<br />
echo "OBJ_NAME is : $OBJ_NAME"</code></p>
<p>Notice how the grep no longer uses the <code>$</code> anchor to match a ( at the end of the line?  Now if <code>$TEST_END</code> isn&#8217;t empty, then we have a ( in our string, so we split on that and return everything to the left (first element in the <code>a[]</code>).</p>
]]></content:encoded>
			<wfw:commentRss>http://furtivecode.com/2007/08/16/bash-how-to-strip-the-last-character-of-a-word/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tales from the Computer Club</title>
		<link>http://furtivecode.com/2007/08/08/tales-from-the-computer-club/</link>
		<comments>http://furtivecode.com/2007/08/08/tales-from-the-computer-club/#comments</comments>
		<pubDate>Wed, 08 Aug 2007 12:14:18 +0000</pubDate>
		<dc:creator>Chris Lamothe</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://furtivecode.com/2007/08/08/tales-from-the-computer-club/</guid>
		<description><![CDATA[Last night&#8217;s Montreal on Rails meetup (their first ever) was a large step up from the Commodore 64 disk swaps of my youth, but probably a lot more significant as far as self improvement goes. A good 30-35 people showed up and the two presentations given were fantastic. The first presentation topic was improving tests, [...]]]></description>
			<content:encoded><![CDATA[<p>Last night&#8217;s <a title="Montreal on Rails" href="http://www.montrealonrails.com">Montreal on Rails</a> meetup (their first ever) was a large step up from the Commodore 64 disk swaps of my youth, but probably a lot more significant as far as self improvement goes.  A good 30-35 people showed up and the two presentations given were fantastic.</p>
<p>The first presentation topic was improving tests, it was given by <a title="Marc Cournoyer's blog entry for the first Monteral on Rails meetup." href="http://macournoyer.wordpress.com/2007/08/08/how-was-montreal-on-rails/">Marc Cournoyer</a> and included a hilarious introduction to a somewhat advanced topic.  The next presentation was given by <a title="Carl Mercier's blog" href="http://blog.carlmercier.com/">Carl Mercier</a>, who introduced the extremely useful <a title="HAML" href="http://haml.hamptoncatlin.com/">HAML</a>, which appears to cut the code in your views by half by generating HTML using a simplified indentation scoped ruby based markup.  Very simple and very powerful stuff and I&#8217;ll be trying it shortly.</p>
<p>Overall the people who attended the meetup were great and I look forward to the next one.  It&#8217;s so good to see a vibrant developer scene in Montreal.</p>
]]></content:encoded>
			<wfw:commentRss>http://furtivecode.com/2007/08/08/tales-from-the-computer-club/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Link grab bag for July 2007</title>
		<link>http://furtivecode.com/2007/08/01/link-grab-bag-for-july-2007/</link>
		<comments>http://furtivecode.com/2007/08/01/link-grab-bag-for-july-2007/#comments</comments>
		<pubDate>Wed, 01 Aug 2007 15:36:56 +0000</pubDate>
		<dc:creator>Chris Lamothe</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Links]]></category>

		<guid isPermaLink="false">http://furtivecode.com/2007/08/01/link-grab-bag-for-july-2007/</guid>
		<description><![CDATA[Here are some of the links that I bookmarked for the month of July. I highly recommend the 101 meals at the bottom of this list. Development a free service oriented architecture diagram. Some simple SQL rules to live by Agile Bookshelf: Ten must read books Keep your data in the tables! Best programmer quotes [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some of the links that I bookmarked for the month of July.  I highly recommend the 101 meals at the bottom of this list.</p>
<h3>Development</h3>
<ul>
<li><a href="http://ttlnews.blogspot.com/2007/07/service-oriented-architecture-diagram.html">a free service oriented architecture diagram.</a></li>
<li><a href="http://weblogs.sqlteam.com/jeffs/archive/2006/03/14/9289.aspx">Some simple SQL rules to live by</a></li>
<li><a href="http://on-agile.blogspot.com/2007/07/agile-bookshelf-10-must-read-books.html">Agile Bookshelf: Ten must read books</a></li>
<li><a href="http://weblogs.sqlteam.com/jeffs/archive/2006/02/10/9002.aspx">Keep your data in the tables!</a></li>
<li><a href="http://www.comp.nus.edu.sg/~damithch/pages/SE-quotes.htm?type=bestQuotes">Best programmer quotes</a></li>
<li><a href="http://www.ibm.com/developerworks/java/library/j-configint/index.html?S_TACT=105AGX59&#038;S_CMP=HP&#038;ca=dgr-jw64javaescnfg">Easing Configuration</a></li>
<li><a href="http://www.informit.com/guides/content.asp?g=java&#038;seqNum=166">Java Image Servlet example</a></li>
</ul>
<h3>Web</h3>
<ul>
<li><a href="http://www.aiderss.com/">Aide RSS:  RSS with artificial intelligence</a></li>
<li><a href="http://www.smileycat.com/miaow/archives/000692.php">10 Things you may not know about the Web Developer Toolbar</a></li>
<li><a href="http://niftytutorials.com/basics/transform-your-photos-into-a-beautiful-mosaic/1/">Photoshop: How to do a mosaic effect</a></li>
<li><a href="http://performancing.com/10-articles-all-bloggers-should-read-at-least-once">Ten articles all bloggers should read at least once</a></li>
<li><a href="http://www.photoshoproadmap.com/Photoshop-blog/2007/07/22/the-best-80-photoshop-text-effects-on-the-web/">The best 80 Photoshop text effects on the web</a></li>
</ul>
<h3>Leisure</h3>
<ul>
<li><a href="http://www.fodors.com/wire/archives/002614.cfm">Top ten under $200 hotels in Europe</a></li>
</ul>
<h3>Self improvement</h3>
<ul>
<li><a href="http://www.mit.edu/~jcb/tact.html">Tact Filters</a></li>
<li><a href="http://thecodist.com/fiche/thecodist/article/info">Good example of actions to put in a CV</a></li>
<li><a href="http://computerworld.com/action/article.do?command=viewArticleBasic&#038;articleId=298362&#038;intsrc=hm_ts_head">Why should I hire you? and other favorite interview questions</a></li>
</ul>
<h3>Food</h3>
<ul>
<li><a href="http://www.goodexperience.com/blog/archives/nyt-071807-101-summer-recipes.txt">101 Summer Express Meals in 10 minutes or less</a></li>
<li><a href="http://urbanvegan.blogspot.com/2007/07/summer-express-101-simple-vegan-meals.html">101 Supper Express Vegan Meals in 10 minutes or less.</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://furtivecode.com/2007/08/01/link-grab-bag-for-july-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exception Handling Best Practices in Java</title>
		<link>http://furtivecode.com/2007/07/15/exception-handling-best-practices-in-java/</link>
		<comments>http://furtivecode.com/2007/07/15/exception-handling-best-practices-in-java/#comments</comments>
		<pubDate>Mon, 16 Jul 2007 01:42:32 +0000</pubDate>
		<dc:creator>Chris Lamothe</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://furtivecode.com/2007/07/15/exception-handling-best-practices-in-java/</guid>
		<description><![CDATA[I&#8217;m in the process of migrating some old Java 1.3 code to Java 6 and I really didn&#8217;t like the way exceptions were handled in the code. Before rewriting things I did some research as to what are considered the &#8220;Best Practices&#8221; when it comes to Java exception handling. Although On Java&#8217;s Best Practices for [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m in the process of migrating some old Java 1.3 code to Java 6 and I really didn&#8217;t like the way exceptions were handled in the code.  Before rewriting things I did some research as to what are considered the &#8220;Best Practices&#8221; when it comes to Java exception handling.  Although  <a title="Best Practices for Exception Handling" href="http://www.onjava.com/pub/a/onjava/2003/11/19/exceptions.html">On Java&#8217;s Best Practices for Exception Handling</a> appears to be the most popular article on the subject, I found the most useful information to come from <a title="Exception Handling: Common Problems and Best Practices" href="http://furtivecode.com/wp-admin/www.old.netobjectdays.org/pdf/02/papers/industry/1430.pdf">Exception Handling: Common Problems and Best Practices with Java 1.4</a> (pdf) by Dr. Andreas Muller and Geoffrey Simmons, both of whom work for the German Sun Java Center.</p>
<p>A summary of Mueller and Simmons&#8217; mains points would be:</p>
<ul>
<li>Empty catch blocks are bad.</li>
<li>Meaningless blanket throws clauses are bad. (e.g. <code>catch(FooException e){ throw new BahException(e.getMessage());}</code> )</li>
<li>Losing stack information is bad, so use exception chaining.</li>
<li>Exceptions that signal an untreatable situation should be unchecked.</li>
<li>Checked exceptions signal an exception situation that might be treatable.</li>
<li>Log an exception to the logfile exactly once.</li>
<li>The right time to log an exception in Java is the latest possible.</li>
<li>By chaining exceptions you gain information content while they travel up the call stack.</li>
<li>Programming exceptions should contain as much information about the state of the system as is available (dump state of objects, session, response, request, etc.)</li>
</ul>
<p>An immediate benefit from the article was learning how throwing unchecked exceptions for exceptions that are untreatable (such as an SQLException) can help get you out of the antipattern where you need to include a dozen types of exceptions in your method signature.  It&#8217;s a bit controversial with some of my colleagues but I really think it cuts down on some of the burden that managing exceptions can create, and allows you to consolidate and deal with the exceptions at a more appropriate place.</p>
]]></content:encoded>
			<wfw:commentRss>http://furtivecode.com/2007/07/15/exception-handling-best-practices-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
