<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Something-driven development</title>
	<atom:link href="http://micknelson.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://micknelson.wordpress.com</link>
	<description>Software development thoughts around Ubuntu, Python, Golang and other tools</description>
	<lastBuildDate>Wed, 30 Nov 2011 16:18:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='micknelson.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Something-driven development</title>
		<link>http://micknelson.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://micknelson.wordpress.com/osd.xml" title="Something-driven development" />
	<atom:link rel='hub' href='http://micknelson.wordpress.com/?pushpress=hub'/>
		<item>
		<title>More YUI and html5 fun</title>
		<link>http://micknelson.wordpress.com/2011/11/29/more-yui-and-html5-fun/</link>
		<comments>http://micknelson.wordpress.com/2011/11/29/more-yui-and-html5-fun/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 09:16:46 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://micknelson.wordpress.com/?p=124</guid>
		<description><![CDATA[Continuing on my YUI MVC experiment, I got to spend a bit of time last week playing with my prototype for Open Goal Tracker, and was blown away by the simplicity of two new html attributes: x-webkit-speech (just &#8216;speech&#8217; when standardised) and contenteditable. Here&#8217;s a 2min video showing how I might use both of them [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=124&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Continuing on my <a href="http://micknelson.wordpress.com/2011/11/11/experimenting-with-yui-application-framework/">YUI MVC experiment</a>, I got to spend a bit of time last week playing with my prototype for Open Goal Tracker, and was blown away by the simplicity of two new html attributes: x-webkit-speech (just &#8216;speech&#8217; when standardised) and contenteditable. Here&#8217;s a 2min video showing how I might use both of them in practise (in dire need of styling as usual):</p>
<p>&nbsp;</p>
<span style="text-align:center; display: block;"><a href="http://micknelson.wordpress.com/2011/11/29/more-yui-and-html5-fun/"><img src="http://img.youtube.com/vi/GdcNMhiiLhQ/2.jpg" alt="" /></a></span>
<p>&nbsp;</p>
<p>Behind the scenes I&#8217;m still loving <a href="http://yuilibrary.com/yui/docs/app/app-todo.html">Yahoo User Interfaces application framework</a> together with the <a href="http://yuilibrary.com/yui/docs/test/">unit-test api</a>, which allow me to create tests like <a href="http://bazaar.launchpad.net/~michael.nelson/open-goal-tracker/html5-client-play/view/head:/ogt_project/static/app/usergoals/tests/test_views.js#L105">&#8220;creating the view should render stats for existing goals&#8221;</a>.</p>
<p>Next week I hope to start implementing the server-sync and investigating integration with Ubuntu&#8217;s notification system. Once I&#8217;ve sorted out the <a href="http://slides.html5rocks.com/#app-cache">application-cache</a> and build/packaging etc. for both Ubuntu and Android, I want to do a initial dummy release and then start iterating the features that will make Open Goal Tracker actually useful for facilitating social-yet-individual learning, both within and without of classrooms.</p>
<p>You can play with the little <a href="http://opengoaltracker.org/prototype_fun/">open-goal-tracker prototype</a> (I&#8217;ve only tried webkit so far) or <a href="http://opengoaltracker.org/prototype_fun/app/tests/tests.html">run the tests yourself</a>.</p>
<br />Filed under: <a href='http://micknelson.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/micknelson.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/micknelson.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/micknelson.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/micknelson.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/micknelson.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/micknelson.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/micknelson.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/micknelson.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/micknelson.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/micknelson.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/micknelson.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/micknelson.wordpress.com/124/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/micknelson.wordpress.com/124/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/micknelson.wordpress.com/124/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=124&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://micknelson.wordpress.com/2011/11/29/more-yui-and-html5-fun/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4dce4d6dbb01b4b687e1ef7cd698b43?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">absoludity</media:title>
		</media:content>
	</item>
		<item>
		<title>A generic juju charm for Django apps</title>
		<link>http://micknelson.wordpress.com/2011/11/22/a-generic-juju-charm-for-django-apps/</link>
		<comments>http://micknelson.wordpress.com/2011/11/22/a-generic-juju-charm-for-django-apps/#comments</comments>
		<pubDate>Tue, 22 Nov 2011 15:59:14 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[juju]]></category>

		<guid isPermaLink="false">http://micknelson.wordpress.com/?p=97</guid>
		<description><![CDATA[After experimenting with juju and puppet the other week, I wanted to see if it was possible to create a generic juju charm for deploying any Django apps using Apache+mod_wsgi together with puppet manifests wherever possible. The resulting apache-django-wsgi charm is ready to demo (thanks to lots of support from the #juju team), but still needs a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=97&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://micknelson.wordpress.com/2011/11/08/experimenting-with-juju-and-puppet/">experimenting with juju and puppet</a> the other week, I wanted to see if it was possible to create a generic juju charm for deploying any Django apps using Apache+mod_wsgi together with puppet manifests wherever possible. The resulting <a href="https://code.launchpad.net/~michael.nelson/charm/oneiric/apache-django-wsgi/trunk">apache-django-wsgi charm</a> is ready to demo (thanks to lots of support from the #juju team), but still needs a few more configuration options. The charm currently:</p>
<ol>
<li>Enables the user to specify a branch of a Python package containing the Django app/project for deploy. This python package will be `python setup.py install`&#8217;d on the instance, but it also</li>
<li>Enables you to configure extra debian packages to be installed <strong>first</strong> so that your requirements can be installed in a more reliable/trusted manner, along with the standard required packages (apache2, libapache2-mod-wsgi etc.). Here&#8217;s the <a href="http://paste.ubuntu.com/745945/">example charm config used for apps.ubuntu.com</a>,</li>
<li>Creates a <a href="http://bazaar.launchpad.net/~michael.nelson/charm/oneiric/apache-django-wsgi/trunk/view/head:/hooks/templates/django.wsgi.erb">django.wsgi</a> and <a href="http://bazaar.launchpad.net/~michael.nelson/charm/oneiric/apache-django-wsgi/trunk/view/head:/hooks/templates/httpd.conf.erb">httpd.conf</a> ready to serve your app, automatically collecting all the static content of your installed Django apps to be served separately from the same Apache virtual host,</li>
<li>When it receives a database relation change, it creates some local settings, overriding the database settings of your branch, sync&#8217;s and migrates the database (a noop if it&#8217;s the second unit) and restarts apache (See the <a href="http://bazaar.launchpad.net/~michael.nelson/charm/oneiric/apache-django-wsgi/trunk/view/head:/hooks/manifests/database_settings.pp">database_settings.pp manifest</a> for more details).</li>
</ol>
<p>Here&#8217;s a quick demo which puts up a postgresql unit and two app servers with these commands:</p>
<pre>$ juju deploy --repository ~/charms local:postgresql
$ juju deploy --config ubuntu-app-dir.yaml --repository ~/apache-django-wsgi/ local:apache-django-wsgi
$ juju add-relation postgresql:db apache-django-wsgi
$ juju add-unit apache-django-wsgi</pre>
<span style="text-align:center; display: block;"><a href="http://micknelson.wordpress.com/2011/11/22/a-generic-juju-charm-for-django-apps/"><img src="http://img.youtube.com/vi/d-WKP0r1Y6M/2.jpg" alt="" /></a></span>
<p>Things that I think need to be improved or I&#8217;m uncertain about:</p>
<ol>
<li>`gem install puppet-module` is included in the <a href="http://bazaar.launchpad.net/~michael.nelson/charm/oneiric/apache-django-wsgi/trunk/view/head:/hooks/install">install hook</a> (a 3rd way of installing something on the system :/). I wanted to use the vcsrepo puppet module to define bzr resource types and <a href="http://forge.puppetlabs.com/">puppet-module-tool</a> seems to be the way to install 3rd-party puppet modules. Using this resource-type enables a simple <a href="http://bazaar.launchpad.net/~michael.nelson/charm/oneiric/apache-django-wsgi/trunk/view/head:/hooks/manifests/initial_state.pp">initial_state.pp manifest</a>. Of course, it&#8217;d be great to have &#8216;necessary&#8217; tools like that in the archive instead.</li>
<li>The <a href="http://bazaar.launchpad.net/~michael.nelson/charm/oneiric/apache-django-wsgi/trunk/view/head:/hooks/manifests/initial_state.pp">initial_state.pp</a> manifest pulls the django app package to /home/ubuntu/django-app-branch and then pip installs it on the system. Requiring the app to be a valid python package seemed sensible (in terms of ensuring it is correctly installed with its requirements satisfied) while still allowing the user to go one step further if they like and provide a debian package instead of a python package in a branch (which I assume we would do ultimately for production deploys?)</li>
<li>Currently it&#8217;s just a <a href="http://bazaar.launchpad.net/~michael.nelson/charm/oneiric/apache-django-wsgi/trunk/view/head:/hooks/templates/httpd.conf.erb">very simple apache setup</a>. I think ideally the static file serving should be done by a separate unit in the charm (ie. an instance running a <a href="https://docs.djangoproject.com/en/dev/howto/deployment/modwsgi/#serving-files">stripped down apache2 or lighttpd</a>). Also, I would have liked to have used an &#8216;official&#8217; or &#8216;blessed&#8217; puppet apache module to benefit from someone else&#8217;s experience, but I couldn&#8217;t see one that stood out as such.</li>
<li>Currently the charm assumes that your project contains the configuration info (ie. a settings.py, urls.py etc.), of which the database settings can be simply overridden for deploy. There should be an additional option to specify a configuration branch (and it shouldn&#8217;t assume that you&#8217;re using django-configglue), as well as other options like django_debug, static_url etc.</li>
<li>The charm should also export an interface (?) that can be used by a load balancer charm.</li>
</ol>
<br />Filed under: <a href='http://micknelson.wordpress.com/category/django/'>django</a>, <a href='http://micknelson.wordpress.com/category/juju/'>juju</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/micknelson.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/micknelson.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/micknelson.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/micknelson.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/micknelson.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/micknelson.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/micknelson.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/micknelson.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/micknelson.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/micknelson.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/micknelson.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/micknelson.wordpress.com/97/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/micknelson.wordpress.com/97/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/micknelson.wordpress.com/97/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=97&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://micknelson.wordpress.com/2011/11/22/a-generic-juju-charm-for-django-apps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4dce4d6dbb01b4b687e1ef7cd698b43?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">absoludity</media:title>
		</media:content>
	</item>
		<item>
		<title>Experimenting with YUI application framework</title>
		<link>http://micknelson.wordpress.com/2011/11/11/experimenting-with-yui-application-framework/</link>
		<comments>http://micknelson.wordpress.com/2011/11/11/experimenting-with-yui-application-framework/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 10:17:42 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://micknelson.wordpress.com/?p=108</guid>
		<description><![CDATA[I&#8217;ve been playing around wit h YUI&#8217;s new application framework over the past few weeks, basically building on the ToDo list example app, extending it for a basic interface for the Open Goal Tracker project. Here&#8217;s a 2 min demo: I&#8217;m loving the MVC separation in the client code, separation of templates, ability to use [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=108&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing around wit h YUI&#8217;s new application framework over the past few weeks, basically building on the <a href="http://yuilibrary.com/yui/docs/app/app-todo.html">ToDo list example app</a>, extending it for a basic interface for the Open Goal Tracker project. Here&#8217;s a 2 min demo:</p>
<span style="text-align:center; display: block;"><a href="http://micknelson.wordpress.com/2011/11/11/experimenting-with-yui-application-framework/"><img src="http://img.youtube.com/vi/dp5TpZ7yfqA/2.jpg" alt="" /></a></span>
<p>I&#8217;m loving the MVC separation in the client code, separation of templates, ability to use real links for navigating within the client (which will also work when copy-n-pasted to hit the server) etc.</p>
<p>If anyone is interested, you can play with the code yourself:</p>
<pre>$ bzr branch lp:~michael.nelson/open-goal-tracker/html5-client-play
$ cd html5-client-play
$ fab test</pre>
<p>which will setup the dev environment and run the django tests&#8230; followed by</p>
<pre>$ fab runserver</pre>
<p>To play with the demo html5 client: http://localhost:8000/static/index.html<br />
To run the javascript unit tests: http://localhost:8000/static/app/tests/test_models.html</p>
<p>or find out more about the purpose of the app with the first 2 mins of this video from a year ago outlining where i hope to go with the application: <a href="http://www.youtube.com/watch?v=OT7P-u-86sM" target="_blank">http://www.youtube.com/watch?v=OT7P-u-86sM</a> (when time permits <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> ).</p>
<br />Filed under: <a href='http://micknelson.wordpress.com/category/javascript/'>javascript</a>, <a href='http://micknelson.wordpress.com/category/yui/'>yui</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/micknelson.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/micknelson.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/micknelson.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/micknelson.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/micknelson.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/micknelson.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/micknelson.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/micknelson.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/micknelson.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/micknelson.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/micknelson.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/micknelson.wordpress.com/108/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/micknelson.wordpress.com/108/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/micknelson.wordpress.com/108/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=108&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://micknelson.wordpress.com/2011/11/11/experimenting-with-yui-application-framework/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4dce4d6dbb01b4b687e1ef7cd698b43?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">absoludity</media:title>
		</media:content>
	</item>
		<item>
		<title>Experimenting with juju and Puppet</title>
		<link>http://micknelson.wordpress.com/2011/11/08/experimenting-with-juju-and-puppet/</link>
		<comments>http://micknelson.wordpress.com/2011/11/08/experimenting-with-juju-and-puppet/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 16:07:15 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[juju]]></category>
		<category><![CDATA[puppet]]></category>
		<category><![CDATA[ubuntu]]></category>

		<guid isPermaLink="false">http://micknelson.wordpress.com/?p=98</guid>
		<description><![CDATA[I&#8217;ve been playing with juju for a few months now in different contexts and I&#8217;ve really enjoyed the ease with which it allows me to think about services rather than resources. More recently I&#8217;ve started thinking about best-practices for deploying services using juju, while still using puppet to setup individual units. As a simple experiment, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=98&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="https://juju.ubuntu.com/"><img class="alignright size-thumbnail wp-image-100" title="juju" src="http://micknelson.files.wordpress.com/2011/11/juju.png?w=150&#038;h=94" alt="" width="150" height="94" /></a>I&#8217;ve been playing with <a title="DevOps distilled" href="https://juju.ubuntu.com/">juju</a> for a few months now in different contexts and I&#8217;ve really enjoyed the ease with which it allows me to think about services rather than resources.</p>
<p>More recently I&#8217;ve started thinking about best-practices for deploying services using juju, while still using puppet to setup individual units. As a simple experiment, I wrote a <a href="https://juju.ubuntu.com/Charms">juju charm</a> to deploy an irssi service [1] to dig around. Here&#8217;s what I&#8217;ve found so far [2]. The first is kind of obvious, but worth mentioning:</p>
<h2>Install hooks can be trivial:</h2>
<pre>#!/bin/bash
sudo apt-get -y install puppet

juju-log "Initialising machine state."
puppet apply $PWD/hooks/initial_state.pp</pre>
<p>Normally the corresponding manifest (see <a href="http://bazaar.launchpad.net/~michael.nelson/charm/oneiric/irssi/trunk/view/head:/hooks/initial_state.pp">initial_state.pp</a>) would be a little more complicated, but in this example it&#8217;s hardly worth mentioning.</p>
<h2>Juju config changes can utilise Puppet&#8217;s Facter infrastructure:</h2>
<p>This enables juju config options to be passed through to puppet, so that config-changed hooks can be equally simple:</p>
<pre>#!/bin/bash
juju-log "Getting config options"
username=`config-get username`
public_key=`config-get public_key`

juju-log "Configuring irssi for user"
# We specify custom facts so that they're accessible in the manifest.
FACTER_username=$username FACTER_public_key=$public_key puppet apply $PWD/hooks/configured_state.pp</pre>
<p>In this example, it is the configured state manifest that is more interesting (see <a href="http://bazaar.launchpad.net/~michael.nelson/charm/oneiric/irssi/trunk/view/head:/hooks/configured_state.pp">configured_state.pp</a>). It adds the user to the system, sets up byobu with an irssi window ready to go, and adds the given public ssh key enabling the user to login.</p>
<p>The same would go for other juju hooks (db-relation-changed etc.), which is quite neat &#8211; getting the best of both worlds: the charm user can still think in terms of deploying services, while the charm author can use puppets declarative syntax to define the machine states.</p>
<p>Next up: I hope to experiment with an optional puppet master for a real project (something simple like the <a href="https://apps.ubuntu.com/cat/">Ubuntu App directory</a>), so that</p>
<ol>
<li>a project can be deployed without the (probably private) puppet-master to create a close-to-production environment, while</li>
<li>configuring a puppet-master in the juju config would enable production deploys (or deploys of exact replicas of production to a separate environment for testing).</li>
</ol>
<p>If you&#8217;re interested in seeing the simple irssi charm, the following 2min video demos:</p>
<pre># Deploy an irssi service
$ juju deploy --repository=/home/ubuntu/mycharms  local:oneiric/irssi
# Configure it so a user can login
$ juju set irssi username=michael public_key=AAAA...
# Login to find irssi already up and running in a byobu window
$ ssh michael@new.ip.address</pre>
<p>and the <a href="https://code.launchpad.net/~michael.nelson/charm/oneiric/irssi/trunk">code is on Launchpad</a>.</p>
<span style="text-align:center; display: block;"><a href="http://micknelson.wordpress.com/2011/11/08/experimenting-with-juju-and-puppet/"><img src="http://img.youtube.com/vi/Ft-2Sd4JYWY/2.jpg" alt="" /></a></span>
<p>[1] Yes, irssi is not particularly useful as a juju service (as I don&#8217;t want multiple units, or relating it to other services etc.), but it suited my purposes for a simple experiment that also automates something I can use for <a href="http://micknelson.wordpress.com/2011/08/26/working-in-the-cloud/">working in the cloud</a>.</p>
<p>[2] I&#8217;m not a puppet or juju expert, so if you&#8217;ve got any comments or improvements, don&#8217;t hesitate.</p>
<br />Filed under: <a href='http://micknelson.wordpress.com/category/juju/'>juju</a>, <a href='http://micknelson.wordpress.com/category/puppet/'>puppet</a>, <a href='http://micknelson.wordpress.com/category/ubuntu/'>ubuntu</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/micknelson.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/micknelson.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/micknelson.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/micknelson.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/micknelson.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/micknelson.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/micknelson.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/micknelson.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/micknelson.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/micknelson.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/micknelson.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/micknelson.wordpress.com/98/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/micknelson.wordpress.com/98/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/micknelson.wordpress.com/98/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=98&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://micknelson.wordpress.com/2011/11/08/experimenting-with-juju-and-puppet/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4dce4d6dbb01b4b687e1ef7cd698b43?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">absoludity</media:title>
		</media:content>

		<media:content url="http://micknelson.files.wordpress.com/2011/11/juju.png?w=150" medium="image">
			<media:title type="html">juju</media:title>
		</media:content>
	</item>
		<item>
		<title>Working in the cloud</title>
		<link>http://micknelson.wordpress.com/2011/08/26/working-in-the-cloud/</link>
		<comments>http://micknelson.wordpress.com/2011/08/26/working-in-the-cloud/#comments</comments>
		<pubDate>Fri, 26 Aug 2011 10:09:55 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://micknelson.wordpress.com/?p=93</guid>
		<description><![CDATA[For a while now I&#8217;ve done all my development work and irc communication via SSH and byobu &#8211; I love the freedom of just grabbing my netbook (ie. switching computers) and heading to a cafe and picking up right where I left off (or even letting tests run while I walk). The one pain-point was [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=93&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For a while now I&#8217;ve done all my development work and irc communication via SSH and <a href="https://launchpad.net/byobu" title="Byobo - an improved screen">byobu</a> &#8211; I love the freedom of just grabbing my netbook (ie. switching computers) and heading to a cafe and picking up right where I left off (or even letting tests run while I walk).</p>
<p>The one pain-point was that I SSH&#8217;d into my own box at home &#8211; and if my home connection went (anything from a thunderstorm to a curious kid pulling a chord), I had to then work on my much slower netbook.</p>
<p>Now, after reading on an email thread that <a href="http://mebentley.blogspot.com/">Aaron</a> was doing something similar, I&#8217;m running a tiny cloud instance for my irc and development work, and documenting everything that I&#8217;m doing to get my dev environment just right &#8211; so that I can automate the setup (not really something for an <a href="https://ensemble.ubuntu.com/">ensemble</a> formula &#8211; just a simple script).</p>
<p>That, and having all my <a href="https://one.ubuntu.com/">music in the cloud</a> for the past 6 months make switching computers and/or physical locations a non-obtrusive part of my work-day.</p>
<p>If anyone has small tips that make their own dev environment enjoyable, let me know!</p>
<br />Filed under: <a href='http://micknelson.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/micknelson.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/micknelson.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/micknelson.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/micknelson.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/micknelson.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/micknelson.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/micknelson.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/micknelson.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/micknelson.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/micknelson.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/micknelson.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/micknelson.wordpress.com/93/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/micknelson.wordpress.com/93/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/micknelson.wordpress.com/93/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=93&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://micknelson.wordpress.com/2011/08/26/working-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4dce4d6dbb01b4b687e1ef7cd698b43?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">absoludity</media:title>
		</media:content>
	</item>
		<item>
		<title>Develop and deploy with virtualenv</title>
		<link>http://micknelson.wordpress.com/2011/06/21/develop-and-deploy-with-virtualenv/</link>
		<comments>http://micknelson.wordpress.com/2011/06/21/develop-and-deploy-with-virtualenv/#comments</comments>
		<pubDate>Tue, 21 Jun 2011 10:57:58 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[django]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://micknelson.wordpress.com/?p=66</guid>
		<description><![CDATA[What is the dream setup for developing and deploying Django apps? I&#8217;m looking for a solution that I can use consistently to deploy apps to servers where I may or may not have the ability to install system packages, or where I might need my app temporarily to use a newer version of a system-installed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=66&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>What is the dream setup for developing and deploying Django apps? I&#8217;m looking for a solution that I can use consistently to deploy apps to servers where I may or may not have the ability to install system packages, or where I might need my app temporarily to use a newer version of a system-installed package while giving other apps running on the same server breathing space to update (think: updating a system-installed Django package on a server running four independent apps).</p>
<p>Specifically, the goals I have for this scenario are:</p>
<ul>
<li>It should be easy to use for both development and deployment (using standard tools and locations so developers don&#8217;t need to learn the environment),</li>
<li>Updating any virtualenv environment should be automatic, but transparent (ie. if the pip requirements.txt changes, the next time I run tests, devserver or deployed server, it&#8217;ll automatically ensure the virtualenv is correct),</li>
<li>I shouldn&#8217;t have to wait unnecessarily for virtualenvs to be created (ie. if I make a change to the requirements to try a new version of a package, and then change it back, I don&#8217;t want to re-create the original virtualenv). Similarly, if I revert a deployment to a previous version, the previous virtualenv should still be available.</li>
<li> For deployment, the virtualenv shouldn&#8217;t unnecessarily replace system python packages, but allow this as an option (ie. not a &#8211;no-site-packages virtualenv).</li>
</ul>
<p>There are a lot of virtualenv/fabric posts out there for both development and deployment, and using a <a href="http://stackoverflow.com/questions/2241055/django-and-virtualenv-development-deployment-best-practices">SHA of the requirements.txt</a> seems an obvious way to go. What I ended up with for my project was this <a href="http://djangosnippets.org/snippets/2467/">develop and deploy with virtualenv</a> snippet which so far is working quite well (although I&#8217;m yet to try a deploy where I override system packages). If the deployed version is using virtualenv exclusively, the requirements.txt file can be shared, but otherwise it would just be a matter of including the requirements.txt for the deploy with the other configuration data (settings.py etc.).</p>
<p>If you can see any reasons why this is not a good idea, or improvements, please let me know!</p>
<br />Filed under: <a href='http://micknelson.wordpress.com/category/django/'>django</a>, <a href='http://micknelson.wordpress.com/category/python/'>python</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/micknelson.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/micknelson.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/micknelson.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/micknelson.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/micknelson.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/micknelson.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/micknelson.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/micknelson.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/micknelson.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/micknelson.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/micknelson.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/micknelson.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/micknelson.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/micknelson.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=66&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://micknelson.wordpress.com/2011/06/21/develop-and-deploy-with-virtualenv/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4dce4d6dbb01b4b687e1ef7cd698b43?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">absoludity</media:title>
		</media:content>
	</item>
		<item>
		<title>Sharing your development environment across branches</title>
		<link>http://micknelson.wordpress.com/2011/05/19/sharing-your-development-environment-across-branches/</link>
		<comments>http://micknelson.wordpress.com/2011/05/19/sharing-your-development-environment-across-branches/#comments</comments>
		<pubDate>Thu, 19 May 2011 13:17:15 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[bzr]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://micknelson.wordpress.com/?p=69</guid>
		<description><![CDATA[If you&#8217;re working on a project that bootstraps a development environment (using virtualenv or similar) it can be painful to bootstrap the environment for every bug/feature branch that you work on. There are lots of ways you can avoid this (local cache etc.), but if you&#8217;re using bzr to manage your branches, a single working [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=69&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re working on a project that bootstraps a development environment (using virtualenv or similar) it can be painful to bootstrap the environment for every bug/feature branch that you work on. There are lots of ways you can avoid this (local cache etc.), but if you&#8217;re using bzr to manage your branches, a single working directory for all your branches can solve the problem for you. Most bzr users will be familiar with this, but people new to bzr might benefit.</p>
<p>The one-time setup is pretty straight forward &#8211; create a repository with a local copy of trunk, and a branch of trunk for your new feature/bug:</p>
<pre>$ cd dev/
$ bzr init-repo myproject
$ cd myproject
$ bzr branch lp:myproject trunk
$ bzr branch trunk myfeaturex</pre>
<p>From now on, you can simply `cd trunk &amp;&amp; bzr pull` when you want to update your local trunk [1]. Now we&#8217;ll create a light-weight checkout and bootstrap our environment there. I tend to call this directory &#8216;current_work&#8217; but whatever works for you. Also, most of the projects I&#8217;m working on are using fabric for setting up the virtualenv and other tidbits, but replace that with your own bootstrap command:</p>
<pre>$ bzr checkout --lightweight myfeaturex current_work
$ cd current_work &amp;&amp; fab bootstrap</pre>
<p>Assuming everything went well, you now have your development environment setup and are ready to work on myfeaturex. Make changes, commit etc., push to launchpad &#8211; it&#8217;ll all be for your myfeaturex branch. But what if half-way through, you need to switch and work on an urgent bug? Easy: commit (or shelve) any changes you&#8217;ve got for your current branch, then:</p>
<pre>$ cd ..
$ bzr branch trunk criticalbugx
$ cd current_work
$ bzr switch ../criticalbugx  [2]</pre>
<p>Edit 2011-05-23: See Ricardo&#8217;s comment &#8211; the above 4 lines can be replaced by his two.</p>
<p>That&#8217;s it &#8211; your current_work directory now reflects the criticalbugx branch &#8211; and is already bootstrapped [3], you can work away, commit push etc., and then switch back to your original branch with:</p>
<pre>$ bzr switch ../myfeaturex</pre>
<p>If you&#8217;re working on large branches, once you&#8217;ve got the above workflow, you may want to try next <a href="https://micknelson.wordpress.com/2011/02/17/keeping-large-features-reviewable-with-bzr-pipelines/">keeping large features reviewable with bzr pipelines</a>.</p>
<p>[1] It&#8217;s a good idea to never do any work in your trunk tree&#8230; always work in a branch of trunk.<br />
[2] The ../ is not actually required, but when you&#8217;ve lots of branches with long names, it means you can tab-complete the branch name.<br />
[3] Of course, if one of your branches changes any virtualenv requirements or similar, you&#8217;ll need to re-bootstrap, but that isn&#8217;t so often in practise. Or sometimes a new version of a dependency is released and you won&#8217;t get it until you rebootstrap.</p>
<br />Filed under: <a href='http://micknelson.wordpress.com/category/bzr/'>bzr</a>, <a href='http://micknelson.wordpress.com/category/python/'>python</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/micknelson.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/micknelson.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/micknelson.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/micknelson.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/micknelson.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/micknelson.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/micknelson.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/micknelson.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/micknelson.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/micknelson.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/micknelson.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/micknelson.wordpress.com/69/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/micknelson.wordpress.com/69/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/micknelson.wordpress.com/69/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=69&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://micknelson.wordpress.com/2011/05/19/sharing-your-development-environment-across-branches/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4dce4d6dbb01b4b687e1ef7cd698b43?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">absoludity</media:title>
		</media:content>
	</item>
		<item>
		<title>GoForms &#8211; validating form data in Golang</title>
		<link>http://micknelson.wordpress.com/2011/05/18/goforms-validating-form-data-in-golang/</link>
		<comments>http://micknelson.wordpress.com/2011/05/18/goforms-validating-form-data-in-golang/#comments</comments>
		<pubDate>Wed, 18 May 2011 07:03:49 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[golang]]></category>
		<category><![CDATA[launchpad]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://micknelson.wordpress.com/?p=61</guid>
		<description><![CDATA[Learning a new language is fun&#8230;finding new ways of thinking about old problems and simple ways of expressing new ideas. As a small learning project for Golang, I set out the other day to experiment writing a simple form field validation library in my spare time &#8211; as it seems there is not yet anything along [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=61&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://golang.org"><img class="alignright size-full wp-image-63" title="gologo" src="http://micknelson.files.wordpress.com/2011/05/gologo.png?w=700" alt=""   /></a>Learning a new language is fun&#8230;finding new ways of thinking about old problems and simple ways of expressing new ideas.</p>
<p>As a small learning project for Golang, I set out the other day to experiment writing a simple form field validation library in my spare time &#8211; as it seems there is not yet anything along the lines of Django&#8217;s form API (<a href="https://groups.google.com/d/topic/golang-nuts/uC6DJ-XxYfI/discussion">email thread on go-nuts</a>).</p>
<p>The purpose was to provide an API for creating forms that can validate http.Request.Form data, cleaning the data when it is valid, and collecting errors when it is not.</p>
<p>The initial version provides just CharField, IntegerField and RegexField, allowing form creation like:</p>
<pre>    egForm := forms.NewForm(
        forms.NewCharField("description"),
        forms.NewIntegerField("purchase_count"))         

    egForm.SetFormData(request.Form)
    if egForm.IsValid() {
        // process the now populated egForm.CleanedData() and 
        // redirect.
    } else {
        // Use the now populated egForm.Errors map to report
        // the validation errors.
    }</pre>
<p>The GoForms package is installable with `goinstall launchpad.net/goforms` or you can browse the <a href="http://bazaar.launchpad.net/~michael.nelson/goforms/trunk/files">goforms code on Launchpad</a> (forms_test.go and fields_test.go have examples of the cleaned data and error). Let me know if you see flaws in the direction, or better ways of doing this in Go.</p>
<p>As a learning project it has been great &#8211; I&#8217;ve been able to use <a href="http://labix.org/gocheck">GoCheck</a> for the tests, use <a href="http://golang.org/doc/effective_go.html#embedding">embedded types</a> (for sharing BaseField functionality &#8211; similar to composition+delegation without the bookkeeping) and start getting a feel for some of the subtleties of working with <a href="http://golang.org/doc/effective_go.html#interfaces_and_types">interfaces and other types</a> in Go (this felt like all the benefits of z3c interfaces, without any of the overhead). Next I hope to include a small widget library for rendering basic forms/fields.</p>
<br />Filed under: <a href='http://micknelson.wordpress.com/category/golang/'>golang</a>, <a href='http://micknelson.wordpress.com/category/launchpad/'>launchpad</a>, <a href='http://micknelson.wordpress.com/category/testing/'>testing</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/micknelson.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/micknelson.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/micknelson.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/micknelson.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/micknelson.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/micknelson.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/micknelson.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/micknelson.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/micknelson.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/micknelson.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/micknelson.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/micknelson.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/micknelson.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/micknelson.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=61&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://micknelson.wordpress.com/2011/05/18/goforms-validating-form-data-in-golang/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4dce4d6dbb01b4b687e1ef7cd698b43?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">absoludity</media:title>
		</media:content>

		<media:content url="http://micknelson.files.wordpress.com/2011/05/gologo.png" medium="image">
			<media:title type="html">gologo</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting going with Go (golang)</title>
		<link>http://micknelson.wordpress.com/2011/04/15/getting-going-with-go-golang/</link>
		<comments>http://micknelson.wordpress.com/2011/04/15/getting-going-with-go-golang/#comments</comments>
		<pubDate>Fri, 15 Apr 2011 16:18:31 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[golang]]></category>

		<guid isPermaLink="false">http://micknelson.wordpress.com/?p=55</guid>
		<description><![CDATA[For quite a while I&#8217;ve been wanting to get stuck into learning the Go programming language, after a colleague at Canonical (Gustavo Niemeyer) wrote enthusiastically about it&#8230; and today I took a bit of time to get started. Getting setup on my Ubuntu Maverick VM was pretty straight forward: Add Gustavo&#8217;s software channel: sudo add-apt-repository [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=55&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>For quite a while I&#8217;ve been wanting to get stuck into learning the <a href="http://golang.org/">Go</a> programming language, after a colleague at Canonical (<a href="http://blog.labix.org/">Gustavo Niemeyer</a>) wrote enthusiastically about it&#8230; and today I took a bit of time to get started.</p>
<p>Getting setup on my Ubuntu Maverick VM was pretty straight forward:</p>
<ul>
<li>Add Gustavo&#8217;s software channel:</li>
</ul>
<pre>sudo add-apt-repository ppa:niemeyer/ppa
sudo apt-get update
sudo apt-get install golang
export GOROOT=/usr/lib/go</pre>
<div>
<ul>
<li>This also adds &#8216;<a href="https://wiki.ubuntu.com/gorun">gorun</a>&#8216;, which effectively saves you having to compile and link each time you edit your go source file &#8211; nice</li>
<li>I had to then grab the go source to get the vim syntax highlighting etc. (files are provided for most editors in the source).</li>
</ul>
<div>Whenever learning a new language I always find it incredibly helpful to be able to see all the options available &#8211; code auto-completion. So finally, I installed <a href="https://github.com/nsf/gocode">gocode</a>, but had to make the following changes to get it to `make install`:</div>
<div>
<ul>
<li>Installed golang-weekly (rather than golang) to get a more recent version&#8230;</li>
<li>Reverted the latest commit to gocode which was an update for the latest golang weekly release, which hadn&#8217;t yet hit the PPA.</li>
</ul>
<div>With those changes, gocode installed and worked beautifully &#8211; learning with auto-completion is like seeing with peripheral vision for the first time.</div>
</div>
<div>Next week I hope to checkout the gocheck testing library as well as the <a href="http://golang.org/doc/effective_go.html">Effective Go</a> tutorial. As much as I love Python, it&#8217;s great getting stuck into a new language!</div>
</div>
<br />Filed under: <a href='http://micknelson.wordpress.com/category/golang/'>golang</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/micknelson.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/micknelson.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/micknelson.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/micknelson.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/micknelson.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/micknelson.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/micknelson.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/micknelson.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/micknelson.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/micknelson.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/micknelson.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/micknelson.wordpress.com/55/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/micknelson.wordpress.com/55/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/micknelson.wordpress.com/55/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=55&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://micknelson.wordpress.com/2011/04/15/getting-going-with-go-golang/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4dce4d6dbb01b4b687e1ef7cd698b43?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">absoludity</media:title>
		</media:content>
	</item>
		<item>
		<title>Code-reviews as relationship builders</title>
		<link>http://micknelson.wordpress.com/2011/03/22/code-reviews-as-relationship-builders/</link>
		<comments>http://micknelson.wordpress.com/2011/03/22/code-reviews-as-relationship-builders/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 09:27:40 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://micknelson.wordpress.com/?p=53</guid>
		<description><![CDATA[I really enjoyed the emphasis of Ben&#8217;s Code-reviews as relationship builders post over the weekend. The focus on healthy learning relationships both for new and old is great &#8211; something I&#8217;ve tried to focus on myself over the past few years working in distributed teams. On a related note, I&#8217;ve wondered of late whether I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=53&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I really enjoyed the emphasis of Ben&#8217;s <a title="Code reviews as relationship builders" href="http://bjk5.com/post/3994859683/code-reviews-as-relationship-builders-a-few-tips">Code-reviews as relationship builders</a> post over the weekend. The focus on healthy learning relationships both for new and old is great &#8211; something I&#8217;ve tried to focus on myself over the past few years working in distributed teams.</p>
<p>On a related note, I&#8217;ve wondered of late whether I could use &#8220;Agreed&#8221; rather than &#8220;Approved&#8221; when reviewing a branch. Agreed (IMO) implies one type of relationship &#8211; peer discussion resulting in agreement &#8211; rather than an approval from an authority (perhaps without interaction). It is a small and maybe insignificant distinction&#8230;</p>
<br />Filed under: <a href='http://micknelson.wordpress.com/category/uncategorized/'>Uncategorized</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/micknelson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/micknelson.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/micknelson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/micknelson.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/micknelson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/micknelson.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/micknelson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/micknelson.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/micknelson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/micknelson.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/micknelson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/micknelson.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/micknelson.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/micknelson.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=micknelson.wordpress.com&amp;blog=7999270&amp;post=53&amp;subd=micknelson&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://micknelson.wordpress.com/2011/03/22/code-reviews-as-relationship-builders/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/e4dce4d6dbb01b4b687e1ef7cd698b43?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">absoludity</media:title>
		</media:content>
	</item>
	</channel>
</rss>
