<?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>Flipflops.org</title>
	<atom:link href="http://www.flipflops.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.flipflops.org</link>
	<description>Flipflops.org is about web development and fairly conceptual art</description>
	<lastBuildDate>Fri, 17 May 2013 23:18:36 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Installing Homebrew &amp; Fabric on OSX</title>
		<link>http://www.flipflops.org/2013/05/18/installing-hombrew-and-fabric-on-osx/</link>
		<comments>http://www.flipflops.org/2013/05/18/installing-hombrew-and-fabric-on-osx/#comments</comments>
		<pubDate>Fri, 17 May 2013 23:18:36 +0000</pubDate>
		<dc:creator>Flipflops</dc:creator>
				<category><![CDATA[Web Things]]></category>
		<category><![CDATA[Deployment]]></category>
		<category><![CDATA[Fabric]]></category>
		<category><![CDATA[Homebrew]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.flipflops.org/?p=825</guid>
		<description><![CDATA[I recently started using Fabric to simplify my deployment process. Fabric is a Python (2.5 or higher) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks. I quite like Fabric &#8211; I&#8217;m not 100% sold, but it’s easy to get started with and it won&#8217;t be long [...]]]></description>
				<content:encoded><![CDATA[<p>I recently started using <a href="http://docs.fabfile.org/en/1.6/">Fabric</a> to simplify my deployment process. </p>
<blockquote><p>Fabric is a Python (2.5 or higher) library and command-line tool for streamlining the use of SSH for application deployment or systems administration tasks.</p></blockquote>
<p>I quite like Fabric &#8211; I&#8217;m not 100% sold, but it’s easy to get started with and it won&#8217;t be long until you can write complex scripts. </p>
<p>Being able to deploy a complex app with a single command is great. I do not miss long checklists and having to run through step after step in a hurry.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">fab deploy</pre></td></tr></table></div>

<p>Pretty easy isn’t it?</p>
<p>Why Fabric? To be honest &#8211; why not. I know a little bit of Python, so why not learn a bit more? I like the glueyness, the fact that it (mostly) lets you get on with things and doesn’t force you to work in a particular way. </p>
<p>I had a devil of a time getting it up and running though on my Mac running 10.6.8 (Snow Leopard). </p>
<h2>Getting started&#8230;</h2>
<p><b>Homebrew</b> <a href="http://mxcl.github.io/homebrew/">http://mxcl.github.io/homebrew/</a><br />
is a package manager for OSX and alternative to MacPorts.  Install Fabric and Python via Homebrew to (hopefully) make your life a bit easier&#8230;</p>
<h2>Install Homebrew</h2>
<p>Open a terminal. Run the commands as your user, not <code>sudo</code></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">ruby <span style="color: #660033;">-e</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$(curl -fsSL https://raw.github.com/mxcl/homebrew/go)</span>&quot;</span></pre></td></tr></table></div>

<p>Install Homebrew and then check the install.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">brew doctor</pre></td></tr></table></div>

<p>Running <code>brew doctor</code> will identify any problems with your install. Any problems are displayed. Work through any issues it flags up one by one. In my case I ended up having to remove MacPorts and had to reinstall Xcode.</p>
<h2>Remove MacPorts</h2>
<p><a href="http://www.macports.org/">MacPorts</a> is another package manager, but apparently it often doesn&#8217;t play with Homebrew.</p>
<p>Follow the instructions <a href="http://guide.macports.org/chunked/installing.macports.uninstalling.html">http://guide.macports.org/chunked/installing.macports.uninstalling.html</a></p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> port <span style="color: #660033;">-fp</span> uninstall installed
<span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">rm</span> <span style="color: #660033;">-rf</span> \
    <span style="color: #000000; font-weight: bold;">/</span>opt<span style="color: #000000; font-weight: bold;">/</span><span style="color: #7a0874; font-weight: bold;">local</span> \
    <span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>DarwinPorts \
    <span style="color: #000000; font-weight: bold;">/</span>Applications<span style="color: #000000; font-weight: bold;">/</span>MacPorts \
    <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>LaunchDaemons<span style="color: #000000; font-weight: bold;">/</span>org.macports.<span style="color: #000000; font-weight: bold;">*</span> \
    <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Receipts<span style="color: #000000; font-weight: bold;">/</span>DarwinPorts<span style="color: #000000; font-weight: bold;">*</span>.pkg \
    <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Receipts<span style="color: #000000; font-weight: bold;">/</span>MacPorts<span style="color: #000000; font-weight: bold;">*</span>.pkg \
    <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>StartupItems<span style="color: #000000; font-weight: bold;">/</span>DarwinPortsStartup \
    <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Tcl<span style="color: #000000; font-weight: bold;">/</span>darwinports1.0 \
    <span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Tcl<span style="color: #000000; font-weight: bold;">/</span>macports1.0 \
    ~<span style="color: #000000; font-weight: bold;">/</span>.macports</pre></td></tr></table></div>

<h2>Remove Xcode</h2>
<p><a href="https://developer.apple.com/xcode/">Xcode</a> is Apple&#8217;s Integrated Development Environment (IDE) containing tools for developing software for OS X and iOS. </p>
<p>Based on issues listed by <code>brew doctor</code> I removed Xcode and the re-installed it.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #000000; font-weight: bold;">/</span>Developer<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>uninstall-devtools <span style="color: #660033;">--mode</span>=all</pre></td></tr></table></div>

<p>Make sure you have your Apple ID to hand if you don&#8217;t have the .dmg and need to download it from Apple.</p>
<h2>Install Git</h2>
<p>Next I installed <a href="https://github.com">Git</a> using Homebrew if you do not already have it (I use Mercurial day to day, so I didn’t)</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">brew <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">git</span>
brew upgrade <span style="color: #c20cb9; font-weight: bold;">git</span></pre></td></tr></table></div>

<h2>Install python</h2>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">brew <span style="color: #c20cb9; font-weight: bold;">install</span> python</pre></td></tr></table></div>

<p>Update your paths to use the version of Python that you&#8217;ve just installed.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">sudo</span> <span style="color: #c20cb9; font-weight: bold;">nano</span> <span style="color: #000000; font-weight: bold;">/</span>etc<span style="color: #000000; font-weight: bold;">/</span>paths
<span style="color: #c20cb9; font-weight: bold;">nano</span> ~<span style="color: #000000; font-weight: bold;">/</span>.bashrc</pre></td></tr></table></div>

<h2>Install Fabric</h2>

<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">brew <span style="color: #c20cb9; font-weight: bold;">install</span> fabric</pre></td></tr></table></div>

<p>Phew! Everything should be working now&#8230; time to write a fabfile.py</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flipflops.org/2013/05/18/installing-hombrew-and-fabric-on-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wouldn&#8217;t it be lovely if&#8230;</title>
		<link>http://www.flipflops.org/2013/04/04/wouldnt-it-be-lovely-if/</link>
		<comments>http://www.flipflops.org/2013/04/04/wouldnt-it-be-lovely-if/#comments</comments>
		<pubDate>Thu, 04 Apr 2013 21:56:30 +0000</pubDate>
		<dc:creator>Flipflops</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[Filesystems]]></category>
		<category><![CDATA[GitHub]]></category>
		<category><![CDATA[Google Drive]]></category>
		<category><![CDATA[MetaData]]></category>

		<guid isPermaLink="false">http://www.flipflops.org/?p=808</guid>
		<description><![CDATA[&#8230;Google Drive supported README files in the same way that GitHub does? I think it would be wonderful if in each directory you not only saw a list of all your files and folders, but could also have formatted page including links, images etc. &#8211; a page that can give an overview or explain why [...]]]></description>
				<content:encoded><![CDATA[<p>&#8230;Google Drive supported README files in the same way that <a href="https://github.com/">GitHub</a> does?</p>
<p>I think it would be wonderful if in each directory you not only saw a list of all your files and folders, but could also have formatted page including links, images etc. &#8211; a page that can give an overview or explain why the specific information has been gathered together.</p>
<p>Part of the great trouble with file systems and directory hierarchies is the problem of &#8216;knowing&#8217; what exists at each level. Loosely structured data (e.g. tag based systems) can be great, but there is very often a need for a more hierarchical structure too. The tree based structure of file systems is both intuitive and useful &#8211; and, I&#8217;d like to think that this is more than just long familiarity.</p>
<p>&#8230;actually I&#8217;d love this functionality on all my devices. I would like to browse any file system and if there is a README to see that with the files. I&#8217;m writing this on a laptop running Linux Mint &#8211; I&#8217;m guessing I could do this already if I knew where to look. Does it exist for Mac and Windows too? Must do, surely?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flipflops.org/2013/04/04/wouldnt-it-be-lovely-if/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Default form values in Rails</title>
		<link>http://www.flipflops.org/2013/02/12/default-form-values-in-rails/</link>
		<comments>http://www.flipflops.org/2013/02/12/default-form-values-in-rails/#comments</comments>
		<pubDate>Tue, 12 Feb 2013 00:19:40 +0000</pubDate>
		<dc:creator>Flipflops</dc:creator>
				<category><![CDATA[Web Things]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.flipflops.org/?p=744</guid>
		<description><![CDATA[One of the problems I initially ran into using Rails was the problem of how the hell you set initial values for your forms? (For example a select menu with a default value chosen but which a user can change). It turns out that as long as you don&#8217;t try and set the values in [...]]]></description>
				<content:encoded><![CDATA[<p>One of the problems I initially ran into using Rails was the problem of how the hell you set initial values for your forms? (For example a select menu with a default value chosen but which a user can change). It turns out that as long as you don&#8217;t try and set the values in your views, it&#8217;s easy and there are several solutions.</p>
<p>As an example I started off with a classic Post model, then moved on to Ghost and Roast to try out alternatives (well you&#8217;ve got to call your models something&#8230;) I generated an identical scaffold for each and then ran a migration e.g.</p>

<div class="wp_syntax"><table><tr><td class="code"><pre class="ruby" style="font-family:monospace;">&nbsp;
rails generate scaffold Post name:<span style="color:#CC0066; font-weight:bold;">string</span> title:<span style="color:#CC0066; font-weight:bold;">string</span> type_id:<span style="color:#CC0066; font-weight:bold;">integer</span>
&nbsp;
rake db:migrate</pre></td></tr></table></div>

<h2>1. Use model after_initialize</h2>
<p><strong>/app/models/post.rb</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;">&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> Post <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>
  attr_accessible <span style="color:#ff3333; font-weight:bold;">:name</span>, <span style="color:#ff3333; font-weight:bold;">:title</span>, <span style="color:#ff3333; font-weight:bold;">:type_id</span>
  validates <span style="color:#ff3333; font-weight:bold;">:name</span>,  <span style="color:#ff3333; font-weight:bold;">:presence</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span>
&nbsp;
  after_initialize <span style="color:#ff3333; font-weight:bold;">:init</span>
&nbsp;
  private
    <span style="color:#9966CC; font-weight:bold;">def</span> init
      <span style="color:#9966CC; font-weight:bold;">if</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">new_record</span>? <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">type_id</span>.<span style="color:#0000FF; font-weight:bold;">nil</span>?
        <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">type_id</span> = <span style="color:#006666;">5</span>
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>Edit the model and add an <code>after_initialize</code> callback. This callback is called after a new object is instantiated. The <code>init</code> method sets the default value, but only if the value has not been set yet.</p>
<p><a href="http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html">http://api.rubyonrails.org/classes/ActiveRecord/Callbacks.html</a></p>
<h2>2. Set the default in the controller</h2>
<p><strong>/app/controllers/ghosts_controller.rb</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;">  <span style="color:#008000; font-style:italic;"># GET /ghosts/new</span>
  <span style="color:#008000; font-style:italic;"># GET /ghosts/new.json</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> new
    <span style="color:#0066ff; font-weight:bold;">@ghost</span> = Ghost.<span style="color:#9900CC;">new</span>
&nbsp;
    respond_to <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span><span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">|</span>
      <span style="color:#CC0066; font-weight:bold;">format</span>.<span style="color:#9900CC;">html</span> <span style="color:#008000; font-style:italic;"># new.html.erb</span>
      <span style="color:#CC0066; font-weight:bold;">format</span>.<span style="color:#9900CC;">json</span> <span style="color:#006600; font-weight:bold;">&#123;</span> render <span style="color:#ff3333; font-weight:bold;">:json</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0066ff; font-weight:bold;">@ghost</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>Using this alternative solution, you simply set the default value in the <code>new</code> method using <code>@ghost.type_id = 5</code>. This value will only ever be set before the <code>new</code> view for this controller is created.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;">  <span style="color:#008000; font-style:italic;"># GET /ghosts/new</span>
  <span style="color:#008000; font-style:italic;"># GET /ghosts/new.json</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> new
    <span style="color:#0066ff; font-weight:bold;">@ghost</span> = Ghost.<span style="color:#9900CC;">new</span>
    <span style="color:#0066ff; font-weight:bold;">@ghost</span>.<span style="color:#9900CC;">type_id</span> = <span style="color:#006666;">5</span>
&nbsp;
    respond_to <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span><span style="color:#CC0066; font-weight:bold;">format</span><span style="color:#006600; font-weight:bold;">|</span>
      <span style="color:#CC0066; font-weight:bold;">format</span>.<span style="color:#9900CC;">html</span> <span style="color:#008000; font-style:italic;"># new.html.erb</span>
      <span style="color:#CC0066; font-weight:bold;">format</span>.<span style="color:#9900CC;">json</span> <span style="color:#006600; font-weight:bold;">&#123;</span> render <span style="color:#ff3333; font-weight:bold;">:json</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0066ff; font-weight:bold;">@ghost</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>This solution is easy implement and has the advantage that what you are doing is obvious &#8211; the default isn&#8217;t tucked away where you might forget about it.</p>
<h2>3. Set the default in the database</h2>
<p>When the <code>rails generate</code> command was run, a migration was automatically created:</p>
<p><strong>/db/migrate/20130209234708_create_roasts.rb</strong></p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> CreateRoasts <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Migration</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> change
    create_table <span style="color:#ff3333; font-weight:bold;">:roasts</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>t<span style="color:#006600; font-weight:bold;">|</span>
      t.<span style="color:#CC0066; font-weight:bold;">string</span> <span style="color:#ff3333; font-weight:bold;">:name</span>
      t.<span style="color:#CC0066; font-weight:bold;">string</span> <span style="color:#ff3333; font-weight:bold;">:title</span>
      t.<span style="color:#CC0066; font-weight:bold;">integer</span> <span style="color:#ff3333; font-weight:bold;">:type_id</span>
      t.<span style="color:#9900CC;">timestamps</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>We can edit the migration to set a default value here e.g.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> CreateRoasts <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Migration</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> change
    create_table <span style="color:#ff3333; font-weight:bold;">:roasts</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>t<span style="color:#006600; font-weight:bold;">|</span>
      t.<span style="color:#CC0066; font-weight:bold;">string</span> <span style="color:#ff3333; font-weight:bold;">:name</span>
      t.<span style="color:#CC0066; font-weight:bold;">string</span> <span style="color:#ff3333; font-weight:bold;">:title</span>
      t.<span style="color:#CC0066; font-weight:bold;">integer</span> <span style="color:#ff3333; font-weight:bold;">:type_id</span>, <span style="color:#ff3333; font-weight:bold;">:default</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">5</span>
      t.<span style="color:#9900CC;">timestamps</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<h2>Conclusion</h2>
<p>Here are three ways of setting the default values. What you choose to do is up to you, I think it is important that a solution is consistent with the rest of the code that you are working with (as long as it isn&#8217;t bad code). Maintainability and clarity shouldn&#8217;t be neglected and I subscribe to the school of thought that you should always keep things simple &#8211; when complicated problems crop up, write complicated solutions, but don&#8217;t complicate things for the sake of it. </p>
<p>Personally I would be disinclined to use the final method because I think it would be easy to forget about.</p>
<p>Creating a method in the model may be overkill most of the time, but if you are setting a lot of default values or your default values change with context, then setting the default values in the method makes sense to me.</p>
<p>These code examples were built with Ruby on Rails 3.2.9</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flipflops.org/2013/02/12/default-form-values-in-rails/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sinatra templates from params</title>
		<link>http://www.flipflops.org/2013/02/05/sinatra-templates-from-params/</link>
		<comments>http://www.flipflops.org/2013/02/05/sinatra-templates-from-params/#comments</comments>
		<pubDate>Tue, 05 Feb 2013 21:15:05 +0000</pubDate>
		<dc:creator>Flipflops</dc:creator>
				<category><![CDATA[Web Things]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://www.flipflops.org/?p=787</guid>
		<description><![CDATA[Having been playing about with Sinatra I&#8217;m finding it cropping up in all kinds of useful ways. I shouldn&#8217;t be too surprised though, as that is the whole raison d&#8217;etre of micro-frameworks. When I get around to it I am writing a little Sinatra app, but for me it has a found a real niche [...]]]></description>
				<content:encoded><![CDATA[<p>Having been playing about with <a href="http://www.sinatrarb.com/" target="_blank">Sinatra</a> I&#8217;m finding it cropping up in all kinds of useful ways. I shouldn&#8217;t be too surprised though, as that is the whole raison d&#8217;etre of micro-frameworks.</p>
<p>When I get around to it I am writing a little Sinatra app, but for me it has a found a real niche helping to prototype or mess around with CSS and Javascript &#8211; it only takes a few seconds to create a little app to play around with.</p>
<p>Here is a minimal app.rb file. It will load templates from the (default) /views directory based on the <code>:name</code> parameter.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;">&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'sinatra'</span>
&nbsp;
get <span style="color:#996600;">'/'</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    erb <span style="color:#ff3333; font-weight:bold;">:index</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
get <span style="color:#996600;">'/map/:name'</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    erb params<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:name</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">to_sym</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>The key here is <code>to_sym</code> &#8211; this is not Sinatra specific it is <a href="http://www.ruby-doc.org/core-1.9.3/String.html#method-i-to_sym" target="_blank">part of the Ruby language</a>. <code>to_sym</code> converts a string into a symbol. </p>
<p>If the concept of a symbol is a little woolly <a target="_blank" href="http://www.troubleshooters.com/codecorn/ruby/symbols.htm">read this</a> for an excellent explanation. An easy (although probably incorrect or simplistic) is to think of a ruby symbol simply as an immutable name for something that can either be a string or an integer. Once created it cannot change.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flipflops.org/2013/02/05/sinatra-templates-from-params/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress updates with SFTP</title>
		<link>http://www.flipflops.org/2013/01/27/wordpress-updates-with-sftp/</link>
		<comments>http://www.flipflops.org/2013/01/27/wordpress-updates-with-sftp/#comments</comments>
		<pubDate>Sat, 26 Jan 2013 23:58:54 +0000</pubDate>
		<dc:creator>Flipflops</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[sftp]]></category>
		<category><![CDATA[ssh]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.flipflops.org/?p=747</guid>
		<description><![CDATA[A lot of people seem to have a great deal of difficulty using the WordPress update facility that allows you to update your WordPress install, themes and plugins from within the WordPress admin. As is so often the case, file and directory permissions are often to blame. (Updating WordPress in the Codex is worth reading) [...]]]></description>
				<content:encoded><![CDATA[<p>A lot of people seem to have a great deal of difficulty using the WordPress update facility that allows you to update your WordPress install, themes and plugins from within the WordPress admin. As is so often the case, file and directory permissions are often to blame. (<a href="http://codex.wordpress.org/Updating_WordPress" target="_blank">Updating WordPress </a>in the Codex is worth reading)</p>
<p><img class="alignleft size-full wp-image-767" alt="Update WordPress" src="http://www.flipflops.org/wp-content/uploads/2013/01/update.png" width="759" height="259" /></p>
<p>If you are using shared hosting with a company like <a href="http://www.dreamhost.com/r.cgi?333550" target="_blank">Dreamhost</a> (for example), then you are in luck. If you are managing your own server or are on many other hosts, then you may have a great deal of difficulty.</p>
<p>I&#8217;ve recently given the blog associated with one of the sites I manage a bit of a makeover. The site has a dedicated server so we can do what we want. We&#8217;ve always had SFTP accounts no basic FTP access. Historically the blog was hosted in a sub directory of the main site and the theme shared many files with the main site and had access to the main site database.</p>
<p>The reason it is important to use SFTP is that FTP user names and passwords are sent as plain text and can be captured by a third party using the same network. <a href="http://en.wikipedia.org/wiki/SSH_File_Transfer_Protocol" target="_blank">SFTP</a> is a secure extension to SSH that allows you to carry out FTP actions.</p>
<p>We decided to unwind this relationship for a variety of reasons (security and ease of maintenance being key) and move the blog into it&#8217;s own sub domain.</p>
<p>I wanted to have the facility to just click the update button and have WordPress update automatically rather than have the hassle of applying all the updates manually. In-fact I think that one of the reasons there are so many insecure WordPress installations is that manually updating the core and the plugins can be very time consuming.<br />
I really had no idea that getting WordPress to update from the admin using SFTP would take me so long. I even ended up pokeing around in the code to see what was going on&#8230;</p>
<p>Eventually I found the <a href="http://wordpress.org/extend/plugins/ssh-sftp-updater-support/" target="_blank">SSH SFTP Updater Support</a> plugin  which works like a dream. I think it&#8217;s quite odd this isn&#8217;t built in, especially as keeping code up-to-date is so important.</p>
<p><img src="http://www.flipflops.org/wp-content/uploads/2013/01/choose2.png" alt="Update your WordPress with SFTP" width="759" height="467" class="alignleft size-full wp-image-769" /></p>
<p>Don&#8217;t forget to include the SFTP/SSH port 22 on the end of the hostname.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flipflops.org/2013/01/27/wordpress-updates-with-sftp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep a website looking good</title>
		<link>http://www.flipflops.org/2013/01/25/keep-a-website-looking-good/</link>
		<comments>http://www.flipflops.org/2013/01/25/keep-a-website-looking-good/#comments</comments>
		<pubDate>Fri, 25 Jan 2013 00:10:35 +0000</pubDate>
		<dc:creator>Flipflops</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[brand guidelines]]></category>
		<category><![CDATA[Style guide]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.flipflops.org/?p=750</guid>
		<description><![CDATA[We all know the story. A new website looks beautiful&#8230; but not for long A year later, the owners of the website go out looking for a new website because their once gorgeous website now looks terrible. What has happened? The code hasn&#8217;t changed but the content has. As developers or designers we often fail to appreciate [...]]]></description>
				<content:encoded><![CDATA[<h2>We all know the story.</h2>
<h2>A new website looks beautiful&#8230; but not for long</h2>
<p>A year later, the owners of the website go out looking for a new website because their once gorgeous website now looks terrible.</p>
<h2>What has happened?</h2>
<p>The code hasn&#8217;t changed but the content has. As developers or designers we often fail to appreciate how hard it can be for non web people (usually the owners) to manage their content.</p>
<p>When developers hand over websites to clients they are always tweaked to look perfect, if the content doesn&#8217;t quite fit the design, the content can be amended. If you have just built and populated a website it is very easy to add quickly add a couple of new styles, it is not so easy for most people.</p>
<p>Most people are not stupid; most business owners are not stupid &#8211; the problem is simply that most people have never had any visual training, nobody has ever sat down and given them any tips.</p>
<p>As a result, despite having the best of intentions, websites (and most printed material that hasn&#8217;t been produced by a designer) tend to end up as a bit of a mess. Technology like WYSIWYG editors, user friendly web applications and easy to use desktop programmes have made content creation accessible to huge numbers of people, but they have also made it very easy to make an incredible mess.</p>
<h2>A few useful  guidelines</h2>
<p>There are a few guiding principles to making the content, specifically the copy of a website look good:</p>
<ul>
<li>Keep it simple &amp; consistent.</li>
<li>Choose a few colours that are easy to read, and which are appropriate for the design of the website.</li>
<li>Choose your fonts carefully and stick to them. It is common practice now to choose a body font that is easy to read (e.g. Arial) and then choose a webfont for headings to provide visual interest.</li>
<li>Don’t use go crazy with all the different font sizes and variants. Use elements like sub-headings, blockquotes and one or two nicely crafted styles (e.g. a wrapping a paragraph in a keyline)</li>
<li>Use images to break up the flow of text, but make sure they enhance and are complementary to the text (and For emphasis don&#8217;t forget the alt tags)</li>
<li>Think about floating elements like images or videos so that the text wraps around to add further interest and provide a flow to the page.</li>
</ul>
<h2>What we can do to help</h2>
<p>A lot companies have style guides and brand guidelines that they use to help maintain consistent printed material. I&#8217;m always amazed how few companies do the same thing to help manage their online presence. You should produce a style guide in conjunction with the website visuals. Having a guide to follow makes the business of inputting or updating great swathes of content much easier.</p>
<p>A PDF of the guide is often useful but why not just create a private page within the CMS that gives the user examples of what they can do? Here are some of the things I include:</p>
<ul>
<li>Show the headings and sub headings and give examples of how you would use them.</li>
<li>Give examples of lists</li>
<li>Show images displayed block, floated left and floated right</li>
<li>Show images with captions displayed block, floated left and floated right</li>
<li>Give an example of a blockquote and cite, with an explanation of when to use them</li>
<li>Even after you have formally handed over a site do a bit of hand holding &#8211; being nice to clients usually pays dividends.</li>
</ul>
<h2>Here&#8217;s one I prepared earlier&#8230;</h2>
<p>This is a style guide that is part of another WordPress site. Feel free to copy and use as a basis.</p>
<div id="attachment_778" class="wp-caption alignleft" style="width: 757px"><img class="size-full wp-image-778" alt="Screenshot of a style guide" src="http://www.flipflops.org/wp-content/uploads/2013/01/style.jpg" width="747" height="597" /><p class="wp-caption-text">Screenshot of a style guide page created for a WordPress site.</p></div>
<h2>Code for a WordPress style demo page</h2>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
</pre></td><td class="code"><pre class="html" style="font-family:monospace;">This is a style guide to demonstrate how you can style up the text on your website. Try to make your website interesting and easy to read. Break content up into small chunks. Add visual interest with lists and images.
&lt;h1&gt;This is an H1 tag.&lt;/h1&gt;
Do not use the H1 ever, we generate them automatically from the page title.
&lt;h2&gt;This is a H2 tag.&lt;/h2&gt;
Use this for sub headings on a page.
&lt;h3&gt;This is an H3 tag.&lt;/h3&gt;
Use this for for further headings. &lt;strong&gt;This is bold text.&lt;/strong&gt; &lt;big&gt;This is some text in a &lt;big&gt; tag&lt;/big&gt; Use the &lt;big&gt; tag for emphasis e.g. to highlight the first paragraph on the page. &lt;em&gt;This is italic text.&lt;/em&gt;
&lt;/big&gt;&lt;/big&gt;
&lt;h2&gt;This is a paragraph with an image floated to the left.&lt;/h2&gt;
&lt;img class=&quot;alignleft size-medium wp-image-1231&quot; alt=&quot;Luminous&quot; src=&quot;/wp-content/uploads/2013/01/luminous_1-300x193.jpg&quot; width=&quot;300&quot; height=&quot;193&quot; /&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean a ante ligula, ut hendrerit odio. Donec posuere felis vel velit feugiat eu euismod dolor aliquam. Vestibulum fringilla posuere nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt posuere tristique. Nam elementum convallis elementum. Aenean in arcu commodo quam tempor tempus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce ac ipsum et quam porta molestie. Nunc ac erat velit, eget convallis nisi. Donec quis eros ut dui hendrerit accumsan. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean a ante ligula, ut hendrerit odio. Donec posuere felis vel velit feugiat eu euismod dolor aliquam. Vestibulum fringilla posuere nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt posuere tristique. Nam elementum convallis elementum. Aenean in arcu commodo quam tempor tempus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce ac ipsum et quam porta molestie. Nunc ac erat velit, eget convallis nisi. Donec quis eros ut dui hendrerit accumsan.
&lt;h2&gt;This is a paragraph with an image floated to the right.&lt;/h2&gt;
&lt;img class=&quot;alignright size-medium wp-image-1231&quot; alt=&quot;Luminous&quot; src=&quot;/wp-content/uploads/2013/01/luminous_1-300x193.jpg&quot; width=&quot;300&quot; height=&quot;193&quot; /&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean a ante ligula, ut hendrerit odio. Donec posuere felis vel velit feugiat eu euismod dolor aliquam. Vestibulum fringilla posuere nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt posuere tristique. Nam elementum convallis elementum. Aenean in arcu commodo quam tempor tempus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce ac ipsum et quam porta molestie. Nunc ac erat velit, eget convallis nisi. Donec quis eros ut dui hendrerit accumsan. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean a ante ligula, ut hendrerit odio. Donec posuere felis vel velit feugiat eu euismod dolor aliquam. Vestibulum fringilla posuere nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt posuere tristique. Nam elementum convallis elementum. Aenean in arcu commodo quam tempor tempus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce ac ipsum et quam porta molestie. Nunc ac erat velit, eget convallis nisi. Donec quis eros ut dui hendrerit accumsan.
&lt;h2&gt;This is a paragraph with an image floated to the left the image has a caption.&lt;/h2&gt;
[caption id=&quot;attachment_854&quot; align=&quot;alignleft&quot; width=&quot;300&quot;]&lt;img class=&quot;size-medium wp-image-1231&quot; alt=&quot;Luminous&quot; src=&quot;/wp-content/uploads/2013/01/luminous_1-300x193.jpg&quot; width=&quot;300&quot; height=&quot;193&quot; /&gt; This is a caption to this image[/caption]
&nbsp;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean a ante ligula, ut hendrerit odio. Donec posuere felis vel velit feugiat eu euismod dolor aliquam. Vestibulum fringilla posuere nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt posuere tristique. Nam elementum convallis elementum. Aenean in arcu commodo quam tempor tempus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce ac ipsum et quam porta molestie. Nunc ac erat velit, eget convallis nisi. Donec quis eros ut dui hendrerit accumsan. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean a ante ligula, ut hendrerit odio. Donec posuere felis vel velit feugiat eu euismod dolor aliquam. Vestibulum fringilla posuere nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt posuere tristique. Nam elementum convallis elementum. Aenean in arcu commodo quam tempor tempus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce ac ipsum et quam porta molestie. Nunc ac erat velit, eget convallis nisi. Donec quis eros ut dui hendrerit accumsan.
&lt;h2&gt;These are lists.&lt;/h2&gt;
Try and break up your content into short snappy bite sized pieces use lists frequently. They add interest to your page and let you highlight key points.
&lt;ul&gt;
&lt;ul&gt;
	&lt;li&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;
&lt;/ul&gt;
&lt;/ul&gt;
&amp;nbsp;
&lt;ul&gt;
	&lt;li&gt;Aenean a ante ligula, ut hendrerit odio.&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;
&nbsp;
&amp;nbsp;
&lt;ul&gt;
	&lt;li&gt;Donec posuere felis vel velit feugiat eu euismod dolor aliquam.&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;
&nbsp;
&amp;nbsp;
&lt;ul&gt;
	&lt;li&gt;Vestibulum fringilla posuere nisi.&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;
&nbsp;
&amp;nbsp;
&lt;ol&gt;
&lt;ol&gt;
	&lt;li&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit.&lt;/li&gt;
&lt;/ol&gt;
&lt;/ol&gt;
&amp;nbsp;
&lt;ul&gt;
	&lt;li&gt;Sed tincidunt posuere tristique.&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;
&nbsp;
&amp;nbsp;
&lt;ul&gt;
	&lt;li&gt;Nam elementum convallis elementum.&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;
&nbsp;
&amp;nbsp;
&lt;ul&gt;
	&lt;li&gt;Aenean in arcu commodo quam tempor tempus.&lt;/li&gt;
&lt;/ul&gt;
&amp;nbsp;
&nbsp;
&amp;nbsp;
&nbsp;
&amp;nbsp;
&lt;h2&gt;This is a blockquote&lt;/h2&gt;
Use this to highlight things like quotes, testimonials or key points.
&lt;blockquote&gt;Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean a ante ligula, ut hendrerit odio. Donec posuere felis vel velit feugiat eu euismod dolor aliquam. Vestibulum fringilla posuere nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt posuere tristique. Nam elementum convallis elementum. Aenean in arcu commodo quam tempor tempus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce ac ipsum et quam porta molestie. Nunc ac erat velit, eget convallis nisi. Donec quis eros ut dui hendrerit accumsan.&lt;/blockquote&gt;
This is an
&nbsp;
&lt;hr /&gt;
&nbsp;
tag. Use this split up blocks of content.
&nbsp;
&lt;hr /&gt;
&nbsp;
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean a ante ligula, ut hendrerit odio. Donec posuere felis vel velit feugiat eu euismod dolor aliquam. Vestibulum fringilla posuere nisi. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed tincidunt posuere tristique. Nam elementum convallis elementum. Aenean in arcu commodo quam tempor tempus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Fusce ac ipsum et quam porta molestie. Nunc ac erat velit, eget convallis nisi. Donec quis eros ut dui hendrerit accumsan.</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.flipflops.org/2013/01/25/keep-a-website-looking-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Isn&#8217;t Ruby nice?</title>
		<link>http://www.flipflops.org/2013/01/18/isnt-ruby-nice/</link>
		<comments>http://www.flipflops.org/2013/01/18/isnt-ruby-nice/#comments</comments>
		<pubDate>Fri, 18 Jan 2013 20:36:39 +0000</pubDate>
		<dc:creator>Flipflops</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[passenger]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sinatra]]></category>

		<guid isPermaLink="false">http://www.flipflops.org/?p=740</guid>
		<description><![CDATA[Recently I’ve been doing a bit of work Ruby using Rails and Sinatra (nothing in the wild world, but a few useful applications in the office). As with anything new it can be frustrating from time to time, but on the whole it is a joy. The other key has been using Passenger that has [...]]]></description>
				<content:encoded><![CDATA[<p>Recently I’ve been doing a bit of work <a href="http://www.ruby-lang.org/en/">Ruby</a> using <a href="http://rubyonrails.org/">Rails</a> and <a href="http://www.sinatrarb.com/">Sinatra</a> (nothing in the wild world, but a few useful applications in the office).</p>
<p>As with anything new it can be frustrating from time to time, but on the whole it is a joy.</p>
<p>The other key has been using <a href="https://www.phusionpassenger.com/">Passenger</a> that has taken away all the deployment pain which, in the past kept me from doing anything more than playing around.</p>
<p>Love it.</p>
<p><iframe width="420" height="315" src="http://www.youtube.com/embed/C2ldtuSfm9g?rel=0" frameborder="0" allowfullscreen></iframe></p>
<p>(It was a toss up between Kenny Rogers &#038; the Kaiser Chiefs &#8211; I think Kenny has more universal appeal&#8230;)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flipflops.org/2013/01/18/isnt-ruby-nice/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I rather like the Delicious re-design</title>
		<link>http://www.flipflops.org/2013/01/16/i-rather-like-the-delicious-re-design/</link>
		<comments>http://www.flipflops.org/2013/01/16/i-rather-like-the-delicious-re-design/#comments</comments>
		<pubDate>Wed, 16 Jan 2013 14:20:23 +0000</pubDate>
		<dc:creator>Flipflops</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[bookmarks]]></category>
		<category><![CDATA[delicious]]></category>
		<category><![CDATA[design]]></category>

		<guid isPermaLink="false">http://www.flipflops.org/?p=734</guid>
		<description><![CDATA[Terrible puns aside, I&#8217;ve been using delicious for years and years &#8211; it has become, as these things do, just another part of memory (not that I don&#8217;t back up my links from time to time). Got confronted with the new design last night, as with any change to something very familiar it takes a [...]]]></description>
				<content:encoded><![CDATA[<p><img src="http://www.flipflops.org/wp-content/uploads/2013/01/Screen-shot-2013-01-16-at-13.59.51-300x253.png" alt="Delicious" width="300" height="253" class="alignright size-medium wp-image-735" />Terrible puns aside, I&#8217;ve been using <a href="http://delicious.com">delicious</a> for years and years &#8211; it has become, as these things do, just another part of memory (not that I don&#8217;t back up my links from time to time).</p>
<p>Got confronted with the new design last night, as with any change to something very familiar it takes a bit of getting used to, but overall I think it&#8217;s pretty good.</p>
<p>Love the previews and comments for all my bookmarks.</p>
<p>During a re-design it&#8217;s easy to get carried away adding new features and updating what is there already. It&#8217;s only natural, designers and developers get bored and want to try out new ways of doing things. </p>
<p>It can be hard to show restraint, but my initial impression is that the delicious team have managed to pull off a re-design that actually improves the user experience. Well done.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flipflops.org/2013/01/16/i-rather-like-the-delicious-re-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is in a girl&#8217;s head?</title>
		<link>http://www.flipflops.org/2013/01/11/what-is-in-a-girls-head/</link>
		<comments>http://www.flipflops.org/2013/01/11/what-is-in-a-girls-head/#comments</comments>
		<pubDate>Fri, 11 Jan 2013 13:59:05 +0000</pubDate>
		<dc:creator>Flipflops</dc:creator>
				<category><![CDATA[Thoughtful]]></category>
		<category><![CDATA[children]]></category>
		<category><![CDATA[poem]]></category>

		<guid isPermaLink="false">http://www.flipflops.org/?p=730</guid>
		<description><![CDATA[In our bathroom we have a framed poem on the shelf by the toothbrushes. The poem is ‘A boy’s head’ by the late Czech poet and scientist Miroslav Holub In it there is a spaceship and a project for doing away with piano lessons. And there is Noah&#8217;s ark, which shall be first. And there [...]]]></description>
				<content:encoded><![CDATA[<p>In our bathroom we have a framed poem on the shelf by the toothbrushes. </p>
<p>The poem is ‘A boy’s head’ by the late Czech poet and scientist <a href="http://www.poetryfoundation.org/bio/miroslav-holub">Miroslav Holub</a></p>
<blockquote><p>In it there is a spaceship<br />
and a project<br />
for doing away with piano lessons.</p>
<p>And there is<br />
Noah&#8217;s ark,<br />
which shall be first.</p>
<p>And there is<br />
an entirely new bird,<br />
and entirely new hare,<br />
an entirely new bumble-bee.</p>
<p>There is a river<br />
that flows upwards.</p>
<p>There is a multiplication table.</p>
<p>There is anti-matter.</p>
<p>And it just cannot be trimmed.<br />
I believe that only what cannot be trimmed<br />
is a head.</p>
<p>There is much promise in the circumstance that so many people have heads.</p>
<p><cite>Miroslav Holub</cite></p></blockquote>
<p>I often read this poem while I brush my teeth. </p>
<p>It always make me wonder what might be in a girl’s head. </p>
<p>I have some theories, but am still working on a definitive list&#8230;</p>
<p><img src="http://www.flipflops.org/wp-content/uploads/2013/01/IMG_0212-300x168.jpg" alt="IMG_0212" width="300" height="168" class="alignnone size-medium wp-image-792" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.flipflops.org/2013/01/11/what-is-in-a-girls-head/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep an eye on your MongoDB</title>
		<link>http://www.flipflops.org/2013/01/10/keep-an-eye-on-your-mongodb/</link>
		<comments>http://www.flipflops.org/2013/01/10/keep-an-eye-on-your-mongodb/#comments</comments>
		<pubDate>Thu, 10 Jan 2013 00:12:00 +0000</pubDate>
		<dc:creator>Flipflops</dc:creator>
				<category><![CDATA[Stuff]]></category>
		<category><![CDATA[indexes]]></category>
		<category><![CDATA[Mongodb]]></category>

		<guid isPermaLink="false">http://www.flipflops.org/?p=727</guid>
		<description><![CDATA[I don&#8217;t use MongoDB that often, but sometimes it is the perfect tool for a job. I have one database with about 2 million documents in the main collection. We needed to rebuild and reprocess the documents in the collection recently &#8211; essentially emptying the collection and letting it rebuild naturally as new data came [...]]]></description>
				<content:encoded><![CDATA[<p>I don&#8217;t use MongoDB that often, but sometimes it is the perfect tool for a job.</p>
<p>I have one database with about 2 million documents in the main collection. We needed to rebuild and reprocess the documents in the collection recently &#8211; essentially emptying the collection and letting it rebuild naturally as new data came in.</p>
<p>After a while I started to notice some severe performance issues on the server as the collection grew. Mongo was consuming vast amounts of CPU. Eventually the penny dropped. After the update, the new indexes had not been created. </p>
<p>As soon as the indexes were added, the amount of resource used by Mongo dropped back to an almost irrelevant level. I am astonished as the performance difference they made.</p>
<p>Not a mistake to make again!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.flipflops.org/2013/01/10/keep-an-eye-on-your-mongodb/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 2.848 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-18 18:02:21 -->

<!-- Compression = gzip -->