<?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>The Navarra Group</title>
	<atom:link href="http://navarra.ca/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://navarra.ca</link>
	<description></description>
	<lastBuildDate>Thu, 13 May 2010 23:05:21 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Navarra&#8217;s new digs</title>
		<link>http://navarra.ca/?p=814</link>
		<comments>http://navarra.ca/?p=814#comments</comments>
		<pubDate>Thu, 13 May 2010 23:05:21 +0000</pubDate>
		<dc:creator>wlach</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://navarra.ca/?p=814</guid>
		<description><![CDATA[
After a few month hiatus of working from home and on site for various clients, I&#8217;m happy to report that Navarra has a new office on 2020 University, sharing space with Syntenic, DokDok, and a few other local Montr&#233;al companies. It&#8217;s a small but cosy little space with a spectacular view of the city 20-odd [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://navarra.ca/wp-content/uploads/2010/05/navarra_syntenic.jpg"><img src="http://navarra.ca/wp-content/uploads/2010/05/navarra_syntenic-225x300.jpg" alt="" title="New office" class="alignleft size-full wp-image-808" style="margin-right: 8px; margin-bottom: 8px; float: left;"/></a>
<p>After a few month hiatus of working from home and on site for various clients, I&#8217;m happy to report that Navarra has a new office on 2020 University, sharing space with <a href="http://www.syntenic.com/">Syntenic</a>, <a href="http://dokdok.com/">DokDok</a>, and a few other local Montr&eacute;al companies. It&#8217;s a small but cosy little space with a spectacular view of the city 20-odd stories up. Feel free to ping us if you&#8217;re in the area and want a tour.</p>
]]></content:encoded>
			<wfw:commentRss>http://navarra.ca/?feed=rss2&amp;p=814</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Making iPhone apps universal</title>
		<link>http://navarra.ca/?p=813</link>
		<comments>http://navarra.ca/?p=813#comments</comments>
		<pubDate>Tue, 11 May 2010 19:32:55 +0000</pubDate>
		<dc:creator>pmccurdy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[iphone ipad]]></category>

		<guid isPermaLink="false">http://navarra.ca/?p=813</guid>
		<description><![CDATA[Just a quick note to point out Noel Llopis&#8217;s excellent post on how to turn an existing iPhone app into a universal app that runs on an iPad,  without having to suffer with pixel-doubled jaggies.  It turns out there are a few surprises, so it&#8217;s handy to have a guide.
]]></description>
			<content:encoded><![CDATA[<p>Just a quick note to point out Noel Llopis&#8217;s <a href="http://gamesfromwithin.com/going-the-ipad-way-all-you-wanted-to-know-about-creating-universal-apps">excellent post</a> on how to turn an existing iPhone app into a universal app that runs on an iPad,  without having to suffer with pixel-doubled jaggies.  It turns out there are a few surprises, so it&#8217;s handy to have a guide.</p>
]]></content:encoded>
			<wfw:commentRss>http://navarra.ca/?feed=rss2&amp;p=813</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basewatch</title>
		<link>http://navarra.ca/?p=806</link>
		<comments>http://navarra.ca/?p=806#comments</comments>
		<pubDate>Sun, 09 May 2010 21:01:22 +0000</pubDate>
		<dc:creator>pzion</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://navarra.ca/?p=806</guid>
		<description><![CDATA[Having had trouble with all the Mac OS X Dashboard widgets for time tracking with 37signals&#8217; Basecamp project management tools, I&#8217;ve written a new one called Basewatch.  It&#8217;s simple, robust and open-source; any feedback is welcome.
Give it a spin at http://github.com/pzion/Basewatch/downloads.
]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-full wp-image-808" style="margin-right: 8px; margin-bottom: 8px; float: left;" title="Basewatch" src="http://navarra.ca/wp-content/uploads/2010/05/Screen-shot-2010-05-10-at-5.12.51-PM.png" alt="" width="88" height="112" />Having had trouble with all the Mac OS X Dashboard widgets for time tracking with 37signals&#8217; <a href="http://basecamphq.com">Basecamp</a> project management tools, I&#8217;ve written a new one called <a href="http://github.com/pzion/Basewatch">Basewatch</a>.  It&#8217;s simple, robust and open-source; any feedback is welcome.</p>
<p>Give it a spin at <a href="http://github.com/pzion/Basewatch/downloads">http://github.com/pzion/Basewatch/downloads</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://navarra.ca/?feed=rss2&amp;p=806</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The definitive iPhone MapKit polyline example project</title>
		<link>http://navarra.ca/?p=786</link>
		<comments>http://navarra.ca/?p=786#comments</comments>
		<pubDate>Thu, 01 Apr 2010 21:12:43 +0000</pubDate>
		<dc:creator>wlach</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://navarra.ca/?p=786</guid>
		<description><![CDATA[Polylines in MapKit. Seems like such an obvious thing to have, yet completely not provided for in Apple&#8217;s default SDK. Why? Who knows; perhaps they don&#8217;t want to encourage people to write applications which violate Google Map&#8217;s terms of use (which forbids writing applications which provide real time navigation services).
That certainly hasn&#8217;t stopped people from [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://navarra.ca/wp-content/uploads/2010/04/MapKit-Polylines-161x300.png" alt="Polylines in MapKit" title="Polylines in MapKit" width="161" height="300" align="left" hspace="5" vspace="5"/>Polylines in MapKit. Seems like such an obvious thing to have, yet completely not provided for in Apple&#8217;s default SDK. Why? Who knows; perhaps they don&#8217;t want to encourage people to write applications which violate Google Map&#8217;s terms of use (which forbids writing applications which provide real time navigation services).</p>
<p>That certainly hasn&#8217;t stopped people from trying to build their own homebrew polyline classes to plug into MapKit. In particular, Craig Spitzkoff wrote up a <a href="http://spitzkoff.com/craig/?p=65">document</a> describing a method of displaying a polyline on the map using an annotation, albeit not updated in real time (the polyline would disappear when the user is performing a zoom action on the map). Nicolas Neubauer later <a href="http://pixelfehler.nicolas-neubauer.de/2009/09/04/mapkit-google-maps-iphone-and-drawing-routes-or-polylines/">expanded</a> upon Craig&#8217;s idea with the idea of hooking into the annotation view&#8217;s center property (called by the map kit view) to get notification to resize the polyline appropriately on zoom and move events. Unfortunately his description has a few errors (you need to hook into MKAnnotationView, not MKAnnotation), but the general idea was correct and was a rather elegant hack around the limitations of MapKit. </p>
<p>In any event, it so happened that I needed something to display a polyline for the <a href="http://transittogo.mindsea.ca">Transit to Go</a> project and was a bit perplexed about how to go about it. To resolve the confusion around how to do this properly once and for all, I decided to code up a quick sample implementation of a zoomable, transparent polyline on a MapKit map. The implementation is extremely bare bones and unoptimized but gets the tricky bits out of the way so you can concentrate on modifying it and improving it for your application&#8217;s needs. I decided that creating a general framework around this idea was kind of overkill, so decided to leave it to people to copy the relevant source files into their applications. I&#8217;ve placed the work under an extremely liberal license in the hopes that it will spread far and wide. Just remember to respect Google Map&#8217;s <a href="http://code.google.com/apis/maps/terms.html">terms of use</a> (read: no real-time navigation) in your app.</p>
<p>Go ahead and checkout the <a href="http://github.com/wlach/nvpolyline">repository on github</a>. You know you want to.</p>
]]></content:encoded>
			<wfw:commentRss>http://navarra.ca/?feed=rss2&amp;p=786</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>On working around mechanical failures with software</title>
		<link>http://navarra.ca/?p=765</link>
		<comments>http://navarra.ca/?p=765#comments</comments>
		<pubDate>Sat, 27 Feb 2010 22:10:42 +0000</pubDate>
		<dc:creator>mcote</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://navarra.ca/?p=765</guid>
		<description><![CDATA[Running a business involves reams of paperwork.  Reams of paperwork eventually means miscategorized, misplaced, and mishandled documents.  The (partial) solution: a scanner, of course.  I say partial because it&#8217;s still easy to have all your digital files in complete disarray, but at least archiving and searching is a fair bit easier.
Of course [...]]]></description>
			<content:encoded><![CDATA[<p>Running a business involves reams of paperwork.  Reams of paperwork eventually means miscategorized, misplaced, and mishandled documents.  The (partial) solution: a scanner, of course.  I say partial because it&#8217;s still easy to have all your digital files in complete disarray, but at least archiving and searching is a fair bit easier.</p>
<p>Of course really good scanners are not exactly cheap.  We bought a Scanjet 5590, which, for the price, is pretty decent.  Most importantly it has a document feeder, crucial if you&#8217;re scanning long, or many, documents.</p>
<p>Now I encourage the use of both sides of paper, but it is a mechanical nightmare to scan double-sided paper correctly.  Sadly the 5590, while officially supporting this feature, is not of sufficient quality to make this really useful&#8211;I&#8217;d say it jams about 50% of the time.</p>
<p>I&#8217;m used to using software to work around hardware bugs.  Back in my last year of university, we discovered that the DSP we were using for our big project had a bug in its serial port: after a few kB, the serial port would lock up and refuse to handle any more data until it was reset.  After asking the manufacturer about this problem, they verified that it was indeed a bug and would be fixed in the next revision&#8211;not too useful when your deadline is in a couple months.  We ended up writing a simple lock-step protocol, with the firmware resetting the serial port if it hadn&#8217;t received expected data after a short period of time.</p>
<p>But back to scanners.  I wasn&#8217;t prepared to shell out the many thousands of dollars required for professional scanning/photocopying/window-cleaning equipment.  Luckily, there is a wonderful little utility called <a href="http://www.accesspdf.com/pdftk/">pdftk</a>, the PDF toolkit.  It&#8217;s available for Linux, Windows (at least via <a href="http://www.cygwin.com/">Cygwin</a>), and probably a bunch of other systems.  It can split PDFs into separate files for each page as well as concatenate PDFs, perfect for what I was doing.  (It can also do a whole pile of other things, less important for me at the moment.)  So the solution is to scan one side of all the pages through the feeder into one file, scan all the other sides into a separate file, and use a series of pdftk commands to split and then merge the files into a single PDF with all the pages in the correct order.</p>
<p>I wouldn&#8217;t be much of a programmer if I was content to repeat those commands every time I needed to scan a double-sided document, so I spent a little bit of time and wrote a short Python program to do it all for me.  I present it below the cut.  It should work in Linux as well as in Windows.</p>
<p><span id="more-765"></span></p>
<pre>
#!/usr/bin/env python

import os, os.path, subprocess, sys, tempfile

def usage(prog):
  print '%s &lt;right-side PDF&gt; &lt;left-side PDF&gt; &lt;output PDF&gt;' \
        % prog

def cleanup(tmpdir):
  os.system('rm -rf %s' % tmpdir)

if len(sys.argv) < 4:
  usage(sys.argv[0])
  sys.exit(1)

rightfile = sys.argv[1]
leftfile = sys.argv[2]
outputfile = sys.argv[3]
tmpdir = tempfile.mkdtemp()
rightdir = os.path.join(tmpdir, 'right')
leftdir = os.path.join(tmpdir, 'left')
os.mkdir(rightdir)
os.mkdir(leftdir)

os.system('cp %s %s' % (rightfile, rightdir))
os.system('cp %s %s' % (leftfile, leftdir))

for i in ((rightfile, rightdir), (leftfile, leftdir)):
  p = subprocess.Popen(['pdftk', i[0], 'burst'], cwd=i[1])
  rc = p.wait()
  if rc != 0:
    print 'Failed to burst %s.' % i[0]
    cleanup(tmpdir)
    sys.exit(2)

rfcount = 0
for f in os.listdir(rightdir):
  if f[:3] == 'pg_': rfcount += 1
lfcount = 0
for f in os.listdir(leftdir):
  if f[:3] == 'pg_': lfcount += 1

if not (0 <= (rfcount - lfcount) <= 1):
  print 'The number of right-side pages (%d) ' % rfcount + \
        'is not equal to or one greater than the'
  print 'number of left-side pages (%d).' % lfcount
  cleanup(tmpdir)
  sys.exit(2)

command = ['pdftk']
for i in range(1, rfcount+1):
  rpage = os.path.join(rightdir, 'pg_%04d.pdf' % i)
  lpage = os.path.join(leftdir, 'pg_%04d.pdf' % i)
  command.append(rpage)
  if os.path.exists(lpage):
    command.append(lpage)

command.extend(['cat', 'output', outputfile])

p = subprocess.Popen(command)
rc = p.wait()
if rc != 0:
  print 'Failed to concatenate pages.'
  cleanup(tmpdir)
  sys.exit(2)

cleanup(tmpdir)
</pre>
]]></content:encoded>
			<wfw:commentRss>http://navarra.ca/?feed=rss2&amp;p=765</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
