<?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>blueDonkey.org</title>
	<atom:link href="http://weblog.bluedonkey.org/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://weblog.bluedonkey.org</link>
	<description>Photos, Travel, Apple, Embedded Software, Wi-Fi and more...</description>
	<lastBuildDate>Wed, 09 Jun 2010 03:32:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Newspapers Are Killing Themselves</title>
		<link>http://weblog.bluedonkey.org/?p=994</link>
		<comments>http://weblog.bluedonkey.org/?p=994#comments</comments>
		<pubDate>Wed, 09 Jun 2010 03:32:05 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Web Technologies]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://weblog.bluedonkey.org/?p=994</guid>
		<description><![CDATA[Yesterday saw the removal of all of my iNewz apps from the Apple app store. Not something I really wanted to do, but something that was forced on me by the very people who stood to benefit the most from the apps: the news organizations who publish the news.
Yesterday was also the day that another [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://ourlivez.com/assets/images/apps/iNewz.png" />Yesterday saw the removal of all of my <a href="http://ourlivez.com/inewz_withdrawn">iNewz apps</a> from the Apple app store. Not something I really wanted to do, but something that was forced on me by the very people who stood to benefit the most from the apps: the news organizations who publish the news.</p>
<p>Yesterday was also the day that another RSS based news app, Pulse, was <a href="http://kara.allthingsd.com/20100608/popular-pulse-news-reader-ipad-app-gets-steve-jobs-praise-in-morning-then-booted-from-app-store-hours-later-after-new-york-times-complaint/">removed from the store</a> despite being praised &#038; shown on stage at WWDC by Steve Jobs. Why? Because the New York Times complained that the app contained the URL for their RSS feed. Quoting from the letter Apple received from the Times:</p>
<blockquote><p>I note that the app is delivered with the NYTimes.com RSS feed preloaded, which is prominently featured in the screen shots used to sell the app on iTunes.</p></blockquote>
<p>The same argument was made by Apple to me for the recent rejection of an update to iNewz (and a few more news feeds were cited as problematic too).</p>
<p><span id="more-994"></span><strong>Is It Copyright Violation?</strong></p>
<p>From my discussion with Apple&#8217;s developer relations last night, it seems that these organizations are happy to have their readers use a commercial RSS reader where they must type in the RSS feed URL, but they are not happy to have the URLs pre-loaded for the user to select from. Aside from the obvious stupidity of making it harder for people to find your content, the only difference between these two app designs is that the actual RSS feed URL is embedded in one. Does that mean that the New York Times considers its actual URLs to be copyright material? Can you even claim that a URL is copyrighted? Seems like a stretch.</p>
<p>The content itself is clearly copyright protected, but since all RSS readers present this in roughly the same way, to complain about ones with pre-loaded feed URLs but be happy about ones where the feed URLs are entered by end users implies that it is not the content itself that is the problem. It will be the same in both cases.</p>
<p>Or are they just worried about the apps using the New York Times name (and perhaps some content via screenshots) in their marketing materials? If so, why not just ask the developers not to use their name and/or content in the app store copy?</p>
<p><strong>More Readers Is Better, No?</strong></p>
<p>One assumes that these companies include RSS feeds for their content in order to encourage more readers to visit their website. If they don&#8217;t want people to use RSS feeds, why have them? The feeds are published by the news organisations, and they control the amount of content inside them. Feeds are essentially a promotional vehicle. By including their feed URLs, a news reader application is essentially providing them with free advertising. Other industries actually pay for this type of referral!</p>
<p>Having more applications out there that promote your content, as long as it delivers the users to the content when they want to read more, would seem to be only beneficial. Unless they don&#8217;t really want people visiting their website. If they think that making it harder to read the news online is going to drive people back to their paper products, or force them to subscribe to an in-house electronic version, they are likely to be disappointed. And if they really do want to do that, then why have the RSS feeds at all?</p>
<p><strong>Sharing</strong></p>
<p>Even more frustrating for me, not only did the iNewz apps have the potential to bring new readers to a whole selection of publications they might not otherwise have even known about, it went further and allowed them to share articles with their followers on Twitter. And from there, out to even more people via the <a target="_blank" href="http://twitter.com/iNewz">@iNewz</a> Twitter feed that re-tweeted any article shared using an iNewz application.</p>
<p>That&#8217;s even more free promotion for the news organisations, and even more eyeballs on their content web pages.</p>
<p><strong>Revenue</strong></p>
<p>The claim that these news apps, because they are not free apps, are commercial use of the feeds is also missing the point. The app developer gets a one time payment of a few dollars for their work in writing the software and marketing it. There is no cost to the news organisations whose feeds are being included for that development work, for the marketing, nor for any updates necessary to keep the app working or improve the user experience. Essentially, as long as the app drives users to their site to read the full story always, they are getting free promotion of their content.</p>
<p>And more readers on their website, means more ad revenues. And those are ongoing revenues, not one-time micro-payments. They should be considering rev-share deals for that revenue with the folks writing news apps, not banning us from helping them boost their circulation!</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.bluedonkey.org/?feed=rss2&amp;p=994</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>App Store Roulette</title>
		<link>http://weblog.bluedonkey.org/?p=984</link>
		<comments>http://weblog.bluedonkey.org/?p=984#comments</comments>
		<pubDate>Thu, 20 May 2010 00:56:33 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[reject]]></category>

		<guid isPermaLink="false">http://weblog.bluedonkey.org/?p=984</guid>
		<description><![CDATA[
This week I have been presented with something of a dilemma regarding what to do with my iNewz applications for the iPhone, iPod touch and most recently the iPad. As is often the case with apps for these platforms, the cause of the problem is nothing technical; it began with Apple&#8217;s review process, or more [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://weblog.bluedonkey.org/photos/2010/05/iNewz.png" alt="" title="iNewz" width="280" height="280" class="alignright size-full wp-image-987" /><br />
This week I have been presented with something of a dilemma regarding what to do with my iNewz applications for the iPhone, iPod touch and most recently the iPad. As is often the case with apps for these platforms, the cause of the problem is nothing technical; it began with Apple&#8217;s review process, or more specifically the inconsistent way in which it is applied.</p>
<p><strong>The Rejection</strong><br />
Like most app developers, I&#8217;ve had rejection emails from Apple before (actually called &#8220;feedback&#8221;), and they have normally been for things that are simple to address, even if not always things I agree with the need for. </p>
<p>This one was different though. Here&#8217;s the key paragraph of the email:</p>
<p><span id="more-984"></span><br />
<blockquote>Thank you for submitting iNewz to the App Store.  We&#8217;ve reviewed iNewz and determined that we cannot post your application because it appears to contain features, namely, feeds, that bear a resemblance to well-known third-party marks, specifically well known news organizations including The New York TImes, The Washington Post, USA Today, and BBC. </p></blockquote>
<p>Yes, iNewz does include feeds from major news organisations &#8211; it is essentially an RSS reader with a set of pre-configured feed URLs making it easier for people to select the news sources they are interested in reading content from.</p>
<p><strong>Clarification</strong><br />
Not being entirely sure about the implication of the wording in that paragraph, I asked for clarification. Here&#8217;s what I received back:</p>
<blockquote><p>Thank you for your response and prompt attention to the Trademark issue.   While we cannot provide legal guidance on the specifics of copyrights,  The New York TImes, The Washington Post, USA Today, and BBC have all previously objected to other applications that include preset feeds to their content, and believes that such features infringe their rights.</p></blockquote>
<p>So, I guess that means iNewz cannot include at least those feeds, and by extension I am sure they will assume all other similar news organisations could feel the same way. I also see no reason why they would feel differently about the other iNewz applications, even though the feeds are from smaller news organisations and blogs.</p>
<p><strong>The Inconsistency</strong><br />
To make it worse, iNewz has been on the app store for over a year, and had mostly the same set of feeds for that time. It has been through the review process numerous times (several times in the last month or so), and certainly makes no attempt to hide the fact that it gets the news from the feeds of major news organisations. </p>
<p><strong>The Irony</strong><br />
 To further emphasize just how random the Apple review process is, on the very same day, just a few hours after the initial rejection email, I received a second email stating that the same update (a fix for a Twitter OAuth problem) to iNewz for iPad had been approved.</p>
<p><strong>The Conclusion</strong><br />
There were really two ways out of this dilemma:</p>
<ol>
<li>I can try to find a way to get the application(s) approved;</li>
<li>I can pull the applications from the store.</li>
</ol>
<p>This application was never really a commercially viable project; it has not even come close to paying for its development in hours. It was more a labour of love &#8211; I wanted a news application for my commute, and I thought other people might enjoy it too.</p>
<p>But looking back over the reviews in the app store, I realise that was perhaps a mistake. And the update it appears is disliked by almost all those who have written reviews so far.</p>
<p>Given that, I think I have no real choice to make here. Sadly, I think iNewz, in all its forms, will have to be removed from the app store soon. </p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.bluedonkey.org/?feed=rss2&amp;p=984</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter xAuth &#8211; The Missing Docs</title>
		<link>http://weblog.bluedonkey.org/?p=959</link>
		<comments>http://weblog.bluedonkey.org/?p=959#comments</comments>
		<pubDate>Sat, 01 May 2010 19:25:41 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Web Technologies]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[docs]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[oauth]]></category>
		<category><![CDATA[twitter]]></category>
		<category><![CDATA[xauth]]></category>

		<guid isPermaLink="false">http://weblog.bluedonkey.org/?p=959</guid>
		<description><![CDATA[The recent decision by Twitter to turn off support for Basic Auth soon means a lot of Twitter apps are now racing to implement either full OAuth support, or the cut down xAuth designed for non-web apps. The iNewz apps fall into this last category, and an initial look at the work involved made it [...]]]></description>
			<content:encoded><![CDATA[<p>The recent decision by Twitter to <a target="_blank" href="http://countdowntooauth.com/">turn off support for Basic Auth soon</a> means a lot of Twitter apps are now racing to implement either full OAuth support, or the cut down xAuth designed for non-web apps. The iNewz apps fall into this last category, and an initial look at the work involved made it seem as though switching from basic auth to xAuth would be pretty straightforward. Sadly, and mostly because of poor documentation and what I consider bugs in the Twitter API implementation of OAuth, this took far longer than it should have done. Hopefully this blog post will help others looking to make this switch by providing a more complete, step-by-step description of the xAuth process. It may also help those trying to make full OAuth work, but I haven&#8217;t tried that yet.</p>
<p><span id="more-959"></span><strong>Signing Up</strong><br />
First step in converting is to sign in to <a href="http://dev.twitter.com/">Twitter&#8217;s new developer site</a> and register your app as an OAuth application. Once you have done that you need to send an email to api@twitter.com requesting permission to xAuth. Include in that email the client ID (the number at the end of the http://dev.twitter.com/apps/ URL once it&#8217;s registered as an OAuth app), and a link to your application&#8217;s website.</p>
<p>Until Twitter has approved your application for xAuth, you will not be able to use the xAuth protocol.</p>
<p>Once you register for OAuth though you will immediately have a consumer key and secret for your application. Make a note of these &#8211; you will need them for all the steps below!</p>
<p><strong>xAuth Background</strong><br />
A useful starting point here is to get an understanding of how xAuth works. Some of this applies to OAuth as well, since after the initial steps both are pretty much the same thing.</p>
<p>There are two stages to xAuth/OAuth that a developer needs to think about:</p>
<ol>
<li><strong>Authorisation</strong> &#8211; the initial request to get permission to access the user&#8217;s Twitter account. Your application&#8217;s registration with Twitter will determine whether or not this is read-only or read/write access.</li>
<li><strong>Identification</strong> &#8211; all subsequent requests using the permission must include something that proves to Twitter that you have permission.</li>
</ol>
<p>In the basic auth model, the two were basically one step, achieved by sending the user&#8217;s username &#038; password in each request. Now they&#8217;re two steps.</p>
<p>The authorisation step returns a token and a matching secret that you need to use for the second step. But unlike basic auth, you don&#8217;t pass them both back on each request, but instead use them to generate a signature. Generating that signature is something that the Twitter docs don&#8217;t help much with, so we&#8217;ll look at it in more detail later (to add to the fun, even the authorisation step requires a signature, but one that is generated slightly differently).</p>
<p><strong>Authorisation</strong><br />
Unlike OAuth, where the authorisation process is a multi-step affair that involves sending the user to a Twitter web page, xAuth is a single request. That request is to the OAuth API endpoint that would normally be the last one in the OAuth sequence, but it includes some extra parameters.</p>
<p>The endpoint is <strong>https://api.twitter.com/oauth/access_token</strong>. To request your access token and secret on behalf of a user, you will need to POST a request to that URL with the following parameters:</p>
<ul>
<li><em>x_auth_username</em> &#8211; the user&#8217;s Twitter username</li>
<li><em>x_auth_password</em> &#8211; the user&#8217;s Twitter password</li>
<p><em>x_auth_mode</em> &#8211; always set to client_auth
</ul>
<p>Remember to URL encode the username and password values.</p>
<p>But you can&#8217;t just post those values; you also need to sign this request and add an HTTP <em>Authorization</em> header to your POST.</p>
<p><strong>Signing The Access Token Request</strong><br />
First step in the signing process is to generate the base string. The base string contains all the required parameters for the request and is used as one of the inputs to the hashing function that will generate the signature.</p>
<p>This is one of the parts of OAuth that I feel is poorly designed, but it is what it is, so we need to jump through the necessary hoops to get the signature. The key to remember here is that Twitter is going to reconstruct this string and use that to verify your signature value; if anything is different at all, then the signatures will not match, and the request will be refused.</p>
<p>There are three parts to the base string, joined by ampersands (&#038;) as follows:</p>
<p><code>method&#038;url&#038;parameters</code></p>
<p>For this request, method will be POST in upper case always. The URL is the URL encoded version of the access token endpoint URL:</p>
<p><code>https%3A%2F%2Fapi.twitter.com%2Foauth%2Faccess_token</code></p>
<p>The hard part is the parameter values (and this is where I think OAuth shows its first sign of poor design). The parameters must be added to the base string in strict order: alphabetic order of the parameter names for this request (requests where a parameter may be repeated must further sort those in order of the values).</p>
<p>The parameters you will need to get an access token, in the order they must be added to the base string, are:</p>
<ul>
<li><em>oauth_consumer_key</em> &#8211; your application&#8217;s consumer key.</li>
<li><em>oauth_nonce</em> &#8211; a nonce (number used once) generated by your application (we&#8217;ll look at this more in a minute).</li>
<li><em>oauth_signature_method</em> &#8211; this is just set to HMAC-SHA1 (the Twitter docs say HMAC_SHA1 in some places, but that is wrong).</li>
<li><em>oauth_timestamp</em> &#8211; the current time in seconds since Jan 1, 1970 00:00:00 GMT. There are posts online claiming that <strong>Twitter violates the OAuth spec</strong> here by checking that this is within 5 minutes of current time. That means your app will fail on devices where the time is not set correctly, or not available.</li>
<li><em>oauth_version</em> &#8211; set this to &#8216;1.0&#8242; (without the quotes).</li>
<li><em>x_auth_mode</em> &#8211; set this to &#8216;client_auth&#8217; (without the quotes).</li>
<li><em>x_auth_password</em> &#8211; the user&#8217;s password.</li>
<li><em>x_auth_username</em> &#8211; the user&#8217;s Twitter username.</li>
</ul>
<p>All the values should be URL encoded. Straightforward so far. To create a single parameters value though for substitution into our base string&#8217;s third component we need to join all that together.</p>
<p>Each parameter is added as <em>key</em>%3D<em>value</em> (where %3D represents the URL encoding for &#8216;=&#8217;). So, using the oauth_signature_method as an example, for that parameter we would generate the string:</p>
<p><code>oauth_signature_method%3DHMAC-SHA1</code></p>
<p>Then we must join them all together to form a single parameter list. Do that by separating the individual parameter strings with %26 (the URL encoding for &#8216;&#038;&#8217;). So the start of the list might look like this:</p>
<p><code>oauth_consumer_key%3DKEY%26oauth_nonce%3DNONCE</code></p>
<p>Where KEY and NONCE are the URL encoded values for those parameters (too long to include here and make it readable).</p>
<p><strong>The Nonce</strong><br />
The nonce is something that your application should generate randomly ideally. The <a target="_blank" href="http://oauth.net/core/1.0a/#nonce">OAuth specification</a> states:</p>
<blockquote><p>The Consumer SHALL then generate a Nonce value that is unique for all requests with that timestamp. A nonce is a random string, uniquely generated for each request.</p></blockquote>
<p>There is a suspicion that Twitter takes a stricter view of these values, but generating a large random number should be sufficient.</p>
<p><strong>The Timestamp</strong><br />
The timestamp should be simple, the number of seconds since January 1, 1970 00:00:00 GMT. All the <a target="_blank" href="http://oauth.net/core/1.0a/#nonce">OAuth specification</a> says about this value is:</p>
<blockquote><p>The timestamp value MUST be a positive integer and MUST be equal or greater than the timestamp used in previous requests.</p></blockquote>
<p>There is a belief (though I&#8217;ve not seen confirmation or denial from Twitter) that the timestamp must also be within 5 minutes of the current time. As well as being an obvious violation of the specification, it is also very poorly thought out design since it will be a problem for devices where the time is set incorrectly, or not available. Even the requirement in the OAuth specification could be problematic, and is unnecessary.</p>
<p><strong>The Signature</strong><br />
The only algorithm Twitter currently supports is HMAC-SHA1, so this is what we need to use here. The trick (that is not easy to find in Twitter&#8217;s docs) is how you encode the &#8217;secret&#8217; for this process.</p>
<p>Firstly though, here&#8217;s an example of the code to generate the signature (in Objective-C for the iPhone, but should be easy to port to other platforms):</p>
<p><code><br />
NSData *dSecret = [secret dataUsingEncoding:NSUTF8StringEncoding];<br />
NSData *dBase = [base dataUsingEncoding:NSUTF8StringEncoding];<br />
uint8_t result[CC_SHA1_DIGEST_LENGTH];<br />
CCHmacContext hmacCtx;<br />
memset(&#038;hmacCtx, 0, sizeof(hmacCtx));<br />
CCHmacInit(&#038;hmacCtx, kCCHmacAlgSHA1, dSecret.bytes, dSecret.length);<br />
CCHmacUpdate(&#038;hmacCtx, dBase.bytes, dBase.length);<br />
CCHmacFinal(&#038;hmacCtx, result);<br />
</code></p>
<p>The secret is normally created by joining the consumer secret for your application (from the Twitter developer site&#8217;s page for your application) and the token secret using an ampersand (&#038;):</p>
<p><code>consumer_secret&#038;token_secret</code></p>
<p>In this case though, since we are still requesting the token, we don&#8217;t have a token secret. So the secret in this case is the consumer secret with a trailing ampersand:</p>
<p><code>consumer_secret&#038;</code></p>
<p>Don&#8217;t miss the trailing ampersand or it won&#8217;t work!</p>
<p><strong>The Authorization Header</strong><br />
Once you have all this information, you can build the string that will become the &#8216;Authorization&#8217; HTTP header value. That value is OAuth followed by a sequence of comma separated key value pairs, the values being URL encoded and then wrapped in double quotes:</p>
<p><code>OAuth oauth_nonce="qfQ4", oauth_signature_method="HMAC-SHA1", ...</code></p>
<p>Unlike the base string values, the order of these values doesn&#8217;t seem to matter. Also, only the oauth_ prefixed values are included here:</p>
<ul>
<li>oauth_nonce</li>
<li>oauth_signature_method</li>
<li>oauth_timestamp</li>
<li>oauth_consumer_key</li>
<li>oauth_signature</li>
<li>oauth_version</li>
</ul>
<p> The <em>x_auth</em> prefixed values are sent in the body of the POST.</p>
<p><strong>The POST Response</strong><br />
In response to posting this information you will receive one of two things:</p>
<ul>
<li>An (annoyingly) URL encoded list of values, including the oauth_token and oauth_token_secret that you will need to store and use on subsequent requests to the Twitter API;</li>
<li>An error message (which is unlikely to help you much, and will tell a user even less &#8211; OAuth was designed by geeks with no idea about user experience it seems);</li>
</ul>
<p>In the case of an error, you should also get an HTTP error (400 or 401 most likely), so you can tell the difference between a successful request and an error.</p>
<p>You don&#8217;t need to store the Twitter username (unless you want it for some other purpose, such as displaying which account the user authorised the application to use), and must not store the Twitter password. Here&#8217;s an example response (with the token and secret masked):</p>
<p><code>oauth_token=XXXX&#038;oauth_token_secret=YYYY&#038;user_id=14642644&#038;<br />
screen_name=bluedonkey&#038;x_auth_expires=0</code></p>
<p>That will all be on one line in the response from Twitter.</p>
<p><strong>Updating User Status</strong><br />
Updating the user&#8217;s status (i.e. posting a tweet into the user&#8217;s timeline) is an authenticated method. Using xAuth (or OAuth, since they&#8217;re the same), we must sign the request and include the Authorization HTTP header.</p>
<p>The process is the same, but here are some things to be careful of:</p>
<ul>
<li>Once you&#8217;ve acquired the access token and corresponding secret, remember to use the combined consumer secret and token secret when generating the signature (see above);</li>
<li>You will also need to add the <em>oauth_token</em> parameter into the list of values in the HTTP Authorization header value.</li>
<li>When creating the base string, the status value (i.e. the content of the tweet) needs to be included. In the body of the POST it will be URL encoded. In the base string it needs to be double URL encoded. So, &#8216;Test Tweet&#8217; becomes &#8216;Test%20Tweet&#8217; for the body of the POST, and it becomes &#8216;Test%2520Tweet&#8217; for the base string.</li>
</ul>
<p><strong>Invalid / Used Nonce Error</strong><br />
Another indication that Twitter&#8217;s OAuth implementation is not really ready for production use is the simple fact that almost any problem with the contents of the Authorization header results in the inaccurate &#8216;invalid / used nonce&#8217; error.</p>
<p>In all the examples I found online, as well as my own experiences, the problem is never related to the nonce value. This error seems to highlight the least likely cause of the problem. Possible real causes of this error include:</p>
<ul>
<li>Timestamp values that are more than 5 minutes from the current time (<a target="_blank" href="http://blainegarrett.com/2009/07/14/failed-to-validate-oauth-signature-and-token-on-twitter-oauth-check-your-cloc/">check the clock on your system</a>!);</li>
<li><a target="_blank" href="http://code.google.com/p/twitter-api/issues/detail?id=1059">Using the old &#8216;+&#8217; encoding for spaces</a> instead of &#8216;%20&#8242; in values included in the base string (e.g. tweet message content);</li>
<li>Incorrect/invalid token value;</li>
<li>Not double encoding the values of POST body parameters that are being included in the base string.</li>
</ul>
<p>If you see this misleading error, check everything else in your base string too &#8211; it is almost certainly not a problem with your nonce as long as you have done something to make sure they&#8217;re random!</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.bluedonkey.org/?feed=rss2&amp;p=959</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Tax Season</title>
		<link>http://weblog.bluedonkey.org/?p=946</link>
		<comments>http://weblog.bluedonkey.org/?p=946#comments</comments>
		<pubDate>Sun, 28 Mar 2010 21:28:43 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Environment]]></category>
		<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://weblog.bluedonkey.org/?p=946</guid>
		<description><![CDATA[It&#8217;s that time of year again, when almost 140 million people in the US have to waste many hours of their personal time collecting information from forms sent to them by employers, banks etc, then enter it all into another set of forms to be sent to the federal and state tax services. Oh, and [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" src="http://weblog.bluedonkey.org/photos/2010/03/photo-300x199.jpg" alt="US Tax Form 1040" title="Tax Return" width="300" height="199" class="alignright size-medium wp-image-947" />It&#8217;s that time of year again, when almost 140 million people in the US have to waste many hours of their personal time collecting information from forms sent to them by employers, banks etc, then enter it all into another set of forms to be sent to the federal and state tax services. Oh, and all that information has already been sent to those very same authorities. Just so they can check your answers? Is this some kind of annual test?</p>
<p><strong>Wasted Time</strong><br />
The <a target="_blank" href="http://www.irs.gov/instructions/i1040a/ar03.html">IRS estimates</a> that on average across all people filing any type of federal return, individuals will spend 17.3 hours &#8220;preparing&#8221; these forms. The <a target="_blank" href="http://www.irs.gov/pub/irs-soi/07databkrevised.pdf">IRS reported (pdf)</a> that in 2007 there were almost 139 million individual tax returns filed. So, a quick calculation suggests that every year in the US, <strong>274,509 person-years</strong> are wasted on collating and transcribing information that the recipient (the IRS) already had. And that doesn&#8217;t include the burden from the state tax filings.</p>
<p><strong>Wasted Money</strong><br />
In addition to the ridiculous amount of time wasted on this activity, the IRS also estimates that it will cost individuals on average $225 to prepare these returns; that&#8217;s <strong>$31 billion</strong> every year (and, again, doesn&#8217;t take into account state tax filing costs). That could be spent on things that were a lot more beneficial than collating and transcribing information from one set of forms to another.</p>
<p><strong>Wasted Resources</strong><br />
It doesn&#8217;t end with wasted time and money either. Every year, employers, banks and other companies mail out those tax details to all their employees/customers. Some now offer electronic delivery at least, but I wonder how many of those end up being printed at home, either for reference while preparing taxes, for providing to an accountant or just for records?</p>
<p>Estimates online range from 9,000 to 15,000 sheets of paper per tree (obviously, the type &#038; size of the tree plays a big part in this!). Let&#8217;s assume the 15,000 sheets per tree number for the sake of this post. That means, assuming each person filing a return received at least 5 of these forms (probably lower than reality based on my experience), <strong>46,000 trees</strong> were destroyed to print these forms (and that doesn&#8217;t include the envelopes used to mail them &#8211; probably close to as much again).</p>
<p>Then there are the tax forms themselves. The IRS reported (in that same data book PDF) that about 79 million of the 139 million returns were filed electronically (a great achievement, by the way). That still leaves 60 million that were mailed in, on paper, though. My federal return from last year was 13 pages. For the sake of round numbers though, let&#8217;s say that the average person mailing in a return is 10 pages. That means another <strong>70,000 trees</strong> were cut down to send the information to the IRS a second time.</p>
<p>Every year, that means over <strong>100,000 trees</strong> are being destroyed every year just to pass this information around multiple times. And that doesn&#8217;t include the rest of the carbon footprint of this process (converting trees to paper, the resources used in printing, and the delivery of the forms).</p>
<p><strong>A Better Idea</strong><br />
I don&#8217;t expect the US to do the smartest thing and switch to a <em>taxed at source</em> model, where companies who pay people are responsible for deducting the correct amount of tax <em>before</em> sending out the money, any time soon. I just don&#8217;t believe it is in the American psyche. Especially not when I hear so many people who are ecstatic to receive a refund from the IRS! They don&#8217;t seem to realise that all those refunds mean is that they gave the IRS an interest free loan for the year.</p>
<p>There is another solution though that would make much more sense than the current scheme: just bill me!</p>
<p>Yes, that&#8217;s right, the IRS (and the state tax authorities too) have all the information that they need to be able to calculate how much tax I owe, or how much they owe me. They have the resources to process that data, and it is all keyed off of a single identifier. So, why can&#8217;t they just send me a statement, and either a bill for what I owe or my refund? That would reduce the time most people spend on taxes to just minutes (the time required to scan the statement, and pay the bill). </p>
<p>The paper waste is also reduced dramatically. Let&#8217;s assume an average of 2 pages, printed double sided, per person billed, and 139 million bills mailed out. That&#8217;s under 10,000 trees now. Add electronic statements as an option, and no-fee bill pay options, and you also reduce the paper wasted by the process even further &#8211; assuming the same proportion of people who e-file their taxes, it would drop to below 5,000 trees per year &#8211; a reduction of over 95%.</p>
<p><strong>Tax Reform</strong><br />
How about it President Obama? Democrats? If you want to make a meaningful difference to the tax system in the US, how about reforming the collection mechanism rather than individual taxes? It makes sense from a fiscal perspective; it makes sense from an enforcement perspective (less avoidance); and it makes sense from an environmental perspective. What&#8217;s not to like here?</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.bluedonkey.org/?feed=rss2&amp;p=946</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Multitasking &amp; Battery Life</title>
		<link>http://weblog.bluedonkey.org/?p=941</link>
		<comments>http://weblog.bluedonkey.org/?p=941#comments</comments>
		<pubDate>Thu, 28 Jan 2010 08:42:59 +0000</pubDate>
		<dc:creator>John</dc:creator>
				<category><![CDATA[Apple]]></category>
		<category><![CDATA[Embedded Software]]></category>
		<category><![CDATA[Gadgets]]></category>
		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://weblog.bluedonkey.org/?p=941</guid>
		<description><![CDATA[One thing that has annoyed me for the longest time now is this myth that multitasking somehow reduces battery life. The iPhone multitasks today, it just doesn&#8217;t allow multiple third party apps to run concurrently.
I&#8217;ve written a lot of software, both application and system level (right down to the lowest levels of an RTOS), and [...]]]></description>
			<content:encoded><![CDATA[<p>One thing that has annoyed me for the longest time now is this myth that multitasking somehow reduces battery life. The iPhone multitasks today, it just doesn&#8217;t allow multiple third party apps to run concurrently.</p>
<p>I&#8217;ve written a lot of software, both application and system level (right down to the lowest levels of an RTOS), and believe me, if it is written properly a background app does little or no harm to battery life.</p>
<p>Many of the applications that people would like to see running in the background would spend almost all of that time waiting for a system event. That waiting state doesn&#8217;t harm your battery life; only when the application is actually processing something does it really consume power. The push mechanism on the iPhone today might actually be worse since it has to load the app each time, a far more expensive operation (in CPU, and therefore battery) than just switching to one that is already &#8220;running.&#8221;  </p>
<p>Consider the IM app example that is so often used to support the claim that background apps kill battery life. Sure, if you run the IM app (background or foreground) and stream messages at it continually, then it will reduce the battery life. If you just have it sitting there in case somebody tries to start a session though it isn&#8217;t doing anything most of the time (occasional presence messages perhaps). I ran an IM app all the time on my Nokia N95, connected over AT&#038;T&#8217;s network 24/7. My battery life was unaffected, as expected.  </p>
<p>Another example of a well behaved background app is the daemon that we wrote for the jailbroken version of Devicescape&#8217;s app (before the SDK and app store existed). It made no difference to battery life because it spent almost all the time blocked waiting for a system event. One that only happened when a new Wi-Fi connection was made. We run in the background on Nokia, Windows Mobile and Android (not to mention Windows XP/Vista/7 and Mac OS X) today without impacting battery life.  </p>
<p>So what will affect battery life? Well, an app that continues to do something in the background, rather than waiting for an event, one that polls for an event rather than blocking until the OS tells it about the event, or one that requires a power-hungry piece of the hardware to be on all the time (e.g. GPS). But even those apps have their place. Imagine a background image uploader: it will do something in the background while it is needed, and then exit or wait for a new photo to be taken. Or an app that checks your location every 5 minutes. It is my choice to use the battery that way, so why restrict it? Just make sure it is reasonable for the application, explained to the user, and under my control (can be checked as part of the review process). </p>
<p>These types of apps don&#8217;t take any more power than they would if I left them running in the foreground, but letting me push them to the background allows me to choose if I want to watch them work, or read my email etc.</p>
<p>Above all, please stop spreading this myth that multitasking or background processes will harm battery life. Only badly written apps would do that.    </p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.bluedonkey.org/?feed=rss2&amp;p=941</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
