<?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>James Baster</title>
	<atom:link href="http://jarofgreen.co.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://jarofgreen.co.uk</link>
	<description>Blog about Technology from Scotland</description>
	<lastBuildDate>Fri, 22 Feb 2013 10:01:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Android Shake Detection Library</title>
		<link>http://jarofgreen.co.uk/2013/02/android-shake-detection-library/</link>
		<comments>http://jarofgreen.co.uk/2013/02/android-shake-detection-library/#comments</comments>
		<pubDate>Sat, 16 Feb 2013 16:14:47 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=492</guid>
		<description><![CDATA[I recently wanted an Android shake detection library and came across lots of examples like this which are great for explaining the basics of how the sensor system works. Unfortunately, what they detect is simply a fast acceleration. Simply passing &#8230; <a href="http://jarofgreen.co.uk/2013/02/android-shake-detection-library/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I recently wanted an Android shake detection library and <a href="http://stackoverflow.com/questions/5271448/how-to-detect-shake-event-with-android">came across lots of examples like this</a> which are great for explaining the basics of how the sensor system works. Unfortunately, what they detect is simply a fast acceleration. Simply passing the phone to someone else quickly could trigger a &#8220;shake&#8221;. <a href="https://github.com/JMB-Technology-Limited/Shoogle-For-Yer-Photos-Android/blob/master/app/src/uk/co/jarofgreen/lib/ShakeDetectActivity.java">So let&#8217;s develop a better one</a>.</p>
<p><span id="more-492"></span></p>
<p>The idea is to store acceleration data for the last couple of seconds and examine that. To trigger a shake event we look for the acceleration changing direction on one axis a couple of times. This isn&#8217;t a perfect system, as someone moving the phone in one direction only in stops and starts could produce an acceleration and deceleration that would trigger the algorithm.</p>
<p>But with this problem it&#8217;s about striking a balance between making it easy to shake and trigger but not so sensitive that just passing the phone to someone else or putting it down triggers it.</p>
<p>After we detect a shake, we ignore any events for a second. We don&#8217;t want two shakes to close together.</p>
<p>One thing to note is that when the screen shuts off due to user inactivity, your application is still in the foreground and is still detecting shakes which may make for a slightly odd user experience. To get round this, when the activity is active I&#8217;ve just locked the screen on. See the <a href="https://github.com/JMB-Technology-Limited/Shoogle-For-Yer-Photos-Android/blob/master/app/src/uk/co/jarofgreen/shakefromgallery/MainActivity.java">onResume() and onPause() methods on this class</a>.</p>
<p>The <a href="https://github.com/JMB-Technology-Limited/Shoogle-For-Yer-Photos-Android/blob/master/app/src/uk/co/jarofgreen/lib/ShakeDetectActivity.java">final class is here</a> and <a href="https://github.com/JMB-Technology-Limited/Shoogle-For-Yer-Photos-Android/blob/master/app/src/uk/co/jarofgreen/lib/ShakeDetectActivityListener.java">the listener class is here</a>. To use it, simply have your activity create this class then pass a listener. Make sure you call onPause() and onResume(). Below is the minimum code needed.</p>
<pre>import uk.co.jarofgreen.lib.ShakeDetectActivity;
import uk.co.jarofgreen.lib.ShakeDetectActivityListener;

public class MainActivity extends Activity {

    ShakeDetectActivity shakeDetectActivity;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        shakeDetectActivity = new ShakeDetectActivity(this);
        shakeDetectActivity.addListener(
        new ShakeDetectActivityListener() {
            @Override
            public void shakeDetected() {
                MainActivity.this.triggerShakeDetected();
            }
        });
    }

    @Override
    protected void onResume() {
        super.onResume();
        shakeDetectActivity.onResume();
    }

    @Override
    protected void onPause() {
        shakeDetectActivity.onPause();
        super.onPause();
    }

    public void triggerShakeDetected() {
        // do something!
    }

}</pre>
<p>It&#8217;s on <a href="https://play.google.com/store/apps/details?id=uk.co.jarofgreen.shakefromgallery">github as part of this app</a> and <a href="https://play.google.com/store/apps/details?id=uk.co.jarofgreen.shakefrompreset.kittens">I&#8217;ve used it in other apps</a>. Feedback and patches welcome!</p>
<p><strong>EDIT 22nd Feb:</strong> I made library easier to use, updated instructions.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2013/02/android-shake-detection-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When you own a domain use it properly</title>
		<link>http://jarofgreen.co.uk/2013/02/when-you-own-a-domain-use-it-properly/</link>
		<comments>http://jarofgreen.co.uk/2013/02/when-you-own-a-domain-use-it-properly/#comments</comments>
		<pubDate>Thu, 07 Feb 2013 13:35:00 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Custom Domains]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=480</guid>
		<description><![CDATA[It&#8217;s common to see people advertising a website on a domain they own like mydomain.co.uk yet advertise an email address like user765@gmail.com or bobby.k.l@yahoo.com instead of hello@mydomain.co.uk, which is insane. For starters, something like  hello@mydomain.co.uk or  info@mydomain.co.uk looks much more &#8230; <a href="http://jarofgreen.co.uk/2013/02/when-you-own-a-domain-use-it-properly/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s common to see people advertising a website on a domain they own like <em>mydomain.co.uk</em> yet advertise an email address like <em>user765@gmail.com</em> or <em>bobby.k.l@yahoo.com</em> instead of <em>hello@mydomain.co.uk</em>, which is insane.<span id="more-480"></span></p>
<p>For starters, something like  <em>hello@mydomain.co.uk</em> or  <em>info@mydomain.co.uk</em> looks much more professional.</p>
<p>But mainly, it&#8217;s insane because your tying yourself to one email provider and account for ever more. Once you start handing out that email address, you have to make sure you keep it.</p>
<p>What happens if <a href="http://www.theatlantic.com/magazine/archive/2011/11/hacked/308673/?single_page=true">something happens to your account and you get locked out</a>? Or what happens if the service goes away or starts charging? If the service already charges, are you happy to pay that for ever more?</p>
<p>In contrast, you can have <em>hello@mydomain.co.uk</em> and move the actual provider of email servers between the best of thousands of companies. When you do this, your email address will not change &#8211; and thus all the people you have ever given your address to will still be able to reach you. Now you aren&#8217;t at the mercy of one company any more!</p>
<p>(I was at <a href="http://opentechcalendar.co.uk/index.php/event/216">an event recently</a> and politely told this to two people. They were grateful so I thought I&#8217;d blog it.)</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2013/02/when-you-own-a-domain-use-it-properly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Project; City Outdoors</title>
		<link>http://jarofgreen.co.uk/2013/02/new-project-city-outdoors/</link>
		<comments>http://jarofgreen.co.uk/2013/02/new-project-city-outdoors/#comments</comments>
		<pubDate>Fri, 01 Feb 2013 14:42:05 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[City Outdoors]]></category>
		<category><![CDATA[Edinburgh City Sci-Quest]]></category>
		<category><![CDATA[Edinburgh Outdoors]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=463</guid>
		<description><![CDATA[Recently one project has been launched and another announced all from the same code base. It all started with NESTA&#8217;s Make It Local competition. This required councils to open some new data and start a new digital service with it. &#8230; <a href="http://jarofgreen.co.uk/2013/02/new-project-city-outdoors/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently one project has been launched and another announced all from the same code base.<span id="more-463"></span></p>
<p>It all started with <a href="http://www.nesta.org.uk/areas_of_work/public_services_lab/past_projects_public_services_lab/make_it_local_scotland">NESTA&#8217;s Make It Local competition</a>. This required councils to open some new data and start a new digital service with it. The code should also be Open Source. Me and Edinburgh Council entered, and won the prize: a grant to fund development! Today the result <a href="http://www.edinburghoutdoors.org.uk/">Edinburgh Outdoors</a> was launched (<a href="http://www.theedinburghreporter.co.uk/2013/01/edinburgh-outdoors-launches-new-parks-app/">Article and video</a>).</p>
<p><img class="aligncenter size-full wp-image-474" title="Edinburgh Outdoors Screenshot" src="http://jarofgreen.co.uk/wp-content/uploads/2013/02/EdinburghOutdoorsScreenshot.png" alt="" width="500" height="348" /></p>
<p>After that the Edinburgh International Science Festival got interested. With any public charity money is tight, and they couldn&#8217;t have afforded to develop from scratch. But by building on the Open Source code we managed to put a project together and yesterday <a href="http://sciencefestival.co.uk/whats-on/categories/activity/edinburgh-city-sci-quest">the festival programme was announced with this: the City Sci-Quest</a>! Some new features are being developed for this and they will be released Open Source to.</p>
<p>The <a href="https://github.com/organizations/City-Outdoors">Open Source software is released on Github</a> (Wed and Android, iPhone/iOS coming soon) and at the moment it&#8217;s more of a code dump than a full project. Things like documentation are needed, and making the code more modular would be good.</p>
<p>So what does this all do anyway?</p>
<p>It lets you run a website and native apps that list points of interest on a map and in categories and lets people find them. Users and anonymous browsers can comment or upload photos (moderation is an option).</p>
<p>There is also a game element. Administrators can set questions that users have to answer, with points being awarded and a leader-board being shown. Different types of questions can be set:</p>
<ul>
<li><em>Freetext</em> lets the user type in anything as an answer. The administrators can set multiple correct answers so if the answer has two spellings that are popularly used then both can be recognised as correct.</li>
<li><em>Multiple Choic</em>e lets points be awarded based on how many tries the user takes, with several answers having the capability to get points. One answer can get more points than others.</li>
<li><em>Higher Or Lower</em> is a question with a numerical answer. As the user guesses they are told &#8220;to high&#8221; or &#8220;to low&#8221;. Points are awarded based on the number of tries taken. A range of numbers (eg 3.5 to 4.1) can be set as the correct answer .</li>
<li><em>Content</em> questions ask the user to send a photo or some text to be displayed publicly, and the moderator can award points.</li>
</ul>
<p>For every question, an additional explanation can be shown to the user after they have got it correct. This allows the game to be an educational experience.</p>
<p>Users can currently log in with an email address and password or Twitter.</p>
<p>There is a web admin interface and a very basic CMS is included. One way of showing static content from this is by month; so you have one page with all the months in the submenu and a different static content page for each one.</p>
<p>The Website is PHP &amp; MySQL.  A lot of data is versioned in the database, although there aren&#8217;t friendly user interfaces to view that history.</p>
<p>I&#8217;m really looking forwards to seeing this idea develop, and also hopefully seeing this develop into a full Open Source platform.</p>
<p>Others involved are Sally Kerr at Edinburgh Council, Matt Wright at Edinburgh International Science Festival, <a href="http://www.linkedin.com/in/mariusciocanel">Marius Ciocanel</a> who is coding the iOS/iPhone version and <a href="http://eskimoonline.com/">Eskimo</a> who did the Edinburgh Outdoors design.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2013/02/new-project-city-outdoors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Technical talks should introduce concepts</title>
		<link>http://jarofgreen.co.uk/2012/08/technical-talks-should-introduce-concepts/</link>
		<comments>http://jarofgreen.co.uk/2012/08/technical-talks-should-introduce-concepts/#comments</comments>
		<pubDate>Sun, 19 Aug 2012 18:09:25 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/2012/08/technical-talks-should-introduce-concepts/</guid>
		<description><![CDATA[One of the things that I think is key to a good technical talk is to introduce concepts instead of getting bogged down in code details. You see, most programmers are self taught. Which means that if they know something &#8230; <a href="http://jarofgreen.co.uk/2012/08/technical-talks-should-introduce-concepts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One of the things that I think is key to a good technical talk is to introduce concepts instead of getting bogged down in code details.</p>
<p><span id="more-459"></span></p>
<p>You see, most programmers are self taught. Which means that if they know something can be done and they want to do it, they&#8217;ll just sit down with Google search results until they crack it.</p>
<p>So teach concepts instead. The idea will stick in the programmers mind and when they need it, maybe years later, it&#8217;ll pop up again.</p>
<p>For example, I found learning Android programming easier because I had seen a talk that explained the basic concepts of the activity life cycle and the intent system that sends messages between activities.</p>
<p>Or the talk about messaging systems that I saw was perfect for web developers. I think when I finally came to use a messaging system I used a different one from the one that was demoed (I used Beanstalkd and I can&#8217;t even remember for sure which one was demoed) but what was important is that the talk taught me the concept of moving the workload from the front of your web app to the back end.</p>
<p>So when I was finding talks for <a href="http://techmeetup.co.uk">Tech Meetup</a>, I would find talks like an introduction to user testing not because I thought all programmers should be experts in it (I wouldn&#8217;t call myself an expert) but because I thought everyone should know the basic concepts of user testing.</p>
<p>I&#8217;m not saying you should never have any technical details in a talk; sometimes a technical detail or demo communicates the idea much more effectively than words ever will, and its usually more entertaining. But always remember to concentrate on the concept.</p>
<p><em>I just gave a talk on running local meetups at Oggcamp, and this is the first blog post from that. Also check out <a href="http://opentechcalendar.co.uk/index.php/Welcome">Open Tech Calender</a> -listing tech events and bringing them together.<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2012/08/technical-talks-should-introduce-concepts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How about a mobile note app backed by git?</title>
		<link>http://jarofgreen.co.uk/2012/08/how-about-a-mobile-note-app-backed-by-git/</link>
		<comments>http://jarofgreen.co.uk/2012/08/how-about-a-mobile-note-app-backed-by-git/#comments</comments>
		<pubDate>Mon, 13 Aug 2012 18:13:48 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[GitNotes]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=432</guid>
		<description><![CDATA[I want a notes app on my mobile devices, and I want the content synced across all my devices and available at my desktop. Now there are tons of companies clamoring to offer such a service if I just open &#8230; <a href="http://jarofgreen.co.uk/2012/08/how-about-a-mobile-note-app-backed-by-git/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I want a notes app on my mobile devices, and I want the content synced across all my devices and available at my desktop. Now there are tons of companies clamoring to offer such a service if I just open an account with them, but <a href="http://www.wired.com/gadgetlab/2012/08/apple-amazon-mat-honan-hacking/">because I&#8217;m concerned about the security and safety of my data</a> I&#8217;d ideally like one I can control and back up.<span id="more-432"></span></p>
<p>How can we do this? We could write an open source app that works with notes and talks to an open source server, but setting up a server is still a pain and a barrier for some people.</p>
<p>Here&#8217;s a simple suggestion: Let&#8217;s use <a href="http://git-scm.com/">git</a> as the backend storage and transport mechanism. You write your note in a text editor, commit it and push and your done!</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/08/git-notes-stickie-small.jpg"><img class="alignright size-full wp-image-436" title="git-notes-stickie-small" src="http://jarofgreen.co.uk/wp-content/uploads/2012/08/git-notes-stickie-small.jpg" alt="" width="200" height="267" /></a>Setting up a server is now easy because there are tons of git providers out there. <a href="https://bitbucket.org/">Bitbucket</a> give you private repositories for free for instance.</p>
<p>And look at all the features you get out of the box!</p>
<ul>
<li>History</li>
<li>Merging</li>
<li>Off-line access &#8211; I thought this would be standard for notes apps but I&#8217;ve seen a review of one that didn&#8217;t have it, yet was still praised. Really?</li>
<li>Team work &#8211; just share a git repo between several users</li>
<li>Desktop tools</li>
<li>Backups &#8211; any repository is self-containing and can be used to replace a lost one, and if you want more security it&#8217;s easy to take a backup elsewhere!</li>
</ul>
<p>The only flaw I can see is the requirement to store a copy of the repository on the device with full history, which could take up a lot of space. But we are talking simple text notes here, so hopefully not to much space would be used. And if you don&#8217;t care about history you can always regularly start a new repository and copy your notes across to reclaim some space.</p>
<p>Sure, this is a bit of a geeky solution and would probably never go mainstream &#8211; but sometimes there is nothing wrong in aiming for the geek audience.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2012/08/how-about-a-mobile-note-app-backed-by-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exploiting Tech Meetups automatic Tweets from it&#8217;s Email List</title>
		<link>http://jarofgreen.co.uk/2012/08/exploiting-tech-meetups-tweet-email-list/</link>
		<comments>http://jarofgreen.co.uk/2012/08/exploiting-tech-meetups-tweet-email-list/#comments</comments>
		<pubDate>Fri, 10 Aug 2012 09:04:25 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Open Tech Calendar]]></category>
		<category><![CDATA[Tech Meetup]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=447</guid>
		<description><![CDATA[Tech Meetup uses Twitter Feed to tweet any new threads started on it&#8217;s Google Groups email list. How can we exploit this for fun and profit? Simply by putting text in the email subject that gets turned into active links &#8230; <a href="http://jarofgreen.co.uk/2012/08/exploiting-tech-meetups-tweet-email-list/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://techmeetup.co.uk/">Tech Meetup</a> uses <a href="http://twitterfeed.com/">Twitter Feed</a> to tweet any new threads started on it&#8217;s Google Groups email list. How can we exploit this for fun and profit?<span id="more-447"></span></p>
<p>Simply by putting text in the email subject that gets turned into active links in the tweet.</p>
<p>So when I announced <a href="http://opentechcalendar.co.uk/">Open Tech Calendar</a> I used this email subject &#8220;Announcing Open Tech Calendar http://opentechcalendar.co.uk/  @OpenTechCalUK&#8221;. And <a href="https://twitter.com/techmeetup/status/227673390822080512">this is the tweet that resulted</a>:</p>
<p><img class="aligncenter size-full wp-image-449" title="tweet" src="http://jarofgreen.co.uk/wp-content/uploads/2012/08/tweet.png" alt="" width="546" height="354" /></p>
<p>The URL and the twitter username became clickable, meaning readers had one less click to reach the real content.</p>
<p>Before you get to carried away, let me just remind you that <strong>Tech Meetup&#8217;s email list is moderated</strong> and all spam or stupidity will be dumped.</p>
<p>So, please keep your posts to the community useful and informative &#8211; but here&#8217;s how you can get that little bit more out of them when you do.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2012/08/exploiting-tech-meetups-tweet-email-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Let&#8217;s put phone numbers in the DNS system</title>
		<link>http://jarofgreen.co.uk/2012/07/phone-numbers-in-dns/</link>
		<comments>http://jarofgreen.co.uk/2012/07/phone-numbers-in-dns/#comments</comments>
		<pubDate>Wed, 18 Jul 2012 18:54:41 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Phone Numbers In DNS]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=396</guid>
		<description><![CDATA[Why do we still have to deal with phone numbers? Why are we still having to remember long numbers, or having to go and look up the number for a pizza place? Or telling someone our number, and checking they &#8230; <a href="http://jarofgreen.co.uk/2012/07/phone-numbers-in-dns/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Why do we still have to deal with phone numbers? Why are we still having to  remember long numbers, or having to go and look up the number for a  pizza place? Or telling someone our number, and checking they got it  right? Or looking up our own number, because we can&#8217;t remember it? It&#8217;s a pain isn&#8217;t it?</p>
<p><span id="more-396"></span>When the internet first started, every computer attached to it had a number and people had to remember specific numbers. However, it quickly got to the stage where that was unworkable. Who can remmeber the number for Google is &#8220;<a href="http://173.194.34.101/">http://173.194.34.101/</a>&#8220;? So we invented the Domain Name System (DNS), which converts a name like &#8220;<a href="https://www.google.com/">http://google.com</a>&#8221; into the right number. (Every computer attached to the internet still has a specific number, but we don&#8217;t have to care about that anymore!)</p>
<p>Pretty cool huh? This is a problem we solved for website names decades ago. So why haven&#8217;t we solved it for phone numbers yet? Why are we still printing phone books so people can look up numbers of local taxi firms? Why do people still have to ask for their friends phone number&#8217;s a second, third or fourth time if they lose their phone? Why isn&#8217;t there a system to convert names into numbers for us?</p>
<p>Let&#8217;s go for a really quick win here with a simple, open, worldwide, scalable system; <strong>let&#8217;s just stick phone numbers in a DNS record</strong>.</p>
<p>Then you can have a simple Android app &#8211; enter a URL:</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/07/Screenshot1-copy.png"><img class="alignnone size-full wp-image-398" title="Screenshot1 (copy)" src="http://jarofgreen.co.uk/wp-content/uploads/2012/07/Screenshot1-copy.png" alt="" width="320" height="270" /></a></p>
<p>and get a list:</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/07/Screenshot2-copy.png"><img class="alignnone size-full wp-image-399" title="Screenshot2 (copy)" src="http://jarofgreen.co.uk/wp-content/uploads/2012/07/Screenshot2-copy.png" alt="" width="320" height="208" /></a></p>
<p>click on a number to jump to the dialer, check the number, and make your call! <a href="https://play.google.com/store/apps/details?id=uk.co.jarofgreen.phonenumbersindnsandroid">Download the app now from the app store</a> or if you don&#8217;t have an android phone, <a href="http://phonedns.jarofgreen.co.uk/">there are some PHP scripts that let you play with this online</a>.</p>
<p>Here&#8217;s what a DNS entry looks like &#8211; a simple country code, number and optional description:</p>
<blockquote><p>v=phone1 44 3700100222 BBC Scotland</p></blockquote>
<p>(Detailed instructions <a href="https://github.com/jarofgreen/PhoneNumbersInDNSAndroid">on this format are in github</a>.)</p>
<p>One website can have several phone numbers and let the user choose which one, aided by the description. An open system means there are lots of tools people can build on top of this. Reusing DNS means a whole bunch of tricky technical problem are solved for us; uniqueness of names, caching, etc. Subdomain&#8217;s can be used so many users can be under one domain (eg jeff@gmail.com can choose to publish his numbers under jeff.gmail.com)</p>
<p><em>Does this mean numbers have to be public?</em></p>
<p>Answer #1: Actually, I could publish my work phone on &#8220;jamesbaster.co.uk&#8221; and my personal phone on &#8220;personal.jamesbaster.co.uk&#8221;. And yes, that is security through obscurity. Oh noes! But that&#8217;s how the current system works. What&#8217;s stopping you from calling Brian Cox right this second? Only the fact that you don&#8217;t know his number. Once you know his number, there&#8217;s no security. You can call him any time of the night or day &#8211; or at least until he gets a restraining order.</p>
<p>Answer #2: Well, yeah. But if we can solve the problem for public numbers with such a simple system that would still be fantastic. There are plenty of businesses that would benefit from having their numbers easier to find.</p>
<p><em>But no-one wants to type a domain name into an app!</em></p>
<p>The screenshots above are just a demo. What if you were browsing a website on your phone, and you could press the phone button to instantly get a list of numbers for that site to choose from? There are lots of possibilities. Apps could warn the user if it was a premium or international call.</p>
<p><em>How much are you charging?</em></p>
<p>It&#8217;s all <strong>Free and Open Source</strong> &#8211; both <a href="https://github.com/jarofgreen/PhoneNumbersInDNSAndroid">the Android code</a> and <a href="https://github.com/jarofgreen/PhoneNumbersInDNSPHP">some PHP scripts</a>. The only way this will take off is if everyone can get stuck in. Download the app from the <a href="https://play.google.com/store/apps/details?id=uk.co.jarofgreen.phonenumbersindnsandroid">Android app store</a> or <a href="http://phonedns.jarofgreen.co.uk/">play with the website</a>.</p>
<p><em>What next?</em></p>
<p>Let&#8217;s see what people think of this &#8230;..please comment or blog/tweet/share if you like it!</p>
<p>(And if it&#8217;s popular, there are lots of improvements to be made to the sample apps &#8211; more robust parsing, save to address book, documentation on how to use libraries from them in your apps, etc)</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2012/07/phone-numbers-in-dns/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>With the rise of mobile browsing, fixed page elements must die.</title>
		<link>http://jarofgreen.co.uk/2012/06/fixed-page-elements-must-die/</link>
		<comments>http://jarofgreen.co.uk/2012/06/fixed-page-elements-must-die/#comments</comments>
		<pubDate>Tue, 05 Jun 2012 09:35:56 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=378</guid>
		<description><![CDATA[One common trick web authors do because they think it&#8217;s neat is make elements of a webpage fixed so as the user scrolls around part of the webpage stays still. &#8220;This is so important the viewer must always see it!&#8221;, &#8230; <a href="http://jarofgreen.co.uk/2012/06/fixed-page-elements-must-die/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>One common trick web authors do because they think it&#8217;s neat is make elements of a webpage fixed so as the user scrolls around part of the webpage stays still. &#8220;This is so important the viewer must always see it!&#8221;, they think.</p>
<p>Sometimes it&#8217;s done with good intents; a rich web app may decide a toolbar should always be visible, for instance. Usually it&#8217;s done with scummy intents; &#8220;If I make the viewer see SHARE ME! buttons wherever they scroll, eventually they&#8217;ll give up and do it!&#8221;.</p>
<p>Either way, read on for a simple visual guide as to why this must stop.<span id="more-378"></span></p>
<p>(I don&#8217;t mean to pick on these sites especially, and I&#8217;m sorry. Your just one of many that do this, and you were a handy example. Nothing personal.)</p>
<p style="text-align: left;"><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/06/jQuerypp_top.png"><img class="aligncenter size-full wp-image-379" title="jQuerypp_top" src="http://jarofgreen.co.uk/wp-content/uploads/2012/06/jQuerypp_top.png" alt="" width="587" height="359" /></a>If you scroll down, the menu stays with you, like this:</p>
<p style="text-align: left;"><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/06/jQuerypp_middle.png"><img class="aligncenter size-full wp-image-380" title="jQuerypp_middle" src="http://jarofgreen.co.uk/wp-content/uploads/2012/06/jQuerypp_middle.png" alt="" width="587" height="359" /></a>Neat, huh?</p>
<p>Now, do you all remember that browsing on mobile devices is on the rise? Good. What do many mobile devices have in common? A small screen. What do people do on small screens? They zoom in to read the text. What happens with your clever floating menu then?</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/06/Screenshot_2012-06-05-07-49-02.png"><img class="aligncenter size-medium wp-image-386" title="Screenshot_2012-06-05-07-49-02" src="http://jarofgreen.co.uk/wp-content/uploads/2012/06/Screenshot_2012-06-05-07-49-02-168x300.png" alt="" width="168" height="300" /></a></p>
<p>Congratulations. Your website is now completely unreadable. Here are some more examples:</p>
<p style="text-align: center;"><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/06/Screenshot_2012-05-28-09-20-09.png"><img class="size-medium wp-image-387 aligncenter" title="Screenshot_2012-05-28-09-20-09" src="http://jarofgreen.co.uk/wp-content/uploads/2012/06/Screenshot_2012-05-28-09-20-09-168x300.png" alt="" width="168" height="300" /></a><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/06/Screenshot_2012-05-23-09-35-17.png"><img class="size-medium wp-image-388 aligncenter" title="Screenshot_2012-05-23-09-35-17" src="http://jarofgreen.co.uk/wp-content/uploads/2012/06/Screenshot_2012-05-23-09-35-17-168x300.png" alt="" width="168" height="300" /></a></p>
<p>In summary: use only when appropriate (clue: almost never), and test carefully.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2012/06/fixed-page-elements-must-die/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>QR codes on business cards should be contacts not URLs.</title>
		<link>http://jarofgreen.co.uk/2012/05/qr-codes-on-business-cards-should-be-contacts/</link>
		<comments>http://jarofgreen.co.uk/2012/05/qr-codes-on-business-cards-should-be-contacts/#comments</comments>
		<pubDate>Thu, 31 May 2012 17:41:33 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[QR Code]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=367</guid>
		<description><![CDATA[Most of the time people put a URL as the QR code so they have records of when it&#8217;s scanned. I even heard of one firm where the staff had a competition to see who could get their QR code &#8230; <a href="http://jarofgreen.co.uk/2012/05/qr-codes-on-business-cards-should-be-contacts/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img title="More..." src="../wp-includes/js/tinymce/plugins/wordpress/img/trans.gif" alt="" />Most of the time people put a URL as the QR code so they have records  of when it&#8217;s scanned. I even heard of one firm where the staff had a  competition to see who could get their QR code scanned the most.</p>
<p>But the problem with that is that firstly it doesn&#8217;t work if the user  is off line, and secondly, you make the user perform an extra action to  get to anything good.</p>
<p>What&#8217;s the alternative? You can embed several pieces of information including a URL in one code with a contact record (VCARD).<span id="more-367"></span></p>
<p>This is what comes up when you scan the QR code on my business card:</p>
<p><img class="aligncenter" title="Screenshot_2012-05-31-18-39-27.png" src="http://jarofgreen.co.uk/wp-content/uploads/2012/05/wpid-Screenshot_2012-05-31-18-39-27.png" alt="Scanning My QR Code" width="500" height="281" /></p>
<p>The user is instantly presented with options to email, call or visit my website &#8211; not to mention saving the whole lot to their phone book for later use.</p>
<p>I just wanted to briefly mention this as today someone said it was the first good use of a QR code they had seen. See this? This is my smug face.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2012/05/qr-codes-on-business-cards-should-be-contacts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>What makes programming at hackdays great fun?</title>
		<link>http://jarofgreen.co.uk/2012/05/hackdays/</link>
		<comments>http://jarofgreen.co.uk/2012/05/hackdays/#comments</comments>
		<pubDate>Mon, 07 May 2012 16:15:09 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Culture Hack Scotland]]></category>
		<category><![CDATA[FestaFriend]]></category>
		<category><![CDATA[Hackdays]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=353</guid>
		<description><![CDATA[Hackdays, events that bring many people from different backgrounds together to work on ideas, can be great fun for many reasons. But for computer programmers there is one particular reason it&#8217;s great fun. Remember, the aim of the hack day &#8230; <a href="http://jarofgreen.co.uk/2012/05/hackdays/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } -->Hackdays, events that bring many people from different backgrounds together to work on ideas, can be great fun for many reasons. But for computer programmers there is one particular reason it&#8217;s great fun.</p>
<p>Remember, the aim of the hack day is to explore an idea with other people, to see what is possible and hopefully kickstart the project into life after the hackday. You&#8217;ll probably end up building a prototype of the idea, to demonstrate how it works. The energy and ideas that are unearthed as people from different backgrounds work together is amazing.</p>
<p><span id="more-353"></span></p>
<p>[Note I'm talking about hackdays where a team gets together to explore a new idea. Some hackdays are about playing with a new technology, and those are different.]</p>
<p>Normally when computing programming, you have to think about the fact that your software will live on and hopefully grow and change. Other programmers will come in later and have to pick up the pieces and work out what is going on – and that includes you, looking at your work from a year ago wondering what on earth you thought you were doing. (There&#8217;s nothing worse after a long debugging session than discovering the moron responsible was you.)</p>
<p>To support that, we have come up with a whole load of professional “best practices” we follow when writing software.</p>
<ul>
<li>Requirements</li>
<li>Architecture &amp; 	Design</li>
<li>Modularity</li>
<li>Code Building</li>
<li>Commenting</li>
<li>Naming conventions</li>
<li>Data validation</li>
<li>Testing</li>
<li>Automated Testing 	(eg Unit Testing)</li>
<li>Continuous 	Integration</li>
<li>Source Code &amp; 	Release Management</li>
</ul>
<p>However, all that is because we expect our software to live on into the future.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/05/hack_day_by_Oolong.jpg"><img class="alignright size-full wp-image-359" title="hack_day_by_Oolong" src="http://jarofgreen.co.uk/wp-content/uploads/2012/05/hack_day_by_Oolong.jpg" alt="" width="180" height="240" /></a>Let me make a prediction now about the software you will write over the hackday:</p>
<p style="text-align: center;"><em> “Most code written at this event while developing ideas will be rewritten from scratch or almost completely rewritten before it is used for real.”</em></p>
<p>With that in mind, can we come up with a list of  professional “best practices” for programming at a hackday?</p>
<ul>
<li>Just make the 	protoype work!</li>
</ul>
<p>That&#8217;s it. Really. If you write a Unit Test at a hackday, you&#8217;re probably doing it wrong.</p>
<p>At one hackday, I did <a href="http://festafriend.com/">a site for finding dates at a festival</a>. When you signed up there was a field to type your birthday in. During the final presentation, my team mate Sarah typed in a random string as she didn&#8217;t want to tell everyone her birthday. The whole site crashed; I hadn&#8217;t even bothered to write the error-handling code to deal with what would happen if users didn&#8217;t put in their birthday. Quickly, I told her to go back and put a real date in and it was fine.</p>
<p>I suggest you think about what will make an effective protoype &#8211; what will really get the idea across and impress others? At one hackday, we put together a <a href="https://heresahand.org.uk/">messaging system for carers</a>. We secretly found out the phone numbers of half the judges and organisers, and during our final presentation sent a message on our website. 20 seconds later 10 phones went off around the room as our message was texted out  –  a humorous and very effective demonstration of our idea.</p>
<p>So have fun!</p>
<p><em>This weekend I&#8217;ll be a mentor at <a href="http://kosovoinnovationcamp.wordpress.com/">this hackday in Pristina</a> &#8211; looking forward to it!</em></p>
<p><em>[Photo by <a href="http://www.flickr.com/photos/0olong/5706787120/">Oolong</a>.]<br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2012/05/hackdays/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flocklight: highlighting connections in a crowd</title>
		<link>http://jarofgreen.co.uk/2012/04/flocklight/</link>
		<comments>http://jarofgreen.co.uk/2012/04/flocklight/#comments</comments>
		<pubDate>Sun, 29 Apr 2012 10:26:07 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Culture Hack Scotland]]></category>
		<category><![CDATA[Flocklight]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=328</guid>
		<description><![CDATA[For Culture Hack Scotland this year I worked on an idea I came up with that week. I feel I didn&#8217;t really do the hack day properly; I ended up working on my own and not using any of the &#8230; <a href="http://jarofgreen.co.uk/2012/04/flocklight/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>For <a href="http://www.welcometosync.com/hack/">Culture Hack Scotland</a> this year I worked on an idea I came up with that week. I feel I didn&#8217;t really do the hack day properly; I ended up working on my own and not using any of the data. But the event was the perfect opportunity to test the idea.</p>
<p>Flocklight pulls all the twitter data for those attending or mentioning an event like a conference, and tries to highlight useful data about the connections between people. The aim is to provide you with information so you make the most of an event. For instance, are others you know going? Do you have something in common with a stranger there who you can go and chat to?</p>
<p><span id="more-328"></span></p>
<p>(The aim is not to produce some kind of score and crown someone the &#8220;winner&#8221;. I&#8217;m sure a gamification expert could do that and lots of people would love that &#8211; and indeed I was told about a recent conference with a score board for those that tweeted the most &#8211; but I personally think that&#8217;s meaningless, and I&#8217;m much more interested in exposing information to help you have a better time in real life.)</p>
<p>By 4pm on Sat (the deadline) we were tracking 148 users, 2272 follows between those users, 9354 tweets and 1417 instances of people mentioning another user in those tweets.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Flocklight-Front-Page.png"><img class="aligncenter size-medium wp-image-330" title="Flocklight Front Page" src="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Flocklight-Front-Page-115x300.png" alt="" width="115" height="300" /></a>For each user, we had a page that exposed who they followed there and who they had conversations with. To be clear, we only tracked follows and conversations between two users we were already tracking; if a user followed someone who wasn&#8217;t there we didn&#8217;t care.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Flocklight-me.png"><img class="aligncenter size-large wp-image-331" title="Flocklight-me" src="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Flocklight-me-1024x835.png" alt="" width="640" height="521" /></a>You could click on &#8220;relationship&#8221; to see the relationship between any two users:</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Flocklight-relationship.png"><img class="aligncenter size-large wp-image-332" title="Flocklight-relationship" src="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Flocklight-relationship-1024x594.png" alt="" width="640" height="371" /></a>We also did some really basic word analysis so you can search for people who are talking about things you are interested in. At Culture Hack, sleep was mentioned a lot:</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Flocklight-sleep1.png"><img class="aligncenter size-full wp-image-334" title="Flocklight-sleep" src="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Flocklight-sleep1.png" alt="" width="644" height="623" /></a>We pulled in data on everyone who tweeted with the hashtag and everyone on the <a href="https://twitter.com/#!/synchq/chsparticipants">curated list set up before the event</a>. This means we had people who weren&#8217;t actually at the event but had tweeted because they were interested in it. I don&#8217;t think that&#8217;s a problem; there are still links there that may be interesting.</p>
<p>But I did add an &#8220;attending&#8221; flag on the system, so people could be marked as attending or not. At the hack day this was filled by marking those on the twitter list as attending and everyone else not attending.</p>
<p><strong>So, what&#8217;s next for this?</strong> The main thing for the idea is to explore, probably by trial and error over more events, what information is signal and what is noise. What do people really want to know?</p>
<p>But here is other stuff you could add, apart from improving what&#8217;s already there and some good design:</p>
<ul>
<li>Allow users to set the attending flag. Logging in with Twitter is already implemented; users could set the attending flag for themselves. If a person hasn&#8217;t set the attending flag for themselves, others could be allowed to set it. (Some events may need multiple attending flags; the recent <a href="http://whiskyweb.co.uk/">WhiskyWeb</a> conference had two days and many people attended the first but not the second.)</li>
<li>Show common relationships between two people; is there a third party they both know that could help with introductions? The problem here is that unlike LinkedIn (another service that does that) the definition of a connection on twitter is more vague. Just because Bob follows Alice, you can&#8217;t assume Alice has even heard of Bob.</li>
<li>Start using follows from Twitter lists, and data from favorited tweets.</li>
<li>We could end up pulling private data (more on that later) so we have to be careful. At the moment we discard such data but can we use it in any way whilst respecting the private flag?</li>
<li>We track followers; can we track old follows as distinct to any new follows made during the event?</li>
<li>Pull attendee lists from places like Lanyard.</li>
<li>Search for links between people using others not at the event. For instance, maybe Bob and Alice are linked by Jane, but Jane&#8217;s hasn&#8217;t even heard of the event &#8211; but knowing they have a connection in common is still good.</li>
<li>Graph analysis; can we identify clusters of people at events who know each other?</li>
<li>Can we use other social networks like LinkedIn or Facebook? There may be less useful data there, and it&#8217;s harder to get.</li>
</ul>
<p>Technically, here are the details: <strong>It&#8217;s done in PHP and MySQL and there isn&#8217;t much to say except <a href="https://dev.twitter.com/docs/rate-limiting#rest">Twitters Rate Limiting</a> can be a giant problem.</strong> (I wasn&#8217;t the only one using Twitter and the venue&#8217;s IP was blocked almost as soon as the hack day started. Almost all my API developing had to be done on a remote server over SSH; great fun!)</p>
<p>At the moment it&#8217;s all done by pulling from the REST API and you have to do that a lot. You are constantly searching for new mentions of the hashtag. For ever user you care about, you are making two calls regularly; one for the tweets and one for the followers. It all adds up, and we haven&#8217;t started polling lists yet.</p>
<p>You are allowed many more calls as an authenticated user to a Twitter app and we started doing that. Apparently calls from authenticated users are measured per user; so if you can encourage users to log in you can make calls as them (however then you start seeing private data and you have to be careful).</p>
<p>Using realtime API&#8217;s may help a bit &#8211; and anyway a service that updates in realtime is much better than a slow one.</p>
<p><strong>The end result?</strong> Several people really liked the idea and I know of one business that is going to be shown it in the coming weeks. The code I did is on <a href="https://github.com/jarofgreen/flocklight">GitHub</a>, and I want to thank <a href="http://www.rohangunatillake.com">Rohan</a> for coming up with the name and <a href="http://www.pixelandbird.com/">Carol</a> for a rushed yet great job on the logo.</p>
<p>While there are lots of technical things that could be done, <strong>next is proving the central idea by asking is any of this data actually useful to attendees?</strong> I think lots of trials are needed to find out (and if anyone wants to invite me to a conference to try it out, <a href="http://jamesbaster.co.uk/">get in touch</a>!)</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2012/04/flocklight/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>I wanna make a GPS Maze game, but with a twist.</title>
		<link>http://jarofgreen.co.uk/2012/04/gps-maze-game/</link>
		<comments>http://jarofgreen.co.uk/2012/04/gps-maze-game/#comments</comments>
		<pubDate>Sat, 14 Apr 2012 20:23:52 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[GPS]]></category>
		<category><![CDATA[OpenStreetMap]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Real Virtual Maze]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=301</guid>
		<description><![CDATA[I want to make one of those GPS maze games, where a maze appears on your phone and you walk around in real life to navigate the virtual maze – but with a twist. You see, all of these games &#8230; <a href="http://jarofgreen.co.uk/2012/04/gps-maze-game/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><!-- 		@page { margin: 2cm } 		P { margin-bottom: 0.21cm } -->I want to make one of those GPS maze games, where a maze appears on your phone and you walk around in real life to navigate the virtual maze – but with a twist.<span id="more-301"></span></p>
<p>You see, all of these games I&#8217;ve seen before just take a maze and put it down wherever you happen to be at the moment, <a href="http://download.cnet.com/GPSMaze/3000-20416_4-75429269.html">like this one</a>:</p>
<p><a href="http://download.cnet.com/GPSMaze/3000-20416_4-75429269.html"><img class="aligncenter" title="Maze Game" src="http://asset3.cbsistatic.com/cnwk.1d/i/tim/2011/03/20/fmimg6847376043699937512_257x386.jpg" alt="" width="257" height="386" /></a></p>
<p>I don&#8217;t mean to pick on this one especially (sorry!) but I think that&#8217;s a bit rubbish. For one, it doesn&#8217;t take account of any natural barriers or features that might make the maze more interesting. And it could be actively dangerous &#8211; any roads around?</p>
<p><strong>So here&#8217;s the twist: I want people to be able to bring up a map and draw a maze on top of it</strong>, using their local knowledge of the area to incorporate natural features. On this website, there would be a everyone&#8217;s mazes with ratings and comments. You would be able to download a maze to your phone, and play!</p>
<p>It could be a great way to explore a new area, or see a familiar area in a different light. And it could be fun to draw mazes on areas you know, and set people puzzling.</p>
<p>I&#8217;ve just spent a day at the <a href="http://whiskyweb.co.uk/">WhiskyWeb</a> conference hackday, and managed to make a good start on this project. There&#8217;s a website where you can design your map and export the data (The maze traces are a bit hard to see at the moment &#8211; click for full version):</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Screenshot-at-2012-04-14-205949.png"><img class="aligncenter size-medium wp-image-305" title="Real Virtual Maze Website after hackday" src="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Screenshot-at-2012-04-14-205949-300x153.png" alt="" width="300" height="153" /></a></p>
<p>And a native Android app where a map centered on where you are shows you the maze (with only one wall around the hackday venue, this one is a bit of an easy maze):</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Screenshot-at-2012-04-14-161835.png"><img class="aligncenter size-full wp-image-304" title="Real Virtual Maze App after Hackday" src="http://jarofgreen.co.uk/wp-content/uploads/2012/04/Screenshot-at-2012-04-14-161835.png" alt="" width="438" height="723" /></a></p>
<p>I was sitting on this idea for a bit, but my experiences today again taught me the value of being open &#8211; from talking to people today I realised that one big and hard feature I thought was essential actually isn&#8217;t. (<a href="http://binarykitten.com/">Thanks Kat!</a>)</p>
<p>So this is clearly early days &#8211; and I have no idea when I&#8217;ll find time to work on it &#8211; but let&#8217;s see what happens. Check the <a href="https://github.com/jarofgreen/Real-Virtual-Maze-Android">app</a> and <a href="https://github.com/jarofgreen/Real-Virtual-Maze-Web">website</a> out on github but don&#8217;t expect much yet!</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2012/04/gps-maze-game/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Dealing with Twitter apps inflexible permissions</title>
		<link>http://jarofgreen.co.uk/2012/01/twitter-apps-inflexible-permissions/</link>
		<comments>http://jarofgreen.co.uk/2012/01/twitter-apps-inflexible-permissions/#comments</comments>
		<pubDate>Sat, 21 Jan 2012 10:58:46 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[showshift]]></category>
		<category><![CDATA[Twitter]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=286</guid>
		<description><![CDATA[Facebook apps, which can ask for any set of permissions from a user at any time, can start by requesting some basic permissions and can request others later when the users trust has been won. In contrast, Twitter apps are &#8230; <a href="http://jarofgreen.co.uk/2012/01/twitter-apps-inflexible-permissions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><!-- p { margin-bottom: 0.21cm; } -->Facebook apps, which can ask for any set of permissions from a user at any time, can start by requesting some basic permissions and can request others later when the users trust has been won. In contrast, Twitter apps are very inflexible. You must set what permissions you want and ask for them at the start, with no chance to change them.</p>
<p>If your Twitter app could work equally well with both read-only or write permissions, what do you do? If you ask for read permissions part of your app won&#8217;t work, and if you ask for write permissions then some users may be scared to give them to you and just abandon your app.</p>
<p><span id="more-286"></span></p>
<p>For <a href="http://showshift.co.uk/">ShowShift</a>, I had this problem and I decided to try a different approach. I made 2 Twitter apps, one with read-only permissions and one with read and write permissions.</p>
<p><strong>When the user signs up</strong></p>
<p>The login link they first click is for the read-only app; then they are logged into the app and can use it at will. But they are prompted that if they let us have write permissions, they get more features.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/01/Ask-For-More-Permissions-Screenshot.png"><img class="aligncenter size-full wp-image-290" title="Ask For More PermissionsScreenshot" src="http://jarofgreen.co.uk/wp-content/uploads/2012/01/Ask-For-More-Permissions-Screenshot.png" alt="" width="696" height="428" /></a></p>
<p>The yes button takes them to Twitter to authorise the write app.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2012/01/Ask-For-More-Permissions-Screenshot-2.png"><img class="aligncenter size-full wp-image-291" title="Ask For More Permissions Screenshot 2" src="http://jarofgreen.co.uk/wp-content/uploads/2012/01/Ask-For-More-Permissions-Screenshot-2.png" alt="" width="648" height="511" /></a></p>
<p><strong>Behind the scenes</strong></p>
<p>You now may have two sets of tokens for each user; one for the read-only app and one for the write app. Store them in separate columns in your user table and then use what ever is appropriate for what your doing.</p>
<pre>CREATE TABLE user_account (
  id BIGINT NOT NULL,
  ....
  read_only_oauth_token VARCHAR(250),
  read_only_oauth_secret VARCHAR(250),
  write_oauth_token VARCHAR(250),
  write_oauth_secret VARCHAR(250),
  PRIMARY KEY(id)
);</pre>
<p><strong>When the user returns</strong></p>
<p>The login link they first click is for the read-only app; so the login and sign up link is the same. This is enough to authenticate them and let them into the app.</p>
<p><strong>Is this worth it?</strong></p>
<p>Is having two apps, and the fuss of having to ask the user for authorisation twice to much? Is the proportion of users who are put off by your app asking for write permissions to start with so small that this added complication isn&#8217;t worth it? For some apps, maybe.</p>
<p>However, the users of ShowShift are going to be quite geeky to start with because of what it does, so I thought I&#8217;d give it a go and see what happens. The challenge now is to tweak the user interface to make it easy to understand. Comments welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2012/01/twitter-apps-inflexible-permissions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Can someone write a present organising app?</title>
		<link>http://jarofgreen.co.uk/2011/12/present-organising-app/</link>
		<comments>http://jarofgreen.co.uk/2011/12/present-organising-app/#comments</comments>
		<pubDate>Tue, 13 Dec 2011 17:42:41 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=273</guid>
		<description><![CDATA[My family has recently been emailing and texting round as we sort getting presents for everyone &#8211; making sure they get something they want whilst not getting two of the same thing … shouldn&#8217;t there be an app for that? &#8230; <a href="http://jarofgreen.co.uk/2011/12/present-organising-app/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><!-- p { margin-bottom: 0.21cm; } -->My family has recently been emailing and texting round as we sort getting presents for everyone &#8211; making sure they get something they want whilst not getting two of the same thing … shouldn&#8217;t there be an app for that?</p>
<p><span id="more-273"></span>FaceBook seems like a good basis for this as then you can build on top of the existing social graph.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/12/present-buying-app.png"><img class="alignright size-full wp-image-282" title="present-buying-app" src="http://jarofgreen.co.uk/wp-content/uploads/2011/12/present-buying-app.png" alt="" width="327" height="354" /></a>You could log in, and tell it what presents you were getting for someone. Then if a mutal friend logged in, they could see that list. So if I said I was getting my sister a cat, my brother could log in and see that and not get her a 2<sup>nd</sup> cat, and instead plan to buy her some cat toys. (We&#8217;re not getting her a cat. A pet is for life, etc &#8230;)</p>
<p>You would need to be able to specify the present was for more than one person, so you can buy for couples. A mobile interface you can use when out shopping would be essential to.</p>
<p>You could say what events the present was for, and while a person would have obvious events pre-filled like Christmas (or other suitable holidays for them) and their birthday, if someone added a special event like “Retirement party” then others could see that, and know you were planning on getting them that comedy pipe and pair of slippers.</p>
<p>People could have wish lists of things they wanted, with links for purchasing. These could even be pulled automatically from places like Amazon.</p>
<p>I found <a href="http://www.familygiftorganizer.com">one site</a> from 2005, but it doesn&#8217;t seem to let you see what other family members have brought for someone, which seems a central feature. Amazon also have a Gift Organizer, but again, as far as I can tell it doesn&#8217;t have that social element.</p>
<p>Of course, some would say that this ruins the spirit of christmas and presents should be a more personal thing. Think of the competitve anxieties this might start! Up to you. But some would use it.</p>
<p>Ironically, I would have realised this could be a good app earlier if I hadn&#8217;t left my christmas present shopping till the last minute. So anyone want to write this? I&#8217;m off shopping.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/12/present-organising-app/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Do Job Searching sites clean data?</title>
		<link>http://jarofgreen.co.uk/2011/11/do-job-searching-sites-clean-data/</link>
		<comments>http://jarofgreen.co.uk/2011/11/do-job-searching-sites-clean-data/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 23:44:43 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=266</guid>
		<description><![CDATA[You would think a basic rule for CV websites is if is a candidate hasn&#8217;t logged in for over a year then assume the data is out of date and flag it or remove it. Got a comedy phone call &#8230; <a href="http://jarofgreen.co.uk/2011/11/do-job-searching-sites-clean-data/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You would think a basic rule for CV websites is if is a candidate hasn&#8217;t  logged in for over a year then assume the data is out of date and flag it or remove it.</p>
<p><span id="more-266"></span>Got a comedy phone call from a recruiter last month. He asked if I was looking for work and I explained I was a freelancer and looking for contracts.</p>
<p>He got very truculent, saying &#8220;It says here your looking for work!&#8221;</p>
<p>&#8220;Where did you get my details from?&#8221;</p>
<p>&#8220;CV Library*&#8221;</p>
<p>&#8220;That&#8217;s 2 years old!&#8221;</p>
<p>He paused for a second, then exclaimed &#8220;It says here it&#8217;s a year old!&#8221;</p>
<p>Seriously people, if the information you have is a year out of date then check before acting on that information. It&#8217;s not hard.</p>
<p>But then he calmed down and got very morose and sad, complaining how hard it was these days &#8211; &#8220;finding you guys is like gold dust&#8221;. Bless.</p>
<p>* These fools also just sent me a newsletter without an unsubscribe link, not recommended.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/11/do-job-searching-sites-clean-data/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What I got up to at this weekends Moving Targets hackday; replay social media with ShowShift</title>
		<link>http://jarofgreen.co.uk/2011/10/hackday-replay-social-media-with-showshift/</link>
		<comments>http://jarofgreen.co.uk/2011/10/hackday-replay-social-media-with-showshift/#comments</comments>
		<pubDate>Sun, 23 Oct 2011 19:40:19 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Hackdays]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[showshift]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=229</guid>
		<description><![CDATA[What I got up to at this weekends Moving Targets hackday; we wrote a system that replays social media buzz as it happened on demand, so if your watching your favourite TV show later than everyone else you can still &#8230; <a href="http://jarofgreen.co.uk/2011/10/hackday-replay-social-media-with-showshift/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><!-- p { margin-bottom: 0.21cm; }a:link {  } -->What I got up to at this weekends <a href="http://movingtargets.org.uk/">Moving Targets</a> hackday; we wrote a system that replays social media buzz as it happened on demand, so if your watching your favourite TV show later than everyone else you can still see everyone&#8217;s comments in context.<span id="more-229"></span></p>
<p><em>On Friday and Saturday, the Moving Targets event brought together developers and people from industry to work on the problem of audience engagement. This is the idea our team talked about with industry people on friday afternoon, the idea I pitched to the judging panel, one of two ideas they picked and the idea me and <a href="http://rhiaro.co.uk/">Amy Guy</a> spent the night hacking up.</em></p>
<p><strong>The ideal situation</strong> is to watch an event on TV (Film, Show, Sporting match) while taking in the social media commentary from others, so you get a full experience as part of a community of fans (some BBC shows broadcast Twitter details at the start to encourage this).</p>
<p><strong>The problem is</strong> so many people watch after the initial broadcast, either from on-demand services like the BBC iPlayer or a recording device. When you do this, you miss out on the social media experience &#8211; and you have to be careful not to read any spoilers beforehand.</p>
<p><strong>So why not have a service</strong> that re-plays social media messages as they happened, but at a later date? Any messages you add as you watch can be seen by others watching later on.</p>
<p><strong>Here&#8217;s the end result; </strong>a web service that can import tweets for any event and make them available.</p>
<p>Ideally, you&#8217;d have better login mechanisms than this:</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/10/Login.png"><img class="aligncenter size-full wp-image-230" title="Login" src="http://jarofgreen.co.uk/wp-content/uploads/2011/10/Login.png" alt="" width="447" height="211" /></a></p>
<p>Then you can list the videos we have a conversation for.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/10/list-videos.png"><img class="aligncenter size-full wp-image-231" title="list videos" src="http://jarofgreen.co.uk/wp-content/uploads/2011/10/list-videos.png" alt="" width="520" height="575" /></a></p>
<p>You can open the video in a new window or &#8220;Stream&#8221; the messages &#8211; this shows you some controls to control the timeline, the messages and a box for you to post your own.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/10/Stream.png"><img class="aligncenter size-full wp-image-233" title="Stream" src="http://jarofgreen.co.uk/wp-content/uploads/2011/10/Stream.png" alt="" width="496" height="736" /></a></p>
<p>The blue marks above the progress bar indicate when messages appear; so if there was a rush of messages about the 14 minute mark (maybe that&#8217;s when the first goal was scored?) you can jump straight there.</p>
<p>One pain point is that you have to manually sync the message feed to what your watching; it would be better if we could use a microphone or camera to see the broadcast and do the synchronisation ourselves. Sadly, that was a bit beyond us in one night.</p>
<p>This page was designed with mobile devices in mind, and was tested all night in iPhone and Android. At one point, we even broke out Amy&#8217;s kindle for a laugh, and were amazed to see it working perfectly.</p>
<p>The watch option on the home screen appears only for YouTube videos and embeds the player right in the page.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/10/watch.png"><img class="aligncenter size-full wp-image-234" title="watch" src="http://jarofgreen.co.uk/wp-content/uploads/2011/10/watch.png" alt="" width="480" height="845" /></a></p>
<p>You can add any video you want.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/10/add-videos.png"><img class="aligncenter size-full wp-image-235" title="add videos" src="http://jarofgreen.co.uk/wp-content/uploads/2011/10/add-videos.png" alt="" width="520" height="165" /></a></p>
<p>We talked about options for</p>
<p>* filtering out the noise of the conversation by having some indicator of how long ago the message was posted or only showing messages from your friends.</p>
<p>* allowing spam messages to be reported to admins for review.</p>
<p>* adding notifications so if you replied to a message the original author could be notified and carry on the conversation.</p>
<p>* collecting some amazing data about which bits of a programme people paused at, fast-forwarded or re-watched.</p>
<p>All night, other coders kept remarking how similar the UI looked to <a href="http://soundcloud.com/">SoundCloud</a> &#8211; a service I have heard of but still haven&#8217;t seen.</p>
<p>Oh, and it was done in PHP &amp; MySQL with thanks to jQuery, Smarty and <a href="http://www.bigv.io/">Bytemarks Bigv.io</a> &#8211; thought their beta programme, I was able to get a massively over-specced Debian+Apache+APC  virtual machine for free that worked perfectly.</p>
<p>Special thanks to my team mate <a href="http://rhiaro.co.uk/">Amy</a>, <a href="https://twitter.com/JonnGalea">Jonathan Galea</a> for making us some great graphics and <a href="http://www.youtube.com/watch?v=XAg5KjnAhuU">Pockets for producing the video we used all night as a test piece</a>.</p>
<p><strong>What else is there?</strong></p>
<p>We did a quick google search on Friday afternoon and found nothing. However, a more leisurely search just now found <a href="http://tweetrewinder.com/">Tweet Rewinder</a> &#8211; a service that replays your tweets for you. We did say at the hackday that it seemed like such a simple idea and we were surprised no-one had done it before, and it turned out they had &#8211; even if literally <a href="http://www.malcolmcoles.co.uk/blog/tweet-rewinder-beta/">only by 1 month</a>.</p>
<p><strong>It was still fun &#8230;.</strong></p>
<p>It was still a fun hackday, and hopefully demonstrates how even one day and nights work can produce an idea and a solid proof of concept you can show to people to develop the idea further.  Thanks to all involved.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/10/hackday-replay-social-media-with-showshift/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>See photos from the other side of the world</title>
		<link>http://jarofgreen.co.uk/2011/10/see-photos-from-the-other-side-of-the-world/</link>
		<comments>http://jarofgreen.co.uk/2011/10/see-photos-from-the-other-side-of-the-world/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 16:56:51 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[OpenLayers]]></category>
		<category><![CDATA[OpenStreetMap]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=202</guid>
		<description><![CDATA[Months ago, I was at a hack day in Edinburgh, and a team were working on a idea they called black and white. I ended up doing a version of it as a simple webpage. It was based on color.com, &#8230; <a href="http://jarofgreen.co.uk/2011/10/see-photos-from-the-other-side-of-the-world/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><!-- p { margin-bottom: 0.21cm; } -->Months ago, I was at a hack day in Edinburgh, and a team were working on a idea they called black and white. I ended up doing a version of it as a simple webpage.</p>
<p>It was based on <a href="http://www.color.com/">color.com</a>, the photo sharing service that shows you photos that others have taken around you. They thought this was daft &#8211; after all you know what&#8217;s around you, your already there. What you don&#8217;t know is what&#8217;s at the other side of the world. They wanted a service were you could take a photo, and you would get one back from the other side of the world.<span id="more-202"></span></p>
<p>They said they would be happy with just a mere fraction of the <a href="http://techcrunch.com/2011/03/24/color/">mind-boggling $41Million that color.com raised</a> &#8211; really, just a tiny fraction and they&#8217;d be very content. (Same goes for me please!)</p>
<p>They then tried to write iPhone and Android apps, via an amusing journey during which they fired one of their team mates by twitter half way through, who then turned out to be their flatmate. “You fired your own flatmate via twitter? Couldn&#8217;t you have just left a note?” “That&#8217;s how we roll.”</p>
<p>Why not do a proof of concept with a simple webpage and the <a href="http://www.flickr.com/">Flickr</a> API, I thought? And finally I did. You can <a href="http://blackandwhite.jarofgreen.co.uk/">play with it here</a>, and <a href="https://github.com/jarofgreen/blackandwhite">the code is on github</a>.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/10/blackandwhite1.png"><img class="aligncenter size-full wp-image-208" title="blackandwhite1" src="http://jarofgreen.co.uk/wp-content/uploads/2011/10/blackandwhite1.png" alt="" width="817" height="605" /></a><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/10/blackandwhite2.png"><img class="aligncenter size-full wp-image-209" title="blackandwhite2" src="http://jarofgreen.co.uk/wp-content/uploads/2011/10/blackandwhite2.png" alt="" width="817" height="602" /></a><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/10/blackandwhite3.png"></a><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/10/blackandwhite3.png"><img class="aligncenter size-full wp-image-218" title="blackandwhite3" src="http://jarofgreen.co.uk/wp-content/uploads/2011/10/blackandwhite3.png" alt="" width="815" height="598" /></a></p>
<p>So how does it work? To display the map it uses <a href="http://openlayers.org/">OpenLayers</a>, a Javascript library that allows you to put maps from many sources on a webpage and allow an user to interact with them. It has a built in class for showing <a href="http://www.openstreetmap.org/">OpenStreetMap</a>, the world map that anyone can edit in a wikipedia fashion.</p>
<p>Then we use <a href="http://www.maxmind.com/app/javascript_city">a service from MaxMind</a> to locate the user and set the initial position on the map. You can include a Javascript file in your code, which will contain several functions that return geographical information. All the information is hardcoded at the server side so the resultant file is only about 500 bytes in size and will work in any Javascript capable browser.</p>
<p>When the user clicks go, a simple bit of PHP converts the coordinates to the other side of the world then sets up the 2nd page. This calls another bit of PHP by AJAX to actually load the photos. This means the page displays quickly to the user.</p>
<p>The Flickr API is nice and clear, and returns XML that is easy to turn into useful JSON. It does seem to error a lot tho &#8211; it&#8217;ll say it has 200 pages of results but the results XML will be empty. We do a bounding box search, set quite wide to ensure it finds some results. That is a bit kludgy &#8211; it could do something like start with a narrow bounding box, but if no results come back you could expand to a much larger one. You wouldn&#8217;t want to do that more than once tho, for the sake of Flickrs server load and your page load times.</p>
<p>Then some simple Javascript helped by <a href="http://jquery.com/">Jquery</a> lets the user explore the photos!</p>
<p>What could be improved? We already have groupings so if some photos are on exactly the same location they will be shown with one marker, but what if two photos are very close together but the user is zoomed out? It will look like there is only one marker there &#8211; some clustering would help with that.</p>
<p>A slideshow mode that jumped from location to location to show all the photos would be cool to.</p>
<p>But there you go. When working on this I found a whole batch of photos from New Zealand that made it look fantastic: mountains, lakes, beaches and 20 men sitting on brightly painted tractors at some kind of parade &#8211; I want to go!</p>
<p><em>You can <a href="http://blackandwhite.jarofgreen.co.uk/">play with it here</a>, and <a href="https://github.com/jarofgreen/blackandwhite">the code is on github</a>.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/10/see-photos-from-the-other-side-of-the-world/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using a custom domain on your service should not mean downtime!</title>
		<link>http://jarofgreen.co.uk/2011/05/custom-domain-should-not-mean-downtime/</link>
		<comments>http://jarofgreen.co.uk/2011/05/custom-domain-should-not-mean-downtime/#comments</comments>
		<pubDate>Sat, 28 May 2011 11:23:33 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Custom Domains]]></category>
		<category><![CDATA[DrupalGardens]]></category>
		<category><![CDATA[Google Apps]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=186</guid>
		<description><![CDATA[Many web hosting services like DrupalGardens.com and WordPress.com allow you to use your own domain. However, the set up procedure for many of them means that it is impossible to use an existing domain without some kind of downtime. The &#8230; <a href="http://jarofgreen.co.uk/2011/05/custom-domain-should-not-mean-downtime/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Many web hosting services like <a href="http://www.drupalgardens.com/">DrupalGardens.com</a> and <a href="http://wordpress.com/">WordPress.com</a> allow you to use your own domain. However, the set up procedure for many of them means that it is impossible to use an existing domain without some kind of downtime.</p>
<p><span id="more-186"></span></p>
<p>The problem is that many insist you point your DNS records at them, then set up the options for the custom domain. They have checks that won&#8217;t allow you to do it the other way round. This means that in the time between you changing your DNS records and setting up your custom domain, you have unavoidable downtime.</p>
<p>I&#8217;ve <a href="http://jarofgreen.co.uk/2011/03/goodbye-wordpress-com-why-im-self-hosting/">previously ranted about WordPress.com</a>, which wont let you continue until you point your name servers at it. This means that every service on that domain, including those that have nothing to do with websites and are considered vital, like, oh, email, will have unavoidable downtime.</p>
<p>Last week I moved a site into <a href="http://www.drupalgardens.com/">DrupalGardens.com</a>, and they insist that a CNAME record exists before you continue. Which means some unavoidable downtime  for your website, but at least your email survives.</p>
<p>I haven&#8217;t tried other popular services like <a href="http://www.tumblr.com/docs/en/custom_domains">Tumblr</a> and <a href="http://posterous.com/help/custom_domain">Posterous</a>, but looking at the instructions it implies they have the same problem.</p>
<p>I guess it&#8217;s a result of lazy design; after all you should really check the DNS is set up correctly and if you do it when the user sets up the domain it&#8217;s a nice simple workflow for all concerned.</p>
<p>So who gets this right? <a href="http://www.google.com/apps">Google Apps</a>. You can set up an Google App control panel, add all your user accounts and aliases, wait for the users to log in, run training sessions (if needed) and check they are happy and then, and only then, must you change your MX records. Which means that you can move an existing domain into Google Apps with no disruption to your incoming email at all. Brilliant!</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/05/custom-domain-should-not-mean-downtime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing FestaFriend, FakeFringe and FringeWars</title>
		<link>http://jarofgreen.co.uk/2011/05/introducing-festafriend-fakefringe-and-fringewars/</link>
		<comments>http://jarofgreen.co.uk/2011/05/introducing-festafriend-fakefringe-and-fringewars/#comments</comments>
		<pubDate>Sun, 08 May 2011 10:27:27 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[FakeFringe]]></category>
		<category><![CDATA[FestaFriend]]></category>
		<category><![CDATA[FringeWars]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=172</guid>
		<description><![CDATA[This year, Edinburgh Festivals Innovation Lab is working hard to open up data about the  festivals. I&#8217;ve just spent a day at their hackday, Culture Hack Scotland and now I want to announce 3 sites. FakeFringe challenges players to pick &#8230; <a href="http://jarofgreen.co.uk/2011/05/introducing-festafriend-fakefringe-and-fringewars/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This year, <a href="http://www.festivalslab.com/">Edinburgh Festivals Innovation Lab</a> is working hard to open up data about the  festivals. I&#8217;ve just spent a day at their hackday, <a href="http://culturehackscotland.com/">Culture Hack Scotland</a> and now I want to announce 3 sites.</p>
<p><span id="more-172"></span></p>
<p><a href="http://fakefringe.com/">FakeFringe</a> challenges players to pick out the fake fringe show from the real one. You can submit a fake show and see how many players you can fool.</p>
<p><a href="http://fringewars.com/">FringeWars</a> pits fringe shows head to head and asks you to vote.</p>
<p>Both these sites compile charts of the best and worst shows, and are intended in a playful spirit. But they have a serious side; the chart of best shows should be valuable data for people writing Fringe shows marketing in the future.</p>
<p>I worked on both these sites before the hack day, and they are open now. At the introduction to the hack day, I announced an idea and showed all the work I had done on it so far: a 10 minute mock up of the home page:</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/05/FestivalFriends.png"><img class="aligncenter size-full wp-image-176" title="FestivalFriends" src="http://jarofgreen.co.uk/wp-content/uploads/2011/05/FestivalFriends.png" alt="" width="640" height="316" /></a></p>
<p>The fantastic Sarah Drummond from <a href="http://www.wearesnook.com/snook/">WeAreSnook</a> joined me, and we made a full set of mockups and a working prototype over one hectic day. The slideshow with our <a href="http://www.slideshare.net/wearesnook/festafriend">final presentation is here</a>:</p>
<div style="width:425px" id="__ss_7876377"> <strong style="display:block;margin:12px 0 4px"><a href="http://www.slideshare.net/wearesnook/festafriend" title="Festafriend">Festafriend</a></strong> <iframe src="http://www.slideshare.net/slideshow/embed_code/7876377" width="425" height="355" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>
<div style="padding:5px 0 12px"> View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/wearesnook">Snook</a> </div>
</p></div>
<p>We hope to take all these ideas forward in the future: Watch this space!</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/05/introducing-festafriend-fakefringe-and-fringewars/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing CreepyCoder; stalking programmers through commit messages</title>
		<link>http://jarofgreen.co.uk/2011/04/introducing-creepycoder/</link>
		<comments>http://jarofgreen.co.uk/2011/04/introducing-creepycoder/#comments</comments>
		<pubDate>Sun, 03 Apr 2011 21:58:54 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[CreepyCoder]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=152</guid>
		<description><![CDATA[I&#8217;ve always wondered what commit messages say about a coder &#8211; so inspired by Creepy, I decided to find out. Every time a coder commits something into a source control repository, they make  information available. Ohloh is one site that &#8230; <a href="http://jarofgreen.co.uk/2011/04/introducing-creepycoder/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve always wondered what commit messages say about a coder &#8211; so inspired by <a href="http://ilektrojohn.github.com/creepy/">Creepy</a>, I decided to find out.</p>
<p><span id="more-152"></span>Every time a coder commits something into a source control repository, they make  information available. Ohloh is one site that <a href="http://www.ohloh.net/accounts/jarofgreen">attempts to extract information from that</a>. To start with, I just wanted to look at the time stamps.</p>
<p>Firstly, looking at the commits I made on <a href="http://elastik.sourceforge.net/">Elastik</a> in a more date-orientated manner: lets put them into an iCal file, so we can view them on a calendar.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/04/ElastikSVNCommitsLastWeekCalendar.png"><img class="aligncenter size-full wp-image-151" title="Elastik Commits Over Last Week" src="http://jarofgreen.co.uk/wp-content/uploads/2011/04/ElastikSVNCommitsLastWeekCalendar.png" alt="" width="501" height="421" /></a></p>
<p>A couple of commits Monday evening, then lots on tue and wed during office hours? We&#8217;ll come back to that. How about aggregating them by hour of the day?</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/04/ElastikHourOfDay.png"><img class="aligncenter" title="Graph" src="http://chart.apis.google.com/chart?cht=bvg&amp;chtt=Hour+Of+Day&amp;chs=700x400&amp;chbh=18&amp;chxt=x&amp;chxl=0:|0|1|2|3|4|5|6|7|8|9|10|11|12|13|14|15|16|17|18|19|20|21|22|23&amp;chd=t:5,0,0,0,0,0,0,0,22,56,70,75,60,76,100,90,64,28,10,9,17,21,18,4" alt="" width="700" height="400" /><br />
</a>No great surprises there, although even I&#8217;m surprised I committed something at 6am in the morning (you can&#8217;t see it in the graph because it only happened once, but I did).</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/04/ElastikDayOfWeek.png"><img class="aligncenter" title="Graph" src="http://chart.apis.google.com/chart?cht=bvg&amp;chtt=Day+Of+Week&amp;chs=220x300&amp;chxt=x&amp;chxl=0:|Mon|Tue|Wed|Thu|Fri|Sat|Sun&amp;chd=t:36,100,88,84,43,24,29" alt="" width="220" height="300" /><br />
</a>Why is there a marked increase on Tue, Wed and Thu? If you know I only work part time, and those are my normal work days, then this graph and the calendar screenshot make sense.</p>
<p>The <a href="http://github.com/jarofgreen/CreepyCoder">basically working proof-of-idea PHP scripts are here</a>.  I did try to build a very modular class structure so it&#8217;s easy to add other methods of collecting or writing data, but the code is quick and dirty. Be warned.</p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/04/CreepyCoderInitialCommitSchedule.png"><img class="aligncenter size-full wp-image-167" title="Creepy Coder - When I worked on the 1st version" src="http://jarofgreen.co.uk/wp-content/uploads/2011/04/CreepyCoderInitialCommitSchedule.png" alt="" width="562" height="819" /></a></p>
<p>I did it all on a netbook over one weekend. The 1st version was started on the train on Friday afternoon, and was got working when I got home late on Friday night. On Sat and Sun I was out all day, but I did some coding on it both mornings before I went out and both evenings when I came back.</p>
<p><strong>It&#8217;s not perfect information.</strong> It doesn&#8217;t tell us how long a programmer spent working on a task before committing it, and with systems like Subversion that need network access you can&#8217;t tell if the programmer worked off-line and then committed later when they got access. But still, turns out it&#8217;s pretty trivial to get information about a programmers routine.</p>
<p><strong>This could be extended</strong> to other open source activities; looking for comments in an issue tracker for instance, all of which are time-stamped. Or people other than programmers; anyone who contributes to an web forum regularly could find their routine analysed.</p>
<p>Comments welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/04/introducing-creepycoder/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>What Sender Policy Framework (SPF) means for your contact forms</title>
		<link>http://jarofgreen.co.uk/2011/03/what-spf-means-for-your-contact-forms/</link>
		<comments>http://jarofgreen.co.uk/2011/03/what-spf-means-for-your-contact-forms/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 08:31:35 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Email]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=129</guid>
		<description><![CDATA[Contact us forms on websites allow the user to fill in the form, and the contents are emailed back to the site owner. I often see people put the address the user gives as the &#8220;From&#8221; field in the email &#8230; <a href="http://jarofgreen.co.uk/2011/03/what-spf-means-for-your-contact-forms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Contact us forms on websites allow the user to fill in the form, and the contents are emailed back to the site owner. I often see people put the address the user gives as the &#8220;From&#8221; field in the email &#8211; here is why you shouldn&#8217;t do that.</p>
<p><span id="more-129"></span></p>
<p><img class="aligncenter" title="http://wordpress.org/extend/plugins/onw-simple-contact-form/screenshots/" src="http://s.wordpress.org/extend/plugins/onw-simple-contact-form/screenshot-2.jpg?r=365677" alt="" width="516" height="395" /></p>
<p>So you run your blog on myblog.com, a little dinky server somewhere. It has a contact form and user@gmail.com comes along to send you a message. They fill out the form and press submit, and your server at myblog.com puts together an email message and sends it to you at me@myemail.com.</p>
<p>However, the operators of myemail.com have had enough of spam and are fighting back. One way is by using data from <a href="http://en.wikipedia.org/wiki/Sender_Policy_Framework">Sender Policy Framework</a> records. This is a system where by the owners of a domain can specify which servers are allowed to send email for it. It is designed to prevent spoofing, where an email claims to come from a user but doesn&#8217;t really. Here&#8217;s what happens.</p>
<p>The server at myemail.com gets the email that claims to come from user@gmail.com. They look up the SPF records for gmail.com</p>
<pre>james@ubuntu:~$ dig gmail.com TXT
....
gmail.com.    300    IN    TXT    
      "v=spf1 ip4:216.239.32.0/19 ip4:64.233.160.0/19"
....</pre>
<p>We can see that Google has specified a list of IP blocks that are allowed to send email. At this point myemail.com notices that the email apparently from user@gmail.com really comes from myblog.com, a dinky little server that is not in one of those IP blocks. Having determined it to be a spoof email, it marks it as spam and you never see the message. Meanwhile, the user who sent the message gets disillusioned by your lack of response and never visits your site again.</p>
<p><strong>So what do you do about it?</strong> Simple: don&#8217;t put the email address the user supplies as the &#8220;From&#8221; address. The &#8220;From&#8221; address should be an email address on the server, such as &#8220;blog@myblog.com&#8221;. What you can do is set the users email address as the <a href="http://en.wikipedia.org/wiki/Email#Header_fields">&#8220;Reply-To&#8221; header</a> (after carefully checking it is actually a email address to avoid header injection attacks) so that when you press reply in your email client the reply automatically goes to them and not blog@myblog.com.</p>
<p>I sat down to write this after seeing this mistake many times, including in a <a href="http://wordpress.org/extend/plugins/onw-simple-contact-form">WordPress plugin</a> with almost 10,000 downloads. My patch for the plugin is: <a href="http://jarofgreen.co.uk/wp-content/uploads/2011/03/patch.replyto.txt">patch.replyto</a>, there is a <a href="http://wordpress.org/support/topic/patch-reply-to-header-in-onw-simple-contact-form">discussion thread for it here</a>.</p>
<p>ps. I&#8217;ve simplified the actual SPF record from Google for a simpler example.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/03/what-spf-means-for-your-contact-forms/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Goodbye wordpress.com, why I&#8217;m self hosting</title>
		<link>http://jarofgreen.co.uk/2011/03/goodbye-wordpress-com-why-im-self-hosting/</link>
		<comments>http://jarofgreen.co.uk/2011/03/goodbye-wordpress-com-why-im-self-hosting/#comments</comments>
		<pubDate>Sat, 19 Mar 2011 23:09:34 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Custom Domains]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jarofgreen.co.uk/?p=107</guid>
		<description><![CDATA[I did start this blog on wordpress.com. If your wanting a decent blog with reliable hosting where someone else takes care of all the details, that&#8217;s great. But when I tried to purchase a premium service to use a domain &#8230; <a href="http://jarofgreen.co.uk/2011/03/goodbye-wordpress-com-why-im-self-hosting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I did start this blog on <a href="http://wordpress.com/">wordpress.com</a>. If your wanting a decent blog with reliable hosting where someone else takes care of all the details, that&#8217;s great. But when I tried to purchase a premium service to use <a href="http://en.wordpress.com/products/">a domain name on my blog</a>, I ran into problems and ended up self-hosting.</p>
<p><span id="more-107"></span>To use an existing domain name on your blog, they ask you what the domain name is. They then check the name servers for that domain name, and they <strong>refuse to continue until the name servers are pointing at them</strong>. When you have done all this, apparently you can add extra DNS records for your domain &#8211; for example, an MX record for your email server.</p>
<p>Firstly, why does wordpress.com insist on being the name server for my domain? I already have a perfectly good name server. Why can&#8217;t I just change my A record to point to wordpress.com?</p>
<p>However, the thing that pushed me into self-hosting was that while I was going through this sign-up procedure (they warn it could take several hours), my email and all my sub-domains would be off-line, and there was nothing I could do about it.</p>
<p>It basically means that if your trying to move an existing domain onto wordpress.com and downtime is a problem for you, you can&#8217;t do it. I&#8217;m about to look at CMS&#8217;s for several local charities. I would like to consider wordpress.com because small charities tend not to have a staff member who can look after software installs, and if you have to pay someone to look after your WordPress then wordpress.com is a decently priced option from the experts. But this one issue may mean I can&#8217;t.</p>
<p>So I ended up hosting this blog on a Debian server, where a fantastic package made setting it up easy (as always).</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/03/goodbye-wordpress-com-why-im-self-hosting/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Volunteering with IT skills for charaties</title>
		<link>http://jarofgreen.co.uk/2011/03/volunteering-with-it-skills-for-charaties/</link>
		<comments>http://jarofgreen.co.uk/2011/03/volunteering-with-it-skills-for-charaties/#comments</comments>
		<pubDate>Mon, 14 Mar 2011 13:02:50 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Edinburgh]]></category>
		<category><![CDATA[Volunteer]]></category>

		<guid isPermaLink="false">http://jarofgreen.wordpress.com/?p=68</guid>
		<description><![CDATA[I, and many others, are interested in volunteering our time and skills. So how does that work when your skills are computer stuff &#8211; anything from teaching social media to programming or system administration? There are weekend long events, like &#8230; <a href="http://jarofgreen.co.uk/2011/03/volunteering-with-it-skills-for-charaties/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I, and <a href="http://programmers.stackexchange.com/questions/35833/ways-to-use-your-skills-as-a-developer-to-give-back-to-the-community-charities/43437#43437">many</a> <a href="http://programmers.stackexchange.com/questions/31036/rolling-your-own-hackathon">others</a>, are interested in volunteering our time and skills. So how does that work when your skills are computer stuff &#8211; anything from teaching social media to programming or system administration?</p>
<p><span id="more-68"></span>There are weekend long events, like the <a href="http://www.sicamp.org/">Social Innovation Camp</a> I did in summer 2009 where teams work to make the first version of a social enterprise over a weekend. Just like <a href="http://www.launch48.com/">Launch48</a> for good causes, basically. And recently I&#8217;ve done several <a href="http://www.edinbuzz.net/social-media-surgeries-edinburgh">Social Media Surgeries</a> in Edinburgh, where volunteers teach local groups about twitter and the like. There are websites where charities and community groups can post requests and get people to work on small projects, like <a href="http://www.sparked.com/">Sparked</a> and <a href="http://www.it4communities.org.uk">it4Communities</a>.</p>
<p>With these, I think the elephant in the room is what happens next &#8211; it&#8217;s easy to get people to sign up for a fun weekend, but ongoing support or development work is more important and that&#8217;s harder to find volunteers for.</p>
<p>For instance, setting up a <a href="http://wordpress.org/">WordPress</a> blog for someone is one thing but if they don&#8217;t keep up to date with security releases they will get hacked eventually (This is true of all software; not picking on WordPress). Fortunately, there is <a href="http://wordpress.com/">http://wordpress.com/</a> &#8211; if you start a blog there, they will take care of all the system administration for you.</p>
<p>Also, how does a charity who doesn&#8217;t really know what is possible decide what they want? And how do they judge the quality of the work? Both seem to require a more general technology consultant to help them, or some kind of feedback loop.</p>
<p>In the mean time, I&#8217;ve signed up for more Social Media Surgeries and have volunteered for my first project with  <a href="http://www.it4communities.org.uk">it4Communities</a> &#8211; so we&#8217;ll see how that goes &#8230;</p>
<div id="_mcePaste" class="mcePaste" style="position:absolute;left:-10000px;top:0;width:1px;height:1px;overflow:hidden;">heciottp://www.sicamp.org/</div>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/03/volunteering-with-it-skills-for-charaties/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More PHP Error Handling Tips</title>
		<link>http://jarofgreen.co.uk/2011/02/more-php-error-handling-tips/</link>
		<comments>http://jarofgreen.co.uk/2011/02/more-php-error-handling-tips/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 19:41:59 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ErrorReportingService]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jarofgreen.wordpress.com/?p=99</guid>
		<description><![CDATA[I gave a talk on Dealing with Errors at the PHP Unconference 2011 in Manchester, and notes were requested. So these posts cover the content of the talk, and more besides. This one covers suppressed errors, debug backtraces and multiple &#8230; <a href="http://jarofgreen.co.uk/2011/02/more-php-error-handling-tips/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>I gave a talk on Dealing with Errors at the <a href="http://www.phpuceu.org/">PHP Unconference 2011 in Manchester</a>, and notes were requested. So these posts cover the content of the talk, and more besides. This one covers suppressed errors, debug backtraces and multiple error handlers.<br />
</em></p>
<p><em><span id="more-99"></span></em><strong>Suppressed errors</strong></p>
<p>In PHP, you can indicate that some code should suppress any errors with an @ sign.</p>
<pre>@print_r($this_variable_does_not_exist);</pre>
<p>I personally don&#8217;t think you should do this &#8211; are you really sure you don&#8217;t care about any of the possible warnings that a function may generate? However I accept some programmers may think this is ok, and more to the point, you may have to collect errors from an application you did not write that does this.</p>
<p>Note that the error handler is still called in this case. But the <a href="http://php.net/manual/en/function.error-reporting.php">error_reporting()</a> function will return 0, so you can test whether errors were suppressed.</p>
<pre>function error_handler($number, $message, $file, $line, $vars)  {
   if (error_reporting() == 0) return;
   die($message);
}
set_error_handler('error_handler');
@print_r($this_variable_does_not_exist);
print "OK";</pre>
<p>Now &#8216;OK&#8217; will be printed, as you would expect.</p>
<p>However there is a gotcha: If <a href="http://www.php.net/manual/en/errorfunc.configuration.php#ini.error-reporting">error_reporting</a> is set to zero anyway, then all errors will be ignored. So make sure that error_reporting is set to a non-zero value before using this trick. If error_reporting is set to zero then I don&#8217;t know of a way to tell if errors are suppressed &#8211; if you do please let me know.</p>
<p><strong>More information from errors</strong></p>
<p>The <a href="http://php.net/debug-backtrace">debug_backtrace()</a> function will provide you with a full stack-trace which can be very helpful for working out how the code got to the error.</p>
<pre>&lt;?php
function e($number, $message, $file, $line, $vars) {
   $x = debug_backtrace();
   print_r($x);
   die();
}
set_error_handler('e');
function b() { $hteu-&gt;oueoe(); }
function c() { b(); }
c();</pre>
<pre>Array
(
   [0] =&gt; Array
   (
      [file] =&gt; /media/692A-1D57/PHP Talk On Errors/debugBacktraceSample.php
      [line] =&gt; 8
      [function] =&gt; e
      [args] =&gt; Array
      (
         [0] =&gt; 8
         [1] =&gt; Undefined variable: hteu
         [2] =&gt; /media/692A-1D57/PHP Talk On Errors/debugBacktraceSample.php
         [3] =&gt; 8
         [4] =&gt; Array
         (
         )
      )
   )</pre>
<p>The output is truncated to the 1st line only, but you can see it includes file, line, function and args &#8211; lots of data. But if you look closely you&#8217;ll see the function is set to &#8216;e&#8217; &#8211; in other words, the exception handler itself is included. I find you can get a more accurate stack trace by taking off the top line and putting back a line with the information passed to the error handler.</p>
<pre>&lt;?php
function e($number, $message, $file, $line, $vars) {
   $x = debug_backtrace();
   array_shift($x);
   array_unshift($x, array('function'=&gt;'?','file'=&gt;$file,'line'=&gt;$line));
   print_r($x);
   die();
}
set_error_handler('e');
function b() { $hteu-&gt;oueoe(); }
function c() { b(); }
c();

Array
(
   [0] =&gt; Array
   (
      [function] =&gt; ?
      [file] =&gt; /media/692A-1D57/PHP Talk On Errors/debugBacktraceSampleImproved.php
      [line] =&gt; 10
   )
   [1] =&gt; Array
   (
      [file] =&gt; /media/692A-1D57/PHP Talk On Errors/debugBacktraceSampleImproved.php
      [line] =&gt; 11
      [function] =&gt; b
      [args] =&gt; Array
   (
<strong> 
</strong></pre>
<p>Finally, we previously <a href="http://jarofgreen.wordpress.com/2011/02/04/catching-php-errors/">talked about to how to catch FATAL errors with a shutdown function</a>. In this case, debug_backtrace() will return the shutdown function only. I haven&#8217;t found a way to get a stacktrace when a fatal error occurs, and would love to know of one.</p>
<p><strong>Multiple Error handers</strong></p>
<p>You can only have one error exception at a time. When you call the <a href="http://php.net/set_error_handler">set_error_handler()</a> function it will return the name of the old error handler. You can store this and call it yourself from your error handler &#8211; thus allowing you to have multiple error handlers.</p>
<pre>function e($number, $message, $file, $line, $vars) {
   global $old_error_handler;
   call_user_func_array($old_error_handler, array($code, $message, $file, $line, $vars));
}
$old_error_handler = set_error_handler('e');</pre>
<p><em>Handling Errors and Exceptions leaving you puzzled? We work on an  open source project to log problems, display a nice message to the user  and email developers. We detect duplicates and let you track errors  in tickets. Have a look at the <a href="http://elastik.sourceforge.net/">ErrorReportingService module in Elastik</a>!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/02/more-php-error-handling-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to PHP Exceptions</title>
		<link>http://jarofgreen.co.uk/2011/02/intro-to-php-exceptions/</link>
		<comments>http://jarofgreen.co.uk/2011/02/intro-to-php-exceptions/#comments</comments>
		<pubDate>Wed, 23 Feb 2011 19:28:16 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ErrorReportingService]]></category>
		<category><![CDATA[Exceptions]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jarofgreen.wordpress.com/?p=101</guid>
		<description><![CDATA[I gave a talk on Dealing with Errors at the PHP Unconference 2011 in Manchester, and notes were requested. So these posts cover the content of the talk, and more besides. This post covers Exceptions. PHP Exceptions are a object-orientated &#8230; <a href="http://jarofgreen.co.uk/2011/02/intro-to-php-exceptions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>I gave a talk on Dealing with Errors at the <a href="http://www.phpuceu.org/">PHP Unconference 2011 in Manchester,</a> and notes were requested. So these posts cover the content of the talk, and more besides. This post covers Exceptions.<br />
</em></p>
<p><span id="more-101"></span>PHP Exceptions are a object-orientated way of triggering errors and dealing with them.</p>
<pre>try {
   throw new Exception();
   print "This line is never run";
} catch (Exception $e) {
   print "error";
}</pre>
<p>You can create a new exception object, and throw it. When thrown PHP will work back up the code stack looking for a catch block that can handle it. You can have as much code as you want in a try or catch block.</p>
<p>Because <a href="http://www.php.net/manual/en/class.exception.php">exceptions are just objects</a>, you can extend them</p>
<pre>class MyError extends Exception {}
try {
   throw new MyError();
} catch (MyError $e) {
   print "error";
} catch (Exception $e) {
   print "error";
}</pre>
<p>Note you can have multiple catch blocks and the appropriate catch block will be used. Inheritance works; so any error that extends the Exception class will be caught by the catch(Exception $e) block.</p>
<p>PHP has <a href="http://www.php.net/manual/en/spl.exceptions.php">a number of built in predefined exception classes</a> you can use.</p>
<p>You can also re-throw an exception:</p>
<pre>try {
   throw new Exception();
} catch (Exception $e) {
   throw $e;
}</pre>
<p>So in your catch block you can run some code (maybe clean up a resource, like close a file you have opened and were half way through reading) then re-throw the exception for it to be dealt with by other code.</p>
<p>Any exceptions that aren&#8217;t caught will kill your script. You can catch them and do something with them before PHP dies. This example is directly from the <a href="http://php.net/set_exception_handler">set_exception_handler</a>() manual.</p>
<pre>function exception_handler($exception) {
   echo "Uncaught exception: " , $exception-&gt;getMessage(), "n";
}
$old_exception_handler = set_exception_handler('exception_handler');
throw new Exception('Uncaught Exception');
echo "Not Executedn";</pre>
<p>You can only have one exception handler at a time, but you can store the name of the old exception handler and call it yourself in your exception handler &#8211; more on this later.</p>
<p><strong>Getting information out of Exceptions</strong></p>
<p>This is easy with the <a href="http://uk.php.net/manual/en/exception.getmessage.php">getMessage()</a>, <a href="http://uk.php.net/manual/en/exception.getfile.php">getFile()</a>, <a href="http://uk.php.net/manual/en/exception.getline.php">getLine()</a> and <a href="http://uk.php.net/manual/en/exception.gettrace.php">getTrace()</a> functions.</p>
<p>However note that these don&#8217;t give you the place that the error was thrown from but the place the exception was created (<a href="http://bugs.php.net/bug.php?id=53882">contrary to documentation</a>). Seeing as almost all of the time people create and throw the exception on the same line, it&#8217;s not a problem and is in fact is a good thing &#8211; if you re-throw the exception then the information in it will be from the original problem, not when it was re-thrown. But if you create an exception then pass it around for a bit then watch out for this.</p>
<p><strong>When to use exceptions?</strong></p>
<p>That is a matter of personal choice, but here are some suggestions to get you thinking.</p>
<p>If a function returns a value, or 0 or -1 for an error, that could be a candidate. Especially if there are multiple errors: you may think it&#8217;s easy to return -1, -2 and so on but that makes it very easy for a programmer to forget to check for an error state (and they will probably have to refer to the manual all the time). Instead, throw an Exception if there is an error. This is harder to ignore and much more readable.</p>
<p>What if a function returns a failure state that evaluates to the same as a valid state when doing a lazy comparison? <a href="http://php.net/manual/en/function.intval.php">intval()</a> returns &#8220;The integer value of var on success, or 0 on failure.&#8221; Which means that these 3 statements all return the same!</p>
<pre>intval('0')
intval('')
intval('oeuoehtu')</pre>
<p>If your writing a function for a web-app which has a text field to collect an integer input, you want the 1st to return 0,the 2nd null (to indicate the user did not put anything in), and the last to raise an error or exception.</p>
<p><em>Handling Errors and Exceptions leaving you puzzled? We work on an open source project to log problems, display a nice message to the user and email developers. We detect duplicates and let you track errors in tickets. Have a look at the <a href="http://elastik.sourceforge.net/">ErrorReportingService module in Elastik</a>!</em></p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/02/intro-to-php-exceptions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Amiando and the apparent SSL certificate</title>
		<link>http://jarofgreen.co.uk/2011/02/amiando-and-the-self-claimed-ssl-certificate/</link>
		<comments>http://jarofgreen.co.uk/2011/02/amiando-and-the-self-claimed-ssl-certificate/#comments</comments>
		<pubDate>Sat, 12 Feb 2011 19:24:00 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[E-commerce]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SSL]]></category>

		<guid isPermaLink="false">http://jarofgreen.wordpress.com/?p=74</guid>
		<description><![CDATA[This is the 2nd time I&#8217;ve booked tickets through http://www.amiando.com/, an on-line ticket system. They have a system where you can embed a widget in the events organisers website, so the whole order happens on their website. This creates problems. &#8230; <a href="http://jarofgreen.co.uk/2011/02/amiando-and-the-self-claimed-ssl-certificate/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This is the 2nd time I&#8217;ve booked tickets through <a href="http://www.amiando.com/">http://www.amiando.com/</a>, an on-line ticket system. They have a system where you can embed a widget in the events organisers website, so the whole order happens on their website. This creates problems.</p>
<p><span id="more-74"></span></p>
<p><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/02/badbookingscreenshot.png"><img class="alignnone size-full wp-image-77" title="Amiando Booking Form looks like it has no SSL." src="http://jarofgreen.co.uk/wp-content/uploads/2011/02/badbookingscreenshot.png" alt="" width="617" height="740" /></a></p>
<p>This should set alarm bells off with everyone.</p>
<p>They aren&#8217;t using an SSL certificate. An SSL certificate means that all traffic between your web browser and the web server is encrypted and no-one can listen in. (If your using an open wifi spot at a coffee shop, listening in is very easy). Someone listening in could get your credit card details, so using a SSL certificate for important data like credit card details is essential.</p>
<p>Except they are: If you use a tool to investigate the AJAX calls, you will see that every single one is to an https server. They use encryption for all your data.</p>
<p>So that&#8217;s fine then? Umm, no.</p>
<p>Web browsers provide tools to users to show them when an encrypted connection is being used. We should be training users to look for them and to refuse to use websites that don&#8217;t have them. Amiando undermines this education effort.</p>
<p>The 1st time I used Amiando was for a big conference, a couple of hundred people. When I saw this I stopped my order and complained to the organisers. After a bit of to-ing and fro-ing I payed by bank transfer instead. But when I was there I had a chat to the event organisers, trying to educate them nicely, and the event organizers informed me in a slightly exasperated manner that I was the only one to complain. So much for the education effort then. The argument about how you educate users effectively is a big one.</p>
<p>Still, I would really like Amiando to sort this out. We should be educating users about security.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/02/amiando-and-the-self-claimed-ssl-certificate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Catching PHP Errors</title>
		<link>http://jarofgreen.co.uk/2011/02/catching-php-errors/</link>
		<comments>http://jarofgreen.co.uk/2011/02/catching-php-errors/#comments</comments>
		<pubDate>Fri, 04 Feb 2011 17:30:17 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Elastik]]></category>
		<category><![CDATA[ErrorReportingService]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[Exceptions]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://jarofgreen.wordpress.com/?p=45</guid>
		<description><![CDATA[I&#8217;ve seen several tutorials on catching PHP errors that only mention how to catch one type of error &#8211; so here is a quick post with details of how to catch more. Type 1. Most errors This is the example &#8230; <a href="http://jarofgreen.co.uk/2011/02/catching-php-errors/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen several tutorials on catching PHP errors that only mention how to catch one type of error &#8211; so here is a quick post with details of how to catch more.</p>
<p><span id="more-45"></span></p>
<p><strong>Type 1. Most errors</strong></p>
<p>This is the example you usually see in tutorials. Most errors can be caught by setting a custom error handler using the set_error_handler function. The example on <a href="http://uk.php.net/manual/en/function.set-error-handler.php">the official PHP manual page</a> is very long but here are the basics:</p>
<pre>function error_handler($number, $message, $file, $line, $vars)  {  
     .... do something with error ...
}
set_error_handler('error_handler');</pre>
<p>Note  the PHP process won&#8217;t die &#8211; after calling your error handler, it will carry on where it left off.</p>
<p><strong>Type 2. Exceptions</strong></p>
<p>You&#8217;ll also want to catch any exceptions using the <a href="http://uk.php.net/manual/en/function.set-exception-handler.php">set_exception_handler</a> function. This time the example on the official manual page is short and to the point.</p>
<p><strong>Type 3. Fatal Errors</strong></p>
<p>Finally, how do you catch Fatal Errors? Because they are fatal, a custom error handler isn&#8217;t called. But you can do this:</p>
<pre>function x() {
   $error = error_get_last();
   if ($error) {
      // deal with $error['file'],$error['line']
      // $error['message'],$error['type']
   }
}
register_shutdown_function('x');</pre>
<p>This is called when PHP shuts down. It will only get the last error, but by definition a fatal error will be the last error to occur so that&#8217;s fine.</p>
<p>How do you know it doesn&#8217;t get the same error you may have seen earlier? It would be annoying to get the same error reported twice. Fortunately, errors you catch with a custom error handler won&#8217;t appear in the results of the <a href="http://uk.php.net/manual/en/function.error-get-last.php">error_get_last</a>() function.</p>
<p>Note that what you can do in a shutdown script can be limited &#8211; PHP is shutting down after all. So don&#8217;t try anything fancy.</p>
<p><strong>What to do with these errors?</strong></p>
<p>Now we have caught these errors, what do we do with them? Ideally you want to log them, display a nice message to the user and email some developers. Which is one of several things <a href="http://jarofgreen.wordpress.com/2011/01/30/tracking-errors-with-php/">our open source project does with errors</a> &#8211; it also detects duplicates and lets you track errors in tickets. Have a look!</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/02/catching-php-errors/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Country fields in address forms</title>
		<link>http://jarofgreen.co.uk/2011/01/country-fields-in-address-forms/</link>
		<comments>http://jarofgreen.co.uk/2011/01/country-fields-in-address-forms/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 22:03:17 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[UI]]></category>

		<guid isPermaLink="false">http://jarofgreen.wordpress.com/?p=37</guid>
		<description><![CDATA[This oatmeal comic talks about Shopping Carts, and while most of it is spot on there in one thing I&#8217;ve seen before that annoys me: put the most popular counties at the top of the county list. It just smacks &#8230; <a href="http://jarofgreen.co.uk/2011/01/country-fields-in-address-forms/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://theoatmeal.com/comics/shopping_cart">This oatmeal comic</a> talks about Shopping Carts, and while most of it is spot on there in one thing I&#8217;ve seen before that annoys me: put the most popular counties at the top of the county list.</p>
<p><span id="more-37"></span>It just smacks of bigger counties getting all whiny about the existence of smaller countries and having to scroll. It just rings of arrogance about how the small countries aren&#8217;t important and just get in the way.</p>
<p>And from an UI point of view, it seems like bad advice.</p>
<p>Your list is suddenly out of order, Sure, if you do happen to live in the biggest country your country is now at the top and it&#8217;s great. If not, you suddenly have 2 places your country could be &#8211; annoying.</p>
<p>So what&#8217;s the alternative?</p>
<p>You don&#8217;t have to scroll. You can type the first few letters and the computer will scroll for you. But I&#8217;ll accept that not everyone knows that. So maybe you could have an empty text box and when you start typing, an auto-complete popup box suddenly appears to help you.</p>
<p>Or maybe have a select box with a sensible default selected. What should that sensible default be?</p>
<p>If your a website that mostly serves one country it&#8217;s easy. Or if your a website that has separate domains for each country, it&#8217;s easy. Someone on <a href="http://www.amazon.fr/">http://www.amazon.fr/</a> is going to want France, 99% of the time.</p>
<p>So what if your a genuinely international website that serves many different countries? Use IP Lookup. Or use the language the user has chosen to browse the website in as a hint.</p>
<p>Now I&#8217;m not an UI expert and I&#8217;d love to hear from one on this topic. It just seems to me that &#8220;Just put the most popular one at the top!&#8221; is a really lazy solution that smacks of arrogance on the part of big countries, and there must be a better way.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/01/country-fields-in-address-forms/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tracking Errors with PHP</title>
		<link>http://jarofgreen.co.uk/2011/01/tracking-errors-with-php/</link>
		<comments>http://jarofgreen.co.uk/2011/01/tracking-errors-with-php/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 12:06:03 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Elastik]]></category>
		<category><![CDATA[ErrorReportingService]]></category>
		<category><![CDATA[Errors]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://jarofgreen.wordpress.com/?p=27</guid>
		<description><![CDATA[If you have a PHP app, how do you track errors? I&#8217;ve been working on an Open Source project to enable you to capture errors and send them to a reporting app. Each error report contains full information (stacktrace, server &#8230; <a href="http://jarofgreen.co.uk/2011/01/tracking-errors-with-php/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you have a PHP app, how do you track errors? I&#8217;ve been working on an <a href="http://elastik.sourceforge.net/">Open Source project</a> to enable you to capture errors and send them to a reporting app.</p>
<p><span id="more-27"></span>Each error report contains full information (stacktrace, server variables, user submitted data &#8211; click the screenshot below for a sample error).  Users can be informed by email as soon as an error occurs, and a ticket can be created so you can track the process of fixing the error. We attempt to catch duplicate errors and tie them together so one error occurring many times does not flood your inbox.</p>
<p>There is a PHP class you can add to any project to collect errors, and I&#8217;m also working on a <a href="http://wordpress.org/extend/plugins/elastik-error-logging/">WordPress plugin</a>.</p>
<p>For more see the documentation on the <a href="http://elastik.sourceforge.net/">ErrorReportingService module here</a>. Any feedback or ideas on what you would like to see is appreciated!</p>
<div id="attachment_33" class="wp-caption alignnone" style="width: 122px"><a href="http://jarofgreen.co.uk/wp-content/uploads/2011/01/screenshot-2.png"><img class="size-medium wp-image-33" title="An Error Report in Elastik (Ver 0.3.1)" src="http://jarofgreen.co.uk/wp-content/uploads/2011/01/screenshot-2.png?w=112" alt="An Error Report in Elastik (Ver 0.3.1)" width="112" height="300" /></a><p class="wp-caption-text">An Error Report in Elastik (Ver 0.3.1)</p></div>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/01/tracking-errors-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Bus Edinburgh</title>
		<link>http://jarofgreen.co.uk/2011/01/my-bus-edinburgh/</link>
		<comments>http://jarofgreen.co.uk/2011/01/my-bus-edinburgh/#comments</comments>
		<pubDate>Sat, 22 Jan 2011 18:48:08 +0000</pubDate>
		<dc:creator>james</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Edinburgh]]></category>

		<guid isPermaLink="false">http://jarofgreen.wordpress.com/?p=19</guid>
		<description><![CDATA[My Bus Edinburgh for Android is a brilliant app that lets you see when a bus is due at a bus stop near you. While it&#8217;s already become essential after only  a week or two, one thing would really improve &#8230; <a href="http://jarofgreen.co.uk/2011/01/my-bus-edinburgh/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://rivernile.org.uk/bustracker/">My Bus Edinburgh for Android</a> is a brilliant app that lets you see when a bus is due at a bus stop near you. While it&#8217;s already become essential after only  a week or two, one thing would really improve it. While it provides real time information on the buses due, it doesn&#8217;t tell you how old that information is.</p>
<p><span id="more-19"></span>It&#8217;ll sit there saying &#8220;5 minutes&#8221; till the bus, but if that information is 3 minutes old then you have much less time than you think you did (I&#8217;ve already missed one bus!). A simple addition of a small text label saying &#8220;this is 3 minutes old&#8221; would enable the user to quickly work out how long they really had.</p>
<p>It does have an auto-update feature, but this would still be good. What if the user had a data connection then loses it? (They may leave a wifi spot for instance).</p>
<p>Apart from that, brilliant app <img src='http://jarofgreen.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><strong>Edit 28th Jan:</strong> Got a tweet from the developers saying this will be considered, here&#8217;s hoping.</p>
<p><strong>Edit 19th March:</strong> This issue can be tracked at <a href="http://code.google.com/p/androidedinburghbustracker/issues/detail?id=16">http://code.google.com/p/androidedinburghbustracker/issues/detail?id=16</a> and will apparently be in the next version.</p>
]]></content:encoded>
			<wfw:commentRss>http://jarofgreen.co.uk/2011/01/my-bus-edinburgh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
