<?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>Trouble With Dreams &#187; twd</title>
	<atom:link href="http://troublewithdreams.com/category/twd/feed/" rel="self" type="application/rss+xml" />
	<link>http://troublewithdreams.com</link>
	<description></description>
	<lastBuildDate>Thu, 05 Jan 2012 10:02:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Last.fm Explorer</title>
		<link>http://troublewithdreams.com/2011/01/30/last-fm-explorer/</link>
		<comments>http://troublewithdreams.com/2011/01/30/last-fm-explorer/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 21:54:45 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[internet]]></category>
		<category><![CDATA[scrobbler]]></category>
		<category><![CDATA[twd]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=432</guid>
		<description><![CDATA[A note to say that a successor to Historical Charts is available at twothreefall.co.uk/lastfmexplorer.  Redesign and restructure aside, new features alongside the charts that went before include:

Interactive charts and plots of weekly playcounts
Charts for only new artists
Information about extreme weeks

For an example see what it does with my data.
I&#8217;m pleased with how it&#8217;s turned [...]]]></description>
			<content:encoded><![CDATA[<p>A note to say that a successor to <a href="/scrobbler">Historical Charts</a> is available at <a href="http://twothreefall.co.uk/lastfmexplorer">twothreefall.co.uk/lastfmexplorer</a>.  Redesign and restructure aside, new features alongside the charts that went before include:</p>
<ul>
<li>Interactive charts and plots of weekly playcounts</li>
<li>Charts for only new artists</li>
<li>Information about extreme weeks</li>
</ul>
<p>For an example see what it does with <a href="http://twothreefall.co.uk/lastfmexplorer/user/aradnuk">my data</a>.</p>
<p>I&#8217;m pleased with how it&#8217;s turned out.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2011/01/30/last-fm-explorer/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Django experiments</title>
		<link>http://troublewithdreams.com/2010/04/05/django-experiments/</link>
		<comments>http://troublewithdreams.com/2010/04/05/django-experiments/#comments</comments>
		<pubDate>Mon, 05 Apr 2010 22:44:53 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[last.fm]]></category>
		<category><![CDATA[scrobbler]]></category>
		<category><![CDATA[twd]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=337</guid>
		<description><![CDATA[I&#8217;ve been playing about with Django and Last.fm data, intended as an eventual upgrade to historical charts.  It&#8217;s fun .. I now know I play most music in March and November (university deadline time!), that my top three artists of 2010 so far are Animal Collective, Grizzly Bear and The Delgados, and that my [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing about with Django and Last.fm data, intended as an eventual upgrade to <a href="/scrobbler"/>historical charts</a>.  It&#8217;s fun .. I now know I play most music in March and November (university deadline time!), that my top three artists of 2010 so far are <a href="http://www.last.fm/music/Animal Collective">Animal Collective</a>, <a href="http://www.last.fm/music/Grizzly Bear">Grizzly Bear</a> and <a href="http://www.last.fm/music/The Delgados">The Delgados</a>, and that my favourite three discoveries are <a href="http://www.last.fm/music/Starless &#038; Bible Black">Starless &amp; Bible Black</a>, <a href="http://www.last.fm/music/RM Hubbert">RM Hubbert</a> and <a href="http://www.last.fm/music/Soweto Kinch">Soweto Kinch</a>.</p>
<p>I also discovered that using a foreign key of an object returned by a Django QuerySet as a dictionary key prompts Django to look the actual data up.  I had something like the following:</p>
<blockquote><p><code>class WeekData(models.Model):<br />
&nbsp;&nbsp;&nbsp;&nbsp;artist = models.ForeignKey(Artist)<br />
&nbsp;&nbsp;&nbsp;&nbsp;plays  = models.PositiveIntegerField()<br />
&nbsp;&nbsp;&nbsp;&nbsp;..</code><br />
<code><br />
tracking = defaultdict(int)<br />
for week in WeekData.objects.all():<br />
&nbsp;&nbsp;&nbsp;&nbsp;tracking[week.artist] += week.plays<br />
</code>
</p></blockquote>
<p>The dictionary update was taking <em>ages</em>.  Confused, I enabled Mysql&#8217;s logging and discovered 25,000 lines of the following..</p>
<blockquote><p>
<code>SELECT `id`, `name` FROM `muncher_artist` WHERE `id` = 22<br />
SELECT `id`, `name` FROM `muncher_artist` WHERE `id` = 23<br />
SELECT `id`, `name` FROM `muncher_artist` WHERE `id` = 24<br />
SELECT `id`, `name` FROM `muncher_artist` WHERE `id` = 25</code>
</p></blockquote>
<p>At which point I realised that using <code>week.artist</code> as the key here looks up the artist <em>every</em> time, meaning 25,000 useless database queries and a really, really slow function.  Perhaps I was being too hopeful in my expectation that Django would be clever.</p>
<p>Changing the last line to:</p>
<blockquote><p>
<code>tracking[week.artist_id] += week.plays</code></p></blockquote>
<p>sped the function up by a factor of ten and lets me produce images like this in reasonable time:</p>
<p><img src="http://troublewithdreams.com/sometimesiwrite/wp-content/uploads/2010/04/tophist-snippet.png" alt="" title="tophist-snippet" class="aligncenter size-full wp-image-345" /></p>
<p>It&#8217;s showing which artists occupy which chart positions as the weeks go by.  The dark black line is for Fleet Foxes .. seems I went pretty mad for them :o</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2010/04/05/django-experiments/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scrabble</title>
		<link>http://troublewithdreams.com/2008/11/21/scrabble/</link>
		<comments>http://troublewithdreams.com/2008/11/21/scrabble/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 00:47:34 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[twd]]></category>
		<category><![CDATA[kylie]]></category>
		<category><![CDATA[scrabble]]></category>
		<category><![CDATA[tumblr]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=219</guid>
		<description><![CDATA[Played a game of Scrabble with Kylie the other night, broke about four hundred records:
Me &#8211; 469 / Kylie &#8211; 397  = 866 combined 0_o
Her best &#8211; 122 for squirmy.
My best &#8211; 72 for (la)ziest, 64 for fainter.
And hence we are an awesome couple.
]]></description>
			<content:encoded><![CDATA[<p>Played a game of Scrabble with Kylie the other night, broke about four hundred records:</p>
<p>Me &#8211; 469 / Kylie &#8211; 397  = 866 combined 0_o</p>
<p>Her best &#8211; 122 for squirmy.</p>
<p>My best &#8211; 72 for (la)ziest, 64 for fainter.</p>
<p>And hence we are an awesome couple.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2008/11/21/scrabble/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s write something I say.</title>
		<link>http://troublewithdreams.com/2008/11/10/lets-write-something-i-say/</link>
		<comments>http://troublewithdreams.com/2008/11/10/lets-write-something-i-say/#comments</comments>
		<pubDate>Sun, 09 Nov 2008 23:50:20 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[twd]]></category>
		<category><![CDATA[tumblr]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=210</guid>
		<description><![CDATA[Then I sit and look down to my left and wonder what to write.
]]></description>
			<content:encoded><![CDATA[<p>Then I sit and look down to my left and wonder what to write.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2008/11/10/lets-write-something-i-say/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dusted</title>
		<link>http://troublewithdreams.com/2007/04/25/dusted/</link>
		<comments>http://troublewithdreams.com/2007/04/25/dusted/#comments</comments>
		<pubDate>Wed, 25 Apr 2007 00:06:14 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[twd]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/2007/04/25/dusted/</guid>
		<description><![CDATA[I&#8217;m not sure I&#8217;ll ever be entirely happy with the appearance of something I&#8217;ve designed entirely.
In other news, Felix Laband&#8217;s music is genius.
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure I&#8217;ll ever be entirely happy with the appearance of something I&#8217;ve designed entirely.</p>
<p>In other news, Felix Laband&#8217;s music is genius.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2007/04/25/dusted/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Trouble v2</title>
		<link>http://troublewithdreams.com/2007/03/28/trouble-v2/</link>
		<comments>http://troublewithdreams.com/2007/03/28/trouble-v2/#comments</comments>
		<pubDate>Tue, 27 Mar 2007 23:50:42 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[twd]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/2007/03/28/trouble-v2/</guid>
		<description><![CDATA[An overhaul is good for the soul.  Events have clearer significance, thoughts and words show entirely different meanings and subtleties, stresses fall in different places and most importantly, everything takes a little less effort.
In other words, I&#8217;ve completely redesigned the site and am quite happy with the current outcome.  It&#8217;s an extension of [...]]]></description>
			<content:encoded><![CDATA[<p>An overhaul is good for the soul.  Events have clearer significance, thoughts and words show entirely different meanings and subtleties, stresses fall in different places and most importantly, everything takes a little less effort.</p>
<p>In other words, I&#8217;ve completely redesigned the site and am quite happy with the current outcome.  It&#8217;s an extension of this <a href="http://www.plaintxt.org/themes/sandbox/">Sandbox</a> theme.  Really quite elegant, in appearance and (for the happy nerd inside me) in design and execution.  And while it&#8217;s Easter there&#8217;ll be plenty more time to extend.</p>
<p>Hurrah.</p>
<p>PS. Stumbled across <a href="http://feeling-jazz.blogspot.com/">this</a>.  Catch it while it lasts.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2007/03/28/trouble-v2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8230;And You Will Know Us By the Trail of Dead</title>
		<link>http://troublewithdreams.com/2007/02/16/and-you-will-know-us-by-the-trail-of-dead/</link>
		<comments>http://troublewithdreams.com/2007/02/16/and-you-will-know-us-by-the-trail-of-dead/#comments</comments>
		<pubDate>Fri, 16 Feb 2007 01:15:05 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[gigs]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[twd]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=31</guid>
		<description><![CDATA[A slight redesign and I&#8217;m suddenly a lot happier with the appearance of the site.  A page for scripts and maybe a page for words will hopefully appear too, though there&#8217;s little chance of anything substantial before a holiday of some kind. 
Saw &#8216;Trail of Dead at (the?) Oran Mor in Glasgow last night, [...]]]></description>
			<content:encoded><![CDATA[<p>A slight redesign and I&#8217;m suddenly a lot happier with the appearance of the site.  A page for scripts and maybe a page for words will hopefully appear too, though there&#8217;s little chance of anything substantial before a holiday of some kind. </p>
<p>Saw &#8216;<a href="http://www.trailofdead.com/">Trail of Dead</a> at (the?) Oran Mor in Glasgow last night, the songs I knew, aka those on <i>Source Tags &#038; Codes</i>, were almost spiritual, most of the others were rocking, a couple were plain and went on too long.  <a href="http://www.forgetcassettes.com/">Forget Cassettes</a> supported, early PJ Harvey-esque in style with some very catchy hooks and great drops.  .. They started their set with a repetitive, low dirge, gradually building in tension and climaxing in noise when the singer opened her mouth and .. woah .. the sound she made was horrible.  And then she stopped shouting loud and the acoustics of the place started working or something, it sounded a lot better.</p>
<p>The same went for &#8216;Trail of Dead, it almost spoilt a few of the songs.</p>
<p>But anyway, on with the Maths that follows my life :/</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2007/02/16/and-you-will-know-us-by-the-trail-of-dead/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>In the beginning</title>
		<link>http://troublewithdreams.com/2006/07/27/in-the-beginning/</link>
		<comments>http://troublewithdreams.com/2006/07/27/in-the-beginning/#comments</comments>
		<pubDate>Thu, 27 Jul 2006 18:35:17 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[music]]></category>
		<category><![CDATA[radiohead]]></category>
		<category><![CDATA[twd]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=6</guid>
		<description><![CDATA[Well .. the foundations are laid at least, theme is one pinched from the Wordpress themes repository thing, designed by Matteo Turchetto and Andreas Viklunda, I rather like it.  The Radiohead stuff is up too, lots of formatting changes to make though.
]]></description>
			<content:encoded><![CDATA[<p>Well .. the foundations are laid at least, theme is one pinched from the Wordpress themes repository thing, designed by <a target="_blank" href="http://www.italiasw.com">Matteo Turchetto</a> and <a target="_blank" href="http://andreasviklund.com"><span class="attribute-name">Andreas Viklunda</span></a>, I rather like it.  The Radiohead stuff is up too, lots of formatting changes to make though.</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2006/07/27/in-the-beginning/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Space Cadet</title>
		<link>http://troublewithdreams.com/2005/05/31/space-cadet/</link>
		<comments>http://troublewithdreams.com/2005/05/31/space-cadet/#comments</comments>
		<pubDate>Tue, 31 May 2005 17:05:50 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[insolence]]></category>
		<category><![CDATA[twd]]></category>

		<guid isPermaLink="false">http://troublewithdreams.com/?p=173</guid>
		<description><![CDATA[(With apologies to Dom, who has already read this..)
Man:   Someone has stolen the ball in my mouse.
Me:    Have another ball.
Man:   Thank you.
A few minutes later -
Man:   I can&#8217;t work out how to get the ball in this damn thing.
Me:    That&#8217;s an optical mouse.
Man: [...]]]></description>
			<content:encoded><![CDATA[<p>(With apologies to Dom, who has already read this..)</p>
<p>Man:   Someone has stolen the ball in my mouse.<br />
Me:    Have another ball.<br />
Man:   Thank you.</p>
<p>A few minutes later -</p>
<p>Man:   I can&#8217;t work out how to get the ball in this damn thing.<br />
Me:    That&#8217;s an optical mouse.<br />
Man:   Oh.<br />
Me:    arghpsjhg.ksjdgnlishgv.knxz;lkgbnzx;kgvbnzxlkfg</p>
]]></content:encoded>
			<wfw:commentRss>http://troublewithdreams.com/2005/05/31/space-cadet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

