<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Mentalized</title>
		<link>http://mentalized.net/journal/</link>
		<description>The online journal of Jakob Skjerning, a freelance web application developer</description>
		<language>en-us</language>		
		<copyright>Copyright 2013, Jakob Skjerning</copyright>
		<lastBuildDate>Sun, 07 Apr 2013 14:45:46 +0100</lastBuildDate>
		<generator>Movable Type (http://www.movabletype.org/?v=5.04)</generator>
		<ttl>600</ttl>		
		
		
		<item>
			<title>Import GPX data to PostGIS</title>
			<description><![CDATA[<p>Here&#8217;s how I imported geo data from a bunch of files containing GPS traces in <a href="http://en.wikipedia.org/wiki/GPS_eXchange_Format">GPX format</a> into a <a href="http://postgis.net/">PostGIS</a> database for further analysis.</p>
]]><![CDATA[<h2>Assumptions</h2>

<ul>
<li>OS X Mountain Lion</li>
<li>MacPorts</li>
<li>PostgreSQL 9.1</li>
</ul>

<h2>Install PostGIS</h2>

<p>Golly, I recently wrote <a href="http://mentalized.net/journal/2013/04/05/how_to_install_postgis_on_mountain_lion/">a tutorial how to install PostGIS</a> - what a coincidence.</p>

<h2>Install GDAL</h2>

<p><a href="http://www.gdal.org/">GDAL</a> is a <q>&#8220;translator library for raster geospatial data formats&#8221;</q>.  The important part is that it comes with a commandline tool to convert from one format to another, named <a href="http://www.gdal.org/ogr2ogr.html">ogr2ogr</a>. We want that:</p>

<pre><code>$ sudo port install gdal +postgresql91
</code></pre>

<p>Check that it works:</p>

<pre><code>$ ogr2ogr --long-usage | grep PostgreSQL
-f "PostgreSQL"
</code></pre>

<h2>Import data to PostgreSQL</h2>

<p>Importing a single file using ogr2ogr is simple (and doesn&#8217;t require the <code>+postgresql</code> variant above):</p>

<pre><code>$ ogr2ogr -append -f PGDump /vsistdout/ gpx.jsp\?relation\=1076755 | psql DATABASE_NAME
</code></pre>

<p>Using find we can easily do it for multiple GPX files:</p>

<pre><code>$ find . -name \*.gpx -exec ogr2ogr -append -f PostgreSQL "PG:dbname=DATABASE_NAME" {} \;
</code></pre>

<h2>See if it worked</h2>

<p>The following should return the number of files you&#8217;ve imported (I think - at least in my case it fit):</p>

<pre><code>$ psql -d geo -c "SELECT COUNT(*) FROM routes"
 count
-------
   289
(1 row)
</code></pre>

<p>Happy geo-analysis!</p>
]]></description>
			<link>http://mentalized.net/journal/2013/04/07/import_gpx_data_to_postgis/</link>
			<guid isPermaLink="false">2163@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2013/04/07/import_gpx_data_to_postgis/#comments</comments>
			<pubDate>Sun, 07 Apr 2013 14:45:46 +0100</pubDate>
			<category>Technology</category>
		</item>
		
		<item>
			<title>How to install PostGIS on Mountain Lion</title>
			<description><![CDATA[<p>I recently needed to run some geographical analysis and <a href="http://postgis.refractions.net/">PostGIS</a> seemed like a perfect fit for this. So off I went to install it, here&#8217;s how.</p>
]]><![CDATA[<h2>Assumptions</h2>

<ul>
<li>OS X Mountain Lion</li>
<li>PostgreSQL 9 installed via MacPorts</li>
</ul>

<h2>Step 0: Install PostgreSQL</h2>

<p>If you don&#8217;t have <a href="http://www.postgresql.org">PostgreSQL</a> already installed, it should be a simple matter of getting it via <a href="http://www.macports.org/">MacPorts</a>:</p>

<pre><code>$ port install postgresql91 postgresql91-server
</code></pre>

<p>Also, I am sure there are tons of tutorials out there to help with this, so I won&#8217;t cover that here.</p>

<h2>Install PostGIS 1.5</h2>

<p>Simple enough:</p>

<pre><code>$ port install postgis
</code></pre>

<p>Note that there is a PostGIS 2.0 out there, but it requires PostgreSQL 9.2 and I wasn&#8217;t ready for upgrading just yet.</p>

<h2>Setup a geospatially enabled database</h2>

<p>This part had me a bit stumped, and digging up the right file paths for this to work took a while:</p>

<pre><code>$ createdb geo
$ createlang plpgsql geo
$ psql -d geo -f /opt/local/share/postgresql91/contrib/postgis-1.5/postgis.sql
$ psql -d geo -f /opt/local/share/postgresql91/contrib/postgis-1.5/spatial_ref_sys.sql
</code></pre>

<p>If you figure you need to routinely setup new databases like this, it might be an idea to create a database template to use in the future.</p>

<h2>Test that it worked</h2>

<p>The following should output a ton (400+) of functions:</p>

<pre><code>$ psql geo -c "\df" | grep st_
</code></pre>

<p>If it did, you&#8217;re good to go. If it didn&#8217;t, good luck.</p>
]]></description>
			<link>http://mentalized.net/journal/2013/04/05/how_to_install_postgis_on_mountain_lion/</link>
			<guid isPermaLink="false">2162@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2013/04/05/how_to_install_postgis_on_mountain_lion/#comments</comments>
			<pubDate>Fri, 05 Apr 2013 10:14:44 +0100</pubDate>
			<category>Software</category>
		</item>
		
		<item>
			<title>Idea: Twimeshift</title>
			<description><![CDATA[<p>Having <a href="https://www.google.dk/search?q=cutting+the+cord">cut the cable TV cord</a> one of the few things I kind of miss, is the real time <del>snark</del>insightful comments on <a href="http://twitter.com">Twitter</a> during live events like the Oscars or X Factor.</p>

<p>Here&#8217;s an idea; You enter a Twitter hashtag (or any search, I guess), and have the resulting tweets replayed in real time 
as they would have appeared had you been following the hashtag when the event occurred. That way you get the full Twitter-augmented experience when watching anything after the fact.</p>

<p>A feature to speed up and slow down is probably a good idea as syncing is going to be a challenge, but overall it doesn&#8217;t have to be synced with millisecond precision.</p>

<p>It would also be interesting if you could add your own tweets to the timeshifted stream after the fact, but I am not entirely sure how that&#8217;d work. Perhaps adding a machine tag indicating a timeshift factor or timestamp could handle it. It would be pretty confusing for your followers seeing your out of context tweets appearing, though.</p>
]]>
</description>
			<link>http://mentalized.net/journal/2013/03/18/idea_twimeshift/</link>
			<guid isPermaLink="false">2161@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2013/03/18/idea_twimeshift/#comments</comments>
			<pubDate>Mon, 18 Mar 2013 09:48:07 +0100</pubDate>
			<category>Ideas</category>
		</item>
		
		<item>
			<title>One RSpec stub, many return values</title>
			<description><![CDATA[<p>Using <a href="https://github.com/rspec/rspec-mocks">RSpec Mocks</a> it is trivially easy to <a href="https://www.relishapp.com/rspec/rspec-mocks/v/2-13/docs/method-stubs">stub a single method</a>:</p>

<pre><code>colors.stub(:favorite).with("Person A").and_return("Mauve")
</code></pre>

<p>It is also easy to have different stubs for different arguments:</p>

<pre><code>colors.stub(:favorite).with("Person A").and_return("Mauve")
colors.stub(:favorite).with("Person B").and_return("Olive")
</code></pre>

<p>However, the other day I needed to stub out the same method many times for a fair amount of different arguments and repeating the <code>foo.stub(...).with(...).and_return()</code> part gets tedious real fast.</p>

<p>Thankfully, RSpec stubs have a way around this.</p>
]]><![CDATA[<p>RSpec docs call this a <a href="https://www.relishapp.com/rspec/rspec-mocks/v/2-13/docs/method-stubs/stub-with-substitute-implementation">&#8220;Stub with substitute implementation&#8221;</a>. You simply setup a fake implementation for a method by passing the stub a block.</p>

<p>We can use this to setup a look up table inside the stubbed method to give is pretty granular control over what it returns:</p>

<pre><code>colors.stub(:favorite) do |argument|
  values = {"Person A" =&gt; "Mauve", "Person B =&gt; "Olive"}
  return values[argument]
end
</code></pre>

<p>This way, whenever your tests call <code>colors.favorite</code> the argument they pass along is used to look up the returned result in the <code>Hash</code> inside the stub.</p>

<p>This has proven quite useful when your <code>FavoriteColorService</code> talks to a DNA sequencer live and we don&#8217;t want each test run to wait 4 weeks for each result.</p>
]]></description>
			<link>http://mentalized.net/journal/2013/03/13/one_rspec_stub_many_return_values/</link>
			<guid isPermaLink="false">2160@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2013/03/13/one_rspec_stub_many_return_values/#comments</comments>
			<pubDate>Wed, 13 Mar 2013 11:02:47 +0100</pubDate>
			<category>Programming</category>
		</item>
		
		<item>
			<title>Danish Ruby and Rails apps of 2012</title>
			<description><![CDATA[<p>While the danish Ruby on Rails community <a href="http://mentalized.net/journal/2011/08/11/the_state_of_ruby_in_denmark/">isn&#8217;t as big as it should be</a>, we&#8217;re far from an inactive bunch.</p>

<p>With help from the Ruby user groups in <a href="http://copenhagenrb.dk">Copenhagen</a> and <a href="http://aarhus.rb">Aarhus</a> I&#8217;ve compiled this list of danish sites/apps built on Rails and launched (more or less) in 2012.</p>
]]><![CDATA[<ul>
<li><h2><a href="http://barndomsfoto.dk/">Barndomsfoto</a></h2> Website for a kids photographer with a customer backend, where photos can be reviewed and ordered.</li>
<li><h2><a href="https://www.censorsekretariatet.dk/">Censorsekretariatet</a></h2> A system for managing and allocating external examiners for exams on danish professional colleges.</li>
<li><h2><a href="http://ejendomsstatistik.dk">Ejendomsstatistik.dk</a></h2> Explore statistics about the number and sizes of business locations available for rent and sale in Denmark.</li>
<li><h2><a href="http://hewa.dk/">Hewa health care</a></h2> Distributor af equipment for pedorthists and podiatrists.</li>
<li><h2><a href="http://holdsport.dk/">holdsport.dk</a></h2> Online SaaS tool for sports team coaches.</li>
<li><h2><a href="http://ibikecph.dk/">iBikeCph</a></h2> Find your way around Copenhagen by bike.</li>
<li><h2><a href="http://www.marselistvaervej4.dk">Marselis Tværvej 4</a></h2> Backend for booking meeting rooms in this shared office space.</li>
<li><h2><a href="www.milestoneselling.dk">Milestone Selling</a></h2> Pipeline tool that helps sales staff sell more, and managers manage sales staff better.</li>
<li><h2><a href="http://misstoro.com/">Misstoro</a></h2> Company selling stainless steel pet-tags worldwide.</li>
<li><h2><a href="http://www.myphoner.com">MyPhoner</a></h2> Increases efficiency and adds delight for cold canvas phoners, super early stage under the radar experimental startup.</li>
<li><h2><a href="http://www.nettopower.dk/">NettoPower</a></h2> Power company challenging the old monopolies providing electricity to danish consumers.</li>
<li><h2><a href="http://penge.dk/">Penge &amp; Privatøkonomi</a></h2> Website for a print magazine with up to date information on stocks, currencies, and interest rate, and tools related around your every day finances.</li>
<li><h2><a href="http://www.pixelsonrails.com">Pixels on Rails</a></h2> Website for a design and development shop.</li>
<li><h2><a href="http://www.proftag.dk/hundetegn/">Proftag</a></h2> Shop selling a wide variety of dog tags.</li>
<li><h2><a href="http://fundingguiden.dk/">Region Syddanmarks Fundingguide</a></h2> Database of funding options for public/commercial partnership projects in the southern region of Denmark.</li>
<li><h2><a href="www.shapp.ly">shapp.ly</a></h2> Shopping apps - the smarter way to learn what shoppers need to turn into buyers.&#8221;</li>
<li><h2><a href="http://single.dk">Single.dk</a></h2> Dating site for singles. Single.dk helps you discover, flirt with and date singles near you.</li>
<li><h2><a href="http://www.soundtracktor.com/">Soundtracktor</a></h2> Soundtracktor offers you a unique search and test feature. Making it easy for you to find the best possible soundtrack, share it with your clients and buy a broadcast license right away!</li>
<li><h2><a href="http://www.tuekeramik.dk/">Tue Keramik Galleri</a></h2> Catalog and galleries of pieces made by ceramic artist, Tue Poulsen.</li>
<li><h2><a href="http://www.calligraphen.dk/dk/unicef-danmark/julekort">Unicef Calligraphen</a></h2> Backend for 25 different sites and production/order management for postcard printer.</li>
<li><h2><a href="http://visitkolding-meetings.dk/">Visit Kolding Meetings</a></h2> Presentation of hotels og conference centers in Kolding.</li>
<li><h2><a href="http://votes.io">Votes.io</a></h2> A super simple way to create polls and get real time results.</li>
</ul>

<p>See the <a href="http://mentalized.net/journal/2011/01/20/new_ruby_and_rails_apps_in_denmark/">list of Ruby and Rails apps launched in 2010</a>.</p>
]]></description>
			<link>http://mentalized.net/journal/2013/01/18/danish_ruby_and_rails_apps_of_2012/</link>
			<guid isPermaLink="false">2158@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2013/01/18/danish_ruby_and_rails_apps_of_2012/#comments</comments>
			<pubDate>Fri, 18 Jan 2013 13:04:38 +0100</pubDate>
			<category>Copenhagen.rb</category>
		</item>
		
		<item>
			<title>Popular posts of 2012</title>
			<description><![CDATA[<p>I know you&#8217;ve all been waiting for this, and this is in absolutely no shape or form an attempt at bolstering my Google juice, no sir, so here it is, the definitive list of the most popular content on <a href="/">mentalized.net</a> in 2012.</p>
]]><![CDATA[<h2>Most popular posts</h2>

<ol>
<li><a href="/journal/2010/03/08/5_ways_to_run_commands_from_ruby/">5 ways to run commands from Ruby</a></li>
<li><a href="/journal/2011/06/27/pepper_-_a_redmine_theme/">Pepper - A Redmine theme</a></li>
<li><a href="/journal/2006/01/24/no_such_file_to_load_mkmf/">no such file to load &#8212; mkmf</a></li>
<li><a href="/journal/2009/08/03/redmine_plugin_github_hook/">Redmine plugin: Github Hook</a></li>
<li><a href="/journal/2006/02/06/hello_ruby_on_rails_world/">Hello Ruby on Rails World</a></li>
<li><a href="/journal/2009/07/27/using_google_page_speed_to_optimize_websites/">Using Google Page Speed to optimize websites</a></li>
<li><a href="/journal/2012/04/13/css_links_gradients_rounded_corners_and_ie/">CSS, links, gradients, rounded corners, and IE</a></li>
<li><a href="/journal/2010/02/05/hello_rails_3_world/">Hello Rails 3 world</a></li>
<li><a href="/journal/2010/06/04/rails_3_responding_with_excel/">Rails 3: Responding with Excel</a></li>
<li><a href="/journal/2011/04/14/ruby_how_to_check_if_a_string_is_numeric/">Ruby: How to check if a String is numeric</a></li>
</ol>

<p>As always, the list is dominated by posts written before 2012. Not surprisingly, but it&#8217;s always funny seeing this long tail of old content.</p>

<h2>Most popular posts from 2012</h2>

<p>Looking at only stuff written in 2012, the list looks like:</p>

<ol>
<li><a href="/journal/2012/04/13/css_links_gradients_rounded_corners_and_ie/">CSS, links, gradients, rounded corners, and IE</a></li>
<li><a href="/journal/2012/05/08/rails_3_actionmailer_and_google_apps_for_domains/">Rails 3, ActionMailer, and Google Apps for Domains</a></li>
<li><a href="/journal/2012/01/02/ruby_ssl_certificate_verification_errors/">Ruby SSL certificate verification woes</a></li>
<li><a href="/journal/2012/02/05/flash_is_not_the_99/">Flash is not the 99%</a></li>
<li><a href="/journal/2012/04/24/all_lights_are_green/">All lights are green</a></li>
<li><a href="/journal/2012/07/25/designers_solve_problems_-_what_do_developers_do/">Designers solve problems - what do developers do?</a></li>
<li><a href="/journal/2012/12/07/how_we_took_our_tests_from_30_to_3_minutes/">How we took our tests from 30 to 3 minutes</a></li>
<li><a href="/journal/2012/10/16/48_hours_of_commits_visualized/">48 hours of commits visualized</a></li>
<li><a href="/journal/2012/02/13/fact-checking_the_40/">Fact-checking the 40%</a></li>
<li><a href="/journal/2012/08/10/ssl_certificate_woes_with_ruby_19_and_os_x/">SSL certificate woes with Ruby 1.9 and OS X</a></li>
</ol>

<h2>Referring sites</h2>

<p>Hey, it looks that social media stuff is finally taking off: That <a href="http://twitter.com">Twitter thing</a> has made its way into the top 5 referring sites! Just barely.</p>

<p><a href="http://google.com">The Google</a> still reigns supreme as my number one traffic generator, which I suppose, fits perfectly fine with the long tail of old posts mentioned above. Google is way better at digging up old stuff when it&#8217;s needed than any social stream service. The latter tends to excel at the here and now.</p>

<p><a href="http://stackoverflow.com">Stack Overflow</a> has also appeared on the list. Understandably, when you consider many of my posts - and indeed of the popular posts - are very concrete issues one might encounter when programming.</p>

<p><a href="http://bing.com">Bing</a> is holding steady at number 10 referring site. That&#8217;s below <a href="http://korben.info/">Korben</a> - good for you, Bing&#8230;</p>

<h2>Browsers</h2>

<p>Ah, yes, browser stats from a geek website, always so very applicable to every other site in existence&#8230; Nevertheless, here&#8217;s the top 5 browsers on mentalized.net:</p>

<ol>
<li>Chrome (53%)</li>
<li>Firefox (29%)</li>
<li>Safari (9%)</li>
<li>Internet Explorer (5%)</li>
<li>Opera (1%)</li>
</ol>

<p>Poor Opera. And while it pains me to say this, having been an avid Firefox user for years, I am kind of surprised seeing Firefox that high on the list.</p>

<h2>Onwards and upwards</h2>

<p>I know my 2012 was great, here&#8217;s hoping 2013 will be just as terrific for all of us.</p>
]]></description>
			<link>http://mentalized.net/journal/2013/01/02/popular_posts_of_2012/</link>
			<guid isPermaLink="false">2157@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2013/01/02/popular_posts_of_2012/#comments</comments>
			<pubDate>Wed, 02 Jan 2013 11:28:50 +0100</pubDate>
			<category>Blogging</category>
		</item>
		
		<item>
			<title>How we took our tests from 30 to 3 minutes</title>
			<description><![CDATA[<p>One of my client projects have grown a fairly large test suite over the last years and it has become way unwieldy. Our original CI server took more than 30 painstakingly slow minutes to complete a test run.</p>

<p>While we are currently writing most our new tests in the <a href="http://www.confreaks.com/videos/641-gogaruco2011-fast-rails-tests">fast test style</a>, rewriting 20.000 lines of slow tests isn&#8217;t something that&#8217;ll be done in the near future.</p>

<p>So we needed to do something differently that would work here and now.</p>

<h2>TL;DR</h2>

<ul>
<li>An irresponsible database and more hardware</li>
</ul>
]]><![CDATA[<h2>Throw hardware at it</h2>

<p>For starters, we rented a dedicated server. Yes, not a cloud thingy, but geniune physical hardware that we could call our own. Surely, 2 quadcore CPUs, 7200 RPM disks, and 16GB of RAM is going to make our test suite scream, right?</p>

<p>Wrong.</p>

<p>Running the test suite on the new server proved only a few minutes quicker than on the tired, old VPS of yore. Disappointing.</p>

<h2>Parallelize</h2>

<p>The mediocre result seemed to suggest that we were CPU bound. Luckily, with 8 cores in the server, that would be easy to solve.</p>

<p>Enter the <a href="https://github.com/grosser/parallel">parallel</a> gem and with almost no other changes our specs would run on all cores on the machine shaving almost 50% off the run time.</p>

<p>Better, but still disappointing. I expected going from 1 to 8 cores to prove more than a 100% performance increase. Next up, tuning the database.</p>

<h2>PostgreSQL, I&#8217;m looking at you</h2>

<p>PostgreSQL is a great database. Fast, reliable, always making sure your data is correct and consistent. All great features of a database running in production.</p>

<p>However, for testing, we don&#8217;t care about our data - it&#8217;s throwaway junk generated from fixtures and factories anyways.</p>

<p>Luckily PostgreSQL allows us to configure some of it&#8217;s <a href="http://www.postgresql.org/docs/9.2/static/non-durability.html">durability</a> away. We changed our postgresql.conf to include the following settings:</p>

<pre><code>checkpoint_segments = '9'
checkpoint_timeout = '30min'
fsync = 'off'
full_page_writes = 'off'
synchronous_commit = 'off'
</code></pre>

<p>Basically this disables/delays a bunch of safeguards that PostgreSQL has in place to ensure your data doesn&#8217;t get corrupted in case of system crashes.</p>

<p>This was like putting Magic Boots of Blinding Speed on our test suite: 2 minutes and 49 seconds! Good riddance.</p>

<h2>What more could be done?</h2>

<p>A couple of things I haven&#8217;t gotten around to, but that could be interesting to see the results of:</p>

<ul>
<li>Running the server on a SSD. I seem to recall this having a huge effect on running the test suite locally, I&#8217;d expect it to at least do something on the server.</li>
<li>Running PostgreSQL from a RAM disk. While my initial tests of this seemed to make no difference whatsoever, I am inclined to chalk that up to me doing something wrong.</li>
</ul>

<p>Next up, making Jenkins build pull requests and notify us on Github.</p>
]]></description>
			<link>http://mentalized.net/journal/2012/12/07/how_we_took_our_tests_from_30_to_3_minutes/</link>
			<guid isPermaLink="false">2155@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2012/12/07/how_we_took_our_tests_from_30_to_3_minutes/#comments</comments>
			<pubDate>Fri, 07 Dec 2012 07:59:35 +0100</pubDate>
			<category>Technology</category>
		</item>
		
		<item>
			<title>CSV Query</title>
			<description><![CDATA[<p>I seem to often find myself munging datasets from various sources in CSV format. While grep, awk, and sort go a long way, command line tools for processing CSV data are surprisingly lackluster.</p>

<p>Sure, I could import the data into a database and run SQL queries on it, but that gets tedious after a few runs - unless, of course, if you automate it. Which I did, and I have decided to share the tool as <a href="https://github.com/koppen/csv_query">CSV Query</a>.</p>
]]><![CDATA[<h2>Example</h2>

<p>CSV Query is a command line tool that allows you to run SQL queries on data stored in CSV files, for example:</p>

<pre><code>$ csvq --select "count(*)" --where "name='Jakob'" sample.csv
count(*)
--------
       1
</code></pre>

<h2>Installation</h2>

<p><a href="https://github.com/koppen/csv_query">CSV Query</a> is distributed as a <a href="http://rubygems.org/gems/csv_query">Ruby gem</a>, so installation is a matter of</p>

<pre><code>$ gem install csv_query
</code></pre>

<p>&#8230; assuming you have Ruby set up.</p>

<h2>The alternatives</h2>

<p>A few days ago, I <a href="https://twitter.com/mentalizer/status/265038907907903488">tweeted</a>:</p>

<blockquote>
  <ol>
<li>Find problem</li>
<li>Fail to find existing project that solves it</li>
<li>Write it yourself</li>
<li>Find 2 other projects that does the same thing</li>
</ol>
</blockquote>

<p>That was roughly my experience with <a href="https://github.com/koppen/csv_query">CSV Query</a>. A few other projects aim to do roughly the same thing, and I didn&#8217;t find them until after I had already written my own tool. Sigh.</p>

<ul>
<li><a href="http://www.gl1tch.com/~lukewarm/software/csvq/">csvq.py - Python variant that does almost the same thing, but uses Python for querying</a></li>
<li><a href="https://github.com/ondrasej/CSVql">CSVql - A query language for CSV files</a></li>
</ul>

<p><a href="https://github.com/koppen/csv_query">CSV Query</a> is slightly different in its approach, basically passing all querying on to SQLite. Here&#8217;s hoping it&#8217;ll prove useful for a few people other than myself.</p>
]]></description>
			<link>http://mentalized.net/journal/2012/11/10/csv_query/</link>
			<guid isPermaLink="false">2153@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2012/11/10/csv_query/#comments</comments>
			<pubDate>Sat, 10 Nov 2012 11:22:02 +0100</pubDate>
			<category>Projects</category>
		</item>
		
		<item>
			<title>A thought experiment</title>
			<description><![CDATA[<p>Let&#8217;s assume I write software for a living.</p>

<p>Let&#8217;s assume I built something and the total cost of development is a nice round number like $10.000.</p>

<p>Let&#8217;s assume I expect to sell a certain number of copies, say 1.000.</p>

<p>Let&#8217;s assume I like to turn a profit (I do) and not give away my work (I don&#8217;t). How much should I charge?</p>

<p>$1? Don&#8217;t be ridiculous.</p>

<p>$10? Assuming every copy is sold that&#8217;d put me at break even. But at $0 net I might as well not have built anything. And if I don&#8217;t sell 1.000 copies, I&#8217;d have lost money.</p>

<p>$20? Now we&#8217;re talking. I&#8217;d be looking at recouping my costs and making a decent profit - I might even be able to pay for food and housing for a few months.</p>

<p>$100? If 200 customers find my something worth that much, why not?</p>

<p>Now, let&#8217;s assume the number of copies with certainty cannot exceed 1.000 for whatever reason. </p>

<p>How much would you charge?</p>
]]>
</description>
			<link>http://mentalized.net/journal/2012/10/19/a_thought_experiment/</link>
			<guid isPermaLink="false">2152@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2012/10/19/a_thought_experiment/#comments</comments>
			<pubDate>Fri, 19 Oct 2012 13:11:16 +0100</pubDate>
			<category>Software</category>
		</item>
		
		<item>
			<title>48 hours of commits visualized</title>
			<description><![CDATA[<div class="video embed"><iframe src="http://www.youtube-nocookie.com/embed/DpeRnaiHGE0" frameborder="0" allowfullscreen></iframe></div>
]]><![CDATA[<p>Created with <a href="http://code.google.com/p/gource/">Gource</a>, visualizing every commit in your Rails Rumble entry, <a href="http://votes.io">Votes.io</a>s git repository.</p>
]]></description>
			<link>http://mentalized.net/journal/2012/10/16/48_hours_of_commits_visualized/</link>
			<guid isPermaLink="false">2151@http://mentalized.net/journal/</guid>
			<comments>http://mentalized.net/journal/2012/10/16/48_hours_of_commits_visualized/#comments</comments>
			<pubDate>Tue, 16 Oct 2012 07:41:00 +0100</pubDate>
			<category>Projects</category>
		</item>
			
	</channel>
</rss>