<?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>Cynic&#039;s Soapbox</title>
	<atom:link href="http://blog.david-reid.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.david-reid.com</link>
	<description>Just a few ramblings on life</description>
	<lastBuildDate>Wed, 05 Jun 2013 22:38:48 +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>Variable Pitch Take 2</title>
		<link>http://blog.david-reid.com/2013/06/05/variable-pitch-take-2/</link>
		<comments>http://blog.david-reid.com/2013/06/05/variable-pitch-take-2/#comments</comments>
		<pubDate>Wed, 05 Jun 2013 22:38:48 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.david-reid.com/?p=1069</guid>
		<description><![CDATA[It&#8217;s fair to say that when I started the Variable Pitch website I didn&#8217;t know a lot about the energy market or the data that would be useful and available. I had an idea and some data and I started &#8230; <a href="http://blog.david-reid.com/2013/06/05/variable-pitch-take-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>It&#8217;s fair to say that when I started the <a href="http://www.variablepitch.co.uk">Variable Pitch</a> website I didn&#8217;t know a lot about the energy market or the data that would be useful and available. I had an idea and some data and I started trying to make it available. The site started with just scottish stations but soon I had people asking me about english, welsh and northern irish stations, so I expanded to also cover those countries.</p>
<p>It wasn&#8217;t just the coverage that expanded. While I started out focussing on Renewable Obligation certificates (ROC) and their value, I was soon being asked about other aspects of finance related to renewable energy. The Ofgem data provided a way of viewing the output for stations but my early focus on ROC was soon shown to be an error as other financial schemes such as the Feed In Tariff needed to be considered. Then there was the selling of electricity that I hadn&#8217;t thought about and the constraint payments made were another area that I had not originally anticipated tracking but something I added to the site.</p>
<p>As with all projects that grow in such an organic manner my initial design of data structures turned out to be totally inadequate. I added the pieces I needed but over time it grew arms and legs on it&#8217;s arms and legs. It worked, but adding things was getting harder and harder. Simple maintenance was proving a challenge. Developing the site was also getting harder.</p>
<p>As a result of everything above I finally decided that the time was right to bite the bullet and use the my additional knowledge to develop a better set of structures for the data. This finally allows me to add some of the extra things that I&#8217;ve been struggling with &#8211; hopefully in a manner that also allows for better maintenance and easier upgrades!</p>
<p>I&#8217;ve made a good start on getting things changed and have a lot of the new design work done, so it&#8217;s just a question of finding and correcting all the small (and some not so small) bugs before pushing it live. I&#8217;m hoping to get that done this week, but it may drift into next week.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.david-reid.com/2013/06/05/variable-pitch-take-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s just a number.</title>
		<link>http://blog.david-reid.com/2013/05/06/its-just-a-number/</link>
		<comments>http://blog.david-reid.com/2013/05/06/its-just-a-number/#comments</comments>
		<pubDate>Mon, 06 May 2013 15:42:12 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[wind farm]]></category>

		<guid isPermaLink="false">http://blog.david-reid.com/?p=1058</guid>
		<description><![CDATA[&#8220;Scottish wind farms paid £1 million to shut down one day&#8221; 1 &#8220;Record Breaking Day for Wind&#8221; 2 The above headlines have both been published recently. They both quote impressive facts and figures &#8211; or do they? Emotions tend to &#8230; <a href="http://blog.david-reid.com/2013/05/06/its-just-a-number/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<blockquote><p>&#8220;Scottish wind farms paid £1 million to shut down one day&#8221; <sup>1</sup></p></blockquote>
<blockquote><p>&#8220;Record Breaking Day for Wind&#8221; <sup>2</sup></p></blockquote>
<p>The above headlines have both been published recently. They both quote impressive facts and figures &#8211; or do they?</p>
<p>Emotions tend to run high when discussing green issues and even more so when discussing renewable energy. It&#8217;s an important debate but one that I feel is regularly trivialised by the sort of reporting evidenced by the above headlines. I have some sympathy for the journalists as due to the complexity of the energy market writing about it in an accessible manner isn&#8217;t easy, but that&#8217;s not an excuse.</p>
<p>In order to have the informed debate that I feel is missing it&#8217;s important to establish the facts and it&#8217;s at this first obstacle that problems start to appear. People make money from the energy market &#8211; lots of money. There are markets where trading takes place and as with stocks, shares or other commodities these markets require real time data. Whenever you mix finance with information you come across barriers, restrictions and payments to the companies that grow to control access to the data. </p>
<p>Without free and unencumbered access to such data it&#8217;s impossible to have an honest and open debate of the issues.</p>
<p>Much of the information about the UK energy market is provided by <a href="http://www.elexon.co.uk/">Elexon UK</a>. They have a lot of information available, for free, but when trying to use the information things soon become less friendly. Given what the data relates to and how important it is, the fact that Elexon UK consider they &#8220;own&#8221; (<em>their words not mine</em>) all information they make available should be of concern.</p>
<p>I previously <a href="http://blog.david-reid.com/2013/04/18/balancing-mechanism-data/">wrote about</a> my dealings with Elexon UK in April 2013.</p>
<p><em>Disclaimer: I maintain a website that attempts to provide an unbiased view of wind energy production in the UK, <a href="http://www.variablepitch.co.uk/">http://www.variablepitch.co.uk/</a>.<br />
</em></p>
<p><strong>References:</strong></p>
<ol>
<li><a href="http://www.telegraph.co.uk/news/uknews/scotland/10038598/Scottish-wind-farms-paid-1-million-to-shut-down-one-day.html">http://www.telegraph.co.uk/news/uknews/scotland/10038598/Scottish-wind-farms-paid-1-million-to-shut-down-one-day.html</a>
</li>
<li><a href="http://www.renewableuk.com/en/news/press-releases.cfm/2013-03-23-record-breaking-day-for-wind">http://www.renewableuk.com/en/news/press-releases.cfm/2013-03-23-record-breaking-day-for-wind</a>
</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.david-reid.com/2013/05/06/its-just-a-number/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quad Copter</title>
		<link>http://blog.david-reid.com/2013/05/05/quad-copter/</link>
		<comments>http://blog.david-reid.com/2013/05/05/quad-copter/#comments</comments>
		<pubDate>Sun, 05 May 2013 09:28:23 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[QuadCopter]]></category>

		<guid isPermaLink="false">http://blog.david-reid.com/?p=1056</guid>
		<description><![CDATA[Having the GoPro cameras has led us to open up our imaginations about how to use them. We&#8217;ve had one suspended from a kite (more to follow) but I&#8217;ve been pondering building a Quad Copter to fly a camera around &#8230; <a href="http://blog.david-reid.com/2013/05/05/quad-copter/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Having the GoPro cameras has led us to open up our imaginations about how to use them. We&#8217;ve had one suspended from a kite (more to follow) but I&#8217;ve been pondering building a Quad Copter to fly a camera around for a while. The ready made solutions seem a lot of money for what they are and it&#8217;s always good to have a project <img src='http://blog.david-reid.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>When I started looking into what was required there was the usual very steep learning curve. All the new terms and concepts to grasp coupled with people keen to sell you things without telling you the details meant it has taken me a while to bite the bullet and start assembling the parts I&#8217;ll need.</p>
<p>I&#8217;ll try and document what I do to try and help others and remind myself of what not to do next time. It&#8217;ll probably also help when reconstructing from the inevitable crashes!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.david-reid.com/2013/05/05/quad-copter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Balancing Mechanism Data</title>
		<link>http://blog.david-reid.com/2013/04/18/balancing-mechanism-data/</link>
		<comments>http://blog.david-reid.com/2013/04/18/balancing-mechanism-data/#comments</comments>
		<pubDate>Thu, 18 Apr 2013 11:27:15 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[wind farm]]></category>

		<guid isPermaLink="false">http://blog.david-reid.com/?p=1052</guid>
		<description><![CDATA[In order to keep the UK National Grid working correctly a delicate balancing act must be performed. The various units generating energy must be matched with the likely demand in order to keep the system within strict limits of frequency &#8230; <a href="http://blog.david-reid.com/2013/04/18/balancing-mechanism-data/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>In order to keep the UK National Grid working correctly a delicate balancing act must be performed. The various units generating energy must be matched with the likely demand in order to keep the system within strict limits of frequency and voltage. When the system drifts beyond those limits bad things happen, inevitably depriving people of the energy they need.</p>
<p>Underpinning this process is a complex set of rules and procedures, detailed on the National grid website <a href="http://www.nationalgrid.com/uk/Electricity/Balancing/services/balanceserv/intro/">here</a>. Given the scale of the UK energy market and the significance of the service, the volumes (and therefore cashflow) involved are very large. An obvious question when developing <a href="http://www.variablepitch.co.uk/">Variable Pitch</a> was how involved wind energy producers were?</p>
<p>The information is available via the <a href="http://www.bmreports.com/bwx_reporting.htm">BMRS webiste (Elexon)</a> which allows you to get figures for all Balancing Mechanism Units for any given date or settlement period. This had been available on Variable Pitch since Nov 2012 and showed the volumes and financial amounts involved. However, as with any set of numbers, taken out of context it was difficult to fully assess them. While the amounts paid to wind generators seem large &#8211; are they really out of proportion with those being paid to the other participants? Context is important and was lacking.</p>
<p>Once the lack of context had been pointed out I started looking at the available data again and started collecting additional information to allow me to provide the context that was lacking. Along the way I had to delve deeper into what the data meant in order to avoid misrepresenting it, but that required me to contact <a href="http://www.elexon.co.uk/">Elexon UK</a>. Initially they were happy to answer questions, but they then delivered this statement.</p>
<blockquote><p>The information is available, but the data is owned by Elexon and permission to reproduce will need to be obtained.</p></blockquote>
<p>Variable Pitch has always had a strict policy about the data it uses. </p>
<blockquote><p>Only data that is freely available and can therefore be validated from the source direct should be used.</p></blockquote>
<p>It may not have been stated on the website (<em>but perhaps it should be?</em>), but that&#8217;s been the underlying policy I have always applied. All sources of data are noted on the site and no attempt is made to disguise where information comes from. As far as possible the &#8220;raw data&#8221; is available on the site. This is the minimum I feel is required for an open and honest representation.</p>
<p>I could contact <a href="http://www.elexon.co.uk/">Elexon UK</a> and request permission to use the data, but then anyone else who wished to do likewise would need to contact them, which isn&#8217;t acceptable to me. Sadly I have reached the decision that I will have to remove all data that is sourced from their website.</p>
<p>To say I do this with a heavy heart is an understatement and it marks a retrograde step by decreasing the transparency and honesty with which the energy market operates. <a href="http://www.elexon.co.uk/">Elexon UK</a> make money by selling the data so I can fully understand their desire to control the data, but as it relates to an industry that is an essential service it really should be freely available. </p>
<p>Without free and open access to such data honest, open and informed debate is impossible.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.david-reid.com/2013/04/18/balancing-mechanism-data/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Ofgem Certificates</title>
		<link>http://blog.david-reid.com/2013/03/30/ofgem-certificates/</link>
		<comments>http://blog.david-reid.com/2013/03/30/ofgem-certificates/#comments</comments>
		<pubDate>Sat, 30 Mar 2013 14:52:40 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[wind farm]]></category>

		<guid isPermaLink="false">http://blog.david-reid.com/?p=1048</guid>
		<description><![CDATA[When looking at the certificates issued by Ofgem all seems simple and straightforward. Each station has certificates issued based on output and various factorings. Simple. Except it isn&#8217;t. certificates can be revoked (no explanation is provided so it&#8217;s unclear why), &#8230; <a href="http://blog.david-reid.com/2013/03/30/ofgem-certificates/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>When looking at the certificates issued by Ofgem all seems simple and straightforward. Each station has certificates issued based on output and various factorings. Simple. Except it isn&#8217;t. certificates can be revoked (no explanation is provided so it&#8217;s unclear why), expired or retired. Some are eventually redeemed. along the way things are just as unclear.</p>
<blockquote><p>As an example, look at the Glyndebourne Wind turbine REGO issuance (<a href="http://www.variablepitch.co.uk/station/392/REGO/">http://www.variablepitch.co.uk/station/392/REGO/</a>). In January 2012 there were 2 sets of certificate issued, both for 158MWh of production and both with the same certificate numbers (click on the i to see the details). The only difference appears to be that they were issued to different holders. Hmm. Similar patterns are visible for the rest of the periods covered until July 2012 when things got more predictable.</p></blockquote>
<p>Why does this matter? Well, by simply looking at the certificates issued in a naive manner such double issuances would lead to double counting so to use the collected data a smarter approach is needed. In fact looking at the data things sometimes get even stranger.</p>
<blockquote><p>For instance, look at the REGO issuance for An Suidhe in August 2012 (<a href="http://www.variablepitch.co.uk/station/98/REGO/">http://www.variablepitch.co.uk/station/98/REGO/</a>). It appears that only 334 certificates have been issued, but the process of arriving at this number is anything but straightforward.</p></blockquote>
<p>Until I changed the method of storing and collecting the certificate data for <a href="http://www.variablepitch.co.uk/">Variable Pitch</a> these changes weren&#8217;t as obvious or as easy to view. Now that the data is easier to work with I&#8217;m working towards new processing that should allow the site to better track the correct output levels and who has ultimately ended up with the certificates. It&#8217;s proving to be a difficult problem due the variety of possible paths that can be taken, but hopefully I&#8217;ll get it working before long.</p>
<p>Watch this space.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.david-reid.com/2013/03/30/ofgem-certificates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spring Cleaning</title>
		<link>http://blog.david-reid.com/2013/03/11/spring-cleaning/</link>
		<comments>http://blog.david-reid.com/2013/03/11/spring-cleaning/#comments</comments>
		<pubDate>Mon, 11 Mar 2013 17:32:26 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.david-reid.com/?p=1045</guid>
		<description><![CDATA[Last week I noticed just how poorly organised the music collection on the home server had become. It&#8217;s inevitable that over the years things will change and so I was expecting it to be a little messy, but what I &#8230; <a href="http://blog.david-reid.com/2013/03/11/spring-cleaning/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Last week I noticed just how poorly organised the music collection on the home server had become. It&#8217;s inevitable that over the years things will change and so I was expecting it to be a little messy, but what I found was far, far worse than that. As I have some time off I resolved to fix the problems and so have spent a few hours going through and tidying up the metadata, changing formats and removing duplicates to a point where things are looking pretty good. </p>
<p>Of course, that&#8217;s only half the battle as the metadata is then used by the media server to serve the files &#8211; destroying much of my good work in the process <img src='http://blog.david-reid.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  I really wish there was a decent media server for linux.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.david-reid.com/2013/03/11/spring-cleaning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spamassassin Storage</title>
		<link>http://blog.david-reid.com/2013/02/24/spamassassin-storage/</link>
		<comments>http://blog.david-reid.com/2013/02/24/spamassassin-storage/#comments</comments>
		<pubDate>Sun, 24 Feb 2013 21:41:34 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.david-reid.com/?p=1042</guid>
		<description><![CDATA[We&#8217;ve been using SQL for storing various Spamassassin data for the last few years. It&#8217;s allowed us to provide our users with a lot of control and has been a good solution. However, a mixture of a inattention and a &#8230; <a href="http://blog.david-reid.com/2013/02/24/spamassassin-storage/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>We&#8217;ve been using SQL for storing various Spamassassin data for the last few years. It&#8217;s allowed us to provide our users with a lot of control and has been a good solution. However, a mixture of a inattention and a failure of some of the maintenance actions has led to a problem with the bayes tables growing to a size that is beyond sensible. We&#8217;ve started taking action to remedy the issue, but as we&#8217;re presently using MySQL the size of the database files isn&#8217;t shrinking <img src='http://blog.david-reid.com/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' />  The effort involved in correcting this is large enough to make me wonder whether it&#8217;s an opportunity to migrate to Postgres. Has anyone done this or have any opinions whether it&#8217;s a sensible move to make?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.david-reid.com/2013/02/24/spamassassin-storage/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Continuing CouchDB Experiments</title>
		<link>http://blog.david-reid.com/2013/02/04/continuing-couchdb-experiments/</link>
		<comments>http://blog.david-reid.com/2013/02/04/continuing-couchdb-experiments/#comments</comments>
		<pubDate>Mon, 04 Feb 2013 12:37:55 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.david-reid.com/?p=1030</guid>
		<description><![CDATA[I&#8217;ve been developing a small app that should be a good fit for CouchDB. It&#8217;s a small app that will allow me to keep a series of notes, some of which are plain text and some are formatted in particular &#8230; <a href="http://blog.david-reid.com/2013/02/04/continuing-couchdb-experiments/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been developing a small app that should be a good fit for CouchDB. It&#8217;s a small app that will allow me to keep a series of notes, some of which are plain text and some are formatted in particular ways. The data needs to be shared between a number of devices with the ability to be edited on any of them &#8211; online and offline. It&#8217;s not a hugely complex app nor is it a unique problem, but it&#8217;s useful place to keep looking at CouchDB.</p>
<p>Why do I think CouchDB is a good fit? It&#8217;s NoSQL foundations means that data can be easily arranged and stored in ways that make sense for each type. The replication features will allow the various devices to sync with each other without any extra effort. Thanks to the <a href="https://github.com/couchbase/Android-Couchbase">Android Couchbase</a> project it&#8217;s possible to use CouchDB on Android (albeit with a larger binary than I would like) allowing for offline storage.</p>
<p>As I&#8217;ll be using multiple devices, I&#8217;ve decided to start by letting the server allocate it&#8217;s default random _id which should avoid duplicates and not require me to devise some more complex scheme.</p>
<p>With a conventional SQL database the decision of how to arrange the data would be simple &#8211; a series of tables connected with joins. However, when contemplating how to arrange the data with NoSQL there doesn&#8217;t seem to be as simple a solution. This could be my inexperience with them but having read a lot of articles I think it&#8217;s just there are so many possible ways of arranging the data that the right solution will depend on the situation.</p>
<p>I&#8217;m keen to keep the complexity down but at the same time I don&#8217;t want to have a simpler database at the expense of making the interface more complex to work with. My original thought was to store all the related documents in an array embedded within a single document, for example</p>
<p><code>{<br />
"_id": "12345",<br />
"title": "Some Subject"<br />
"notes": [<br />
{<br />
"type": "text",<br />
"content": "Simple text note"<br />
},<br />
{<br />
"type": "text",<br />
"content": "Another simple piece of text"<br />
}<br />
]}<br />
</code></p>
<p>This is nice and simple and allows me to use a single request to get the entire document, but it adds a lot of complexity to the interface. When editing one of the notes, I would need to</p>
<ol>
<li>request the document</li>
<li>edit the document</li>
<li>update the entire document</li>
</ol>
<p>Far simpler from an editing point of view would be to have the notes as seperate records with a link back to their parent document. For example,</p>
<p><code>{<br />
"_id": "12345",<br />
"title": "Some Subject"<br />
}<br />
{<br />
"_id": "23456",<br />
"parent": "12345",<br />
"type": "text",<br />
"content": "Simple text note"<br />
}<br />
{<br />
"_id": "34567",<br />
"parent": "12345",<br />
"type": "text",<br />
"content": "Another simple piece of text"<br />
}<br />
</code></p>
<p>This allows me to edit each document separately and so avoids the need to request the entire parent document and then manipulate the returned data prior to updating, but does raise the question of how I could efficiently request the document and all it&#8217;s related child documents. With some simple changes, a complex key in a view and careful use of parameters it turns out to be very possible.</p>
<p>First I alter the documents slightly by adding a type field to every document.</p>
<p><code>{<br />
"_id": "12345",<br />
"title": "Some Subject",<br />
"type": "subject"<br />
}<br />
{<br />
"_id": "23456",<br />
"parent": "12345",<br />
"type": "subject:note",<br />
"content-type": "text",<br />
"content": "Simple text note"<br />
}<br />
{<br />
"_id": "34567",<br />
"parent": "12345",<br />
"type": "subject:note",<br />
"content-type": "text",<br />
"content": "Another simple piece of text"<br />
}<br />
</code></p>
<p>Next I write a simple view function.</p>
<p><code><br />
function(doc) {<br />
if (doc.type) {<br />
if (doc.type == "subject") {<br />
emit([doc._id, 0], doc);<br />
} else if (doc.type == "subject:note" &amp;&amp; doc.topic) {<br />
emit([doc.topic, 1], doc);<br />
}<br />
}<br />
}</code></p>
<p>Running this query (without any parameters) produces the following result,</p>
<p><code><br />
{"total_rows": 3, "offset": 0, "rows": [<br />
{<br />
"id": "12345",<br />
"key": ["12345", 0],<br />
"value": {...}<br />
}, {<br />
"id": "23456",<br />
"key": ["12345", 1],<br />
"value": {...}<br />
}, {<br />
"id": "34567",<br />
"key": ["12345", 1],<br />
"value": {...}<br />
}<br />
]}<br />
</code></p>
<p>The &#8216;&#8230;&#8217; in the value fields will have the contents of the document, so this query returns me all the information I need. Filtering is also possible thanks to CouchDB and the usual key, startkey and endkey parameters. Additionally I can add fields to the complex key without changing how it functions. Nice. </p>
<p>Getting a single subject with all the related notes is as simple as requesting the view with the parameters <code>?startkey=["12345"]&amp;endkey;=["12345", 2]</code>.</p>
<p>If I add additional document types then I can simply adjust my view and return them as well, using the number to differentiate between them. Parsing the data for an interface becomes simple and each document can be edited/updated in isolation.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.david-reid.com/2013/02/04/continuing-couchdb-experiments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Blast from the past&#8230;</title>
		<link>http://blog.david-reid.com/2013/02/03/blast-from-the-past/</link>
		<comments>http://blog.david-reid.com/2013/02/03/blast-from-the-past/#comments</comments>
		<pubDate>Sun, 03 Feb 2013 22:50:27 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.david-reid.com/?p=1031</guid>
		<description><![CDATA[This is another of the &#8220;this is to help me remember what I did to cure this problem&#8221; type posts. Having recently updated the mail server an old issue resurfaced that caused one of my users to be unable to &#8230; <a href="http://blog.david-reid.com/2013/02/03/blast-from-the-past/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This is another of the &#8220;<em>this is to help me remember what I did to cure this problem</em>&#8221; type posts.</p>
<p>Having recently updated the mail server an old issue resurfaced that caused one of my users to be unable to send mail correctly. We use SMTP AUTH to authenticate users and only allow relaying for authenticated users. It&#8217;s not an unusual configuration but as <a href="http://www.postfix.org/">postfix</a> is installed by <a href="http://www.ubuntu.com/">Ubuntu </a>it has this line in the main.cf config file</p>
<p><code>smtpd_tls_auth_only = yes</code></p>
<p>With this line only connections that are encrypted will offer the AUTH command. While this is great for security it means that users who ignore my advice to use encrypted connections are unable to relay mails.</p>
<p>I&#8217;ve commented out the line in main.cf allowing the default value of &#8216;no&#8217; to be used which has allowed all users to send correctly. Of course, warnings have also been given to the affected users along with a reiteration of the advice to use an encrypted connection <img src='http://blog.david-reid.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.david-reid.com/2013/02/03/blast-from-the-past/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Android Development Environment on Ubuntu 12.10</title>
		<link>http://blog.david-reid.com/2013/01/06/android-development-environment-on-ubuntu-12-10/</link>
		<comments>http://blog.david-reid.com/2013/01/06/android-development-environment-on-ubuntu-12-10/#comments</comments>
		<pubDate>Sun, 06 Jan 2013 17:51:01 +0000</pubDate>
		<dc:creator>david</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[mobile]]></category>

		<guid isPermaLink="false">http://blog.david-reid.com/?p=1022</guid>
		<description><![CDATA[As with many people I&#8217;m using the 64-bit version of Ubuntu 12.10. This means that when you install the various pieces you need for android development the tools found in the platform-tools directory won&#8217;t run. They give the simple error &#8230; <a href="http://blog.david-reid.com/2013/01/06/android-development-environment-on-ubuntu-12-10/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>As with many people I&#8217;m using the 64-bit version of Ubuntu 12.10. This means that when you install the various pieces you need for android development the tools found in the platform-tools directory won&#8217;t run. They give the simple error message</p>
<p><code>bash: android-sdk/platform-tools/adb: No such file or directory</code></p>
<p>The solution is simple enough, but it took me a few minutes to find, so maybe this post will save someone else that time.</p>
<p>The issue was that the apps are 32-bit and my install is 64-bit, so you need to install the 32-bit versions of the system libraries to make them happy.</p>
<p><code>sudo apt-get install ia32-libs</code></p>
<p>Et voila! The apps now run.</p>
<p>I&#8217;d suggest doing this before installing the eclipse ADT as it will check whether the apps can be run and if they can&#8217;t will produce some very strange and unhelpful errors when you try and look at an android project.</p>
<p>I did find a <a href="http://www.webupd8.org/2012/08/install-adb-and-fastboot-android-tools.html">web page describing installing the apps via a ppa</a> which claimed to avoid the need for the 32-bit libs, but when I tried it I couldn&#8217;t find any way of telling eclipse where to find the apps installed via the ppa and so was no further forward. If anyone knows the magic incantations to make this work then let me know as I&#8217;d prefer not to need the 32-bit libs.</p>
<p>Additionally, when trying to run the emulator I saw the following errors</p>
<p><code>[2013-01-06 17:58:48 - Emulator] Failed to load libGL.so<br />
[2013-01-06 17:58:48 - Emulator] error libGL.so: cannot open shared object file: No such file or directory<br />
[2013-01-06 17:58:48 - Emulator] Failed to load libGL.so<br />
[2013-01-06 17:58:48 - Emulator] error libGL.so: cannot open shared object file: No such file or directory</code></p>
<p>The solution was provided by <a href="http://learnedstuffs.wordpress.com/2012/07/17/fixing-ubuntu-error-failed-to-load-libgl-so/">this blog post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.david-reid.com/2013/01/06/android-development-environment-on-ubuntu-12-10/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
