<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>deferred until inspiration hits</title>
    <link>http://chrisroos.co.uk/</link>
    <language>en-us</language>
    <ttl>40</ttl>

    <description></description>
    
      <item>
        <title>Confusing git log behaviour</title>
        <description>&lt;p&gt;I was confused by the behaviour of &lt;code&gt;git log&lt;/code&gt; when using the &lt;code&gt;before&lt;/code&gt; and &lt;code&gt;after&lt;/code&gt; options. After some playing I realised that it was because the default &lt;code&gt;git log&lt;/code&gt; output shows the author date but the &lt;code&gt;before&lt;/code&gt; and &lt;code&gt;after&lt;/code&gt; options operate on the &lt;code&gt;commit&lt;/code&gt; date.&lt;/p&gt;

&lt;p&gt;I can demonstrate the behaviour in an empty repository.&lt;/p&gt;

&lt;h2&gt;Create a new git repo&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;$ cd /tmp
$ mkdir testing-git-log
$ cd testing-git-log
$ git init
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Create a file and add it to the repo&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;$ touch file1
$ git add file1
$ git commit -m &quot;Add file1&quot;
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Edit the author and commit date of the commit&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;$ GIT_COMMITTER_DATE=&quot;2015-01-02 09:00&quot; \
git commit --amend \
--date &quot;2015-01-01 09:00&quot; \
--reuse-message HEAD
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The &lt;code&gt;--date&lt;/code&gt; option sets the author date of the commit.&lt;/p&gt;

&lt;p&gt;Setting &lt;code&gt;GIT_COMMITTER_DATE&lt;/code&gt; affects the commit date of the commit when it’s amended.&lt;/p&gt;

&lt;h2&gt;Check that the author and commit date have been set as expected&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;$ git log --pretty=fuller
Author:     Chris Roos &amp;lt;chris@seagul.co.uk&amp;gt;
AuthorDate: Thu Jan 1 09:00:00 2015 +0000
Commit:     Chris Roos &amp;lt;chris@seagul.co.uk&amp;gt;
CommitDate: Fri Jan 2 09:00:00 2015 +0000

    Add file1
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Use git log to show commits on 1st Jan 2015&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;$ git log --after &quot;2015-01-01 00:00&quot; --before &quot;2015-01-01 23:59:59&quot;
# Nothing shown
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Use git log to show commits on 2nd Jan 2015&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;$ git log --after &quot;2015-01-02 00:00&quot; --before &quot;2015-01-02 23:59:59&quot;
commit 5f2c92e2b44ab697f92cb4336fd66c6206f56be2
Author: Chris Roos &amp;lt;chris@seagul.co.uk&amp;gt;
Date:   Thu Jan 1 09:00:00 2015 +0000

    Add file1
&lt;/code&gt;&lt;/pre&gt;
</description>

        <pubDate>Fri, 20 Nov 2015 16:20:25 +0000</pubDate>
        <guid isPermaLink="false">urn:uuid:d309caf9-53c2-4b67-9a70-defb2032d154</guid>
        <author>Chris Roos</author>
        <link>http://chrisroos.co.uk/blog/2015-11-20-confusing-git-log-behaviour</link>
      </item>
    
      <item>
        <title>Manually uploading activities from Garmin Fit app</title>
        <description>&lt;p&gt;I had two activities recorded on 12 Nov 2015 that weren’t syncing to Garmin Connect from the Garmin Fit app on my phone. I signed out and back in a number of times to try to force the sync (as per &lt;a href=&quot;https://support.garmin.com/support/searchSupport/case.faces?caseId=%7Ba3c0eb60-ff54-11e0-73d0-000000000000%7D&quot;&gt;Garmin&amp;rsquo;s support page&lt;/a&gt;), but to no avail.&lt;/p&gt;

&lt;p&gt;I eventually used &lt;a href=&quot;https://play.google.com/store/apps/details?id=com.sand.airdroid&amp;amp;hl=en_GB&quot;&gt;Airdroid&lt;/a&gt; to download the two .fit files (stored in /SD Card/Android/data/com.garmin.android.apps.fitness/files/) from my phone to my laptop.&lt;/p&gt;

&lt;p&gt;I was able to manually import those files into &lt;a href=&quot;https://connect.garmin.com&quot;&gt;Garmin Connect&lt;/a&gt; and can now see the two activities as expected.&lt;/p&gt;

&lt;p&gt;After signing out and back in to the Garmin Fit app I noticed that the 2 activities on 12 Nov 2015 were now duplicated - presumably the versions on the phone were slightly different from the versions on the website. I fixed this by removing all the Garmin Fit app data from my phone and signing in one final time.&lt;/p&gt;

&lt;h2&gt;Garmin Fit app has been removed&lt;/h2&gt;

&lt;p&gt;While writing this I tried to find a link to the Garmin Fit app in the Google Play Store. While I can see it in my list of installed apps, it no longer appears in the public store. I also followed the link to the app in iTunes but that reports that it&amp;rsquo;s no longer available in the UK store. I can&amp;rsquo;t find any official information about the app being removed but &lt;a href=&quot;https://forums.garmin.com/showthread.php?314912-Is-Garmin-Fit-gone&quot;&gt;this thread on the Garmin forums suggests that it was removed in early 2015!&lt;/a&gt;.&lt;/p&gt;
</description>

        <pubDate>Sat, 14 Nov 2015 08:06:40 +0000</pubDate>
        <guid isPermaLink="false">urn:uuid:bcb7fe70-7b45-4965-8552-67aa13276fcb</guid>
        <author>Chris Roos</author>
        <link>http://chrisroos.co.uk/blog/2015-11-14-manually-uploading-activities-from-garmin-fit-app</link>
      </item>
    
      <item>
        <title>Getting my Webby powered website running on Mac OS X El Capitan</title>
        <description>&lt;p&gt;This is what I needed to do to get &lt;a href=&quot;https://github.com/TwP/webby&quot;&gt;Webby&lt;/a&gt; powered &lt;a href=&quot;https://github.com/chrisroos/chrisroos.co.uk&quot;&gt;website&lt;/a&gt; working on my laptop.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cd ~/Code/github/chrisroos.co.uk

$ cat .rbenv-version
1.8.7-p352

$ rbenv install 1.8.7-p352

ERROR: This package must be compiled with GCC, but ruby-build couldn't
find a suitable `gcc` executable on your system. Please install GCC
and try again.

DETAILS: Apple no longer includes the official GCC compiler with Xcode
as of version 4.2. Instead, the `gcc` executable is a symlink to
`llvm-gcc`, a modified version of GCC which outputs LLVM bytecode.

For most programs the `llvm-gcc` compiler works fine. However,
versions of Ruby older than 1.9.3-p125 are incompatible with
`llvm-gcc`. To build older versions of Ruby you must have the official
GCC compiler installed on your system.

TO FIX THE PROBLEM: Install Homebrew's apple-gcc42 package with this
command: brew tap homebrew/dupes ; brew install apple-gcc42

You will need to install the official GCC compiler to build older
versions of Ruby even if you have installed Apple's Command Line Tools
for Xcode package. The Command Line Tools for Xcode package only
includes `llvm-gcc`.

BUILD FAILED (OS X 10.11.1 using ruby-build 20150818)

$ brew tap homebrew/dupes ; brew install apple-gcc42
==&amp;gt; Tapping homebrew/dupes
Cloning into '/usr/local/Library/Taps/homebrew/homebrew-dupes'...
remote: Counting objects: 42, done.
remote: Compressing objects: 100% (42/42), done.
remote: Total 42 (delta 0), reused 4 (delta 0), pack-reused 0
Unpacking objects: 100% (42/42), done.
Checking connectivity... done.
Tapped 39 formulae (103 files, 420K)
==&amp;gt; Installing apple-gcc42 from homebrew/homebrew-dupes
==&amp;gt; Downloading http://r.research.att.com/tools/gcc-42-5666.3-darwin11.pkg
######################################################################## 100.0%
==&amp;gt; /bin/pax --insecure -rz -f usr.pkg/Payload -s ,./usr,/usr/local/Cellar/apple-gcc42/4.2.1-5666.3,
==&amp;gt; Caveats
NOTE:
This formula provides components that were removed from XCode in the 4.2
release. There is no reason to install this formula if you are using a
version of XCode prior to 4.2.

This formula contains compilers built from Apple's GCC sources, build
5666.3, available from:

  http://opensource.apple.com/tarballs/gcc

All compilers have a `-4.2` suffix. A GFortran compiler is also included.
==&amp;gt; Summary
🍺  /usr/local/Cellar/apple-gcc42/4.2.1-5666.3: 104 files, 75M, built in 23 seconds

$ rbenv install 1.8.7-p352
Downloading ruby-1.8.7-p352.tar.gz...
-&amp;gt; https://dqw8nmjcqpjn7.cloudfront.net/2325b9f9ab2af663469d057c6a1ef59d914a649808e9f6d1a4877c8973c2dad0
Installing ruby-1.8.7-p352...
Installed ruby-1.8.7-p352 to /Users/chrisroos/.rbenv/versions/1.8.7-p352

Downloading rubygems-1.6.2.tgz...
-&amp;gt; https://dqw8nmjcqpjn7.cloudfront.net/cb5261818b931b5ea2cb54bc1d583c47823543fcf9682f0d6298849091c1cea7
Installing rubygems-1.6.2...
Installed rubygems-1.6.2 to /Users/chrisroos/.rbenv/versions/1.8.7-p352

$ rbenv rehash

$ gem install bundler
Fetching: bundler-1.10.6.gem (100%)
Successfully installed bundler-1.10.6
1 gem installed

$ bundle install
Fetching gem metadata from http://rubygems.org/..........
Fetching version metadata from http://rubygems.org/..
Resolving dependencies...
Installing rake 0.9.2.2
Installing RedCloth 4.2.7 with native extensions
Installing activesupport 3.0.0
Installing addressable 2.2.6
Installing diff-lcs 1.1.3
Installing directory_watcher 1.4.1
Installing haml 3.0.25
Installing hpricot 0.8.5 with native extensions
Installing launchy 2.0.5
Installing little-plugger 1.1.3
Installing logging 1.6.1
Installing loquacious 1.9.1
Installing rdiscount 1.6.8 with native extensions
Installing rspec-core 2.7.1
Installing rspec-expectations 2.7.0
Installing rspec-mocks 2.7.0
Installing rspec 2.7.0
Installing webby 0.9.4
Using bundler 1.10.6
Bundle complete! 5 Gemfile dependencies, 19 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

$ webby autobuild
WARNING: Global access to Rake DSL methods is deprecated.  Please include
...  Rake::DSL into classes and modules which use the Rake DSL methods.
WARNING: DSL method Webby::Apps::Main#import called at /Users/chrisroos/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/webby-0.9.4/lib/webby/apps/main.rb:177:in `import_default_tasks'
WARNING: DSL method Webby::Apps::Main#import called at /Users/chrisroos/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/webby-0.9.4/lib/webby/apps/main.rb:177:in `import_default_tasks'
WARNING: DSL method Webby::Apps::Main#import called at /Users/chrisroos/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/webby-0.9.4/lib/webby/apps/main.rb:177:in `import_default_tasks'
WARNING: DSL method Webby::Apps::Main#import called at /Users/chrisroos/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/webby-0.9.4/lib/webby/apps/main.rb:177:in `import_default_tasks'
WARNING: DSL method Webby::Apps::Main#import called at /Users/chrisroos/.rbenv/versions/1.8.7-p352/lib/ruby/gems/1.8/gems/webby-0.9.4/lib/webby/apps/main.rb:177:in `import_default_tasks'
[17:22:46]  INFO: starting autobuild (Ctrl-C to stop)
[17:22:47]  INFO: running the build
[17:23:18]  INFO: running the build
&lt;/code&gt;&lt;/pre&gt;
</description>

        <pubDate>Thu, 29 Oct 2015 17:20:00 +0000</pubDate>
        <guid isPermaLink="false">urn:uuid:7f9f06d4-4cf6-407e-9f92-83321e34d105</guid>
        <author>Chris Roos</author>
        <link>http://chrisroos.co.uk/blog/2015-10-29-getting-my-webby-powered-website-running-on-mac-os-x-el-capitan</link>
      </item>
    
      <item>
        <title>Exploring my Google Location History</title>
        <description>&lt;p&gt;I used &lt;a href=&quot;https://www.google.com/settings/takeout&quot;&gt;Google Takeout&lt;/a&gt; to export my &lt;a href=&quot;https://maps.google.co.uk/locationhistory/b/0&quot;&gt;Location History&lt;/a&gt; as JSON. I wanted to know what date range the file covered (it&amp;rsquo;s not obvious from the Location History site) and figured I&amp;rsquo;d use command line tools rather than parsing the JSON.&lt;/p&gt;

&lt;p&gt;This is the command I ended up with to display the earliest timestamp in the file:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cat LocationHistory.json | \
grep timestampMs | \
grep -o -E &quot;\d+&quot; | \
sort | \
head -n1 | \
cut -c1-10 | \
xargs -J% date -j -f &quot;%s&quot; %

#=&amp;gt; Sun  4 Mar 2012 12:33:29 GMT
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Building the command&lt;/h2&gt;

&lt;p&gt;Use &lt;code&gt;grep&lt;/code&gt; to extract all the lines containing timestamps.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ head LocationHistory.json | \
grep timestampMs

#=&amp;gt; &quot;timestampMs&quot; : &quot;1414831041235&quot;,
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Use &lt;code&gt;grep&lt;/code&gt; to extract the timestamp from each line.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ head LocationHistory.json | \
grep timestampMs | \
grep -o -E &quot;\d+&quot;              # Find 1 or more digits and print the matching string

#=&amp;gt; 1414831041235
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Use &lt;code&gt;cut&lt;/code&gt; to strip off the milliseconds from the timestamp.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ head LocationHistory.json | \
grep timestampMs | \
grep -o -E &quot;\d+&quot; | \
cut -c1-10                    # Ignore the last three digits (milliseconds) of the timestamp

#=&amp;gt; 1414831041
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Use &lt;code&gt;date&lt;/code&gt; to display the timestamp in a human friendly format.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ head LocationHistory.json | \
grep timestampMs | \
grep -o -E &quot;\d+&quot; | \
cut -c1-10 | \
xargs -J% date -j -f &quot;%s&quot; %   # Use `-j` to avoid setting the date
                              # and -f &quot;%s&quot; to tell date to parse the string as unix time

#=&amp;gt; Sat  1 Nov 2014 08:37:21 GMT
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The full command adds &lt;code&gt;sort&lt;/code&gt; to ensure all timestamps are ordered and then either &lt;code&gt;head -n1&lt;/code&gt; or &lt;code&gt;tail -n1&lt;/code&gt; to print the earliest and latest dates respectively.&lt;/p&gt;
</description>

        <pubDate>Sat, 01 Nov 2014 09:44:26 +0000</pubDate>
        <guid isPermaLink="false">urn:uuid:14ac3ce0-6711-4dd9-af2b-3a5e604d4fda</guid>
        <author>Chris Roos</author>
        <link>http://chrisroos.co.uk/blog/2014-11-01-exploring-my-google-location-history</link>
      </item>
    
      <item>
        <title>Notes from The First International Conference on Software Archaeology</title>
        <description>&lt;p&gt;&lt;a href=&quot;http://jamesmead.org/&quot;&gt;James&lt;/a&gt; and I attended &lt;a href=&quot;http://ticosa.org/&quot;&gt;The First International Conference on Software Archaeology&lt;/a&gt; last week.&lt;/p&gt;

&lt;p&gt;I&amp;rsquo;ve spent some time going through the notes I made and have categorised the things I took from the presentations into three broad themes. I&amp;rsquo;m not sure how effective a picture this paints for anyone that wasn&amp;rsquo;t there but hopefully there&amp;rsquo;s something useful in here. For an alternative overview, please see &lt;a href=&quot;http://www.fatvat.co.uk/2014/02/the-first-international-conference-on.html&quot;&gt;Jeff Foster&amp;rsquo;s TICOSA writeup&lt;/a&gt; or the &lt;a href=&quot;http://ticosa.org/sessions.html&quot;&gt;TICOSA sessions&lt;/a&gt; page which contains some of the presentation slides.&lt;/p&gt;

&lt;p&gt;The three broad themes are analysing legacy code (the past), working on legacy code (the present) and helping our future selves (the future).&lt;/p&gt;

&lt;h2&gt;Analysing legacy code&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;I think the main thing I took away from this theme was that there&amp;rsquo;s quite a lot of work going into what still appears to be a fairly new idea.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/mfeathers&quot;&gt;Michael Feathers&lt;/a&gt; demonstrated the use of his &lt;a href=&quot;https://github.com/michaelfeathers/delta-flora&quot;&gt;delta-flora&lt;/a&gt; tool to analyse Ruby projects over the history of the git repository.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/dmitrykandalov&quot;&gt;Dmitry Kandalov&lt;/a&gt; demonstrated his &lt;a href=&quot;https://github.com/dkandalov/code-history-mining&quot;&gt;code-history-mining IntelliJ plugin&lt;/a&gt; that was inspired by Michael&amp;rsquo;s delta-flora.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/robsmallshire&quot;&gt;Robert Smallshire&lt;/a&gt; showed us a number of ways of visualising complexity, including maps of complexity density, and explained how we can use these to identify areas of concern in a system.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/stephaneducasse&quot;&gt;Stéphane Ducasse&lt;/a&gt; told us that having to maintain software means that the software is useful and successful. So, maintenance is a good thing but we can often benefit from dedicated tools that help us understand our specific problems.&lt;/p&gt;

&lt;h2&gt;Working on legacy code&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;The main thing I took away from this theme was the reinforcement of my belief that we shouldn&amp;rsquo;t be so quick to think that we can improve something by throwing it away and rewriting it.&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;Avoiding the temptation to throw away what&amp;rsquo;s there&lt;/h3&gt;

&lt;p&gt;Stéphane Ducasse reminded us that, &amp;ldquo;Early decisions were certainly good at that time&amp;rdquo;&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/keithb_b&quot;&gt;Keith Braithwaite&lt;/a&gt; explained that different types of people approach problems in slightly different ways: Computer scientists might prefer a single longer method that contains all the logic, while OO advocates might prefer many smaller methods. There are merits to both approaches and we should remember that projects coded in a style different to our own aren&amp;rsquo;t wrong; they&amp;rsquo;re just different.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/chrisoldwood&quot;&gt;Chris Oldwood&lt;/a&gt;&amp;rsquo;s lightning talk &lt;a href=&quot;https://twitter.com/dmitrykandalov/status/429401314234494977&quot;&gt;contained a paraphrased quote&lt;/a&gt; (coined by either &lt;a href=&quot;http://en.wikiquote.org/wiki/Talk:Robert_Frost&quot;&gt;Robert Frost&lt;/a&gt; or &lt;a href=&quot;http://platitudesundone.blogspot.co.uk/2010/04/dont-take-fence-down-until-you-know-why.html&quot;&gt;G.K. Chesterton&lt;/a&gt;) that really resonated with me:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Don&amp;rsquo;t ever take a fence down until you know why it was put up&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/stuartcurran&quot;&gt;Stuart Curran&lt;/a&gt; reminded us of George Santayana&amp;rsquo;s quote, &amp;ldquo;Those who cannot remember the past are condemned to repeat it&amp;rdquo;&lt;/p&gt;

&lt;h3&gt;Using tools to get an overview of the code we&amp;rsquo;re working on&lt;/h3&gt;

&lt;p&gt;Michael Feathers (using delta-flora), Dmitry Kandalov (using his IntelliJ plugin) and Robert Smallshire (in his dependency structure matrices) all demonstrated ways of visualising which parts of the system are tightly coupled.&lt;/p&gt;

&lt;h2&gt;Helping our future selves&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;The main thing I took away from this theme was that code will be around for longer than we expect and we should do our best to help our future selves.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Stéphane Ducasse reminded us that software is a living entity and will probably survive for longer that we might imagine. Stéphane gave examples of military and insurance systems that have been around for 15/20 years, which seemed like a long time until I realised that &lt;a href=&quot;https://github.com/freerange/mocha&quot;&gt;Mocha&lt;/a&gt; has been around for about &lt;a href=&quot;https://github.com/freerange/mocha/commit/df720ef11f8cdb21cf5dfbc5f84f35e325fa8258&quot;&gt;8 years&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Robert Smallshire showed some graphs that suggest code is likely to outlast most other aspects of an organisation. By the time you&amp;rsquo;re working on a 20 year old codebase, you&amp;rsquo;re probably working in a team where only 20% have been around from the beginning.&lt;/p&gt;

&lt;p&gt;Michael Feathers suggested we be more aware of how seemingly unrelated factors can affect the complexity of our code. He used the fascinating example of how &lt;a href=&quot;http://www.wired.com/wiredscience/2011/04/judges-mental-fatigue/&quot;&gt;parole is more likely to be granted at certain times of day&lt;/a&gt; to illustrate the sort of things we could be looking for.&lt;/p&gt;

&lt;p&gt;I loved &lt;a href=&quot;https://twitter.com/mattwynne&quot;&gt;Matt Wynne&lt;/a&gt;&amp;rsquo;s metaphor that he uses to explain refactoring to non-developers: Think of developers as chefs, their output as meals and refactoring as keeping the kitchen clean. Matt also talked about analysing the commits in the new &lt;a href=&quot;https://github.com/cucumber/cucumber-ruby-core&quot;&gt;cucumber-ruby-core project&lt;/a&gt; and saying that he thinks that about 75% of the commits are refactoring commits.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/danielbrolund&quot;&gt;Daniel Brolund&lt;/a&gt; described how to use the Mikado method to ensure that we&amp;rsquo;re always reshaping the system to get it into a state that&amp;rsquo;s ready to accept new changes.&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;https://twitter.com/ivanrmoore&quot;&gt;Ivan Moore&lt;/a&gt; gave us some practical advice about &lt;a href=&quot;http://puttingtheteaintoteam.blogspot.co.uk/2014/02/making-life-easier-for-future-software.html&quot;&gt;being kind to our future selves in his lightning talk&lt;/a&gt;.&lt;/p&gt;
</description>

        <pubDate>Fri, 07 Feb 2014 12:25:17 +0000</pubDate>
        <guid isPermaLink="false">urn:uuid:05586206-a0fc-434f-ad2f-5815671d94f5</guid>
        <author>Chris Roos</author>
        <link>http://chrisroos.co.uk/blog/2014-02-07-notes-from-the-first-international-conference-on-software-archaeology</link>
      </item>
    
      <item>
        <title>Deploying Rails apps using Recap, Apache and Passenger</title>
        <description>&lt;p&gt;This assumes that you already have &lt;a href=&quot;http://httpd.apache.org/&quot;&gt;Apache&lt;/a&gt; and &lt;a href=&quot;https://www.phusionpassenger.com/&quot;&gt;Passenger&lt;/a&gt; installed; and that you&amp;rsquo;ve run &lt;code&gt;recap setup&lt;/code&gt; and configured your &lt;code&gt;Capfile&lt;/code&gt; with the address of your server.&lt;/p&gt;

&lt;p&gt;I&amp;rsquo;m going to use &amp;lsquo;thames-time-lapse&amp;rsquo; as an example application name but you&amp;rsquo;ll want to replace that with the name of your app in the instructions below.&lt;/p&gt;

&lt;p&gt;The first step is to set-up the server and get the code deployed.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ cap bootstrap
$ cap deploy:setup
$ cap deploy
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We now want to make &lt;a href=&quot;https://github.com/freerange/recap&quot;&gt;Recap&amp;rsquo;s&lt;/a&gt; configuration options available to Passenger. We can do this by changing the application user&amp;rsquo;s shell to bash and loading Recap&amp;rsquo;s environment variables in that user&amp;rsquo;s &lt;code&gt;.bashrc&lt;/code&gt;.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Set the app user's shell to bash
# So that Passenger can pick up environment variables from .bashrc
$ sudo chsh -s /bin/bash thames-time-lapse

# Create a .bashrc that loads the recap environment variables
$ sudo su - thames-time-lapse
$ echo 'source ~/.recap-env-export' &amp;gt; ~/.bashrc
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Add an Apache virtual host for our application. Note that I&amp;rsquo;m setting the &lt;code&gt;PassengerRuby&lt;/code&gt; option as it defaults to the user that owns &lt;code&gt;config.ru&lt;/code&gt;, which happens to be the user that deployed rather than the application user.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$ sudo vi /etc/apache2/sites-available/thames-time-lapse.chrisroos.co.uk.conf

# Paste the following content
&amp;lt;VirtualHost *:80&amp;gt;
  # Set PassengerRuby if you're using a non-system Ruby
  PassengerRuby /usr/local/bin/ruby
  # We have to set the user because config.ru is owned by the user that deployed
  PassengerUser thames-time-lapse
  ServerName thames-time-lapse.chrisroos.co.uk
  DocumentRoot /home/thames-time-lapse/app/public
  &amp;lt;Directory /home/thames-time-lapse/app/public&amp;gt;
    Allow from all
    Options -MultiViews
  &amp;lt;/Directory&amp;gt;
&amp;lt;/VirtualHost&amp;gt;

# Make the site available to Apache
$ sudo a2ensite thames-time-lapse.chrisroos.co.uk.conf

# Restart Apache
$ sudo service apache2 reload
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;All being well, your Rails app has now been deployed with Recap and is being served with Apache and Passenger.&lt;/p&gt;

&lt;p&gt;The final step is to define the &lt;code&gt;deploy:restart&lt;/code&gt; Capistrano task so that the app is restarted after deployment. Add the following task to your Capfile.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;namespace :deploy do
  task :restart do
    as_app 'touch tmp/restart.txt'
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And that should be everything you need to get your app deployed using recap, and served by Apache and Passenger.&lt;/p&gt;
</description>

        <pubDate>Tue, 15 Oct 2013 14:49:07 +0000</pubDate>
        <guid isPermaLink="false">urn:uuid:a3189abe-2732-4996-bffa-40cc0c770a18</guid>
        <author>Chris Roos</author>
        <link>http://chrisroos.co.uk/blog/2013-10-15-deploying-rails-apps-using-recap-apache-and-passenger</link>
      </item>
    
      <item>
        <title>Moving my timelapse app from Heroku to AWS</title>
        <description>&lt;p&gt;I love &lt;a href=&quot;https://www.heroku.com/&quot;&gt;Heroku&lt;/a&gt; and tend to use the free resources to deploy apps when they&amp;rsquo;re in their very early stages of development. I have a few things that I continue to use Heroku for but unfortunately ran into some of the limits with the &lt;a href=&quot;https://github.com/chrisroos/thames-time-lapse&quot;&gt;Thames Time Lapse project&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The first limitation was the number of rows in the free development database. The dev plan gives you 10,000 rows for free but I managed to get up to around 150,000 before receiving a warning email from Heroku. I only create around 1,000 rows a day, and I&amp;rsquo;m nowhere near 150 days in, so I&amp;rsquo;d obviously screwed up somewhere along the line.&lt;/p&gt;

&lt;p&gt;Another limitation was in my use of the &lt;a href=&quot;http://rubygems.org/gems/s3&quot;&gt;S3 gem&lt;/a&gt; to find the new images that had been uploaded to S3. As far as I can tell the gem doesn&amp;rsquo;t understand S3 folders which meant that I had to scan the entire S3 bucket looking for new images. As more were uploaded, so this took longer and longer which just wasn&amp;rsquo;t sustainable. Moving to AWS has allowed me to use the excellent &lt;a href=&quot;http://s3tools.org/s3cmd&quot;&gt;s3cmd&lt;/a&gt; command line interface to greatly improve the performance of looking for new images.&lt;/p&gt;

&lt;p&gt;Finally, having the app running on AWS should also make it easier to use imagemagick to create smaller versions of the images, and ffmpeg to automatically create a timelapse of each day of images.&lt;/p&gt;

&lt;p&gt;Instructions for settings up an AWS instance (I&amp;rsquo;m using a free micro instance) are in the README of the application should you be so inclined to play along.&lt;/p&gt;
</description>

        <pubDate>Sun, 13 Oct 2013 17:08:54 +0000</pubDate>
        <guid isPermaLink="false">urn:uuid:e3d6bffa-f81d-4a4c-93f0-c14766b68617</guid>
        <author>Chris Roos</author>
        <link>http://chrisroos.co.uk/blog/2013-10-13-moving-my-timelapse-app-from-heroku-to-aws</link>
      </item>
    
      <item>
        <title>Time slice images of the Thames</title>
        <description>&lt;p&gt;This image was created by taking 24 images (well, I think it might actually be 23 because my maths was off) from the set I captured on the &lt;a href=&quot;http://thames-time-lapse.chrisroos.co.uk/days/2013-08-30&quot;&gt;30th August 2013&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/images/2013-08-30-thames-time-slice.jpg&quot; alt=&quot;Time slice image of the Thames&quot; /&gt;&lt;/p&gt;

&lt;p&gt;I played around with different numbers of images making up the final image, but felt that one per hour produces the best results.&lt;/p&gt;

&lt;p&gt;I&amp;rsquo;ve also had a bit of a play with creating a movie from a set of 27 of these time-slice images. I really like the undulating effect of the water. You can also view it on &lt;a href=&quot;https://vimeo.com/74574559&quot;&gt;Vimeo&lt;/a&gt; if you can&amp;rsquo;t see the video below.&lt;/p&gt;

&lt;p&gt;&lt;video width=&quot;782&quot; height=&quot;612&quot; controls&gt;
  &lt;source src=&quot;/videos/thames-time-slice.mp4&quot; type=&quot;video/mp4&quot;&gt;
  Your browser does not support the video tag.
&lt;/video&gt;&lt;/p&gt;
</description>

        <pubDate>Sun, 15 Sep 2013 17:23:24 +0000</pubDate>
        <guid isPermaLink="false">urn:uuid:05352791-fc8c-4428-b425-f25ab9b72b0c</guid>
        <author>Chris Roos</author>
        <link>http://chrisroos.co.uk/blog/2013-09-15-time-slice-images-of-the-thames</link>
      </item>
    
      <item>
        <title>Why split the subject and body in git commit messages?</title>
        <description>&lt;p&gt;Tim Pope&amp;rsquo;s, &lt;a href=&quot;http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html&quot;&gt;&amp;ldquo;A Note About Git Commit Messages&amp;rdquo;&lt;/a&gt; suggests that we should split our git commit message into subject and body, with a newline between the two. Tim lists some tools that make use of this split and I thought I&amp;rsquo;d follow that with some screenshots showing how this convention is used in four fairly common (well, I use them) git tools.&lt;/p&gt;

&lt;h2&gt;&lt;a href=&quot;http://mac.github.com/&quot;&gt;GitHub for Mac&lt;/a&gt;&lt;/h2&gt;

&lt;h3&gt;With a long commit message on a single line&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/images/git-commit-message-github-bad.png&quot; alt=&quot;GitHub.app with a long commit message on a single line&quot; /&gt;&lt;/p&gt;

&lt;h3&gt;With the commit message split into subject and body&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/images/git-commit-message-github-good.png&quot; alt=&quot;GitHub.app with the commit message split into subject and body&quot; /&gt;&lt;/p&gt;

&lt;h2&gt;&lt;a href=&quot;https://www.kernel.org/pub/software/scm/git/docs/gitk.html&quot;&gt;Gitk&lt;/a&gt;&lt;/h2&gt;

&lt;h3&gt;With a long commit message on a single line&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/images/git-commit-message-gitk-bad.png&quot; alt=&quot;Gitk with a long commit message on a single line&quot; /&gt;&lt;/p&gt;

&lt;h3&gt;With the commit message split into subject and body&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/images/git-commit-message-gitk-good.png&quot; alt=&quot;Gitk with the commit message split into subject and body&quot; /&gt;&lt;/p&gt;

&lt;h2&gt;&lt;a href=&quot;http://gitx.frim.nl/&quot;&gt;GitX&lt;/a&gt;&lt;/h2&gt;

&lt;h3&gt;With a long commit message on a single line&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/images/git-commit-message-gitx-bad.png&quot; alt=&quot;GitX with a long commit message on a single line&quot; /&gt;&lt;/p&gt;

&lt;h3&gt;With the commit message split into subject and body&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/images/git-commit-message-gitx-good.png&quot; alt=&quot;GitX with the commit message split into subject and body&quot; /&gt;&lt;/p&gt;

&lt;h2&gt;&lt;a href=&quot;http://git-scm.com/&quot;&gt;Git cli&lt;/a&gt;&lt;/h2&gt;

&lt;h3&gt;With a long commit message on a single line&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/images/git-commit-message-git-cli-bad.png&quot; alt=&quot;Git cli with a long commit message on a single line&quot; /&gt;&lt;/p&gt;

&lt;h3&gt;With the commit message split into subject and body&lt;/h3&gt;

&lt;p&gt;&lt;img src=&quot;/images/git-commit-message-git-cli-good.png&quot; alt=&quot;GitX with the commit message split into subject and body&quot; /&gt;&lt;/p&gt;
</description>

        <pubDate>Mon, 09 Sep 2013 15:53:06 +0000</pubDate>
        <guid isPermaLink="false">urn:uuid:2eb2f5e1-748d-4a22-b94d-357e4047000e</guid>
        <author>Chris Roos</author>
        <link>http://chrisroos.co.uk/blog/2013-09-09-why-split-the-subject-and-body-in-git-commit-messages</link>
      </item>
    
      <item>
        <title>Automatically updating my desktop background from my Thames time lapse pictures</title>
        <description>&lt;p&gt;One of the things I wanted to do with the &lt;a href=&quot;/blog/2013-08-14-android-and-some-time-lapse-ish-magic&quot;&gt;pictures of the Thames that I&amp;rsquo;ve been capturing&lt;/a&gt; is to periodically update my desktop background to show the most recent image.&lt;/p&gt;

&lt;p&gt;I was investigating how best to hook it all up when I came across this article that describes how to &lt;a href=&quot;http://www.macosxautomation.com/automator/examples/ex08/03.html&quot;&gt;Set the Desktop Picture to NASA Image of the Day&lt;/a&gt;. I figured that I could add a feed of the recent images to the &lt;a href=&quot;http://thames-time-lapse.chrisroos.co.uk/images&quot;&gt;thames-time-lapse website&lt;/a&gt; and follow the same workflow to set my desktop background.&lt;/p&gt;

&lt;p&gt;Once I had the workflow downloading images and automatically setting my desktop background, I added a cron job to execute that workflow every 15 minutes.&lt;/p&gt;

&lt;p&gt;Another thing I&amp;rsquo;ve been meaning to do is try to improve the quality of some of the images: They&amp;rsquo;re being taken through a pretty dirty window and suffer from both the dirt and reflections as the light changes during the day. I&amp;rsquo;m hoping that the increased visibility of the images will prompt me to do something about this sooner rather than later.&lt;/p&gt;
</description>

        <pubDate>Mon, 09 Sep 2013 10:39:55 +0000</pubDate>
        <guid isPermaLink="false">urn:uuid:32f11fcc-2675-450a-885e-6107aba7760a</guid>
        <author>Chris Roos</author>
        <link>http://chrisroos.co.uk/blog/2013-09-09-automatically-updating-my-desktop-background-from-my-thames-time-lapse-pictures</link>
      </item>
    
  </channel>
</rss>

