<?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 McInerney&#039;s Blog</title>
	<atom:link href="http://jamesmc.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://jamesmc.com/blog</link>
	<description>Autobiographical writing from a technologist</description>
	<lastBuildDate>Tue, 07 Feb 2012 19:33:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Uploading Pictures on Mobile Web</title>
		<link>http://jamesmc.com/blog/?p=43</link>
		<comments>http://jamesmc.com/blog/?p=43#comments</comments>
		<pubDate>Tue, 07 Feb 2012 19:31:18 +0000</pubDate>
		<dc:creator>jamesmc</dc:creator>
				<category><![CDATA[Mobile development]]></category>

		<guid isPermaLink="false">http://jamesmc.com/blog/?p=43</guid>
		<description><![CDATA[<p>I&#8217;m writing an app at the moment for the Defibrillator Challenge held in Philadelphia this month, which will award $10,000 for members of the public to locate defibrillators (<a title="see here" href="http://scailab.media.mit.edu/heartcrowd/welcome.jsp?referrer=contact@jamesmc.com" target="_blank">see here</a> for more info). Defibrillators or AEDs are medical devices that are used to start the heart again after a heart attack. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m writing an app at the moment for the Defibrillator Challenge held in Philadelphia this month, which will award $10,000 for members of the public to locate defibrillators (<a title="see here" href="http://scailab.media.mit.edu/heartcrowd/welcome.jsp?referrer=contact@jamesmc.com" target="_blank">see here</a> for more info). Defibrillators or AEDs are medical devices that are used to start the heart again after a heart attack. There is no good central list of them for Philadelphia, so this is one way that the University of Pennsylvania is intending to find them.</p>
<p>We want our mobile users to be able to describe where the AED is, and to upload a photo of it (firstly, as some reassurance that they are not simply lying about finding one, since we are paying them $5 per AED found).</p>
<p>The problem? The mobile web is not very good at photo uploads. The iPhone and iPad categorically do not allow any file uploads in Safari. Not all Android devices allow file upload, and the ones that do provide a terrible experience (I&#8217;ve programmed some things for Android and it took me about 5 mins just to find my photo folder from the root directory &#8211; what hope does someone less technically able have in doing it?). Blackberry seems to be better at it, but it&#8217;s hard for me to know well because I don&#8217;t normally have access to those devices.</p>
<p>If I&#8217;m cynical, I could believe that Apple and Google know that they get a 30% and 20% cut (respectively) from app purchases and in-app purchases, so have little incentive to make mobile web browsing a superior experience. Also, their markets are under their control, which gives them more power (especially Apple who wield that power more tightly).</p>
<p>In practical terms, here are the workarounds I discovered:</p>
<ul>
<li><strong>Use an app intermediary like <a title="Aurigma Up" href="http://www.aurigma.com/iphone/" target="_blank">Aurigma Up</a> or <a title="Picup" href="http://picupapp.com/" target="_blank">Picup</a></strong> - The idea is that when your user reaches the stage in your workflow where they want to upload a photo (on your mobile website), they are directed to download one of these apps. From then on, every time they want to upload a photo to your website they click a link which seamlessly opens the separate photo uploading app, which allows them to select or capture a photo for upload. After this they are automatically sent back to your website. I&#8217;ve tried these and they seem to work ok (Aurigma worked better for me). The problem: it&#8217;s a clunky experience for the user, who might prefer NOT to expend the energy necessary to understand this system. (Incidentally, I could not find any apps for Android that do this &#8211; anybody?).</li>
<li><strong>Provide a personal email address for the user to email photos to</strong> &#8211; This is what Facebook does on their mobile website. The email address is slightly memorable (such as 123dodge456@yoursite.com) and the user is expected to email their file in the normal way. I did consider how to implement this, and came across this <a href="http://code.google.com/p/django-webmail/wiki/Features" target="_blank">Django framework</a> for webmail. This is separate from normal Django which deals with server requests; you want a program that can regularly scan a given inbox and update your models with files attached to incoming emails.</li>
<li><strong>Wrap your website in a multi-platform app framework</strong> like <a href="http://phonegap.com/" target="_blank">PhoneGap</a> or <a href="http://www.quickconnectfamily.org/qc_hybrid/" target="_blank">QuickConnectFamily</a> &#8211; These are frameworks that work like an app for the mobile user, but which are written in web languages like HTML/jQuery, with access to native functionality like audio, accelerometer and file uploading. I consider this a workaround because in theory it should be very easy to wrap your existing web code into one of these apps and deploy on all the platforms. This is what I ended up doing because of the benefits of home screen visibility, ease of use, and app market visibility. Will probably write a separate post on my experience with PhoneGap.</li>
</ul>
<div>In conclusion, I&#8217;m very excited by the future of HTML5 and the mobile web because you get to update your user experience and functionality in real time, without waiting for approval or for your users to manually update their apps. You are also not at the mercy (in financial and flexibility terms) to app store controllers like Apple, Google and RIM (though there are probably discoverability benefits that also help you). Unfortunately, this might also be the reason why more progress hasn&#8217;t been made yet on this fundamental experience of uploading photos.</div>
]]></content:encoded>
			<wfw:commentRss>http://jamesmc.com/blog/?feed=rss2&#038;p=43</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Author Identification</title>
		<link>http://jamesmc.com/blog/?p=30</link>
		<comments>http://jamesmc.com/blog/?p=30#comments</comments>
		<pubDate>Fri, 19 Nov 2010 14:07:26 +0000</pubDate>
		<dc:creator>jamesmc</dc:creator>
				<category><![CDATA[Tech ideas]]></category>

		<guid isPermaLink="false">http://jamesmc.com/blog/?p=30</guid>
		<description><![CDATA[<p>For several years it has been possible to automatically identify the author of a given text. Some universities use it to detect plagiarism. It has been applied to discover whether Alexander Hamilton or James Madison actually wrote the <a href="http://en.wikipedia.org/wiki/Federalist_Papers#Disputed_essays">twelve contested essays</a> in the Federalist Papers (answer: Madison wrote most of them). A typical scenario might be [...]]]></description>
			<content:encoded><![CDATA[<p>For several years it has been possible to automatically identify the author of a given text. Some universities use it to detect plagiarism. It has been applied to discover whether Alexander Hamilton or James Madison actually wrote the <a href="http://en.wikipedia.org/wiki/Federalist_Papers#Disputed_essays">twelve contested essays</a> in the Federalist Papers (answer: Madison wrote most of them). A typical scenario might be that you are given a set of texts of uncontested authorship and a test text of unknown origin. Can you identify who wrote it, out of a set of candidate authors? (N.B. I am using the term &#8216;author&#8217; in the most general sense, as somebody who has written a piece of text, which could be an blog, letter, email, maybe even a text message).<span id="more-30"></span><br />
I think this area is fascinating because so much writing is done on the web with the assumption of anonymity. Indeed, this assumption might be regarded as one of the web&#8217;s most liberating features. You can be a blogger inside a large corporation letting the world know about dubious practices. Or you can share your experiences as a <a href="http://en.wikipedia.org/wiki/Belle_de_Jour_(writer)">call girl</a> working in London. Does the world benefit from this ability to be at once anonymous and ubiquitous? Aside from giving some people the feeling that they can get away with being ten times more obnoxious than normal, I think there is a net benefit.</p>
<p>But attempts to anonymise your writing are likely to fail against techniques involving pattern recognition and machine learning. There are certain stylographic features of which most of us are not even aware. Given a certain sample size, these features constitute your &#8216;fingerprint&#8217; that can be used to verify the identity of an author. (&#8216;Fingerprint&#8217; is a dubious word to use at this point because I don&#8217;t know whether there is something about every person&#8217;s writing that is truly unique, but I will stick with it for now). Of course, if your fingerprint is mixed among millions of others, then it is practically impossible to do this kind of analysis because it would take too long to do. But in the case of the whistleblower, who may have revealed certain information that is known only to a limited set of people, the danger is greater. The case against the possibility of a larger candidate pool may also change as computer power increases (indeed, quantum computing, though nascent at the moment, excels at this type of parallel processing).</p>
<p>Along these lines, just for fun, I have been thinking about how one might outwit stylographic analysis. Could it be possible to create a program that can change a piece of writing just enough to make it impregnable to stylographic analysis, while also leaving the meaning and the style of the piece intact? It&#8217;s an interesting question. My first step in this area has been to create a simple program to perform author identification in the first place. It was done in only a few hours, nothing fancy at all. I tried it out with a small (*ahem*, very small) amount of data and it seemed to work ok. I downloaded novels by Charles Dickens and several of his contemporaries (Henry James, Louisa May Alcott and George Eliot) from <a href="http://www.gutenberg.org/">Project Gutenberg</a> and the program got them all right, given training with two works, and testing with one work, per author.</p>
<p>You can download the python program below for free (for which you need to have<a href="http://www.python.org/download/">python</a> installed in your machine &#8211; also free). First, unzip the package to a directory of your choice; put your writing samples (the larger and more numerous the better) into the same directory; run the training part &#8216;Train.py&#8217; using the instructions in the &#8216;README&#8217; file; then run the testing part with &#8216;python CompareFeatures.py [filename]&#8216; where you should fill in the filename of the sample you want to test. To get you started, I already included some of the classic texts that I used to test the system. If I get round to it, I will try and put a user-friendly GUI around it.</p>
<p><a href="http://jamesmc.com/authorid.zip">DOWNLOAD HERE</a></p>
<p>I&#8217;m not very good at disclaimers but I guess I should tell you that it is provided &#8216;as is&#8217; with no implied warranty or support and no guarantee that it will actually work. Do not use the program for commercial purposes without my permission. All rights reserved.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmc.com/blog/?feed=rss2&#038;p=30</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Scientist Flash Futures Competition</title>
		<link>http://jamesmc.com/blog/?p=25</link>
		<comments>http://jamesmc.com/blog/?p=25#comments</comments>
		<pubDate>Fri, 19 Nov 2010 14:01:01 +0000</pubDate>
		<dc:creator>jamesmc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesmc.com/blog/?p=25</guid>
		<description><![CDATA[<p>I have been reading <a href="http://www.newscientist.com/">New Scientist</a> ever since I was about eleven years old. It&#8217;s been a huge influence on my thinking, which I would like to think has turned out to be evidence and reason-based. Every year they hold a flash fiction competition.<a href="http://www.newscientist.com/article/dn19561-flash-fiction-competition-2010-forgotten-futures.html">This year&#8217;s topic</a> is about &#8216;forgotten futures&#8217;. The idea was to imagine how [...]]]></description>
			<content:encoded><![CDATA[<p>I have been reading <a href="http://www.newscientist.com/">New Scientist</a> ever since I was about eleven years old. It&#8217;s been a huge influence on my thinking, which I would like to think has turned out to be evidence and reason-based. Every year they hold a flash fiction competition.<a href="http://www.newscientist.com/article/dn19561-flash-fiction-competition-2010-forgotten-futures.html">This year&#8217;s topic</a> is about &#8216;forgotten futures&#8217;. The idea was to imagine how the world would be now if one of the failed theories of the past had actually turned out to be true e.g. if the ether had turned out to exist after all or if the eyes really did work by emitting corpsucles. All entries had to be 350 words or under. I chose to imagine how the world would be if <a href="http://en.wikipedia.org/wiki/Lamarckism">Larmarck&#8217;s theory of evolution</a> had turned out to be true. <span id="more-25"></span></p>
<p><strong>Lamarckian Morals</strong></p>
<p>&#8220;Will the defendants please rise&#8221;, a rich baritone commanded.</p>
<p>I duly stood up, sharing a glance of hopeful solidarity with my wife, who was also in handcuffs.</p>
<p>&#8220;We have heard testimony from a leading demographer: as a married couple in your 30s, you are highly likely to have your first child within the next few years. Furthermore, a biologist from Oxford University has reminded us that the Lamarckian theory of evolution has been the scientific consensus for over 150 years. The evidence for the inheritability of acquired characteristics is overwhelming.&#8221;</p>
<p>For a few moments, my mind flew back to a London Zoo school trip, where we saw a family of giraffes with necks as tall as the clock tower of Big Ben. Each generation of giraffes bred in captivity was trained to have longer necks than their parents, by feeding them from ever higher cranes. This was proof, if any more were needed, that each generation passes the features it acquires directly to the next.</p>
<p>&#8220;Witnesses have testified to your most appalling lifestyle. Not only do you smoke and overeat, you have consistently failed to push your intellectual boundaries since the free university education you received ten years ago. Mr and Mrs Wendel, the state paid for that education so that the next generation might soar higher and see farther. And in return, you have been sitting at home watching YouTube?&#8221;</p>
<p>The incredulity of the judge condensed into the rising pitch of his speech.</p>
<p>&#8220;Your behaviour disgusts this court. Although you have not yet conceived, your actions have shown a criminal intent to endow your future children with bad genes, severely and permanently disadvantaging them in society. I have no choice but to find you both guilty of child abuse.&#8221;</p>
<p>&#8220;I sentence you to five years in a reformation clinic. There you will acquire the characteristics of good parents. A strict diet, a daily exercise regime and an education programme will get you back into shape. With any luck, your future children will not exhibit the traits I heard about today. Bailiffs, take them away!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmc.com/blog/?feed=rss2&#038;p=25</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Airplanes, Artificial Brains and Iron Men</title>
		<link>http://jamesmc.com/blog/?p=20</link>
		<comments>http://jamesmc.com/blog/?p=20#comments</comments>
		<pubDate>Sat, 10 Apr 2010 12:57:39 +0000</pubDate>
		<dc:creator>jamesmc</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jamesmc.com/blog/?p=20</guid>
		<description><![CDATA[<p>This time last year I really got my teeth into the lecture scene. I loved attending events, conferences and evenings based on subjects such as clean technology, entrepreneurship and other technology-related topics. The best part about it were the people you would meet at random. People of all ages and occupations- you could be sitting [...]]]></description>
			<content:encoded><![CDATA[<p>This time last year I really got my teeth into the lecture scene. I loved attending events, conferences and evenings based on subjects such as clean technology, entrepreneurship and other technology-related topics. The best part about it were the people you would meet at random. People of all ages and occupations- you could be sitting next to them or happen to be walking towards the wine table at the same time. Whatever situation it was, however important the person looked, you had license to introduce yourself because you were already bonded by the fact that both of you were interested enough in Smart Grids or Green Cars to forgo a comfortable evening in the living room.<span id="more-20"></span> Then I started my MSc, which is a taught course, so the appeal of attending lectures in my spare time lost its lustre (in much the same way that speaking to anybody on the phone felt like work during the two years I worked at the <a href="http://www.tardis-group.com/">Tardis Group</a> making sales calls every day).</p>
<p>It was around this lecture-thirsty time that I heard my granddad was due to attend one about airplane history. This seemed to me to be another great area I could explore, with random experts just waiting to wax lyrical to me about this or that issue in the field. I would also get to spend some time with granddad. He is enamored with airplanes. He designed them during World War II. Both my grandfathers actually designed planes (but the other one died many years ago). This must go some way to explaining who I am. If I had been born over 60 years earlier, I probably would have also dreamed of extending the miracle of powered flight. If granddad had been born in the 1980s, he would probably now be working for Google.</p>
<p>And so we met in central London, then sat listening to a lecture given by a man maybe twenty years his junior. He was passionately presenting his theory on the decline of the airplane industry in the UK. I forget the details, perhaps because I was mesmerized by the genealogy of the airplane companies involved and the encyclopedic knowledge that granddad indicated he had, using only a few murmurs of disagreement during the lecture at seemingly esoteric moments. It was fun, in a looking-across-the-double-generational-divide kind of way. After the lecture I made the effort to speak to one or two people but granddad seemed impatient to get moving. I was puzzled by this lack of engagement with like minded plane enthusiasts. Was he not interested in getting to really know anyone new? Is this what happens as you approach your final years &#8211; no point in networking because you won&#8217;t be around to make full use of even the juiciest opportunities to try out a new idea or cultivate a new interest? Best not to ask, I thought. He probably knows what he&#8217;s doing.</p>
<p>My favourite part of the movie &#8220;Iron Man&#8221; starts when Tony Stark is being held captive in a cave by terrorists. He starts to build a mechanical suit that will allows him to literally walk out of his prison. It really stimulated my imagination because he was using his creativity to get out of an extremely tight spot. This moment gave me tingles up the spine when I first saw it (even if I was already 23 years old at the time). It was not long after I saw the film that I was given another pile of extremely dull deal research work to do by an associate at the investment bank I was interning at. Not only was the work dull, it seemed to always be required in record breaking time, a double torture. So I had the idea to write a program to do it for me. Suddenly work was interesting again. I was working past the hours when everyone else went home. But it didn&#8217;t matter because a little extra time invested now would do away with a slice of the drudgery for a lifetime (or at least the next 6 months). I would hum the tune to the Black Sabbath song on the way home every night. And when it was done, it was glorious.</p>
<p>It strikes me that if I project this experience back in time and change a few of the variables, I can see exactly why granddad seems to spend most of his waking moments thinking about airplanes. Imagine you&#8217;re a young man inspired by this amazing new technology. Howard Hughes is strutting around building bigger and better planes with his fortune. Then all of a sudden the entire world is at war. Britain is under attack from an evil empire. We simply have to build better combat and intelligence technologies than our enemies. It&#8217;s &#8220;Iron Man&#8221; all over again. I usually find that a dose of panic can work wonders with creativity. Imagine what the fear of subjugation or death can do? So to come through that experience victorious would surely make an immense impact.</p>
<p>I, of course, do not wish for any kind of analogous situation for my lifetime (although one might see some parallels with the problem of global climate change). But still I can see myself sitting there in 2065, right next to my grandson. He looks interested in the lecture but he&#8217;s probably watching a movie on his ocular implant. The guy giving the talk was not even born as I write this, but he thinks he knows why America was so utterly overtaken in the artificial intelligence arms race by China. I still can&#8217;t get enough of those artificial brains, but with any luck I&#8217;m working and still have another 20 or 30 years of active life remaining, depending on how far medical science has advanced. So after the lecture I grab the attention of a wine-dispensing droid and introduce myself to a like-minded technologist. Then another. Didn&#8217;t I think the speaker gravely underplayed the importance of the nanobotic civil war of 2041? &#8220;Yes&#8221;, I say, &#8220;certainly&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmc.com/blog/?feed=rss2&#038;p=20</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

