<?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>mmrobins.com &#187; Technology</title>
	<atom:link href="http://www.mmrobins.com/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mmrobins.com</link>
	<description></description>
	<lastBuildDate>Thu, 10 Oct 2013 17:08:56 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.6</generator>
		<item>
		<title>New Job At PuppetLabs</title>
		<link>http://www.mmrobins.com/2010/05/new-job-at-puppetlabs/</link>
		<comments>http://www.mmrobins.com/2010/05/new-job-at-puppetlabs/#comments</comments>
		<pubDate>Sat, 29 May 2010 19:05:25 +0000</pubDate>
		<dc:creator>mmrobins</dc:creator>
				<category><![CDATA[food]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.mmrobins.com/?p=543</guid>
		<description><![CDATA[More technical info on my nerdy blog for those that don&#8217;t fall asleep to a few programming terms, but I&#8217;ve got a new job at Puppet Labs.  Aside from the technology, I&#8217;m excited about the shorter commute to downtown, the insanely better food options because of all the food carts nearby, and of course the [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>More technical info on my <a href="http://www.mattrobinson.net/2010/05/29/working-at-puppet-labs/">nerdy blog</a> for those that don&#8217;t fall asleep to a few programming terms, but I&#8217;ve got a new job at <a href="http://www.puppetlabs.com">Puppet Labs</a>.  Aside from the technology, I&#8217;m excited about the shorter commute to downtown, the insanely better food options because of all the food carts nearby, and of course the better salary right before the baby is born.</p>
<p>I&#8217;ve already been there two weeks now and have probably eaten at <a href="http://dcvegetarian.com">DC Veg</a> food cart half the days.  Sooner or later I&#8217;ll start bring my own lunch from home again rather than eat out  in order to save money and not get fat eating out all the time, but for now all the delicious food options are just too much and my new coworkers like to go out to lunch together.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mmrobins.com/2010/05/new-job-at-puppetlabs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sony Reader</title>
		<link>http://www.mmrobins.com/2007/08/sony-reader/</link>
		<comments>http://www.mmrobins.com/2007/08/sony-reader/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 21:23:47 +0000</pubDate>
		<dc:creator>mmrobins</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.mmrobins.com/2007/08/28/sony-reader/</guid>
		<description><![CDATA[I faced a major dilemma in packing for Peru: what books to bring? Books are heavy and bulky, but I can&#8217;t imagine not having something to read during downtime, which there&#8217;s plenty of while traveling (airports, bus stops, train stations, etc). While I can easily entertain myself with one or two books for a week, [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I faced a major dilemma in packing for Peru: what books to bring?  Books are heavy and bulky, but I can&#8217;t imagine not having something to read during downtime, which there&#8217;s plenty of while traveling (airports, bus stops, train stations, etc).  While I can easily entertain myself with one or two books for a week, six months is too long for just a couple of books.  So I got a <a href="http://www.learningcenter.sony.us/assets/itpd/reader/">Sony Reader</a>.  So far I love it.</p>
<p>The screen is as easy on the eyes as paper and the battery lasts a long time.  The text can be resized to three different sizes which makes it even easier on the eyes.  It can even do a decent job of displaying PDF&#8217;s that are formatted to be printed at 8.5&#215;11, although it&#8217;s often necessary to rotate the device to a horizontal display so that half a page is displayed at a time (hold the size button down until it rotates).  </p>
<p>The device costs $300 which is a bit much for some books, but when I think about how much I spend on gear to make it lighter and smaller I feel justified.  I wanted to wait a bit longer for it to come down in price and include a few more features, but moving abroad determined the timing of the purchase.  The features that I really want included that aren&#8217;t:</p>
<ol>
<li>Searchable text</li>
<li>A touchscreen that allowed hyperlinks to be followed so that you could put wikipedia on it.
  </li>
<li>A dictionary so that you could click on words and bring up the definition.</li>
</ol>
<p>So basically everything I want would require and input method like a stylus or an onscreen keyboard or something.  The <a href="http://www.irextechnologies.com/products/features">Iliad</a> is another reader that costs $700 and you can write on it, but it doesn&#8217;t look like it makes the text searchable either, and I don&#8217;t think it can do hyperlinks.</p>
<p>I&#8217;ve got dozens of books ready for the trip now.  The best places I&#8217;ve found for getting free books are <a href="http://www.gutenberg.org/wiki/Main_Page">Project Gutenberg</a> for stuff out of copyright and <a href="http://www.wowio.com/">Wowio</a> which has free books that are ad sponsored.  There is a store that Sony has where you can buy books, but when you&#8217;re DRMing the purchase and still charing almost as much as you would for a paper copy, it&#8217;s not very worthwhile.  I&#8217;m willing to pay for electronic versions of things, but not when they&#8217;re less useful than the physical media versions and when the cost doesn&#8217;t reflect even part of the savings in distribution.</p>
<p>Overall I&#8217;m already happy with the purchase.  I&#8217;m looking forward to reading a lot of good books while traveling.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mmrobins.com/2007/08/sony-reader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Email Subscriptions Now Available</title>
		<link>http://www.mmrobins.com/2007/03/email-subscriptions-now-available/</link>
		<comments>http://www.mmrobins.com/2007/03/email-subscriptions-now-available/#comments</comments>
		<pubDate>Wed, 07 Mar 2007 23:44:37 +0000</pubDate>
		<dc:creator>mmrobins</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.mmrobins.com/2007/03/07/email-subscriptions-now-available/</guid>
		<description><![CDATA[I realize that most of my friends and family don&#8217;t have a clue what RSS is or use any kind of feed reader, so I&#8217;ve setup email subscriptions if you want em. Enter your email address: Delivered by FeedBurner I&#8217;ve also converted my feeds to feedburner so I can see if anyone ever actually does [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I realize that most of my friends and family don&#8217;t have a clue what <a href="http://en.wikipedia.org/wiki/RSS_(file_format)">RSS</a> is or use any kind of <a href="http://www.bloglines.com">feed reader</a>, so I&#8217;ve setup email subscriptions if you want em.  </p>
<form style="border:1px solid #ccc;padding:3px;text-align:center;" action="http://www.feedburner.com/fb/a/emailverify" method="post" target="popupwindow" onsubmit="window.open('http://www.feedburner.com', 'popupwindow', 'scrollbars=yes,width=550,height=520');return true">
<p>Enter your email address:</p>
<p><input type="text" style="width:140px" name="email"/></p>
<p><input type="hidden" value="http://feeds.feedburner.com/~e?ffid=774865" name="url"/><input type="hidden" value="mmrobins.com" name="title"/><input type="submit" value="Subscribe" />
<p>Delivered by <a href="http://www.feedburner.com" target="_blank">FeedBurner</a></p>
</form>
<p>I&#8217;ve also converted <a href="http://feeds.feedburner.com/mmrobinscom/">my feeds</a> to <a href="http://www.feedburner.com">feedburner</a> so I can see if anyone ever actually does subscribe to an RSS feed.  I figure once I move to Peru more people might be interested in reading about that than me moving across town.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mmrobins.com/2007/03/email-subscriptions-now-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Tech Website</title>
		<link>http://www.mmrobins.com/2007/02/new-tech-website/</link>
		<comments>http://www.mmrobins.com/2007/02/new-tech-website/#comments</comments>
		<pubDate>Wed, 14 Feb 2007 07:26:10 +0000</pubDate>
		<dc:creator>mmrobins</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.mmrobins.com/2007/02/13/new-tech-website/</guid>
		<description><![CDATA[It&#8217;s time for me to branch my blogging: one for personal stuff, one for work related technical stuff. I&#8217;ve never really wanted my personal blog to be big on search results for my name, even if I have a way of keeping my personal posts mostly personal. However, it&#8217;s always bothered me a little that [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s time for me to branch my blogging: one for personal stuff, one for work related technical stuff.  I&#8217;ve never really wanted my personal blog to be big on search results for my name, even if I have a way of keeping my personal posts mostly personal.  However, it&#8217;s always bothered me a little that searching for <a href="http://www.google.com/search?q=%22matt+robinson%22">&#8220;Matt Robinson&#8221;</a> I don&#8217;t even register on the first 5 pages (I quit looking after that).  So I&#8217;ve nabbed a sweet new domain: <a href="http://www.mattrobinson.net">mattrobinson.net</a>.  Both .com and .org had been taken, and honestly I&#8217;m surprised this one hadn&#8217;t with all the matt robinsons there are.  Now I can write technical, nerdy stuff and get recognized for it.  Potential employers will Google me and find stuff that looks good for a job app instead of my vacations and movie reviews that I post here at mmrobins.com.  </p>
<p>Anyway, hopefully anyone who actually reads this isn&#8217;t upset about possibly subscribing to two RSS feeds, but then most people who read this don&#8217;t even know what RSS is, so they definitely won&#8217;t miss my tech writing, of which there should be a lot more now on the other site.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mmrobins.com/2007/02/new-tech-website/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby sort_by for Enumerables</title>
		<link>http://www.mmrobins.com/2007/01/ruby-sort_by-for-enumerables/</link>
		<comments>http://www.mmrobins.com/2007/01/ruby-sort_by-for-enumerables/#comments</comments>
		<pubDate>Wed, 24 Jan 2007 06:28:44 +0000</pubDate>
		<dc:creator>mmrobins</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.mmrobins.com/2007/01/23/ruby-sort_by-for-enumerables/</guid>
		<description><![CDATA[I have been trying to figure this one out forever. I have an array of objects, usually hashes, and want to sort them. Thing is I want to sort them by their values, not their keys. Regular old sort for arrays is powerless here since it doesn&#8217;t know how to compare complex objects, let alone [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I have been trying to figure this one out forever.  I have an array of objects, usually hashes, and want to sort them.  Thing is I want to sort them by their values, not their keys.  Regular old sort for arrays is powerless here since it doesn&#8217;t know how to compare complex objects, let alone reach down inside them and sort by that value.  I found <a href="http://www.ruby-doc.org/core/classes/Enumerable.html#M003156">sort_by</a> finally, but still couldn&#8217;t get it to do what I wanted often because sometimes the objects I was sorting could have a nil value, and the sort function doesn&#8217;t know how to sort nil.  Here&#8217;s an example: I have an array of Employees, and each employee has an employee_number.  Actually not every employee has a number, since some are temporary.  So if I try to sort by employee_number bad things happen.  </p>
<p>Here&#8217;s how I finally made it work.  </p>
<p><code>array.sort_by { |employee| employee.number.nil? : 0 : employee.number }</code></p>
<p>It basically says if the employee number is nil or null or whatever you want to call it, pretend we&#8217;re sorting by the value 0, otherwise sort by the employee number.  Hooray!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mmrobins.com/2007/01/ruby-sort_by-for-enumerables/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Two Weeks on Nothing but Linux at Home and Loving it</title>
		<link>http://www.mmrobins.com/2006/09/two-weeks-on-nothing-but-linux-at-home-and-loving-it/</link>
		<comments>http://www.mmrobins.com/2006/09/two-weeks-on-nothing-but-linux-at-home-and-loving-it/#comments</comments>
		<pubDate>Sat, 16 Sep 2006 06:31:43 +0000</pubDate>
		<dc:creator>mmrobins</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.mmrobins.com/2006/09/15/two-weeks-on-nothing-but-linux-at-home-and-loving-it/</guid>
		<description><![CDATA[So far there&#8217;s nothing I really miss from Windows, thanks in large part to the help frum ubuntuguide.org. I haven&#8217;t dealt with finding a replacement for Microsoft Money yet and will have to soon. Gnucash sounds like it&#8217;ll work, but it really does look uglier than Money, not that it&#8217;s toooo important for a simple [&#8230;]]]></description>
				<content:encoded><![CDATA[<div class="goalentry">
<p>So far there&#8217;s nothing I really miss from Windows, thanks in large part to the help frum ubuntuguide.org.  I haven&#8217;t dealt with finding a replacement for Microsoft Money yet and will have to soon. Gnucash sounds like it&#8217;ll work, but it really does look uglier than Money, not that it&#8217;s toooo important for a simple finance program.</p>
<p>I was really impressed that I was able to find a program  called <a href='http://www.hamrick.com/' class='external-link'>VueScan</a> that supported my dimage scan dual iv so that I could <a href="http://www.43things.com/things/view/40832" style="">scan all my photos</a>.  It seems to work even better than the program for windows that came with the scanner.</p>
<p>My only complaint so far is that <span class="caps">FLAC</span> files didn&#8217;t play on Amarok.  I found an updated version of libxine on somebody&#8217;s web page that fixed it.  I&#8217;m absolutely loving Amarok though.  That&#8217;s easily the best music player I&#8217;ve ever used.</p>
<p>I&#8217;ve got a computer running Ubuntu at work now too.  I&#8217;m slowly tring to move everything over there too, but it&#8217;s a lot harder when everything around you is Microsoft, from Active Directory to Exchange to Project.</p>
</div>
<div class="goalprogresslink">See more progress on: <a href="http://www.43things.com/people/progress/mmrobins?on=4582771">Switch to linux</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.mmrobins.com/2006/09/two-weeks-on-nothing-but-linux-at-home-and-loving-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ubuntu 6.06</title>
		<link>http://www.mmrobins.com/2006/09/ubuntu-606/</link>
		<comments>http://www.mmrobins.com/2006/09/ubuntu-606/#comments</comments>
		<pubDate>Mon, 04 Sep 2006 06:51:46 +0000</pubDate>
		<dc:creator>mmrobins</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.mmrobins.com/2006/09/03/ubuntu-606/</guid>
		<description><![CDATA[I&#8217;ve finally got linux working with wireless on my laptop with http://www.ubuntu.com/. It still didn&#8217;t work straight off the install, and I&#8217;m wondering why Network Manager isn&#8217;t the default by now, but after installing that, and the correct drivers for my wireless card to use with ndiswrapper (type lspci in the terminal and look for [&#8230;]]]></description>
				<content:encoded><![CDATA[<div style="float: right; margin-left: 10px; margin-bottom: 10px;">
 <a href="http://www.flickr.com/photos/mmrobins/233533974/" title="photo sharing"><img src="http://static.flickr.com/90/233533974_9e019ad3fb_m.jpg" alt="" style="border: solid 2px #000000;" /></a>
</div>
<p>I&#8217;ve finally got linux working with wireless on my laptop with <a href="http://www.ubuntu.com/">http://www.ubuntu.com/</a>.  It still didn&#8217;t work straight off the install, and I&#8217;m wondering why <a href="http://www.gnome.org/projects/NetworkManager/">Network Manager</a> isn&#8217;t the default by now, but after installing that, and the correct drivers for my wireless card to use with ndiswrapper (type lspci in the terminal and look for you wireless hardware info then find the drivers at <a href="http://ndiswrapper.sourceforge.net/mediawiki/index.php/List">http://ndiswrapper.sourceforge.net/mediawiki/index.php/List</a>), I had a wireless connection that could do WPA authentication in more than one place easily.  Phew.  </p>
<p>There were a few other small road bumps.  Almost everything can be fixed or figured out with the help of <a href="http://ubuntuguide.org/">ubuntuguide.com</a>.  Sound for flash didn&#8217;t work, which was a problem for youtube.com, but ubuntu guide had an entry for that.  One of the first things you should do is run Automatix (there&#8217;s instructions for that on ubuntuguide.com also), which automatically downloads a ton of proprietary software than can&#8217;t be included with the open source Ubuntu install like mp3 and other audio and video codecs, Acrobat PDF reader and more.  I wanted a utility to tell me where my disk space was like Treesize does for Windows and found baobab in the Synaptic package listing.  </p>
<p>I was excited to see Google has some of their apps on linux, because I love Picasa for organizing photos.  Google Earth is cool even if I rarely use it.  I was even able to get some Windows apps installed with <a href="http://www.winehq.com/">wine</a>.  So far I&#8217;ve been using this linux distro for about a week and haven&#8217;t needed to boot back into Windows for anything except Yahoo Music Player so that I can stream those damned DRM&#8217;d music files.  </p>
<p>If any of my friends or family read this and want to try installing Ubuntu let me know and I&#8217;ll help.  In many ways it really is better and easier than Windows, the main downside is you have to learn a whole new system which makes it seem harder at first.  I don&#8217;t belive Linux will really take off in the Desktop arena in the U.S. until it comes preloaded on more computers, but that IS beginning to happen.  Even if people don&#8217;t take the time to run linux or other &#8216;<a href="http://www.gnu.org/philosophy/free-sw.html">free software</a>&#8216;, it&#8217;s well worth <a href="http://www.gnu.org/philosophy/philosophy.html">understanding the philosophy</a> and <a href="http://www.ram.org/ramblings/philosophy/fmp/copying_primer.html">ethics</a> behind free software.  </p>
<div class="goalprogresslink">See more progress on: <a href="http://www.43things.com/people/progress/mmrobins?on=4582771">Switch to linux</a></div>
]]></content:encoded>
			<wfw:commentRss>http://www.mmrobins.com/2006/09/ubuntu-606/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Connecting Rails to Pervasive SQL ODBC</title>
		<link>http://www.mmrobins.com/2006/06/connecting-rails-to-pervasive-sql-odbc/</link>
		<comments>http://www.mmrobins.com/2006/06/connecting-rails-to-pervasive-sql-odbc/#comments</comments>
		<pubDate>Wed, 28 Jun 2006 18:40:24 +0000</pubDate>
		<dc:creator>mmrobins</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.mmrobins.com/archives/2006/06/connecting-rails-to-pervasive-sql-odbc/</guid>
		<description><![CDATA[I&#8217;d been putting off trying to link my rails app to our accounting deparment&#8217;s Pervasive SQL database because I thought it would be really hard. Turned out to be quite easy using ODBC. It might be nice if in the future someone wrote an adapter specifically for Pervasive SQL, but for now ODBC does what [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;d been putting off trying to link my rails app to our accounting deparment&#8217;s Pervasive SQL database because I thought it would be really hard.  Turned out to be quite easy using ODBC.  It might be nice if in the future someone wrote an adapter specifically for Pervasive SQL, but for now ODBC does what I need which is allow me to access employee data already populated in the accounting database so that I don&#8217;t have to duplicate in the rails database.  I found the code to get me going on this from the first reply at this <a href="http://www.ruby-forum.com/topic/64065">Ruby Forum conversation</a>.  Below is a method I defined in my employee controller.<br />
<code>
<pre>  
  def sync
    @conn = DBI.connect('DBI:ODBC:odbc_name','username','password')
    Employee.current_employees.each do |emp|
      rs = @conn.select_one('SELECT EMPLOYEE.WC_Code, EMPLOYEE.Employee_Name 
                                       FROM EMPLOYEE WHERE ((EMPLOYEE.Employee) = \'' + 
                                       emp.employee_number.to_s + '\')')
      emp.empl_workers_comp_code = rs["WC_Code"] unless rs.nil?
      emp.save
    end
    redirect_to :action => 'list'
  end</pre>
<p></code></p>
<p>The only problem is I can only seem to call this method while running WEBrick.  If I try the method while running Mongrel I get<br />
<code><br />
DBI::DatabaseError in EmployeesController#sync<br />
S1000 (-4019) [TimberlineODBC][TimberlineODBCEngine ODBC Driver][DRM File Library]Drive or directory unavailable [IO-WIN 3]<br />
Screen\OD.scr<br />
RAILS_ROOT: c:/rails/kj/config/..<br />
Application Trace | Framework Trace | Full Trace<br />
c:/ruby/lib/ruby/site_ruby/1.8/DBD/ODBC/ODBC.rb:95:in `connect'<br />
c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:584:in `connect'<br />
c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:384:in `connect'<br />
#{RAILS_ROOT}/app/controllers/employees_controller.rb:9:in `sync'<br />
c:/ruby/lib/ruby/site_ruby/1.8/DBD/ODBC/ODBC.rb:95:in `connect'<br />
c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:584:in `connect'<br />
c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:384:in `connect'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/base.rb:910:in `perform_action_without_filters'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'<br />
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/rescue.rb:82:in `perform_action'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/base.rb:381:in `process_without_filters'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/filters.rb:377:in `process_without_session_management_support'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/session_management.rb:117:in `process'<br />
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.3/lib/dispatcher.rb:38:in `dispatch'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel/rails.rb:85:in `process'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:563:in `process_client'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:562:in `process_client'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:648:in `run'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:648:in `run'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:637:in `run'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:969:in `run'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:968:in `run'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel_service-0.1/bin/mongrel_service:84:in `service_main'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel_service-0.1/bin/mongrel_service:153<br />
c:/ruby/bin/mongrel_service:18<br />
c:/ruby/lib/ruby/site_ruby/1.8/DBD/ODBC/ODBC.rb:95:in `connect'<br />
c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:584:in `connect'<br />
c:/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:384:in `connect'<br />
#{RAILS_ROOT}/app/controllers/employees_controller.rb:9:in `sync'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/base.rb:910:in `perform_action_without_filters'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/filters.rb:368:in `perform_action_without_benchmark'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'<br />
c:/ruby/lib/ruby/1.8/benchmark.rb:293:in `measure'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/benchmarking.rb:69:in `perform_action_without_rescue'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/rescue.rb:82:in `perform_action'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/base.rb:381:in `process_without_filters'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/filters.rb:377:in `process_without_session_management_support'<br />
c:/ruby/lib/ruby/gems/1.8/gems/actionpack-1.12.2/lib/action_controller/session_management.rb:117:in `process'<br />
c:/ruby/lib/ruby/gems/1.8/gems/rails-1.1.3/lib/dispatcher.rb:38:in `dispatch'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel/rails.rb:85:in `process'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:563:in `process_client'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:562:in `process_client'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:648:in `run'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:648:in `run'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:637:in `run'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:969:in `run'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel-0.3.13.2-mswin32/lib/mongrel.rb:968:in `run'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel_service-0.1/bin/mongrel_service:84:in `service_main'<br />
c:/ruby/lib/ruby/gems/1.8/gems/mongrel_service-0.1/bin/mongrel_service:153<br />
c:/ruby/bin/mongrel_service:18<br />
</code><br />
and a different error in Apache that I can&#8217;t reproduce right now.  I&#8217;ll probably have to figure this out sooner or later once I have more data that needs to be synced on a regular basis.  I tried just writing a method for the model that returns the data in question from the Pervasive database, thus providing completely updated data on every request and avoiding storing the data on the rails database, but it was waaaaaaay too slow.  Maybe if there were a Pervasive SQL adapter it would be faster than over ODBC.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mmrobins.com/2006/06/connecting-rails-to-pervasive-sql-odbc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails Sortable Column Headers With Associations</title>
		<link>http://www.mmrobins.com/2006/04/rails-sortable-column-headers-with-associations/</link>
		<comments>http://www.mmrobins.com/2006/04/rails-sortable-column-headers-with-associations/#comments</comments>
		<pubDate>Thu, 20 Apr 2006 21:33:06 +0000</pubDate>
		<dc:creator>mmrobins</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.mmrobins.com/archives/2006/04/rails-sortable-column-headers-with-associations/</guid>
		<description><![CDATA[Of all the magic things Ruby on Rails does by default, I&#8217;m surprised they didn&#8217;t automatically create sortable column headers. I figured out my own way to do it, but I couldn&#8217;t figure out how to sort columns correctly when the data for that column contained a foreign key &#8211; until now. For example, I [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>Of all the magic things Ruby on Rails does by default, I&#8217;m surprised they didn&#8217;t automatically create sortable column headers.  I figured out my own way to do it, but I couldn&#8217;t figure out how to sort columns correctly when the data for that column contained a foreign key &#8211; until now.  </p>
<p>For example, I have a requests table with an employee_id field.  This is an integer that references the id of some employee in my employee table.  Sorting those integers doesn&#8217;t alphabetically sort my request list based on who made the request.  </p>
<p>I finally found a good lead to the solution from a modified version of <a href="http://wiki.rubyonrails.org/rails/pages/SortHelper2">SortHelper2</a>, by <a href="http://www.jaikoo.com/articles/2006/02/21/sorting-tables-in-rails-with-associations">Jonathan Conway</a>.  His code worked great for me as long as I did my list function like this:</p>
<p><code></p>
<pre>
def list
      sort_init('id', 'asc', nil, 'cheeses', true)
      sort_update
      @cheese_pages, @cheeses = paginate :cheeses, :per_page => 30, 
      :order =>   sort_clause, :include => [:cheese_maker]
end</pre>
<p></code></p>
<p>But I defined some functions in my class that I use so that I don&#8217;t have to rewrite finds every time, so I had to use <a href="http://api.rubyonrails.org/classes/ActionController/Pagination.html">custom/classic pagination</a>.  This got me to wonder what the code looked like for the find statement.  I finally figured out how to use the :include statement in the find command to sort by an association.</p>
<p><code>		</p>
<pre>find( :all, :include => :employee, :conditions => ["resolved_on is null"], 
                          :order => "employees.name asc",
                          :limit  =>  @it_request_pages.items_per_page,
                          :offset =>  @it_request_pages.current.offset)</pre>
<p></code></p>
<p>Normally I think the api documentation for rails is great, but how am I supposed to know how to do this from the <a href="http://api.rubyonrails.org/classes/ActiveRecord/Base.html#M000860">find function definition</a> of :include option (:include: Names associations that should be loaded alongside using LEFT OUTER JOINs. The symbols named refer to already defined associations. See eager loading under Associations).  Okay, I guess there&#8217;s a decent example if you do find the eager loading section of the <a href="http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html">Associations</a> definition.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mmrobins.com/2006/04/rails-sortable-column-headers-with-associations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Adsense &#8211; Done</title>
		<link>http://www.mmrobins.com/2005/11/google-adsense-done/</link>
		<comments>http://www.mmrobins.com/2005/11/google-adsense-done/#comments</comments>
		<pubDate>Sat, 12 Nov 2005 21:59:19 +0000</pubDate>
		<dc:creator>mmrobins</dc:creator>
				<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.mmrobins.com/?p=178</guid>
		<description><![CDATA[I&#8217;ve taken that Adsense Ads off my site. They haven&#8217;t earned me even a penny in weeks. They just aren&#8217;t worth having on a site with so little traffic, especially when traffic is mostly friends and family. I pretty much knew that before I started, but now at least I have a better feel for [&#8230;]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve taken that Adsense Ads off my site.  They haven&#8217;t earned me even a penny in weeks.  They just aren&#8217;t worth having on a site with so little traffic, especially when traffic is mostly friends and family.  I pretty much knew that before I started, but now at least I have a better feel for how it works.  It&#8217;s a really cool advertising concept though.  I was actually interested in quite a few of the ads that displayed since they were about subjects I was writing about.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.mmrobins.com/2005/11/google-adsense-done/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
