<?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>athe.la blog &#187; Uncategorized</title>
	<atom:link href="http://blog.athe.la/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.athe.la</link>
	<description>how to internets with style</description>
	<lastBuildDate>Mon, 30 Jan 2012 20:37:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>All fake gamestation sites</title>
		<link>http://blog.athe.la/all-fake-gamestation-sites/</link>
		<comments>http://blog.athe.la/all-fake-gamestation-sites/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 13:53:05 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.athe.la/?p=398</guid>
		<description><![CDATA[Gamestation have finally replied to my requests and have provided this list of all the fake gamestation sites they had. Some are quite funny and I would have loved to have found them when they were up! Trampstation Flamestation Moustachestation Grannystation Pigstation Tutustation Bikinistation Artificialinseminationstation Tentingstation Chavstation Legstation Bongstation Moiststation Stripstation Massdebatestation]]></description>
			<content:encoded><![CDATA[<p>Gamestation have finally replied to my requests and have provided this list of all the fake gamestation sites they had.</p>
<p>Some are quite funny and I would have loved to have found them when they were up!</p>
<ul>
<li>Trampstation</li>
<li>Flamestation</li>
<li>Moustachestation</li>
<li>Grannystation</li>
<li>Pigstation</li>
<li>Tutustation</li>
<li>Bikinistation</li>
<li>Artificialinseminationstation</li>
<li>Tentingstation</li>
<li>Chavstation</li>
<li>Legstation</li>
<li>Bongstation</li>
<li>Moiststation</li>
<li>Stripstation</li>
<li>Massdebatestation</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/all-fake-gamestation-sites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fake Gamestation Competition Hiding Something?</title>
		<link>http://blog.athe.la/fake-gamestation-competition-hiding-something/</link>
		<comments>http://blog.athe.la/fake-gamestation-competition-hiding-something/#comments</comments>
		<pubDate>Tue, 08 Nov 2011 07:48:36 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.athe.la/?p=381</guid>
		<description><![CDATA[To help launch their new-look website, Gamestation recently held a competition for their customers to find other websites that &#8220;stole&#8221; their new design.  The competition encouraged customers to investigate websites that ended in &#8220;station.co.uk&#8221;.  I found a few but it never got recognised on the website and I never heard back from anyone. I asked <a href='http://blog.athe.la/fake-gamestation-competition-hiding-something/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>To help launch their new-look website, <a href="http://www.gamestation.co.uk/">Gamestation</a> recently held a competition for their customers to find other websites that &#8220;stole&#8221; their new design.  The competition encouraged customers to investigate websites that ended in &#8220;station.co.uk&#8221;.  I found a few but it never got recognised on the website and I never heard back from anyone. I asked gamestation&#8217;s customer support for some details of the competition and they were as helpful as a brick wall.</p>
<h3>The competition page</h3>
<p>Confirmed websites such as <a href="http://www.grannystation.co.uk">grannystation.co.uk</a> and <a href="http://www.chavstation.co.uk">chavstation.co.uk</a> were found and posted on the <a href="http://www.gamestation.co.uk/webapp/wcs/stores/servlet/HubArticleView?hubId=148280&amp;articleId=148287&amp;catalogId=10202&amp;langId=45&amp;storeId=10651">gamestation&#8217;s competition page</a>.</p>
<div id="attachment_382" class="wp-caption aligncenter" style="width: 208px"><a href="http://blog.athe.la/wp-content/uploads/2011/11/Gamestation-Snoops-Win-Prizes-.png"><img class="size-medium wp-image-382" title="Gamestation - Snoops Win Prizes" src="http://blog.athe.la/wp-content/uploads/2011/11/Gamestation-Snoops-Win-Prizes--198x300.png" alt="" width="198" height="300" /></a><p class="wp-caption-text">Screenshot as of 7th November 2011 of the competition page on the gamestation website</p></div>
<p>As soon as I figured out that all the fake websites adhered to a simple naming pattern, (plus with me being a bit geeky and excited about writing something new) I wrote a powershell script that attempted to visit every site.  The script took in the English dictionary of words between 2 and 8 characters long and appended &#8220;station.co.uk&#8221;.  If it found a link to the gamestation.co.uk website, it would log it and move on to the next.</p>
<h3>The script, it ran&#8230;</h3>
<p>Lo-and-behold it found two more that had not been posted on the gamestation site.  I didn&#8217;t really care if I won the grand prize, I just did it for the fun and wanted to investigate all the work that the designers went to to create these sister sites.</p>
<p>I found <a href="http://www.tutustation.co.uk">www.tutustation.co.uk</a> and <a href="http://www.bongstation.co.uk">www.bongstation.co.uk</a></p>
<h3>I contacted customer services&#8230;</h3>
<p>I entered the competition and checked back daily to see if my new findings were detailed on the site. Nope. Long after the competition ended, I emailed customer services and these are the responses I received:</p>
<blockquote><p>Sorry but this competition does not run anymore . I no longer have access to any information regarding this.</p>
<p>Regards,</p>
<p>Syd W</p></blockquote>
<p>I responded by saying &#8220;I know it doesn&#8217;t run anymore, that&#8217;s why I&#8217;m asking. How come you have no information regarding the competition? I would just like a list of the websites that were involved. Some information is available at [link to competition page] but it&#8217;s old and that information was available before the end of the competition.&#8221;</p>
<blockquote><p>I would [...] like to apologise for any confusion. A list of the &#8216;fake&#8217; websites and winners can be found by following the link below:</p>
<p>http://www.gamestation.co.uk/webapp/wcs/stores/servlet/HubArticleView?hubId=148280&#038;articleId=148287&#038;catalogId=10202&#038;langId=45&#038;storeId=10651</p>
<p>I apologise for any confusion this may have caused, and please do not hesitate to contact us with any further queries you may have.</p>
<p>Regards,</p>
<p>Sam F</p></blockquote>
<p>Haha, this is the same link that I had just emailed to them! I ask again: &#8220;I&#8217;m afraid that is not the case. I found http://tutustation.co.uk/ but that is not listed. Why can&#8217;t you provide the full information?&#8221;</p>
<blockquote><p>The competition regrettably is now over. If you have submitted your answer to the competition providers they will contact us direct if you are winner.</p>
<p>If you have any further queries please don&#8217;t hesitate to contact us.</p>
<p>Regards,</p>
<p>Charlotte H</p></blockquote>
<p>Their excuse of the competition being over implies that I should have asked while the competition was running! What a joke.  At least now though I have learned from this email that the competition providers are a separate company to gamestation, yet at the bottom of the competition page it clearly states: &#8220;The promoter of the competition is Gameplay (GB) Ltd. trading as Gamestation&#8221;.</p>
<p>For now I don&#8217;t think I will ever find out what the other fake gamestation sites were. Maybe I did find them all? My curiosity is not yet satisfied.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/fake-gamestation-competition-hiding-something/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Green garbled video on youtube</title>
		<link>http://blog.athe.la/green-garbled-video-on-youtube/</link>
		<comments>http://blog.athe.la/green-garbled-video-on-youtube/#comments</comments>
		<pubDate>Wed, 04 Aug 2010 22:16:17 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.athe.la/?p=311</guid>
		<description><![CDATA[Just got a new laptop and noticed a few youtube videos were green and garbled as if they had been corrupted.  I went and disabled hardware acceleration in the flash settings and now everything is fine]]></description>
			<content:encoded><![CDATA[<p>Just got a new laptop and noticed a few youtube videos were green and garbled as if they had been corrupted.  I went and disabled hardware acceleration in the flash settings and now everything is fine <img src='http://blog.athe.la/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/green-garbled-video-on-youtube/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Bases of DateTime</title>
		<link>http://blog.athe.la/the-bases-of-datetime/</link>
		<comments>http://blog.athe.la/the-bases-of-datetime/#comments</comments>
		<pubDate>Sat, 10 Jul 2010 16:50:53 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[great idea]]></category>
		<category><![CDATA[I'm just rambling]]></category>
		<category><![CDATA[Not very useful]]></category>
		<category><![CDATA[offbeat]]></category>

		<guid isPermaLink="false">http://blog.athe.la/?p=294</guid>
		<description><![CDATA[Let&#8217;s say you were coding up program that required a number of base 24, how would you go about it? Think now of how you would do it in your own programming language. No really&#8230; think about it and think about the resulting type. You&#8217;re returning a string right? Depending on your programming language, you <a href='http://blog.athe.la/the-bases-of-datetime/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s say you were coding up program that required a number of base 24, how would you go about it?  Think now of how you would do it in your own programming language.  No really&#8230; think about it and think about the resulting type.  You&#8217;re returning a string right?  Depending on your programming language, you might have gone for the approach of assuming a base 10 input, then using division and the remainder operator to go through a dictionary of strings a,b,c,A,B,C.  The type of the result is a string which is cumbersome to work with.  For example, how would you add 1 to it?  I&#8217;m guessing you&#8217;d have to convert it back to base 10, add one, then reconvert.  In my opinion that is a lot of (too much) hassle.</p>
<p>Well how about we think a little differently&#8230;  <span id="more-294"></span>We know that there are 24 hours in a day. How about we use a DateTime type to natively count using base 24?  We could initialise our datetime object at DateTime.MinValue and then use .AddHours(input) to start counting in base 24.  To increment or decrease the value we can use the .AddHours() function again to count in native base 24.  We have now got a native representation of base 24!</p>
<p>Check out this table of all the fancy bases you can get out of the DateTime type:</p>
<table>
<thead>
<tr>
<th>Base</th>
<th>Component of DateTime</th>
<th>To Add 1</th>
</tr>
</thead>
<tbody>
<tr>
<td>2</td>
<td>am/pm</td>
<td>Add 12 hours</td>
</tr>
<tr>
<td>2</td>
<td>Whether the year is a leap year</td>
<td>Add 2 years</td>
</tr>
<tr>
<td>7</td>
<td>Days of the week</td>
<td>Add 1 day</td>
</tr>
<tr>
<td>12</td>
<td>Hours in a day in 12-hour form</td>
<td>Add 1 hour</td>
</tr>
<tr>
<td>12</td>
<td>Months in a year</td>
<td>Add 1 month</td>
</tr>
<tr>
<td>24</td>
<td>Hours in a day in 24-hour form</td>
<td>Add 1 hour</td>
</tr>
<tr>
<td>28, 29, 30, 31</td>
<td>Days in a month</td>
<td>Add 1 day</td>
</tr>
<tr>
<td>60</td>
<td>Minutes in an hour</td>
<td>Add 1 minute</td>
</tr>
<tr>
<td>75*</td>
<td>Timezones</td>
<td>Dunno mate, is there an index you could use?</td>
</tr>
<tr>
<td>365, 366</td>
<td>Days in a year</td>
<td>Add 1 day</td>
</tr>
<tr>
<td>1000</td>
<td>Milliseconds in a second</td>
<td>Add 1 millisecond</td>
</tr>
</tbody>
</table>
<p>*Number of timezones differ per operating system.  Windows has 75 I think.</p>
<p>Also, if you&#8217;re clever, you would have noticed by now that all of the above is basically useless as you will always have to use a string dictionary to get it into a form ready for saving to a db, sending to another app or displaying to the user.  This has no use other than for the sheer fun of using weird methods to calculate numbers <img src='http://blog.athe.la/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/the-bases-of-datetime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Recent Purchases</title>
		<link>http://blog.athe.la/my-recent-purchases/</link>
		<comments>http://blog.athe.la/my-recent-purchases/#comments</comments>
		<pubDate>Sun, 07 Mar 2010 16:56:35 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.athe.la/?p=242</guid>
		<description><![CDATA[I&#8217;ve just recently bought 3ible.com and 3ible.co.uk based on nothing other than the fact that the domains look like the word Bible. Don&#8217;t know how I&#8217;m going to use these but I have them for two years so I have that time to think up a brilliant plan! I was thinking of sending all 3ible.com <a href='http://blog.athe.la/my-recent-purchases/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just recently bought <a href="http://3ible.com">3ible.com</a> and <a href="http://3ible.co.uk">3ible.co.uk</a> based on nothing other than the fact that the domains look like the word Bible.</p>
<p>Don&#8217;t know how I&#8217;m going to use these but I have them for two years so I have that time to think up a brilliant plan!</p>
<p>I was thinking of sending all 3ible.com traffic over to <a href="http://youversion.com">youversion.com</a> as I greatly admire their responsive ajaxy site.  It&#8217;s a huge step up from the stone-age biblenet.com and has lots of great translations <img src='http://blog.athe.la/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  (My current favourite is <a href="http://en.wikipedia.org/wiki/God%27s_Word_Translation_%28GW%29">GOD&#8217;S WORD translation</a>)</p>
<p>That is all for now, gonna be writing some more posts soon when I have some time!</p>
<p>Oh and Microsoft support is awesome <img src='http://blog.athe.la/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/my-recent-purchases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dynamic CSS Sprites</title>
		<link>http://blog.athe.la/dynamic-css-sprites/</link>
		<comments>http://blog.athe.la/dynamic-css-sprites/#comments</comments>
		<pubDate>Sat, 23 May 2009 23:04:30 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[background-position]]></category>
		<category><![CDATA[chart]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[dynamic]]></category>
		<category><![CDATA[pie chart]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://atheladev.wordpress.com/?p=99</guid>
		<description><![CDATA[Hi, ok if you don&#8217;t know what a sprite is then this post might get confusing quite quickly.  I&#8217;d suggest having a quick read up and find out what they are.  Simply put, the technique of using a CSS Sprite is so that you can reduce the number of HTTP requests browsers make to your <a href='http://blog.athe.la/dynamic-css-sprites/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Hi, ok if you don&#8217;t know what a sprite is then this post might get confusing quite quickly.  I&#8217;d suggest having a quick <a href="http://css-tricks.com/css-sprites/">read up</a> and find out what they are.  Simply put, the technique of using a CSS Sprite is so that you can reduce the number of HTTP requests browsers make to your server by only showing a <strong>portion</strong> of a larger image by changing the background-position (so that only the bit you want to see is showing through the object).  Another use for them (and this is the one we&#8217;ll be using here) is for convenience.</p>
<p>A <strong>pie chart </strong>of increasing values 0-100% could be stored as 20 separate independent images, named pie-[00-100].gif.  This however is inefficient for both the browser, the server, and the user.  The user will have to wait for the image to download if they haven&#8217;t already seen it (and hence cached it).  In my example I have 20 pie charts of increasing values in one image.  The background-position css property will dynamically change via server-side code to show only one of the 20 available pie charts.</p>
<p>Here&#8217;s the finished article:</p>
<p style="text-align: left;"><a href="http://blog.athe.la/wp-content/uploads/2009/05/pie-finalresult.gif"><img class="size-full wp-image-100 aligncenter" title="pie-finalresult" src="http://blog.athe.la/wp-content/uploads/2009/05/pie-finalresult.gif" alt="pie-finalresult" width="331" height="158" /></a>Here&#8217;s how it was done&#8230;</p>
<p><span id="more-99"></span></p>
<p style="text-align: left;">my models.py:</p>
<pre class="brush: python; title: ; notranslate">class Question(models.Model):
[........]
def offset(self, total, votes, full_length, slice_length):
    desired_length = (full_length - slice_length) * (votes/total)
    offset_pixels, remainder = divmod(desired_length,slice_length)
    offset_pixels *= slice_length
    if (remainder &gt; slice_length / 2.0):
        offset_pixels += slice_length
    return str(offset_pixels) + 'px'

def yes_pie_offset(self, full_length, slice_length):
    if self.num_votes &gt; 0:
        return self.offset(self.num_votes, self.num_yes, full_length, slice_length)
    else:
        return &quot;0px&quot;

def no_pie_offset(self, full_length, slice_length):
    if self.num_votes &gt; 0:
        return self.offset(self.num_votes, self.num_no, full_length, slice_length)
    else:
        return &quot;0px&quot;
</pre>
<p>my views.py</p>
<pre class="brush: python; title: ; notranslate">yes_pie = question.yes_pie_offset(630,30)
no_pie = question.no_pie_offset(630,30)</pre>
<p>template where it&#8217;s in use:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;div class=&quot;pie greenpie&quot; style=&quot;background-position:-{{yes_pie}} 0&quot;&gt;&lt;/div&gt;
</pre>
<p>Basically, the view gives the model&#8217;s methods two arguments, the entire length of the sprite, and how long each image is.  The methods will use two of their own values to come up with how much to fill the pie chart.  It will return a positive integer that is a multiple of the individual image length.  Remember to use a negative sign before the template tag if your sprite goes from low to high (as my example below)</p>
<p style="text-align: center;"><a href="http://blog.athe.la/wp-content/uploads/2009/05/pie-green.gif"><img class="size-medium wp-image-107 aligncenter" title="pie-green" src="http://blog.athe.la/wp-content/uploads/2009/05/pie-green.gif?w=300" alt="pie-green" width="300" height="14" /></a></p>
<p style="text-align: left;">I got this image from <a href="http://petewilliamsagency.com/css/examples/pie/">here </a>but had to add my own 0% pie chart to the very left</p>
<p style="text-align: left;">(sorry if you didn&#8217;t understand this, I&#8217;m very tired now and can&#8217;t explain myself very well)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/dynamic-css-sprites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Athela logo refreshed</title>
		<link>http://blog.athe.la/athela-logo-refreshed/</link>
		<comments>http://blog.athe.la/athela-logo-refreshed/#comments</comments>
		<pubDate>Wed, 29 Apr 2009 22:21:06 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://atheladev.wordpress.com/?p=91</guid>
		<description><![CDATA[Thanks to the great constructive criticism at http://www.logospire.com/logos/1155 I went and redesigned the logo.  (I&#8217;m loving logospire at the moment) I hope this new design fairs better!  I went for a clean tall and thin font and placed in some minimalist art above.  I could also experiment with some reflection (i don&#8217;t mean nasty web2.0 <a href='http://blog.athe.la/athela-logo-refreshed/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Thanks to the great constructive criticism at <a href="http://www.logospire.com/logos/1155">http://www.logospire.com/logos/1155</a> I went and redesigned the logo.  (I&#8217;m loving logospire at the moment)</p>
<p>I hope this new design fairs better!  I went for a clean tall and thin font and placed in some minimalist art above.  I could also experiment with some reflection (i don&#8217;t mean nasty web2.0 reflection, but some classy stuff) but for the moment I like this. Now i just got to find a way of implementing it into the site design i&#8217;ve come up with</p>

<a href='http://blog.athe.la/athela-logo-refreshed/logo2/' title='logo2'><img width="150" height="150" src="http://blog.athe.la/wp-content/uploads/2009/04/logo2-150x150.png" class="attachment-thumbnail" alt="logo2" title="logo2" /></a>
<a href='http://blog.athe.la/athela-logo-refreshed/logo2-dark/' title='logo2-dark'><img width="150" height="150" src="http://blog.athe.la/wp-content/uploads/2009/04/logo2-dark-150x150.png" class="attachment-thumbnail" alt="logo2-dark" title="logo2-dark" /></a>

]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/athela-logo-refreshed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My implementation of a twitter clone in django (Take 2)</title>
		<link>http://blog.athe.la/my-implementation-of-a-twitter-clone-in-django-take-2/</link>
		<comments>http://blog.athe.la/my-implementation-of-a-twitter-clone-in-django-take-2/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 21:44:12 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[social networking]]></category>
		<category><![CDATA[sourcecode]]></category>
		<category><![CDATA[tweets]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://atheladev.wordpress.com/?p=87</guid>
		<description><![CDATA[Ok, so I promised this a long time ago but I&#8217;ve hardly had the time to work on it and now it&#8217;s finally here.  A beta version of my twitter clone. http://www.speedyshare.com/635861674.html There is a setting you can add to your settings.py to change the number of chirps that show on a single page (default <a href='http://blog.athe.la/my-implementation-of-a-twitter-clone-in-django-take-2/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Ok, so I promised this a long time ago but I&#8217;ve hardly had the time to work on it and now it&#8217;s finally here.  A beta version of my twitter clone.</p>
<p><a href="http://www.speedyshare.com/635861674.html">http://www.speedyshare.com/635861674.html</a></p>
<p>There is a setting you can add to your settings.py to change the number of chirps that show on a single page (default 15): NUMBER_OF_CHIRPS_PER_PAGE</p>
<p>Lots of things have changed! Please look through the code, I&#8217;ve commented it so it should be easy to follow (please note as of yet there is no user recognition when @someone is typed in the content of a chirp- That&#8217;ll come later)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/my-implementation-of-a-twitter-clone-in-django-take-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>TimeToggle django custom filter</title>
		<link>http://blog.athe.la/timetoggle-filter/</link>
		<comments>http://blog.athe.la/timetoggle-filter/#comments</comments>
		<pubDate>Tue, 21 Apr 2009 18:21:45 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[custom filter]]></category>
		<category><![CDATA[date]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[filter]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[sourcecode]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timesince]]></category>
		<category><![CDATA[timetoggle]]></category>
		<category><![CDATA[usability]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://atheladev.wordpress.com/?p=76</guid>
		<description><![CDATA[It&#8217;s always good to keep web pages clean and free of clutter to focus the user experience on what really is important.  For this matter, it&#8217;s nice to be shown the difference between the time now and the time something was posted in a informal way such as below: So if you still wanted this <a href='http://blog.athe.la/timetoggle-filter/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s always good to keep web pages clean and free of clutter to focus the user experience on what really is important.  For this matter, it&#8217;s nice to be shown the difference between the time now and the time something was posted in a informal way such as below:</p>
<p><a href="http://blog.athe.la/wp-content/uploads/2009/04/timetoggle-normal.png"><img class="size-full wp-image-78 alignnone" title="timetoggle-normal" src="http://blog.athe.la/wp-content/uploads/2009/04/timetoggle-normal.png" alt="timetoggle-normal" width="510" height="81" /></a></p>
<p>So if you still wanted this uncluttered view but still desired to allow the user to see the exact moment that was, then maybe you&#8217;d have to let the user check a checkbox in their user settings are show an exact time when the view of that object is more detailed.  However I&#8217;ve come up with the idea that on mouseover the nice and informal &#8216;time since&#8217; can be replaced with an exact time of the post in an easy custom filter.</p>
<p>Here&#8217;s the same chirp as shown above but with the mouse hovering over the time.</p>
<p><a href="http://blog.athe.la/wp-content/uploads/2009/04/timetoggle-mouseover.png"><img class="size-full wp-image-77 alignnone" title="timetoggle-mouseover" src="http://blog.athe.la/wp-content/uploads/2009/04/timetoggle-mouseover.png" alt="timetoggle-mouseover" width="510" height="81" /></a></p>
<p>When the mouse is rolled back out, the informal time since is displayed again.</p>
<p>Seamless user experience showing more detail when the user wants it <img src='http://blog.athe.la/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<pre class="brush: python; title: ; notranslate">
from django.utils import timesince, dateformat

@register.filter
def timetoggle(time, id):
link = &quot;&lt;span id=\&quot;&quot;+str(id) + &quot;timesince\&quot;&gt; about &lt;a href=\&quot;#\&quot; onmouseover=\&quot;document.getElementById('&quot;+str(id)+&quot;timeactual').style.display=''; document.getElementById('&quot;+str(id)+&quot;timesince').style.display='none';return false;\&quot;&gt;&quot;
link += timesince.timesince(time)
link += &quot; ago&lt;/a&gt; &lt;/span&gt;&lt;span id=\&quot;&quot;+str(id)+&quot;timeactual\&quot; style='display:none'&gt; at &lt;a href=\&quot;#\&quot; onmouseout=\&quot;document.getElementById('&quot;+str(id)+&quot;timeactual').style.display='none'; document.getElementById('&quot;+str(id)+&quot;timesince').style.display='';return false;\&quot;&gt;&quot;
link += dateformat.DateFormat(time).format(&quot;g:ia o\\n l jS N Y&quot;)
link += &quot;&lt;/a&gt;&lt;/span&gt;&quot;
return mark_safe(link)
</pre>
<p>Use in the following way: {{ time_object|timetoggle:unique_identifier }}   Here&#8217;s an example: {{ post.pub_date|timetoggle:post.id }}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/timetoggle-filter/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Athela is pronounced</title>
		<link>http://blog.athe.la/how-athela-is-pronounced/</link>
		<comments>http://blog.athe.la/how-athela-is-pronounced/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 11:23:25 +0000</pubDate>
		<dc:creator>Dan Cooper</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://atheladev.wordpress.com/?p=71</guid>
		<description><![CDATA[It&#8217;s like saying &#8220;a seller&#8221; with a lisp. /əˈθɛlər/ uh-the-luh]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s like saying &#8220;a seller&#8221; with a lisp.</p>
<p>/əˈθɛlər/<br />
<em>uh</em>-the-luh</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.athe.la/how-athela-is-pronounced/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

