<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>syntatic</title>
	<atom:link href="http://syntatic.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://syntatic.wordpress.com</link>
	<description></description>
	<lastBuildDate>Tue, 20 Dec 2011 08:10:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='syntatic.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>syntatic</title>
		<link>http://syntatic.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://syntatic.wordpress.com/osd.xml" title="syntatic" />
	<atom:link rel='hub' href='http://syntatic.wordpress.com/?pushpress=hub'/>
		<item>
		<title>MacPorts Snow Leopard Upgrade</title>
		<link>http://syntatic.wordpress.com/2009/08/30/macports-snow-leopard-upgrade/</link>
		<comments>http://syntatic.wordpress.com/2009/08/30/macports-snow-leopard-upgrade/#comments</comments>
		<pubDate>Mon, 31 Aug 2009 04:30:29 +0000</pubDate>
		<dc:creator>syntatic</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://syntatic.wordpress.com/?p=109</guid>
		<description><![CDATA[After upgrading to Snow Leopard using sudo port caused errors: no suitable image found no matching architecture in universal wrapper I was able to fix the problem by installing the Snow Leopard compatible version of MacPorts found on the download page. Once you&#8217;ve installed the new MacPorts  you&#8217;ll want to make sure the ports tree [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=109&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After upgrading to Snow Leopard using <code>sudo port</code> caused errors:</p>
<p>no suitable image found<br />
no matching architecture in universal wrapper</p>
<p>I was able to fix the problem by installing the Snow Leopard compatible version of MacPorts found on the <a href="http://www.macports.org/install.php">download page</a>.</p>
<p>Once you&#8217;ve installed the new MacPorts  you&#8217;ll want to make sure the ports tree and base sources are the latest available:</p>
<p><code>sudo port selfupdate</code></p>
<p>Then I ran a command to recompile:</p>
<p><code>sudo port upgrade --force installed</code></p>
<p><code><br />
dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found.  Did find:<br />
/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: no matching architecture in universal wrapper<br />
while executing<br />
"load /opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib"<br />
("package ifneeded Pextlib 1.0" script)<br />
invoked from within<br />
"package require Pextlib 1.0"<br />
(procedure "mportinit" line 382)<br />
invoked from within<br />
"mportinit ui_options global_options global_variations"<br />
Error: /opt/local/bin/port: Failed to initialize MacPorts, dlopen(/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib, 10): no suitable image found.  Did find:<br />
/opt/local/share/macports/Tcl/pextlib1.0/Pextlib.dylib: no matching architecture in universal wrapper</code></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syntatic.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syntatic.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syntatic.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syntatic.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syntatic.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syntatic.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syntatic.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syntatic.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syntatic.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syntatic.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syntatic.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syntatic.wordpress.com/109/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syntatic.wordpress.com/109/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syntatic.wordpress.com/109/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=109&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syntatic.wordpress.com/2009/08/30/macports-snow-leopard-upgrade/feed/</wfw:commentRss>
		<slash:comments>18</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">syntatic</media:title>
		</media:content>
	</item>
		<item>
		<title>JRuby 1.3.0 with AutoTest</title>
		<link>http://syntatic.wordpress.com/2009/08/13/jruby-1-3-0-with-autotest/</link>
		<comments>http://syntatic.wordpress.com/2009/08/13/jruby-1-3-0-with-autotest/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 17:24:40 +0000</pubDate>
		<dc:creator>syntatic</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://syntatic.wordpress.com/?p=103</guid>
		<description><![CDATA[I had some trouble getting JRuby 1.3.0 and ZenTest 4.1.3 autotest to work together.  Part of the problem is that the subprocess that launches autotest ignores any attempt to turn ObjectSpace on.  The other part of the problem is how jruby parses -u after the unit_diff command.  Here&#8217;s a way to hack in fixes for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=103&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I had some trouble getting JRuby 1.3.0 and ZenTest 4.1.3 autotest to work together.  Part of the problem is that the subprocess that launches autotest ignores any attempt to turn ObjectSpace on.  The other part of the problem is how jruby parses -u after the unit_diff command.  Here&#8217;s a way to hack in fixes for each problem:</p>
<p>Open zentest.rb in the ZenTest gem lib directory and add the following to the top.</p>
<p><pre class="brush: ruby;">
if RUBY_PLATFORM == 'java'
  require 'jruby'
  JRuby.objectspace = true
end
</pre></p>
<p>Open autotest.rb and in the initialize of the Autotest class change</p>
<p><pre class="brush: ruby;">
  self.unit_diff = &quot;unit_diff -u&quot;
</pre></p>
<p>to</p>
<p><pre class="brush: ruby;">
if RUBY_PLATFORM == 'java'
  self.unit_diff = &quot;unit_diff&quot;
else
  self.unit_diff = &quot;unit_diff -u&quot;
end
</pre></p>
<p>Run autotest.</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syntatic.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syntatic.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syntatic.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syntatic.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syntatic.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syntatic.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syntatic.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syntatic.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syntatic.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syntatic.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syntatic.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syntatic.wordpress.com/103/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syntatic.wordpress.com/103/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syntatic.wordpress.com/103/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=103&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syntatic.wordpress.com/2009/08/13/jruby-1-3-0-with-autotest/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">syntatic</media:title>
		</media:content>
	</item>
		<item>
		<title>The Closet JRubyists</title>
		<link>http://syntatic.wordpress.com/2008/11/25/the-closet-jrubyists/</link>
		<comments>http://syntatic.wordpress.com/2008/11/25/the-closet-jrubyists/#comments</comments>
		<pubDate>Tue, 25 Nov 2008 17:11:20 +0000</pubDate>
		<dc:creator>syntatic</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[jruby java jvm jboss]]></category>

		<guid isPermaLink="false">http://syntatic.wordpress.com/?p=83</guid>
		<description><![CDATA[For too long we&#8217;ve let the JRuby core contributors be the only voice for JRuby. I for one am guilty of taking and taking and taking from the tireless and thankless work the JRuby team has done. Charles, Ola, Tom, Nick, Vladimir and many others need to be thanked. Almost all of the JRuby projects [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=83&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For too long we&#8217;ve let the <a title="JRuby" href="http://jruby.codehaus.org/">JRuby</a> core contributors be the only voice for JRuby. I for one am guilty of taking and taking and taking from the tireless and thankless work the JRuby team has done. <a title="Charless Nutter" href="http://blog.headius.com/">Charles</a>, <a title="Ola Bini" href="http://olabini.com/blog/">Ola</a>, <a title="Thomas Enebo" href="http://www.bloglines.com/blog/ThomasEEnebo">Tom</a>, <a title="Nick Sieger" href="http://blog.nicksieger.com/">Nick</a>, <a title="Vladimir" href="http://blog.emptyway.com/">Vladimir</a> and many others need to be thanked.</p>
<p>Almost all of the JRuby projects I&#8217;ve been aware of or a part of are nowhere to be found on blogs, twitter or any other techno-coder communication flavor of the month. These projects aren&#8217;t going to become popular or have the codista spotlight on them. Most JRuby work is done in the deep inner workings of the corporate bureaucratic sinkhole that is enterprise IT. JRuby work is hidden behind non-disclosure agreements and kept secret because of the technological edge secrecy provides. The great stories haven&#8217;t been told and Charles is only able to hint at them because they really aren&#8217;t his to tell.</p>
<p>This is one such story and I hope that this post encourages other JRubyists to speak up and at least share parts of their JRuby experience. You owe it to the JRuby team and the Ruby community in general.</p>
<p>I&#8217;ll start out by being blunt and if you want to dismiss the rest of the post due to the next sentence then go ahead and move along because this post is not for you. JRuby is fantastic. The rest of this post will hopefully explain why that statement is true.</p>
<p>I joined a project that started out using MRI to wrap a C library, which built into a gem. The C library is a financial analytics package used to price instruments and extract contract specifications. Working in C with MRI was easy. The Ruby C API methods are simple and you almost get the sense you&#8217;re working in Ruby. Everything was lollipops and gumdrops just as working with Ruby should be. A rails application was built to display data provided by the gem. As the rails community moved through new deployment strategies so did we moving from webrick to mongrel with lighttpd, etc.</p>
<p>Then some of the business specifications required pricing to be done on hundreds of thousands of instruments at a time. An order of magnitude change in usage made speed and memory usage become very important. Pricing that many instruments in 3 months is not helpful. It needed to be done in parallel.</p>
<p>With this many instruments needing to be priced my team and I created a simple system for distributing the data and processing it in parallel using DRb similar in many ways to Hadoop. Had we been using JRuby at the time Hadoop would be perfect to wrap, but MRI didn&#8217;t give us that option.</p>
<p>Right around this point in time MRI became a huge bottleneck. MRI wasn&#8217;t going to handle the over 6 million objects we needed to push through DRb and even if it could get data to the workers on a grid of machines it couldn&#8217;t fully utilize all the cores on each machine. A combination of running out of memory and MRI failing to fully utilize all the cores of 64-core servers ground the project to a halt.</p>
<p>JRuby 1.0 had just been released and was starting to gain some traction. A 1.0 project? Certainly that can&#8217;t handle these problems. With nowhere else to go we took part of the C Ruby API and moved to a C, JNI, Java and JRuby stack. The new stack of tools wasn&#8217;t lollipops and gumdrops, but if it worked then who cares? Not me. I enjoyed the polygot work passing ruby objects into C callbacks and unit testing C from JRuby. Mind streaching stuff.</p>
<p>Turns out JRuby had no problems managing 8GB of memory and 6 million plus objects being passed around over DRb. Having the JVM do memory management for your Ruby objects isn&#8217;t that bad. I didn&#8217;t have to care about it anymore and not caring about the JVM is light years ahead of caring about MRI memory management. Yes, there is real value to using the JVM.</p>
<p>Additionally, JRuby fit into the rest of our MRI system because we weren&#8217;t having any problems with MRI talking to JRuby over DRb. I ran into a few problems with IO and Socket, but Charles and Ola were available via <a title="JRuby IRC" href="http://jruby.codehaus.org/IRC">IRC</a> and the problems were fixed in a matter of days. The availability of the JRuby team is something I haven&#8217;t found in any other community. Charles always put my questions before his other tasks and if you know anything about the man, he is busy. I don&#8217;t know how many <a href="http://dist.codehaus.org/jruby/talks/">talks</a> he&#8217;s done recently, but his twitter messages list so many cities I&#8217;m not sure where he lives anymore.</p>
<p>The initial pricing times came in at around an hour and fifteen minutes. Not bad considering the client was ok with 2 days. JRuby FTW!</p>
<p>Now the story could end here and I&#8217;d consider the transition to JRuby a success, but the story goes on.</p>
<p>Tweaking the JVM options allowed us to move the time to about 45 minutes once we upgraded to JRuby 1.1.1. I added some of my findings to the performance tuning wiki page, which you can find <a title="JRuby Performance Tuning" href="http://wiki.jruby.org/wiki/Performance_Tuning">here</a>. When was the last time you heard of someone passing some options to MRI&#8217;s garbage collector and see performance increases?</p>
<p>Exporting this much data turned out to be a problem as well.<span class="entry-content"> Excel&#8217;s 256 column limit wasn&#8217;t to happy about my 9,000+ column files and the standard ruby spreadsheet gem had trouble handling anything more than 7MB. Fortunately, the <a title="Apache POI" href="http://poi.apache.org/">Apache POI </a>(Java) project could handle some these problems as well as other features like auto-sizing columns and freeze panes, which no other MRI compatible gem could provide (Yes, there are Ruby POI bindings). I n</span><span class="entry-content">ever thought I&#8217;d enjoy working with POI/Excel&#8217;s API, but JRuby plus POI libraries had me smiling. Excel with a ruby feel rocks. Using JRuby to wrap pre-existing Java solutions is a great way to sleep at night.<br />
</span></p>
<p>Next we moved our Rails apps over to JRuby by deploying them as wars in <a title="JBoss" href="http://www.jboss.org/">JBoss</a>.  Managing the mongel problem was gone and JBoss turned out to be much faster anyway provided you give it enough memory. Nick Seiger has done some great work with warbler and the process was a breeze.  Unfortunately, with the number of apps we moved over the DBAs were starting to get upset about the 60+ database connections we used. <span class="entry-content">Rails 2.2 wasn&#8217;t around yet so connection pooling inside of Rails wasn&#8217;t an option, but using JNDI inside of JBoss worked perfectly. Using prexisting Java tool&#8217;s with an adapter written by the JRuby team made my job a lot easier again. </span></p>
<p><span class="entry-content">Meanwhile, JRuby was still releasing new versions. Using 1.1.3 moved our pricing time to about 15 minutes. Yes, from 1 hour and 15 to 15. There were some other tweaks we made along the way, but the most significant improvements came from JRuby itself. </span><span class="entry-content">In it&#8217;s current state the </span><span class="entry-content">C/Java/JRuby API is now exposed through Merb (http/json), DRb (druby), Rails (http/xml, http/html) and an Excel plugin and more opportunities are ahead. </span></p>
<p><span class="entry-content">We&#8217;re able to upgrade to a new version of JRuby within a day of release. Yes, it is that stable and easy to switch. Yes, 1.1.5 is currently in our production environment. Upgrading to new versions of MRI was usually a nightmare for me so I welcome the stability. JRuby being a jar has some wonderful benefits.<br />
</span></p>
<p><span class="entry-content">I won&#8217;t go into detail about the other libraries we&#8217;ve wrapped with JRuby including JFreeChart and QuicKFIX/J. I won&#8217;t go into detail about using JRuby with CORBA or RMI and the many other tools that become available to you with the use of JRuby. </span></p>
<p><span class="entry-content">Currently, MRI isn&#8217;t even installed on our production servers and I don&#8217;t see it being installed in the future. Most if not all the ways that the data is available or usable is due to JRuby. JRuby made my job much easier and many of the features I&#8217;ve implemented possible. Give it a try.<br />
</span></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syntatic.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syntatic.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syntatic.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syntatic.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syntatic.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syntatic.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syntatic.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syntatic.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syntatic.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syntatic.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syntatic.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syntatic.wordpress.com/83/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syntatic.wordpress.com/83/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syntatic.wordpress.com/83/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=83&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syntatic.wordpress.com/2008/11/25/the-closet-jrubyists/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">syntatic</media:title>
		</media:content>
	</item>
		<item>
		<title>Connection Pooling for Rails on JRuby using JNDI and JDBC</title>
		<link>http://syntatic.wordpress.com/2008/08/20/connection-pooling-for-rails-on-jruby-using-jndi-and-jdbc/</link>
		<comments>http://syntatic.wordpress.com/2008/08/20/connection-pooling-for-rails-on-jruby-using-jndi-and-jdbc/#comments</comments>
		<pubDate>Wed, 20 Aug 2008 07:10:34 +0000</pubDate>
		<dc:creator>syntatic</dc:creator>
				<category><![CDATA[jruby]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[jboss]]></category>
		<category><![CDATA[jdbc]]></category>
		<category><![CDATA[jndi]]></category>
		<category><![CDATA[pooling]]></category>

		<guid isPermaLink="false">http://syntatic.wordpress.com/?p=69</guid>
		<description><![CDATA[While JRuby is getting a lot of attention for its ability to use multiple cores with a single kernel thread. There are some other performance advantages that JRuby hands you as a Rails developer from Java&#8217;s toolkit. Not only does using JDBC allow connection usage to be concurrent, but managing the database connections becomes an [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=69&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While JRuby is getting a lot of <a title="Ruby's Threading Future" href="http://www.infoq.com/news/2007/05/ruby-threading-futures">attention</a> for its ability to use multiple cores with a single kernel thread. There are some other performance advantages that JRuby hands you as a Rails developer from Java&#8217;s toolkit. Not only does using JDBC allow <a title="MRI Ruby + MySQL + Threads == Stop the world... JRuby doesn't" href="http://blog.hungrymachine.com/2008/8/17/ruby-and-multi-threaded-mysql-mri-vs-jruby-jdbc-vs-dataobjects-mysql">connection usage to be concurrent</a>, but managing the database connections becomes an easier process as well.</p>
<p>I&#8217;ve been using JNDI (Java Naming and Directory Interface) to manage Oracle database connections for multiple warred up Rails projects deployed inside of a JBoss application server.</p>
<p>Setting up connection pooling is an easy process when you can find good documentation.  Hopefully this will aide the setup process.</p>
<p>If you aren&#8217;t using Oracle for your database (MySQL, PostgreSQL, etc) the instructions don&#8217;t change much.</p>
<p>First you&#8217;ll need to know where you are deploying wars inside your jboss directory (your jboss context). This is usually at &lt;path to jboss&gt;/server/default/deploy where &#8216;default&#8217; is the context.  In the context directory we&#8217;ll need to copy the JDBC driver you&#8217;ll use into the &#8216;lib&#8217; directory. I&#8217;m using Oracle so the jar will be ojdbc14.jar, ojdbc5.jar, or ojdbc6.jar. Copying the database drivers into lib means that JBoss will automatically add the jar to the classpath.</p>
<p>Next we&#8217;ll move into the &#8216;deploy&#8217; directory off of our JBoss context.  You&#8217;ll want to create a xml datasource file.  Using Oracle my file will be named oracle-ds.xml and it looks like this:</p>
<p><pre class="brush: xml;">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;datasources&gt;
  &lt;local-tx-datasource&gt;
    &lt;jndi-name&gt;DevelopmentOracleDS&lt;/jndi-name&gt;
    &lt;connection-url&gt;jdbc:oracle:thin:@odev.domain.com:1523:dbdev&lt;/connection-url&gt;
    &lt;driver-class&gt;oracle.jdbc.driver.OracleDriver&lt;/driver-class&gt;
    &lt;user-name&gt;user&lt;/user-name&gt;
&lt;password&gt;pass&lt;/password&gt;
    &lt;min-pool-size&gt;0&lt;/min-pool-size&gt;
    &lt;max-pool-size&gt;5&lt;/max-pool-size&gt;
    &lt;blocking-timeout-millis&gt;10000&lt;/blocking-timeout-millis&gt;
    &lt;idle-timeout-minutes&gt;5&lt;/idle-timeout-minutes&gt;
    &lt;exception-sorter-class-name&gt;org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter&lt;/exception-sorter-class-name&gt;
    &lt;!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml --&gt;
    &lt;metadata&gt;
       &lt;type-mapping&gt;Oracle9i&lt;/type-mapping&gt;
    &lt;/metadata&gt;
  &lt;/local-tx-datasource&gt;
&lt;/datasources&gt;
</pre></p>
<p>JBoss should automatically pick up the JNDI name and make it available.</p>
<p>Next we need to edit our rails database.yml file to look like this:</p>
<p><pre class="brush: ruby;">
&lt;% if defined?($servlet_context) %&gt;
development:
   adapter: jdbc
   jndi: jdbc:DevelopmentOracleDS
   driver: oracle.jdbc.driver.OracleDriver
&lt;% else %&gt;
development:
  adapter: jdbc
  driver: oracle.jdbc.driver.OracleDriver
  url: jdbc:oracle:thin:@odev.domain.com:1523:dbde
  username: user
  password: pass
&lt;% end %&gt;
</pre></p>
<p>Because the ActiveRecord will no longer be controlling a persistent database connection you&#8217;ll need to disconnect from JNDI using the following code provided by Nick Sieger.</p>
<p><pre class="brush: ruby;">
# config/initializers/close_connections.rb
if defined?($servlet_context)
   require 'action_controller/dispatcher'

    ActionController::Dispatcher.after_dispatch do      
      ActiveRecord::Base.clear_active_connections!
   end
end
</pre></p>
<p>Redeploy your rails application and now your database connections are pooled.</p>
<p>If you&#8217;re using <a title="GlassFish" href="http://java.sun.com/javaee/community/glassfish/">GlashFish</a> the team over at LinkedIn has <a title="GlashFish Connection Pooling" href="http://blog.linkedin.com/blog/2008/08/jdbc-connection.html">setup instructions</a> on their <a title="LinkedIn Blog" href="http://blog.linkedin.com/blog/">blog</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syntatic.wordpress.com/69/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syntatic.wordpress.com/69/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syntatic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syntatic.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syntatic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syntatic.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syntatic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syntatic.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syntatic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syntatic.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syntatic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syntatic.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syntatic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syntatic.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syntatic.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syntatic.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=69&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syntatic.wordpress.com/2008/08/20/connection-pooling-for-rails-on-jruby-using-jndi-and-jdbc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">syntatic</media:title>
		</media:content>
	</item>
		<item>
		<title>Speaking at OSCON 2008</title>
		<link>http://syntatic.wordpress.com/2008/06/12/speaking-at-oscon-2008/</link>
		<comments>http://syntatic.wordpress.com/2008/06/12/speaking-at-oscon-2008/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 04:48:48 +0000</pubDate>
		<dc:creator>syntatic</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://syntatic.wordpress.com/?p=45</guid>
		<description><![CDATA[In July I&#8217;ll be speaking at OSCON 2008 with Dave Hoover. We&#8217;ll talk about our experiences with Apprenticeships on Open Source. I&#8217;ll provide the apprentice side and Dave will be providing the mentor side. Additionally, I&#8217;m sure you&#8217;ll receive some insights from Dave&#8217;s upcoming book Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman. I encourage [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=45&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In July I&#8217;ll be speaking at <a title="OSCON 2008" href="http://en.oreilly.com/oscon2008/public/content/home">OSCON 2008</a> with <a title="Dave Hoover" href="http://redsquirrel.com/cgi-bin/dave">Dave Hoover</a>.  We&#8217;ll talk about our experiences with <a href="http://en.oreilly.com/oscon2008/public/schedule/detail/2348">Apprenticeships on Open Source</a>.  I&#8217;ll provide the apprentice side and Dave will be providing the mentor side.</p>
<p>Additionally, I&#8217;m sure you&#8217;ll receive some insights from Dave&#8217;s upcoming book  <a title="Apprenticeship Patterns" href="http://softwarecraftsmanship.oreilly.com/wiki">Apprenticeship Patterns: Guidance for the Aspiring Software Craftsman</a>.  I encourage you to read some of the initial chapters as they are a great source of wisdom and inspiration for any one who is looking to grow in the field of software development.<a href="../"> </a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syntatic.wordpress.com/45/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syntatic.wordpress.com/45/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syntatic.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syntatic.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syntatic.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syntatic.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syntatic.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syntatic.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syntatic.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syntatic.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syntatic.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syntatic.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syntatic.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syntatic.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syntatic.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syntatic.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=45&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syntatic.wordpress.com/2008/06/12/speaking-at-oscon-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">syntatic</media:title>
		</media:content>
	</item>
		<item>
		<title>MacPorts erlang &#8220;Bus error&#8221; due to Mac OS X 10.5.3 Update</title>
		<link>http://syntatic.wordpress.com/2008/06/12/macports-erlang-bus-error-due-to-mac-os-x-1053-update/</link>
		<comments>http://syntatic.wordpress.com/2008/06/12/macports-erlang-bus-error-due-to-mac-os-x-1053-update/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 02:16:53 +0000</pubDate>
		<dc:creator>syntatic</dc:creator>
				<category><![CDATA[erlang]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[macports]]></category>
		<category><![CDATA[os x]]></category>

		<guid isPermaLink="false">http://syntatic.wordpress.com/?p=43</guid>
		<description><![CDATA[The past few weeks, I&#8217;ve used my train ride home to dig deeper and deeper into erlang. Then after an OS X update released on May 28, 2008 my macports erlang installation stopped working! Running erl caused a &#8220;bus error&#8221; to occur.  Trying to recompile erlang caused the same bus error to occur.  Directions below [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=43&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The past few weeks, I&#8217;ve used my train ride home to dig deeper and deeper into erlang.  Then after an OS X update released on May 28, 2008 my macports erlang installation stopped working! Running erl caused a &#8220;bus error&#8221; to occur.  Trying to recompile erlang caused the same bus error to occur.  Directions below work whether you have an existing erlang installation or you&#8217;re trying to compile erlang without prior installation.</p>
<p>Here&#8217;s how I was able to get it working again:</p>
<p>Open the erlang portfile with your favorite text editor, I prefer vi.</p>
<p><code>cd /opt/local/var/macports/sources/rsync.macports.org/release/ports/lang/erlang</code><br />
<code>sudo vi Portfile</code></p>
<p>Delete this line from configure.args attribute:</p>
<p><code> --enable-hipe                   \</code></p>
<p>The MacPorts configuration doesn&#8217;t depend on the enabling of HiPE and erlang will work fine without it. By default HiPE (Hi-Performance Erlang) isn&#8217;t enabled or supported on Mac OS X so I&#8217;m not sure why the Portfile enables it.  HiPE is a project aimed at creating a faster Erlang by compiling to native code. You can find out more about HiPE <a title="Hi-Performance Erlang" href="http://www.it.uu.se/research/group/hipe/index.shtml">here</a>.</p>
<p>Reinstall erlang:</p>
<p><code>sudo port uninstall erlang</code><br />
<code>sudo port install erlang</code></p>
<p>You should see a message that says: Portfile changed since last build; discarding previous state.</p>
<p>Use erlang again!</p>
<p>If you want to know when the MacPorts issue is solved you can follow the Trac ticket <a title="MacPorts Erlang Bus Error Ticket" href="http://trac.macports.org/ticket/15459">here</a>.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syntatic.wordpress.com/43/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syntatic.wordpress.com/43/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syntatic.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syntatic.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syntatic.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syntatic.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syntatic.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syntatic.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syntatic.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syntatic.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syntatic.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syntatic.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syntatic.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syntatic.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syntatic.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syntatic.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=43&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syntatic.wordpress.com/2008/06/12/macports-erlang-bus-error-due-to-mac-os-x-1053-update/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">syntatic</media:title>
		</media:content>
	</item>
		<item>
		<title>WinISD Accuracy and Subwoofers</title>
		<link>http://syntatic.wordpress.com/2008/04/28/winisd-accuracy-and-subwoofers/</link>
		<comments>http://syntatic.wordpress.com/2008/04/28/winisd-accuracy-and-subwoofers/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 02:44:34 +0000</pubDate>
		<dc:creator>syntatic</dc:creator>
				<category><![CDATA[audio]]></category>

		<guid isPermaLink="false">http://syntatic.wordpress.com/?p=34</guid>
		<description><![CDATA[To those of you who plan to use WinISD for predicting subwoofer maximum SPL. Be weary of using WinISD to predict maximum output. WinISD can be a great tool for predicting speakers at small amplitudes, but it is a little naive concerning the non-linearities that occur with high amplitudes. WinISD makes all of its predictions [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=34&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>To those of you who plan to use <a title="WinISD" href="http://www.linearteam.dk/">WinISD</a> for predicting subwoofer maximum SPL.</p>
<p>Be weary of using WinISD to predict maximum output. WinISD can be a great tool for predicting speakers at small amplitudes, but it is a little naive concerning the non-linearities that occur with high amplitudes.</p>
<p>WinISD makes all of its predictions based off of T/S parameters, which are small-signal specifications and they are not always scaleable to larger power levels. You <em>hope</em> they don&#8217;t change in order to use them as an indication of performance, but they are better used for on deciding on box size and box type.</p>
<p>It&#8217;s also important to remember two different speakers with the exact same T/S parameters can have extremely different parameters at a given X-max. With small drivers it isn&#8217;t that big of a deal since X-max isn&#8217;t a big factor, but high excursion drivers are a different story. It&#8217;s safe to say that frequency response changes with power output especially for lower frequencies and WinISD doesn&#8217;t model the changes since it models in an &#8216;ideal&#8217; world.</p>
<p>By ideal I mean WinISD assumes that a driver won&#8217;t suffer from power compression and more generally assumes that a driver&#8217;s response won&#8217;t change as additional power is applied.</p>
<p>Take a look at <a href="http://www.avtalk.co.uk/forum/index.php?t=thread&amp;frm_id=50&amp;rid=0&amp;SQ=0" target="_blank">AV Talks Tests</a> and <a href="http://www.hometheatershack.com/forums/subwoofer-tests/6015-index-subwoofer-tests-manufacturer-model.html" target="_blank">Ilkka&#8217;s Tests</a>. You&#8217;ll notice that every one of the tested drivers suffer from power compression at lower frequencies and the lower you go the greater the problem becomes. As <a href="http://www.ultimateavmag.com/features/604way/">Keith Yates</a> puts it, &#8220;Power compression is the audio equivalent of getting shortchanged.&#8221; WinISD does not give you any indication of when your design is going to get shortchanged, which makes it very hard to compare to subwoofers that are already tested.</p>
<p>Another important piece of WinISD that is missing is that it doesn&#8217;t indicate how THD levels relate to SPL and frequency. For example, WinISD may show a maximum ouput of 114dB  at 40Hz, but it won&#8217;t tell you how much distortion exists at that SPL level.</p>
<p>Further reading on high amplitude scenarios: <a href="http://www.klippel.de/download/Nonlin/klippel,%20Loudspeaker%20nonlinearities%20-%20causes%20and%20symptoms.pdf" target="_blank">here</a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syntatic.wordpress.com/34/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syntatic.wordpress.com/34/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syntatic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syntatic.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syntatic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syntatic.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syntatic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syntatic.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syntatic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syntatic.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syntatic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syntatic.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syntatic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syntatic.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syntatic.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syntatic.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=34&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syntatic.wordpress.com/2008/04/28/winisd-accuracy-and-subwoofers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">syntatic</media:title>
		</media:content>
	</item>
		<item>
		<title>Impedance Matching</title>
		<link>http://syntatic.wordpress.com/2008/04/28/impedance-matching/</link>
		<comments>http://syntatic.wordpress.com/2008/04/28/impedance-matching/#comments</comments>
		<pubDate>Tue, 29 Apr 2008 02:32:12 +0000</pubDate>
		<dc:creator>syntatic</dc:creator>
				<category><![CDATA[agile]]></category>
		<category><![CDATA[consulting]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://syntatic.wordpress.com/?p=42</guid>
		<description><![CDATA[As I&#8217;ve moved further into software development consulting, I&#8217;m becoming more aware of the role that empathy plays in all client relationships. When a client calls because disaster has struck their software, it is imperative that I match their level of concern. If my level of concern doesn&#8217;t match their level then I&#8217;ve failed as [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=42&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As I&#8217;ve moved further into software development consulting, I&#8217;m becoming more aware of the role that empathy plays in all client relationships.  When a client calls because disaster has struck their software, it is imperative that I match their level of concern.  If my level of concern doesn&#8217;t match their level then I&#8217;ve failed as a consultant.  I can deliver software on time.  I can estimate projects accurately.  I can have technical mastery.  If I can&#8217;t be in their shoes and convey that state to them then I&#8217;m not developing a long-term relationship.  Genuinely share in their work by staying on the same page.</p>
<p>Impedance matching isn&#8217;t solely about the words that you say or write.  Your overall attitude and <a title="Tone of Voice" href="http://members.aol.com/nonverbal2/tone.htm">tone of voice</a> matter too.  Additionally, it&#8217;s important to recognize the form of communication used has implicit levels of concern and care. <a title="Impedance Matching" href="http://en.wikipedia.org/wiki/Impedance_matching">Impedance matching</a> is the act of meeting your clients social attitude, orientation and behavior to maximize communication transfer and minimize problems with the client.</p>
<p>In my realm of work receiving messages often occur via instant message.  Unfortunately, instant messages are easy to overlook and relay little context.  Receiving a message that says &#8220;the server is down&#8221; can mean hundreds of different things.  Most of them require a simple reply, &#8220;I&#8217;ll take a look.&#8221;  Receiving a message that says &#8220;SERVER!!  DOWN!!&#8221; means that the instant messaging needs to stop.  While the client is choosing to use instant message the amplitude of the conversation is far beyond any instant message can convey appropriately.  Pick up a phone, their impedance demands it.</p>
<p>How I communicate over instant message changes drastically with each client.  Most of the time, I think it is best to adopt whatever format the client uses.  If they write in complete sentences with capitalization and punctuation then I meet that formality.  I let them set the stage for professional communication.</p>
<p>As consultants we want our clients to have positive feelings about us.  We want the work to be collaborative instead of adversarial.  We need to bend our thoughts and actions to meet theirs.  As consultants it is our job to be in their shoes and earn their trust.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syntatic.wordpress.com/42/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syntatic.wordpress.com/42/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syntatic.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syntatic.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syntatic.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syntatic.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syntatic.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syntatic.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syntatic.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syntatic.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syntatic.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syntatic.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syntatic.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syntatic.wordpress.com/42/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syntatic.wordpress.com/42/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syntatic.wordpress.com/42/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=42&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syntatic.wordpress.com/2008/04/28/impedance-matching/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">syntatic</media:title>
		</media:content>
	</item>
		<item>
		<title>Tools in the Studio</title>
		<link>http://syntatic.wordpress.com/2007/11/30/tools-in-the-studio/</link>
		<comments>http://syntatic.wordpress.com/2007/11/30/tools-in-the-studio/#comments</comments>
		<pubDate>Fri, 30 Nov 2007 15:42:46 +0000</pubDate>
		<dc:creator>syntatic</dc:creator>
				<category><![CDATA[craftsmanship]]></category>
		<category><![CDATA[obtiva]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[process]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://syntatic.wordpress.com/2007/11/30/tools-in-the-studio/</guid>
		<description><![CDATA[Process Obtiva&#8217;s Studio is busy churning out projects and I thought it would be good to let the rest of the world what we are up to. Most of our rails projects are now using CruiseControl.rb, Zentest, restful_authentication, gems, query_trace, attachment_fu, Rcov, redgreen, exception_notification and mocha. While the list may seem long we are always [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=31&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Process</strong></p>
<p><a href="http://www.obtiva.com/" title="Obtiva">Obtiva&#8217;s Studio</a> is busy churning out projects and I thought it would be good to let the rest of the world what we are up to. Most of our rails projects are now using <a href="http://cruisecontrolrb.thoughtworks.com/" title="Cruise Control for Ruby">CruiseControl.rb</a>, <a href="http://www.zenspider.com/ZSS/Products/ZenTest/">Zentest</a>, <a href="http://svn.techno-weenie.net/projects/plugins/restful_authentication/" title="Restful Authentication">restful_authentication</a>, <a href="http://projects.wh.techno-weenie.net/browser/r1088/facebook/vendor/plugins/gems" title="gems plugin">gems</a>, <a href="https://terralien.devguard.com/svn/projects/plugins/query_trace/" title="Query Trace">query_trace</a>,<a href="http://svn.techno-weenie.net/projects/plugins/attachment_fu/" title="Attachment Fu"> attachment_fu</a>, <a href="http://agilewebdevelopment.com/plugins/rails_rcov" title="Rails Rcov">Rcov,</a> <a href="http://on-ruby.blogspot.com/2006/06/more-fun-with-redgreen.html" title="redgreen">redgreen</a>, <a href="http://dev.rubyonrails.org/svn/rails/plugins/exception_notification/" title="Exception Notification">exception_notification</a> and <a href="http://mocha.rubyforge.org/" title="Mocha">mocha.</a> While the list may seem long we are always looking for new tools.  If you have any suggestions please comment.</p>
<p>As a team we&#8217;ve setup <a href="http://growl.info/" title="Growl">growl</a> <a href="http://www.dcmanges.com/blog/25" title="CruiseControl.rb with Growl">integrations for cruise</a>, autotest and redgreen which is strongly suggested.  Make TDD easier for yourself.  As a team we really need to put out a tutorial on how to set all of this up properly.  In my opinion you are doing yourself a disservice without them.</p>
<p>A quick side note, grep -r is mostly dead around here due to <a href="http://search.cpan.org/~petdance/ack-1.74/Ack.pm" title="Ack">ack</a>.  Try ack, you&#8217;ll love it.</p>
<p><strong>Interests</strong></p>
<p>We&#8217;ve also pushed a lot of our interest into <a href="http://jruby.codehaus.org/" title="JRuby">JRuby</a> and <a href="http://www.erlang.org/" title="Erlwng">Erlang</a>.  We are all extremely excited for the opportunities those two tools will provide.  JRuby&#8217;s memory usage have our mouths drooling.  If you are not paying attention to Charles Nutter&#8217;s <a href="http://headius.blogspot.com/" title="Charles Nutter">blog</a> you are missing out!  The pace of everything surrounding JRuby is astounding.  <a href="http://merbivore.com/" title="Merb">Merb</a> and <a href="http://sinatra.rubyforge.org/" title="Sinatra">Sinatra</a> are on our radar.</p>
<p><strong>People</strong></p>
<p>Joseph Leddy is deep in the bowels of <a href="http://activewarehouse.rubyforge.org/">ActiveWarehouse</a> and <a href="http://fastercsv.rubyforge.org/" title="FasterCSV">FasterCSV</a> where he is making millions of SQL rows consumable for our clients.   Joseph is also exploring  <a href="http://activewarehouse.rubyforge.org/etl/">ETL Tool</a>. He&#8217;s been aggressively implementing state machines alongside access control also. Tools unique to Joseph are  <a href="http://agilewebdevelopment.com/plugins/query_analyzer" title="Query Analyzer">query_analyzer</a> and <a href="http://errtheblog.com/post/21" title="Tail Logs">tail_logs</a> which I&#8217;m eager to take a look at.  Joseph recently implemented some multi-server file uploading using <a href="http://backgroundrb.rubyforge.org/" title="backgroundrb">BackgrounDRB</a> with tests!</p>
<p>Nate Jackson&#8217;s work involves <a href="http://blog.evanweaver.com/articles/2007/07/09/ultrasphinx-searching-the-world-in-231-seconds/" title="Sphinx Search">sphinx</a> via <a href="http://www.datanoise.com/articles/2007/3/23/acts_as_sphinx-plugin" title="Acts As Sphinx">acts_as_sphinx</a> mashed into <a href="http://errtheblog.com/post/4791" title="Will Paginate">will_paginate</a> and <a href="http://aspell.net/" title="Aspell">aspell</a>.  He&#8217;s created an intelligent word suggestor for misspelled words and phrases using <a href="http://sourceforge.net/projects/raspell/" title="RAspell">raspell</a>.  Nate spent a day or two scraping the web with <a href="http://code.whytheluckystiff.net/hpricot/" title="Hpricot">hpricot</a>, <a href="http://mechanize.rubyforge.org/mechanize/" title="Mechanize">WWW:Mechanize</a> , <a href="http://csspool.rubyforge.org/csspool/" title="csspool">csspool</a> and <a href="http://haml.hamptoncatlin.com/docs/sass" title="Sass">sass</a>. Nate&#8217;s also pushing the studio into <a href="http://deadlock.netbeans.org/hudson/job/ruby/" title="Ruby NetBeans">NetBeans for Ruby</a>, <a href="http://rspec.rubyforge.org/" title="Rspec">RSpec</a>, <a href="http://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard" title="Dvorak">Dvorak</a> and Leopard. Nate likes to include <a href="http://svn.rtra.in/public/plugins/svn_tools/" title="SVN Tools">svn_tools</a> and <a href="http://www.pivotalblabs.com/articles/2007/10/15/dot-rake" title="dot.rake">dot.rake</a> in his projects.</p>
<p><a href="http://redsquirrel.com/cgi-bin/dave" title="Dave Hoover">Dave Hoover</a>&#8216;s working on innovative interfaces with Ajax and <a href="http://backgroundrb.rubyforge.org/" title="BackgrounDRB">BackgroundDRB</a>.   Dave has picked up <a href="http://agilewebdevelopment.com/plugins/ar_extensions" title="AR Extensions">AR::Extensions</a> as a hammer for memory and speed intensive ActiveRecord imports.  He&#8217;s also weaving together <a href="http://agilewebdevelopment.com/plugins/fleximage" title="Fleximage">fleximage</a> and <a href="http://svn.techno-weenie.net/projects/plugins/attachment_fu/" title="Attachment Fu">attachment_fu</a> in a few projects.  I don&#8217;t know much about it yet, but Dave seemed please with <a href="http://ziya.liquidrail.com/" title="Ziya Charts for Rails">ZIYA</a> and Flash chart delivery.  Dave&#8217;s spent some of his time plunging into <a href="http://sinatra.rubyforge.org/" title="Sinatra">Sinatra</a> too.  Dave&#8217;s editor of choice is <a href="http://macromates.com/" title="TextMate">Textmate</a>.  Other things in his camp include: <a href="http://www.liquidmarkup.org/" title="Liquid">liquid</a>, <a href="http://whytheluckystiff.net/ruby/redcloth/" title="RedCloth">RedCloth</a>, and <a href="http://chronic.rubyforge.org/" title="Chronic">chronic</a>.</p>
<p>Dave also released a gem called TamTam using <a href="http://code.whytheluckystiff.net/hpricot/" title="Hpricot">hpricot</a> that will inline css.  You can find the gem <a href="http://tamtam.rubyforge.org/" title="Tamtam">here</a>. Dave and Nate paired up to create Obtiva&#8217;s first OS X widget <a href="http://madmimi.com/widgets/tamtam/" title="TamTam Widget">here</a>.  I paired up with Dave to create a rails plugin for TamTam too which is named <a href="http://tamtam.rubyforge.org/svn/plugins/inline_css/" title="Inline CSS">inline_css</a>.</p>
<p><a href="http://daddy.platte.name/" title="Ryan Platte">Ryan Platte</a> has put together some sweet mashups with <a href="http://code.google.com/webtoolkit/" title="GWT">GWT</a>, <a href="http://developer.aim.com/presenceMain.jsp" title="AIM Presence">AIM Presence API</a>, BackgrounDRb and <a href="http://activescaffold.com/" title="Active Scaffold.">ActiveScaffold</a>.  While Ryan wasn&#8217;t a huge fan of  ActiveScaffold I was impressed.  His editor of choice is <a href="http://www.vim.org/scripts/script.php?script_id=1567" title="rails.vim"> rails.vim</a>.  For testing he is using <a href="http://unit-test-ar.rubyforge.org/" title="Unit Record">UnitRecord</a> to speed up his test suite among its other benefits.  Ryan is now promoting the use of <a href="http://www.dcmanges.com/blog/38" title="Factories in Rails">factories</a> over fixtures. Ryan and Gareth demoed <a href="http://ruby-prof.rubyforge.org/" title="Ruby Prof">Ruby Prof</a> to the rest of the studio. Ryan introduced me to the wonderful world of <a href="http://www.gnu.org/software/screen/" title="GNU Screen">GNU Screen</a>. The little exposure I&#8217;ve had to his projects has me very impressed.</p>
<p><a href="http://counterflo.ws/" title="Gareth Reeves">Gareth Reeves</a> is doing work in <a href="http://en.wikipedia.org/wiki/Event_Driven_Architecture" title="Event Driven Architecture">Event Driven Architecture</a>  and <a href="http://en.wikipedia.org/wiki/Event-driven_programming" title="Event Driven Programming">Event Driven Programming</a>.  He introduced me to testing Java with <a href="http://www.jmock.org/" title="jMock">jMock</a>.</p>
<p>I&#8217;ve been working with <a href="http://www.pluitsolutions.com/projects/amazon-ecs" title="Amazon ECS">Amazon ECS</a>, <a href="http://streamlinedframework.org/" title="Streamlined">Streamlined</a> and a session bridge between rails and Perl&#8217;s CGI Session.  I strapped subdomain/SEO love onto a project using <a href="http://agilewebdevelopment.com/plugins/request_routing" title="Request Routing">request_routing</a>, <a href="https://fngtps.com/svn/rails-plugins/trunk/url_for_domain/" title="Url for Domain">url_for_domain</a>, and <a href="http://agilewebdevelopment.com/plugins/acts_as_sluggable" title="Acts As Sluggable">acts_as_sluggable</a>.  Nate and I pulled <a href="http://www.activemerchant.org/" title="Active Merchant">ActiveMerchant</a> into a project which was much less painful than expected.  If you&#8217;re doing complex condition building my tool of choice is <a href="http://agilewebdevelopment.com/plugins/condition_builder" title="Condition Builder">condition_builder</a>. I also extended restful_authentication so that it can support authentication for multiple types of users.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syntatic.wordpress.com/31/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syntatic.wordpress.com/31/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syntatic.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syntatic.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syntatic.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syntatic.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syntatic.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syntatic.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syntatic.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syntatic.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syntatic.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syntatic.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syntatic.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syntatic.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syntatic.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syntatic.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=31&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syntatic.wordpress.com/2007/11/30/tools-in-the-studio/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">syntatic</media:title>
		</media:content>
	</item>
		<item>
		<title>ruby on rails: merge! &#8216;params&#8217; with a hash indifferently</title>
		<link>http://syntatic.wordpress.com/2007/11/28/ruby-on-rails-merge-params-with-a-hash-indifferently/</link>
		<comments>http://syntatic.wordpress.com/2007/11/28/ruby-on-rails-merge-params-with-a-hash-indifferently/#comments</comments>
		<pubDate>Thu, 29 Nov 2007 04:01:47 +0000</pubDate>
		<dc:creator>syntatic</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://syntatic.wordpress.com/2007/11/28/ruby-on-rails-merge-params-with-a-hash-indifferently/</guid>
		<description><![CDATA[When using a merge! with the params method key value pairs are not clobbered if the calling hash is using symbols as keys. If params[:colors] contains: and sym_hsh contains: a merge! of the two will result in this: Notice the duplicate blue key and mixed key types. Some are symbols and some are strings. Using [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=36&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When using a merge! with the params method key value pairs are not clobbered if the calling hash is using symbols as keys.</p>
<p>If params[:colors] contains:</p>
<p><pre class="brush: ruby;">
params[:colors] = { &quot;blue&quot; =&gt; false, &quot;green&quot; =&gt; true }
</pre></p>
<p>and sym_hsh contains:</p>
<p><pre class="brush: ruby;">
sym_hsh = { :blue =&gt; true, :red =&gt; false }
</pre></p>
<p>a merge! of the two will result in this:</p>
<p><pre class="brush: ruby;">
sym_hsh.merge!(params[:colors])
=&gt; { &quot;blue&quot;=&gt; false, :blue =&gt; true, :red =&gt; false, &quot;green&quot; =&gt; true }
</pre></p>
<p>Notice the duplicate blue key and mixed key types.  Some are symbols and some are strings.</p>
<p>Using rails you probably haven&#8217;t run into this problem much.  Behind the scenes in most of rails hashes are made indifferent to key type.  Indifference protects developers from running into problems with strings and symbols as hash keys.</p>
<p>The rails code base uses the class HashWithIndifferentAccess allowing hashes to use strings and hashes interchangeably.</p>
<p>When creating new hashes in a rails project it is best to avoid the problem alongside rails.  You can do this by creating hashes two different ways:</p>
<p><pre class="brush: ruby;">
hsh = HashWithIndifferentAccess.new( :blue =&gt; true, :red =&gt; false)
</pre></p>
<p>or this which does the above for you:</p>
<p><pre class="brush: ruby;">
{ :blue =&gt; true, :red =&gt; false }.with_indifferent_access
</pre></p>
<p>Now the merge! will clobber :blue instead of appending another :blue key.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/syntatic.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/syntatic.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/syntatic.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/syntatic.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/syntatic.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/syntatic.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/syntatic.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/syntatic.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/syntatic.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/syntatic.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/syntatic.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/syntatic.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/syntatic.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/syntatic.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/syntatic.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/syntatic.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=syntatic.wordpress.com&amp;blog=1050287&amp;post=36&amp;subd=syntatic&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://syntatic.wordpress.com/2007/11/28/ruby-on-rails-merge-params-with-a-hash-indifferently/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="" medium="image">
			<media:title type="html">syntatic</media:title>
		</media:content>
	</item>
	</channel>
</rss>
