<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>The Lucid</title>
	
	<link>http://thelucid.com</link>
	<description>The Lightweight Ramblings of Jamie Hill</description>
	<lastBuildDate>Thu, 26 Jan 2012 13:52:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/thelucid" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="thelucid" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Loving MongoDB but Missing Transactions</title>
		<link>http://thelucid.com/2012/01/26/loving-mongodb-but-missing-transactions/</link>
		<comments>http://thelucid.com/2012/01/26/loving-mongodb-but-missing-transactions/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 13:52:28 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[MongoDB]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[mongodb]]></category>
		<category><![CDATA[mongoid]]></category>
		<category><![CDATA[schema]]></category>
		<category><![CDATA[transactions]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=783</guid>
		<description><![CDATA[I&#8217;ve been venturing into the world of MongoDB via Mongoid in a Rails app. On one hand it&#8217;s a breath of fresh air (no migrations, flexible schemas etc.) but on the other hand I really, really miss transactions. If somebody asked me if I used transactions much in MySQL, I would probably have said no&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been venturing into the world of <a href="http://www.mongodb.org">MongoDB</a> via <a href="http://mongoid.org/">Mongoid</a> in a Rails app. On one hand it&#8217;s a breath of fresh air (no migrations, flexible schemas etc.) but on the other hand I really, really miss transactions.</p>
<p>If somebody asked me if I used transactions much in MySQL, I would probably have said no&#8230; however, now that I don&#8217;t have them I realise just how much I used them. Things that just work when using <a href="http://api.rubyonrails.org/classes/ActiveRecord/Base.html">ActiveRecord</a> such as creating a record and ensuring that an associated record gets created is sooo much harder.</p>
<p>MongoDB has &#8220;<a href="http://www.mongodb.org/display/DOCS/Atomic+Operations">Atomic Operations</a>&#8221; which means if you have an embedded relationship, all is good and the database will be rolled back if the entire document does not save. As soon as you have two top level collections and need to ensure that a record is created in both, things get a little hairy.</p>
<p>There seems to be a great deal of &#8220;if you need transactions just use a RDBMS&#8221; talk but what if you need a flexible schema and transactions, the last thing you want to manage is some kind of <a href="http://www.magentocommerce.com/wiki/2_-_magento_concepts_and_architecture/magento_database_diagram">EAV system like Magento</a>.</p>
<p>I&#8217;ve created <a href="http://groups.google.com/group/mongodb-user/browse_thread/thread/10da4c2571142671">a thread on the Mongo User forum</a> with a typical example so feel free to join in the discussion. I&#8217;d love to hear experienced Mongo user&#8217;s views on how to overcome these kinds of situations and what kind of applications people are running with MongoDB.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2012/01/26/loving-mongodb-but-missing-transactions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Naming your Terminal tabs in OSX Lion</title>
		<link>http://thelucid.com/2012/01/04/naming-your-terminal-tabs-in-osx-lion/</link>
		<comments>http://thelucid.com/2012/01/04/naming-your-terminal-tabs-in-osx-lion/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 17:13:43 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Mac / OS X]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=773</guid>
		<description><![CDATA[If you find yourself in the Terminal app with a bunch of tabs open, the default name of &#8220;bash&#8221; isn&#8217;t very useful when navigating between them. You can change the tab name via the UI by right clicking the tab, then clicking &#8220;Inspect Tab&#8221; and changing the window or tab names but this is somewhat [...]]]></description>
			<content:encoded><![CDATA[<p>If you find yourself in the Terminal app with a bunch of tabs open, the default name of &#8220;bash&#8221; isn&#8217;t very useful when navigating between them. You can change the tab name via the UI by right clicking the tab, then clicking &#8220;Inspect Tab&#8221; and changing the window or tab names but this is somewhat long winded.</p>
<p>Below are a couple of bash functions I have in my &#8220;.profile&#8221; file to make this easier:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> tabname <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #7a0874; font-weight: bold;">printf</span> <span style="color: #ff0000;">&quot;\e]1;$1\a&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">function</span> winname <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #7a0874; font-weight: bold;">printf</span> <span style="color: #ff0000;">&quot;\e]2;$1\a&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

<p>Now you can easily name your tabs or windows with the following:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Rename tab</span>
tabname <span style="color: #ff0000;">&quot;Funky Tab&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Rename window</span>
winname <span style="color: #ff0000;">&quot;Funky Window&quot;</span></pre></div></div>

<p>Thanks to <a href="http://superuser.com/questions/223308/name-terminal-tabs#answer-223314" rel="external">Bubu and Chris Page on the SuperUser site</a> for the right codes.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2012/01/04/naming-your-terminal-tabs-in-osx-lion/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Using Pow when developing Rails applications on OSX</title>
		<link>http://thelucid.com/2012/01/01/using-pow-when-developing-rails-applications-on-osx/</link>
		<comments>http://thelucid.com/2012/01/01/using-pow-when-developing-rails-applications-on-osx/#comments</comments>
		<pubDate>Sun, 01 Jan 2012 15:17:03 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Mac / OS X]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[pow]]></category>
		<category><![CDATA[rack]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=768</guid>
		<description><![CDATA[I heard about Pow a while ago which is &#8220;a zero-config Rack server for Mac OS X&#8221; but never got around to giving it a go. I&#8217;ve just installed it and can instantly see that it is going to make developing with Rails (or any Rack app) a whole lot nicer, especially when dealing with [...]]]></description>
			<content:encoded><![CDATA[<p>I heard about <a href="http://pow.cx" rel="external">Pow</a> a while ago which is &#8220;a zero-config Rack server for Mac OS X&#8221; but never got around to giving it a go. I&#8217;ve just installed it and can instantly see that it is going to make developing with Rails (or any Rack app) a whole lot nicer, especially when dealing with apps that use subdomain account keys.</p>
<p>If you&#8217;ve not tried it yet, head over to <a href="http://pow.cx" rel="external">the Pow website</a> and get it installed with:</p>
<p><code lang="bash">curl get.pow.cx | sh</code></p>
<p>Happy new year everyone!</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2012/01/01/using-pow-when-developing-rails-applications-on-osx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TextMate refusing to launch in Lion</title>
		<link>http://thelucid.com/2011/11/24/textmate-refusing-to-launch-in-lion/</link>
		<comments>http://thelucid.com/2011/11/24/textmate-refusing-to-launch-in-lion/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 16:57:53 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Mac / OS X]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[lion]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[textmate]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=765</guid>
		<description><![CDATA[On occasion under OSX Lion, TextMate refuses to launch. I&#8217;ve found that simply deleting it&#8217;s pid file seems to get things working again, just open Terminal and type: rm ~/Library/Application\ Support/TextMate/TextMate.pid Hope this safes someone some puzzled frowning time.]]></description>
			<content:encoded><![CDATA[<p>On occasion under OSX Lion, TextMate refuses to launch. I&#8217;ve found that simply deleting it&#8217;s pid file seems to get things working again, just open Terminal and type:</p>
<p><code>rm ~/Library/Application\ Support/TextMate/TextMate.pid</code></p>
<p>Hope this safes someone some puzzled frowning time.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2011/11/24/textmate-refusing-to-launch-in-lion/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Cucumber’s “tableish” depreciated</title>
		<link>http://thelucid.com/2011/11/22/cucumbers-tableish-depreciated/</link>
		<comments>http://thelucid.com/2011/11/22/cucumbers-tableish-depreciated/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 16:14:41 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[capybara]]></category>
		<category><![CDATA[tableish]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=761</guid>
		<description><![CDATA[I was just running some cucumber features on an old project and came across a problem whereby &#8220;tableish&#8221; has been depreciated in Cucumber. Dennis Reimann has posted a nice alternative here using Capybara&#8230; thanks Dennis.]]></description>
			<content:encoded><![CDATA[<p>I was just running some cucumber features on an old project and came across a problem whereby <a href="https://github.com/cucumber/cucumber-rails/issues/145">&#8220;tableish&#8221; has been depreciated in Cucumber</a>.</p>
<p>Dennis Reimann has posted a <a href="http://dennisreimann.de/blog/capybara-finder-for-cucumber-rails-deprecated-tableish/">nice alternative here using Capybara</a>&#8230; thanks Dennis.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2011/11/22/cucumbers-tableish-depreciated/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Pulling changes into a Github fork from the original repository</title>
		<link>http://thelucid.com/2011/10/16/pulling-changes-into-a-github-fork-from-the-original-repository/</link>
		<comments>http://thelucid.com/2011/10/16/pulling-changes-into-a-github-fork-from-the-original-repository/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 12:43:40 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Version Control]]></category>
		<category><![CDATA[fork]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[remote]]></category>
		<category><![CDATA[repository]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=757</guid>
		<description><![CDATA[If you maintain your own ongoing fork of a project on Github, you will inevitably want to pull in changes from the originator&#8217;s repository. Here&#8217;s how I usually go about it. First add the other guy&#8217;s repository to your list of remotes: cd my-fork git remote add other-guy https://github.com/other-guy/other-guys-repo.git If you were to then list [...]]]></description>
			<content:encoded><![CDATA[<p>If you maintain your own ongoing fork of a project on Github, you will inevitably want to pull in changes from the originator&#8217;s repository. Here&#8217;s how I usually go about it.</p>
<p>First add the other guy&#8217;s repository to your list of remotes:</p>
<pre language="bash">
cd my-fork
git remote add other-guy https://github.com/other-guy/other-guys-repo.git
</pre>
<p>If you were to then list your remotes, you would have something like:</p>
<pre language="bash">
origin
other-guy
</pre>
<p>Now it&#8217;s just a case of pulling from the relevant branch on their repo, in this case &#8216;master&#8217;:</p>
<pre language="bash">
git pull other-guy master
</pre>
<p>Hope that saves someone some time.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2011/10/16/pulling-changes-into-a-github-fork-from-the-original-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Writing Javascript that runs in multiple environments (with a one-liner)</title>
		<link>http://thelucid.com/2011/07/14/writing-javascript-that-runs-in-multiple-environments-with-a-one-liner/</link>
		<comments>http://thelucid.com/2011/07/14/writing-javascript-that-runs-in-multiple-environments-with-a-one-liner/#comments</comments>
		<pubDate>Thu, 14 Jul 2011 14:22:45 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[browser]]></category>
		<category><![CDATA[commonjs]]></category>
		<category><![CDATA[node]]></category>
		<category><![CDATA[oneliner]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=743</guid>
		<description><![CDATA[With the introduction of server-side javascript, it&#8217;s nice to be able to utilise any Javascript libraries you may write in both the browser and on the server. I&#8217;ve seen a few different approaches to this but wanted a one-liner that I could just stick at the top of an anonymous function&#8230; this is what I [...]]]></description>
			<content:encoded><![CDATA[<p>With the introduction of server-side javascript, it&#8217;s nice to be able to utilise any Javascript libraries you may write in both the browser and on the server. I&#8217;ve seen a few different approaches to this but wanted a one-liner that I could just stick at the top of an anonymous function&#8230; this is what I came up with:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
  <span style="color: #003366; font-weight: bold;">var</span> MyLib <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> exports <span style="color: #339933;">!==</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> exports <span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">MyLib</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
  <span style="color: #006600; font-style: italic;">// MyLib.myFunction = ...</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Now in NodeJS you can do:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #003366; font-weight: bold;">var</span> MyLib <span style="color: #339933;">=</span> require<span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'./mylib.js'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>This also passes <a href="http://jslint.com">JS Lint</a> using the following:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">/*jslint */</span>
<span style="color: #009966; font-style: italic;">/*global exports */</span>
<span style="color: #009900;">&#40;</span><span style="color: #003366; font-weight: bold;">function</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #3366CC;">&quot;use strict&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #003366; font-weight: bold;">var</span> MyLib <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">typeof</span> exports <span style="color: #339933;">!==</span> <span style="color: #3366CC;">'undefined'</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> exports <span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">this</span>.<span style="color: #660066;">MyLib</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
    MyLib.<span style="color: #660066;">foo</span> <span style="color: #339933;">=</span> <span style="color: #3366CC;">'bar'</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2011/07/14/writing-javascript-that-runs-in-multiple-environments-with-a-one-liner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>On Open Sourcing Your Competitive Advantage</title>
		<link>http://thelucid.com/2011/04/05/on-open-sourcing-your-competitive-advantage/</link>
		<comments>http://thelucid.com/2011/04/05/on-open-sourcing-your-competitive-advantage/#comments</comments>
		<pubDate>Tue, 05 Apr 2011 14:10:12 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[open-source business code development]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=734</guid>
		<description><![CDATA[It&#8217;s been a little quiet around here, so I thought I&#8217;d share something that&#8217;s been on mind for a while. At what point in the lifecycle of a commercial project is it a good idea to Open Source? Take Shopify for instance, they open sourced their payment integration code early on in the form of [...]]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s been a little quiet around here, so I thought I&#8217;d share something that&#8217;s been on mind for a while.</p>
<h3>At what point in the lifecycle of a commercial project is it a good idea to Open Source?</h3>
<p>Take <a href="http://shopify.com/">Shopify</a> for instance, they open sourced their payment integration code early on in the form of <a href="http://www.activemerchant.org/">ActiveMerchant</a>. This was undoubtably a wise move, as they benefitted from an entire Ruby community testing their code in the wild and contributing back in the form of new payment gateways.</p>
<p>I don&#8217;t know exactly when it was in the development of Shopify that ActiveMerchant was released but at what point are you open sourcing your competitive advantage. Don&#8217;t get me wrong, I love open source, I am just trying to determine when is a good time to open source and when are you just giving away your competitive advantage. For instance, if ActiveMerchant had been released 2 years before the release of Shopify, anyone could have used it in the development of a Shopify&#8217;esque product&#8230; but would anyone have even thought of using it in that way? Who knows?</p>
<h3>Bite sized chunks</h3>
<p>I feel it is a good idea to open source little and often. Obviously if Shopify had open sourced their entire shopping cart, subscription code and templating solution as a whole, you would have seen Shopify&#8217;s popping up all over the interweb and their business would likely have suffered. Instead they opted to open source their payment gateway code (<a href="http://www.activemerchant.org/">ActiveMerchant</a>) and templating library (<a href="http://www.liquidmarkup.org/">Liquid</a>) separately as self-contained projects.</p>
<h3>A key ingredient</h3>
<p>There comes a point when you simply should not open source certain code, this is when it contains the key ingredient to a commercial project. Do you think Coca-Cola would have been as big as they are today if they had released the complete recipe, including the key ingredient for their revolutionary new black fizzy pop? It&#8217;s all about the byproduct, for example if Coca-Cola had released the secret to their new screw on lid (I&#8217;m sure they didn&#8217;t invent screw on lids but bear with me), they would have got their name out there through recognition of their fancy lid, the pop community may have helped refine it&#8217;s design and coke may have stayed fizzy for longer&#8230; that&#8217;s one hell of a contrived example but hopefully you get my point. It doesn&#8217;t matter that every other pop out there will also stay fizzy longer, they&#8217;re not Coke.</p>
<p>I&#8217;d love to hear peoples examples of commercial projects where code has been open sourced. What result did it have on the project? Was it worthwhile or did it have a detrimental effect on your business?</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2011/04/05/on-open-sourcing-your-competitive-advantage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using git add -A</title>
		<link>http://thelucid.com/2011/01/27/using-git-add-a/</link>
		<comments>http://thelucid.com/2011/01/27/using-git-add-a/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 16:28:44 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=731</guid>
		<description><![CDATA[In my day-to-day Git workflow I often find myself doing the the following before a commit: git add . git add -u git status The first line adds any new or modified file contents to the Git index and the second uses the &#8220;update&#8221; flag which marks any deleted files as deleted in the Git [...]]]></description>
			<content:encoded><![CDATA[<p>In my day-to-day Git workflow I often find myself doing the the following before a commit:</p>
<pre>
git add .
git add -u
git status
</pre>
<p>The first line adds any new or modified file contents to the Git index and the second uses the &#8220;update&#8221; flag which marks any deleted files as deleted in the Git index. I then proceed with a commit and all my changes are committed.</p>
<p>I find myself repeating this before every commit and so had a browse of the documentation to see if there was a simpler way. I found the &#8220;-A&#8221; or &#8220;&#8211;all&#8221; flag which I had never noticed before (is this new?). Now my commits are usually a two step process:</p>
<pre>
git add -A
git commit -m "Committing all changed and deleted files"
</pre>
<p>Hope someone finds this useful.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2011/01/27/using-git-add-a/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Releasing IQ::Color</title>
		<link>http://thelucid.com/2011/01/18/releasing-iqcolor/</link>
		<comments>http://thelucid.com/2011/01/18/releasing-iqcolor/#comments</comments>
		<pubDate>Tue, 18 Jan 2011 03:35:49 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[SonicIQ]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[convert]]></category>
		<category><![CDATA[gem]]></category>

		<guid isPermaLink="false">http://thelucid.com/?p=728</guid>
		<description><![CDATA[At SonicIQ we have a number of RubyGems used internally that we haven&#8217;t found time to open-source yet i.e. cleanup the documentation and get into state that people can find useful. I&#8217;m going to make it my mission to get some of these out there which first involves releasing some of the smaller Gems that [...]]]></description>
			<content:encoded><![CDATA[<p>At <a href="http://soniciq.com">SonicIQ</a> we have a number of RubyGems used internally that we haven&#8217;t found time to open-source yet i.e. cleanup the documentation and get into state that people can find useful. I&#8217;m going to make it my mission to get some of these out there which first involves releasing some of the smaller Gems that the larger ones depend on.</p>
<p><a href="https://github.com/soniciq/iq-color">IQ::Color</a> is a really simple Gem for converting colour values to and from CSS(3) notation, this is used by a couple of our larger Gems but I can see it being of use on it&#8217;s own. A simple example:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">color1 = <span style="color:#6666ff; font-weight:bold;">IQ::Color</span>.<span style="color:#9900CC;">RGB</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">127</span>, <span style="color:#006666;">127</span>, <span style="color:#006666;">255</span><span style="color:#006600; font-weight:bold;">&#41;</span>
color1.<span style="color:#9900CC;">to_css</span> <span style="color:#008000; font-style:italic;">#=&gt; &quot;#7f7fff&quot;</span>
&nbsp;
color2 = <span style="color:#6666ff; font-weight:bold;">IQ::Color</span>.<span style="color:#9900CC;">from_css</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">'rgba(127,127,255,0.4)'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
color2.<span style="color:#9900CC;">red</span>    <span style="color:#008000; font-style:italic;">#=&gt; 127</span>
color2.<span style="color:#9900CC;">green</span>  <span style="color:#008000; font-style:italic;">#=&gt; 127</span>
color2.<span style="color:#9900CC;">blue</span>   <span style="color:#008000; font-style:italic;">#=&gt; 255</span>
color2.<span style="color:#9900CC;">alpha</span>  <span style="color:#008000; font-style:italic;">#=&gt; 0.4</span>
color2.<span style="color:#9900CC;">to_css</span> <span style="color:#008000; font-style:italic;">#=&gt; &quot;rgba(127,127,255,0.4)&quot;</span></pre></div></div>

<p>More examples can be found on <a href="https://github.com/soniciq/iq-color">GitHub</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://thelucid.com/2011/01/18/releasing-iqcolor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

