<?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 m allen</title>
	<atom:link href="http://jamesmallen.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://jamesmallen.net</link>
	<description>teacher and computer scientist</description>
	<lastBuildDate>Thu, 04 Apr 2013 18:21:34 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Raspberry Pi Adventures &#8211; Display and SD Card Issues</title>
		<link>http://jamesmallen.net/2013/04/04/raspberry-pi-adventures-display-and-sd-card-issues/</link>
		<comments>http://jamesmallen.net/2013/04/04/raspberry-pi-adventures-display-and-sd-card-issues/#comments</comments>
		<pubDate>Thu, 04 Apr 2013 18:21:34 +0000</pubDate>
		<dc:creator>jma</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://jamesmallen.net/?p=232</guid>
		<description><![CDATA[My students in Intro CS this year have decided they want to build a tabletop arcade game for their final project. They picked this because they had heard about the Raspberry Pi, and wanted to do something cool with it. &#8230; <a href="http://jamesmallen.net/2013/04/04/raspberry-pi-adventures-display-and-sd-card-issues/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>My students in Intro CS this year have decided they want to build a tabletop arcade game for their final project. They picked this because they had heard about the <a href="http://www.raspberrypi.org/">Raspberry Pi</a>, and wanted to do something cool with it. I swear that I had no influence on them choosing this project (though my personal collection of arcade games may have influenced my willingness to allow them to do something of this scale).</p>
<p><span id="more-232"></span>First up, I ordered the Raspberry Pi. This ended up being much more complicated than expected. At the time, Amazon had the Raspberry Pi in stock &#8211; but for $90! Considering this was supposed to be a &#8220;$35 computer,&#8221; I wasn&#8217;t interested in that. I found the American distributor is a company called <a href="http://www.newark.com/">Newark</a>, and I was able to order directly from them. Unfortunately, I had to pay a rather exorbitant amount for shipping and the thing was backordered. It arrived just a few days before school started back up after spring break.</p>
<p>Device and adapter cables in hand, I excited brought the Pi to my students. I had done a little bit of reading of the quick-start guide (and I&#8217;m familiar with Linux), but I decided I wanted them to do most of the prep work. I showed them the Pi, and explained what each of the important ports was for, along with a variety of cables and an SD card, and from that point on I let them take the lead.</p>
<p>First they plugged everything in, including the SD card. They did this without reading any instructions whatsoever. The Pi powered on, but nothing appeared on the screen. At this point, they were stumped. I suggested they actually read the quick start guide that I had pointed them to. They had only looked at the first page! Kids these days&#8230;</p>
<p>They soon discovered they needed to put an &#8220;image&#8221; on the SD card. I offered to download it for them with my faster internet connection, if they could tell me what file to download. They found the &#8220;Raspbian wheezy&#8221; image file, and I commenced downloading while we discussed the <a href="http://www.debian.org/doc/manuals/debian-faq/ch-ftparchives.en.html#s-sourceforcodenames">origins of that very silly-sounding name</a>.</p>
<p>So after writing the image to the SD card, we started it up again. This time, a green light started blinking &#8211; that looked good! Unfortunately, nothing came up on the monitor we had connected via an HDMI to DVI converter.</p>
<p>I suggested rebooting, which they did by unplugging the USB power source. Unfortunately, the screen was still blank.</p>
<p>At this point, I suggested that we plug it in to the overhead projector using an ancient composite video connection, and Eureka, we had a picture! The students logged in using the default credentials (by this point, they had learned that they should actually read, and not just skim). At this point, class ended, but I promised to investigate the video issues.</p>
<p>So I set out to figure out the video issues. I tried using a different video adapter (HDMI to VGA), but this gave me the same result. I plugged in to a TV that had an HDMI connection, and that worked fine, so it seemed like it was not properly detecting the existence of the monitor.</p>
<p>I found mention of changing some <a href="http://elinux.org/RPiconfig">config.txt settings</a>, so I put the SD card back in my Windows 7 computer. Uh oh. The card was showing up as a 55 MB unformatted partition, and I couldn&#8217;t see any of the files!</p>
<p>I should note that I have a Dell Latitude E6410 laptop, with a built-in Ricoh SD Card reader. It appears that this was actually the culprit. I tried a bunch of futzing around, attempting to hook the SD card reader up to a virtual machine running Ubuntu, but nothing would get the computer to recognize anything other than a small RAW partition.</p>
<p>I decided to try an external SD card reader, and this solved my troubles. Now I was able to see a FAT partition, including files! So, note to wary travelers: if you&#8217;re having trouble working with the files on your SD card, try using a different card reader!</p>
<p>Next up was to actually make some changes to the config. First off, you should use a multi-platform-aware editor, such as Notepad++, to work with the config files. Regular old notepad will not show the line endings properly.</p>
<p>I opened up config.txt, and tried a bunch of little changes, going back and forth between the computer and the RPi. The one setting that actually made a difference was</p>
<pre class="brush: actionscript3; gutter: true">hdmi_force_hotplug=1</pre>
<p>I uncommented it by removing the &#8220;#&#8221; from the beginning of the line, and then the RPi was able to boot connected to a Dell monitor over DVI! This appeared to be the only setting change necessary to get a picture to show up (although we may decide to change the resolution to suit our needs later).</p>
<p>Hopefully this helps someone having similar problems. Or even me next year when I forget all this.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmallen.net/2013/04/04/raspberry-pi-adventures-display-and-sd-card-issues/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Doctor Who Christmas Special</title>
		<link>http://jamesmallen.net/2012/12/25/doctor-who-christmas-special/</link>
		<comments>http://jamesmallen.net/2012/12/25/doctor-who-christmas-special/#comments</comments>
		<pubDate>Wed, 26 Dec 2012 01:10:10 +0000</pubDate>
		<dc:creator>jma</dc:creator>
				<category><![CDATA[Portfolio]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[dslr]]></category>
		<category><![CDATA[fcpx]]></category>

		<guid isPermaLink="false">http://jamesmallen.net/?p=228</guid>
		<description><![CDATA[Starring Hurley and Penny]]></description>
				<content:encoded><![CDATA[<p>Starring Hurley and Penny</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmallen.net/2012/12/25/doctor-who-christmas-special/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Artemis on iPads &#8211; before the app comes out</title>
		<link>http://jamesmallen.net/2012/11/26/artemis-on-ipads-before-the-app-comes-out/</link>
		<comments>http://jamesmallen.net/2012/11/26/artemis-on-ipads-before-the-app-comes-out/#comments</comments>
		<pubDate>Mon, 26 Nov 2012 23:03:10 +0000</pubDate>
		<dc:creator>jma</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://jamesmallen.net/?p=218</guid>
		<description><![CDATA[If you have not yet heard of Artemis, the fantastic Spaceship Bridge Simulation game by Thom Robertson, then you should check it out right now. Chances are you&#8217;re here because you HAVE heard of it, though. According to the developer, &#8230; <a href="http://jamesmallen.net/2012/11/26/artemis-on-ipads-before-the-app-comes-out/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>If you have not yet heard of <a href="http://www.artemis.eochu.com/">Artemis</a>, the fantastic Spaceship Bridge Simulation game by Thom Robertson, then you should check it out right now.</p>
<p><iframe src="http://www.youtube.com/embed/72XhdVqDT1g?list=PL532DC01F548EE15C&amp;hl=en_US" frameborder="0" width="560" height="315"></iframe></p>
<p>Chances are you&#8217;re here because you HAVE heard of it, though. According to the developer, an iOS app is in the works, but it still isn&#8217;t out. We had a need for an extra station at a party the other night, so I spent one of my days off figuring out a way to play Artemis using an iPad.</p>
<p>It turns out I&#8217;m not the only one to have struggled with this. Artemis forum member <em>troy</em> has <a href="https://docs.google.com/document/d/1b8ZYNnMttUN2h244gvwEcXjztnsJ5YnTqr_mElpaTdA/edit">posted a write-up</a> of how he accomplished the same goal using some different equipment than me. My method is similar &#8211; the short of it is that you use a virtual machine or machines running Artemis, and connect to those from an iPad using some sort of remote desktop functionality.</p>
<p>My main desktop PC is an iMac, so I was looking for Mac-compatible solutions. Since Artemis is a Windows-only game, I decided to use <a href="http://www.vmware.com/products/fusion/overview.html">VMware Fusion</a> to run the game. I installed Windows 7 in a virtual machine using the (legal) free 30-day trial <a href="http://www.google.com/url?q=http%3A%2F%2Fmsft.digitalrivercontent.net%2Fwin%2FX17-59463.iso&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNFSGmGjLvRJXPLBjPOrjHbRQ0mFng">available here</a>.</p>
<p>Then, rather than use Splashtop or one of the other for-pay apps, I decided to use a feature of VMWare Fusion (and, I believe VMware workstation) that lets you connect directly to a virtual monitor using VNC. In VMware Fusion, you set this up by going into the VM settings, choosing <strong>Advanced</strong>, and enabling <strong>Remote display over VNC</strong>.</p>
<p><a href="http://jamesmallen.net/wp-content/uploads/2012/11/Screen-Shot-2012-11-26-at-5.47.33-PM.png"><img class="alignright size-full wp-image-220" title="Screen Shot 2012-11-26 at 5.47.33 PM" src="http://jamesmallen.net/wp-content/uploads/2012/11/Screen-Shot-2012-11-26-at-5.47.33-PM.png" alt="" width="689" height="505" /></a></p>
<p>&nbsp;</p>
<p>I also set a different port number than the default 5900 (because I have screen sharing set up on my Mac). If you plan to run multiple instances of Artemis for use with iPads, you should set each of them to a unique port number. It&#8217;s very common to use the numbers after 5900.</p>
<p>Start up the VM, install Windows, install the VMware Tools, and install Artemis. Also, make sure to set the VM to use the network in <strong>Bridged</strong> mode. Next it&#8217;s time to test out the VNC connection.</p>
<p>From an iPad, you need a VNC app. The best value app I found for this purpose is called <a href="http://remoterlabs.com/main/">Remoter VNC</a> (it happened to be free over Thanksgiving weekend &#8211; bonus for me!). I found other apps either had issues displaying colors, or weirdness involving clicking.</p>
<p>From within Remoter VNC, you need to add a new connection.</p>
<ol>
<li>Choose Manual Setup.</li>
<li>Set the server type to VNC/ScreenSharing.</li>
<li>Give the connection a name, such as &#8220;Artemis.&#8221;</li>
<li>For the hostname, enter the IP address of the computer that&#8217;s running VMware Fusion. Please note you should NOT enter the IP address of the virtual machine itself. You can <a href="http://www.youtube.com/watch?v=IodtMNPa6Lo">find your IP address using System Preferences</a>.</li>
<li>Make sure to enter the VNC port number to whatever you set it to in the VM settings.</li>
<li>Enter the password you configured, if any, and Save.</li>
</ol>
<p>You should now be able to connect to the VM using the Remoter app.</p>
<p>If all is well, tapping the screen on your iPad should result in a click on the VM. I was able to use the iMac as a view screen running the Wineskin version full screen while the VM was running in the background. There was a slight delay, so I&#8217;d only say this was appropriate for use by Communications, Science, or a Tactical map, but it was still pretty cool!</p>
<p>You could use this same technique to put Artemis on an Android tablet or smartphone, as long as you can find a decent VNC app.</p>
<p>Next on my to-do list: reverse engineering the Artemis network protocol to make a completely independent client&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmallen.net/2012/11/26/artemis-on-ipads-before-the-app-comes-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Working with Dropbox from my Pogoplug</title>
		<link>http://jamesmallen.net/2012/10/17/working-with-dropbox-from-my-pogoplug/</link>
		<comments>http://jamesmallen.net/2012/10/17/working-with-dropbox-from-my-pogoplug/#comments</comments>
		<pubDate>Wed, 17 Oct 2012 14:32:53 +0000</pubDate>
		<dc:creator>jma</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://jamesmallen.net/?p=214</guid>
		<description><![CDATA[I had a bunch of large files backed up on my pogoplug that I wanted to get onto my iPad and iPhone. Long story short, I decided that the best way would be to use Dropbox. Unfortunately, you can&#8217;t install &#8230; <a href="http://jamesmallen.net/2012/10/17/working-with-dropbox-from-my-pogoplug/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I had a bunch of large files backed up on my pogoplug that I wanted to get onto my iPad and iPhone. Long story short, I decided that the best way would be to use Dropbox. Unfortunately, you can&#8217;t install Dropbox on an ARM machine!</p>
<p>Luckily, I found this great script by andreafabrizi: <a href="https://github.com/andreafabrizi/Dropbox-Uploader">Dropbox-Uploader</a>. This is a simple bash script that only relies upon cURL being available on the system it&#8217;s running, which is available pretty much everywhere. The setup process was a little weird, but the first time you run the script, it guides you through the process. Now I&#8217;m able to put things in my Dropbox using a simple ssh connection to my pogoplug!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmallen.net/2012/10/17/working-with-dropbox-from-my-pogoplug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreedomPop &#8211; Free 4G Internet</title>
		<link>http://jamesmallen.net/2012/10/11/freedompop-free-4g-internet/</link>
		<comments>http://jamesmallen.net/2012/10/11/freedompop-free-4g-internet/#comments</comments>
		<pubDate>Thu, 11 Oct 2012 12:54:48 +0000</pubDate>
		<dc:creator>jma</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://jamesmallen.net/?p=210</guid>
		<description><![CDATA[Yesterday, my Freedom Spot &#8211; Photon arrived in the mail, and I just thought I&#8217;d post a quick review. FreedomPop is a new-ish service focused on providing free (as in beer) internet access anywhere in their coverage areas. No more &#8230; <a href="http://jamesmallen.net/2012/10/11/freedompop-free-4g-internet/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Yesterday, my Freedom Spot &#8211; Photon arrived in the mail, and I just thought I&#8217;d post a quick review.</p>
<p><a href="http://www.freedompop.com/">FreedomPop</a> is a new-ish service focused on providing free (as in beer) internet access anywhere in their coverage areas. No more hunting down coffeeshops or McDonalds &#8211; just bring your hotspot, and you&#8217;re good to go! They offer 500 MB free per month, with the ability to pay by the MB after that or upgrade to a bigger plan.</p>
<p><span id="more-210"></span>Their freemium model seems a lot like DropBox&#8217;s &#8211; they expect the majority of their customers to stick with the &#8220;free&#8221; plans, and pay for everything with the minority premium users. Note that even the free plans do require an upfront &#8220;deposit&#8221; for the cost of the hotspot/modem, so they might be making some profit here under the assumption that not everyone will return the device.</p>
<p>I already have an iPhone with a data plan, but I&#8217;m about to be bumped down to 2 GB per month, so this extra 500 MB could be quite useful. In addition, my iPad doesn&#8217;t have 3G or 4G, so my intention is to use this coupled with my iPad or when my iPhone&#8217;s data is running low.</p>
<p><img class="alignright size-medium wp-image-211" title="2012-10-11 08.22.30" src="http://jamesmallen.net/wp-content/uploads/2012/10/2012-10-11-08.22.30-300x224.jpg" alt="Photon Hotspot" width="300" height="224" /></p>
<p>When I opened the box, I was amazed at how tiny the hotspot is. In the picture, it is sitting on top of a pad of Post-It notes &#8211; it&#8217;s really small. It&#8217;s got a slightly rubbery feel, but overall, I think it&#8217;s a good size and weight.</p>
<p>Operation is quite simple &#8211; you turn it on by pressing the power button, wait while it acquires a signal, and then connect over wifi. The default SSID and password are printed right on the bottom of the device, but you can change those after logging in to the management interface, which works very similarly to a normal router.</p>
<p>Of course the first thing I did after connecting to it with my phone was test the speed. I was pleasantly surprised to see speeds that greatly exceeded my typical 3G speeds on my phone: 3.96 Mbps down, and 2.19 Mbps up, with a 106 ms ping time. Not bad for free.</p>
<p>My home happens to be within their coverage areas, so I&#8217;m pretty lucky. Unfortunately, here&#8217;s where FreedomPop has some work to do: their coverage areas are limited basically to areas that have Sprint 4G service. Cleveland happens to be one of those areas, but their <a href="http://launch.freedompop.com/coverage">coverage map</a> is mostly blank.</p>
<p>The other issue I&#8217;ve noticed so far is coverage inside my place of employment is very spotty. I get a weak signal on the hotspot, and when the signal is weak, the speeds go down significantly. I think this is mainly due to the construction of the building &#8211; it&#8217;s a very old school building, and I know that the walls here are basically impervious to wifi signals, so I can&#8217;t imagine they&#8217;re very good for 4G.</p>
<p>However, in newer constructions, or while driving, I think the performance is great, and I look forward to being able to use the internet more easily from my devices without running up my main data plan.</p>
<p>If you&#8217;re interested in trying the service out, let me know &#8211; also like Dropbox, they&#8217;ve got a referral system where people earn extra data for referrals, and who can say no to more free data? <img src='http://jamesmallen.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmallen.net/2012/10/11/freedompop-free-4g-internet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Out with the old</title>
		<link>http://jamesmallen.net/2012/10/03/out-with-the-old/</link>
		<comments>http://jamesmallen.net/2012/10/03/out-with-the-old/#comments</comments>
		<pubDate>Wed, 03 Oct 2012 16:15:20 +0000</pubDate>
		<dc:creator>jma</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://jamesmallen.net/?p=205</guid>
		<description><![CDATA[I received an e-mail the other day about a Konfabulator project that I hadn&#8217;t even thought about since 2007: over five years ago! The widget in question was one developed for a &#8220;4k contest,&#8221; one in which coders try to &#8230; <a href="http://jamesmallen.net/2012/10/03/out-with-the-old/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I received an e-mail the other day about a <a href="http://en.wikipedia.org/wiki/Yahoo!_Widgets">Konfabulator</a> project that I hadn&#8217;t even thought about since 2007: over five years ago! The widget in question was one developed for a &#8220;4k contest,&#8221; one in which coders try to make something interesting with a minimal amount of code. One of my submissions was a pseudo-3D rubik&#8217;s cube widget.</p>
<p>The person who contacted me had the submitted version of my code and was trying to use it as a basis for another project of his. Unfortunately, the submitted version was not designed to be human-readable, and was a bit annoying to work with.</p>
<p>Now, a lot has changed for me in five years. Back then, I was in a different career &#8211; freelance web development. Now I&#8217;m a computer science teacher. Back then, I used SVN to store and track changes for my work. Now, I use GitHub.<span id="more-205"></span></p>
<p>&#8220;No problem,&#8221; I told myself, &#8220;I&#8217;ll just pull the thing out of my SVN repository and send it to him.&#8221; Except I didn&#8217;t remember how to use SVN, or where my repository was.</p>
<p>If I&#8217;m struggling with this now, only a few years after I last had occasion to use it, imagine how I&#8217;ll feel in a few more years? I decided I needed to migrate my code, if only to ensure that I don&#8217;t end up with something unrecoverable. I&#8217;m a bit of a packrat.</p>
<p>Thankfully, there is a tool to help with just such a migration: <a href="https://github.com/nirvdrum/svn2git#readme">svn2git</a>. As soon as I figured out where my SVN repository was on my DreamHost server, I was able to move things over. I decided to migrate all of my public widgets &#8211; they don&#8217;t contain any sensitive information, and I didn&#8217;t feel like picking and choosing. Like I said, packrat.</p>
<p>The command I used to migrate them:</p>
<pre>svn2git svn+ssh://username@host/path/to/svn/repo --rootistrunk -v</pre>
<p>The &#8220;&#8211;rootistrunk&#8221; argument basically just copies over the repo file-by-file. Not using that option results in Git attempting to remap SVN conventions to Git conventions, but in my case, my project folders were kind of a mess. I just want to make sure the files are accessible in the future, I don&#8217;t care so much about nice organization of this old stuff.</p>
<p>The &#8220;-v&#8221; option turned on verbosity, which allowed me to see each step of the way. I ran into some problems with my environment that weren&#8217;t explained the first couple times I ran this command, so turning on &#8220;-v&#8221; allowed me to better see what was causing the problems.</p>
<p>Then it was a simple matter of adding this remote to the local git repo, and pushing it up to github (instructions via <a href="https://help.github.com/articles/importing-from-subversion">https://help.github.com/articles/importing-from-subversion</a>):</p>
<div>
<pre>$ git remote add origin git@github.com:GITHUB_USERNAME/REPO_NAME.git
$ git push origin master</pre>
</div>
<p>This part ended up taking awhile &#8211; I kept a lot of history with these things, including some big binary files like PSDs. If you want to see the repo, you can find it at <a href="https://github.com/jamesmallen/mywidgets">https://github.com/jamesmallen/mywidgets</a>.</p>
<p>Now I just need to do this with my other SVN projects, and future-proof myself!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmallen.net/2012/10/03/out-with-the-old/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting started with vim</title>
		<link>http://jamesmallen.net/2012/02/02/getting-started-with-vim/</link>
		<comments>http://jamesmallen.net/2012/02/02/getting-started-with-vim/#comments</comments>
		<pubDate>Thu, 02 Feb 2012 15:27:37 +0000</pubDate>
		<dc:creator>jma</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://jamesmallen.net/?p=139</guid>
		<description><![CDATA[I decided it&#8217;s finally time that I learn to properly use a terminal-based editor other than nano, since nano is rather limited when it comes to editing source code. vim seemed like a good choice, but I was so daunted &#8230; <a href="http://jamesmallen.net/2012/02/02/getting-started-with-vim/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I decided it&#8217;s finally time that I learn to properly use a terminal-based editor other than nano, since nano is rather limited when it comes to editing source code. vim seemed like a good choice, but I was so daunted by it. Then I discovered vimtutor &#8211; it&#8217;s a tutorial that takes place entirely in vim, and it&#8217;s nicely paced!</p>
<p>If you&#8217;ve got vim installed on your machine, just run <code>vimtutor</code> at a command prompt and follow the instructions from there. Hello, cursor movement using letter keys!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmallen.net/2012/02/02/getting-started-with-vim/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PogoPlug as a Siri Proxy</title>
		<link>http://jamesmallen.net/2012/01/29/pogoplug-as-a-siri-proxy/</link>
		<comments>http://jamesmallen.net/2012/01/29/pogoplug-as-a-siri-proxy/#comments</comments>
		<pubDate>Sun, 29 Jan 2012 22:27:54 +0000</pubDate>
		<dc:creator>jma</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://jamesmallen.net/?p=127</guid>
		<description><![CDATA[UPDATE 2012-02-03: I realized I forgot about installing the certificate on the non-4S device. Fixed! UPDATE 2012-02-04: amanpatel pointed out on the ArchLinuxArm forums that you need to make sure base-devel is installed. I&#8217;ve updated the prerequisites section to include &#8230; <a href="http://jamesmallen.net/2012/01/29/pogoplug-as-a-siri-proxy/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><strong>UPDATE 2012-02-03: I realized I forgot about installing the certificate on the non-4S device. Fixed!</strong></p>
<p><strong>UPDATE 2012-02-04: amanpatel pointed out on the ArchLinuxArm forums that you need to make sure base-devel is installed. I&#8217;ve updated the prerequisites section to include this.</strong></p>
<p>My wife got an iPhone 4S recently, which of course features Siri, the virtual assistant. I didn&#8217;t think I needed a 4S, but I was pretty jealous of Siri. Unfortunately, I don&#8217;t qualify for a discounted upgrade since I got my iPhone4 less than a year ago.</p>
<p>Enter <a href="http://blog.chpwn.com/post/14689740472">Spire</a> by <a href="https://twitter.com/#!/chpwn">@chpwn</a>. Spire lets you install Siri on a jailbroken iPhone, but it requires the use of a proxy that lets non-4S devices pretend to be a 4S. I found lots of instructions for getting a proxy up and running as a virtual machine, but I don&#8217;t like leaving full computers running all the time. I decided to figure out what would be required to make it work with what we had: a PogoPlug server.<span id="more-127"></span></p>
<p>Back in December I picked up a <a href="http://www.google.com/products/catalog?q=pogoplug+pink&amp;hl=en&amp;prmd=imvns&amp;resnum=1&amp;bav=on.2,or.r_gc.r_pw.r_cp.,cf.osb&amp;biw=1083&amp;bih=906&amp;um=1&amp;ie=UTF-8&amp;tbm=shop&amp;cid=8086923100599712541&amp;sa=X&amp;ei=RHklT877J8jj0gGZxND4CA&amp;ved=0CEYQ8wIwAA">PogoPlug</a> on sale for $20 shipped from J&amp;R Music/Computer World. $20 for a plug computer that can run a real version of Linux is an awesome deal (I&#8217;m excited about the Raspberry Pi, but that isn&#8217;t available yet). After trying out the installed version of Linux, I decided to put <a href="http://archlinuxarm.org/platforms/armv6/pogoplug-provideov3">ArchLinuxArm</a> on it for some more flexibility. It turns out this device is perfectly suited to act as a SiriProxy server!</p>
<h2>Necessary Items:</h2>
<ol>
<li>Device running ArchLinux (I used a PogoPlug B01 model for this, but I think any other ArchLinux machine will probably work as well)</li>
<li>USB hard disk or flash drive for keeping system files (there isn&#8217;t enough space on the internal flash memory for the entire system)</li>
<li>Router set to redirect traffic on ports 53 and 443 to your PogoPlug if your PogoPlug does not have an external IP address.</li>
<li>iPhone 4S (doesn&#8217;t need to be jailbroken)</li>
<li>iPhone 4 (jailbroken)</li>
</ol>
<div>Acknowledgements: https://gist.github.com/1552448</div>
<p>Okay, now for the work.</p>
<h2>Prerequisites</h2>
<ol>
<li>Make sure you&#8217;ve got your ArchLinux system up and running. I won&#8217;t go into that here &#8211; follow <a href="http://archlinuxarm.org/platforms/armv6/pogoplug-provideov3">the guide on the ArchLinuxArm site</a> if you&#8217;ve got the same PogoPlug model as me.</li>
<li>We&#8217;ve got to install a few packages (explanations for some of them are below). Luckily, pacman can handle these. Login to your box as root and run:
<pre>pacman -Sy dnsmasq git ruby zlib ruby-ncurses ruby-pkgconfig make base-devel</pre>
<p>Note that we will not be using rvm, as many other tutorials for this recommend. rvm is meant to simplify switching between various versions of ruby, but since we have limited resources on our PogoPlug, we&#8217;ll just be making sure that we&#8217;re running the correct version of Ruby system-wide.</li>
<li>We&#8217;ve also got to set up a few Ruby gems. These are pretty automated, but they took a while to complete on my pogoplug:
<pre>gem install rake bundler</pre>
</li>
<li>Make note of your external IP address. If your IP is not static, you&#8217;ll need to make sure you have some sort of dynamic DNS service in place so you can access your pogoplug from outside of your home network.</li>
</ol>
<h2>dnsmasq</h2>
<p><strong>dnsmasq </strong>is a simple DNS forwarder/rewriter. We will use this to spoof the iPhone 4S into talking to our SiriProxy instead of the real Siri servers.</p>
<ol>
<li>Edit <strong>/etc/dnsmasq.conf</strong> and create an entry to redirect <strong>guzzoni.apple.com</strong> to our server (replace <strong>XX.XX.XX.XX</strong>with your IP address), like so:
<pre class="brush: text; gutter: true"># Add domains which you want to force to an IP address here.
# The example below send any host in double-click.net to a local
# web-server.
#address=/double-click.net/127.0.0.1
address=/guzzoni.apple.com/XX.XX.XX.XX</pre>
</li>
<li>Test your configuration by running:
<pre>rc.d checkconfig dnsmasq</pre>
<p>You should receive the following message indicating it works:</p>
<pre>dnsmasq: syntax check OK.</pre>
</li>
<li>Start dnsmasq by running:
<pre>rc.d start dnsmasq</pre>
</li>
<li>You can test that dnsmasq is properly rewriting requests to guzzoni.apple.com by running the following in a Terminal app:
<pre>host guzzoni.apple.com XX.XX.XX.XX</pre>
<p>You should receive a response like the following:</p>
<pre>Using domain server:
Name: XX.XX.XX.XX
Address: XX.XX.XX.XX#53
Aliases:

guzzoni.apple.com has address XX.XX.XX.XX</pre>
<p>Your pogoplug&#8217;s IP address should be showing up in all three places.</li>
</ol>
<h2>Certificates</h2>
<p>SiriProxy uses certificates as part of spoofing the real Siri servers. This can cause some complications if you want to be able to use SiriProxy on your local LAN as well as on the Internet. The solution is to generate a dual certificate.</p>
<ol>
<li>Edit /etc/openssl.cnf. Look for:
<pre>commonName = Common Name (eg, YOUR name)
commonName_max = 64</pre>
<p>and replace it with:</p>
<pre>0.commonName = Common Name (eg, YOUR name)
0.commonName_default = your.dynamic.hostname.com
0.commonName_max = 64
1.commonName = Common Name (eg, YOUR name)
1.commonName_default = guzzoni.apple.com
1.commonName_max = 64</pre>
<p>Change <strong>your.dynamic.hostname.com</strong> to whatever dynamic hostname you are using (<a href="http://freedns.afraid.org/">http://freedns.afraid.org/</a> works really well for me).</li>
<li>Generate the certificates. You will be prompted to enter some things with the lines below &#8211; you should be able to leave most of them set to their default values just by hitting the enter key. The main exception is that you will need to type in passphrases during the generation process &#8211; just pick them when it asks you to come up with one, and re-enter it at the later phases that require it.
<pre>mkdir -p /root/.siriproxy
cd /root/.siriproxy

openssl genrsa -des3 -out ca.key 4096
openssl req -new -x509 -days 365 -key ca.key -out ca.crt

openssl genrsa -des3 -out server.key 4096

openssl req -new -key server.key -out server.csr

openssl x509 -req -days 365 -in server.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out server.passless.crt

openssl rsa -in server.key -out server.key.insecure

mv server.key server.key.secure
mv server.key.insecure server.passless.key</pre>
</li>
<li>Copy the ca.crt file to your desktop. I have an <a href="http://archlinuxarm.org/support/guides/applications/samba">SMB server</a> set up on my pogoplug that makes this very simple.</li>
</ol>
<h2>SiriProxy</h2>
<p>There are several forks of SiriProxy. I found the master branch in <a href="https://github.com/plamoni/SiriProxy">plamoni&#8217;s github</a>to work fine for our set up (just two people sharing a single key).</p>
<ol>
<li>Clone the SiriProxy code into /root/SiriProxy using git. (Note: because SiriProxy needs to listen on port 443, it needs to be run as root)
<pre>cd /root
git clone git://github.com/westbaer/SiriProxy.git</pre>
</li>
<li>Use rake to install siriproxy to /usr/lib for system-wide use:
<pre>rake install</pre>
</li>
<li>Bundle siriproxy (I guess this installs any plugins you&#8217;ve set up and updates the certificates. You should run this any time you generate new certificates or change the configuration, I think):
<pre>siriproxy bundle</pre>
</li>
<li>Start the siriproxy server:
<pre>siriproxy server</pre>
</li>
</ol>
<h2>iPhone 4S</h2>
<p>Remember, you don&#8217;t need to jailbreak the iPhone 4S for this to work!</p>
<h3>Install Certificate</h3>
<ol>
<li>E-mail the <strong>ca.crt</strong> file from above to an e-mail account on your iPhone 4S.</li>
<li>Open up the e-mail on your 4S device, then open the certificate by tapping it.</li>
<li>Install the certificate by tapping the <strong>Install</strong> button, then tap <strong>Done</strong>.</li>
</ol>
<h3>Change DNS</h3>
<ol>
<li>Open up the <strong>Settings</strong> app, and go into <strong>Wifi</strong> settings.</li>
<li>Tap on the blue arrow to the right of your wifi network&#8217;s name to get detailed settings.</li>
<li>In the <strong>DNS</strong> field, put the IP address of your pogoplug at the very beginning of the line.</li>
</ol>
<h3>Test SiriProxy</h3>
<ol>
<li>Open up Siri on your 4S device by holding down the Home button, and say &#8220;<strong>Test Siri Proxy.</strong>&#8221; Siri should respond with, &#8220;<strong>Siri Proxy is up and running!</strong>&#8221; You should also see a bunch of lines scroll by on the siriproxy server window.</li>
<li>If you don&#8217;t get anything, then double-check that you have completed everything above. You need your 4S device to have connected to the proxy in order for the rest of these steps to work.</li>
</ol>
<h2>iPhone 4 (not 4S)</h2>
<h3>INSTALL CERTIFICATE</h3>
<p><strong>UPDATE 2012-02-03: I had originally forgotten about this section.</strong></p>
<ol>
<li>E-mail the <strong>ca.crt</strong> file from above to an e-mail account on your iPhone 4S.</li>
<li>Open up the e-mail on your 4S device, then open the certificate by tapping it.</li>
<li>Install the certificate by tapping the <strong>Install</strong> button, then tap <strong>Done</strong>.</li>
</ol>
<h3>Install Siri</h3>
<p>Make sure your jailbroken phone (the one that doesn&#8217;t yet have Siri) is connected to Wifi. Spire will require ~100 MB of data to be downloaded, so this could take a while.</p>
<ol>
<li>Open up <strong>Cydia</strong>, and install the packages <strong>OpenSSH</strong>, <strong>Erica Utilities</strong>, and <strong>Spire</strong>. If you haven&#8217;t set up OpenSSH before and/or you haven&#8217;t set your passwords, you definitely want to do that. Refer to the <a href="http://cydia.saurik.com/openssh.html">Cydia guide</a> for more information on OpenSSH.</li>
<li>Go into the <strong>Settings</strong> app, and choose Spire. Enter <strong>https://your.dynamic.hostname.com</strong> as your proxy host, using the dynamic hostname you are using.</li>
<li>Go back to the main <strong>Settings</strong>, tap on <strong>General</strong>, then <strong>Siri</strong>, and turn Siri on.</li>
<li>Attempt to use Siri by holding down the Home button (the proximity sensor won&#8217;t work with non-4S devices).</li>
<li>After it fails, ssh into your non-4S device (default username: root, default password: alpine). You can get the IP address by looking at your Wifi settings details. Run the following command:
<pre>plutil -show /User/Library/Preferences/com.apple.assistant.plist</pre>
<p>You should get output that looks something like this:</p>
<pre>{
    Accounts =     {
        &quot;12345678-90AB-CDEF-01234-567890ABCDEF&quot; =         {
            &quot;Ace Host&quot; = &quot;665414ff-75ab-42b2-9473-5aa74fb11533&quot;;
            &quot;Assistant Identifier&quot; = &quot;&quot;;
            Hostname = &quot;https://your.dynamic.hostname.com&quot;;
            &quot;Last Assistant Data Anchor&quot; = &quot;&quot;;
            &quot;Last Sync Dates&quot; =             {
                &quot;com.apple.alarm.label&quot; = 2012-01-29 21:33:50 +0000;
                &quot;com.apple.contact.people&quot; = 2012-01-29 21:33:48 +0000;
                &quot;com.apple.media.entities&quot; = 2012-01-29 21:33:52 +0000;
                &quot;com.apple.reminder.list.name&quot; = 2012-01-29 21:33:50 +0000;
            };
            &quot;Speech Identifier&quot; = &quot;&quot;;
            &quot;Validation Expiration&quot; = 2012-01-30 22:01:50 +0000;
        };
    };
    &quot;Session Language&quot; = &quot;en-US&quot;;
}</pre>
<p>If you&#8217;re missing some of the above fields, don&#8217;t worry &#8211; we&#8217;re going to fix that. Pay careful attention to the first string of numbers and letters after the word &#8220;Accounts&#8221; (<strong>12345678-90AB-CDEF-01234-567890ABCDEF</strong> in the example above). This is your unique hex key.</li>
<li>Run the following commands to update your Siri plist file, replacing <strong>12345678-90AB-CDEF-01234-567890ABCDEF</strong> with your unique hex key from above (copy and paste!):
<pre>plutil -key &quot;Accounts&quot; -key &quot;784ECD19-25FD-46E3-A28A-92DFD892255F&quot; -key &quot;Ace Host&quot; -value &quot;&quot; /User/Library/Preferences/com.apple.assistant.plist

plutil -key &quot;Accounts&quot; -key &quot;784ECD19-25FD-46E3-A28A-92DFD892255F&quot; -key &quot;Assistant Identifier&quot; -value &quot;&quot; /User/Library/Preferences/com.apple.assistant.plist

plutil -key &quot;Accounts&quot; -key &quot;784ECD19-25FD-46E3-A28A-92DFD892255F&quot; -key &quot;Speech Identifier&quot; -value &quot;&quot; /User/Library/Preferences/com.apple.assistant.plist</pre>
</li>
<li>Open up Siri on your non-4S device by holding down the Home button, and say &#8220;<strong>Test Siri Proxy</strong>&#8221; just like you did before with the 4S device. Siri should respond with, &#8220;<strong>Siri Proxy is up and running!</strong>&#8221; If you made it this far, congratulations! Siri is working on your non-4S device!</li>
</ol>
<h2>Automating Services on the PogoPlug</h2>
<p>Okay, so we&#8217;ve got it up and running, but if we lose power everything crashes. It would be nice if we could ensure it was automatically started every time our PogoPlug rebooted. To do this, we need to add a daemon script for siriproxy and tell our pogoplug to automatically start dnsmasq and siriproxy.</p>
<p>First, let&#8217;s create an rc.d script for sirirproxy. This is based on the ArchLinux <a href="https://wiki.archlinux.org/index.php/Writing_rc.d_scripts">sample rc.d script</a> for crond. Edit /etc/rc.d/siriproxy to look like the following:</p>
<pre class="brush: bash; gutter: true">#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

DAEMON=siriproxy
ARGS=server

export HOME=/root
PID=`pidof -o %PPID /usr/bin/ruby /usr/bin/$DAEMON`

[ -r /etc/conf.d/$DAEMON ] &amp;&amp; . /etc/conf.d/$DAEMON

case &quot;$1&quot; in
  start)
    stat_busy &quot;Starting $DAEMON&quot;
    if [ -z &quot;$PID&quot; ] ; then
      $DAEMON $ARGS 1&gt;/dev/null 2&gt;/dev/null &amp;
      add_daemon $DAEMON
      stat_done
    else
      stat_fail
      exit 1
    fi
    ;;
  stop)
    stat_busy &quot;Stopping $DAEMON&quot;
    [ -n &quot;$PID&quot; ] &amp;&amp; kill $PID &amp;&gt; /dev/null
    if [ $? = 0 ]; then
      rm_daemon $DAEMON
      stat_done
    else
      stat_fail
      exit 1
    fi
    ;;
  restart)
    $0 stop
    sleep 1
    $0 start
    ;;
  *)
    echo &quot;usage: $0 {start|stop|restart}&quot;
esac</pre>
<p>You will also need to make this file executable:</p>
<pre>chmod a+x /etc/rc.d/siriproxy</pre>
<p>Now that we&#8217;ve got an rc.d script set up, let&#8217;s test it out.</p>
<pre>rc.d restart siriproxy</pre>
<p>Stopping siriproxy may fail, if it wasn&#8217;t already running. Starting siriproxy should print DONE.</p>
<p>Now we just need to make dnsmasq and siriproxy start automatically on boot. Edit /etc/rc.conf, and go down to the end where the start-up daemons are listed. Add dnsmasq and siriproxy inside these parentheses, like so:</p>
<pre>DAEMONS=(set-oxnas-mac !hwclock syslog-ng network netfs crond sshd openntpd samba dnsmasq siriproxy)</pre>
<p>(You may have other things listed differently &#8211; just make sure dnsmasq and siriproxy are in here).</p>
<p>Lastly, reboot your pogoplug by running the following:</p>
<pre>reboot</pre>
<p>Give it a minute or two to start up, then try out Siri on both your 4S device and your non-4S device by saying &#8220;Test Siri Proxy.&#8221; Make sure to pause a little bit between them &#8211; Apple has been known to ban Siri if it&#8217;s used too much.</p>
<p>One final note: it&#8217;s important that the 4S device connects to the proxy at least once a day. This is because it gets new keys from Apple every now and then, which it needs to share with the proxy server in order for the non-4S device to be able to use them.</p>
<p>I hope this helps someone!</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmallen.net/2012/01/29/pogoplug-as-a-siri-proxy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Arcade</title>
		<link>http://jamesmallen.net/2011/11/01/arcade/</link>
		<comments>http://jamesmallen.net/2011/11/01/arcade/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 21:38:35 +0000</pubDate>
		<dc:creator>jma</dc:creator>
				<category><![CDATA[Blog]]></category>

		<guid isPermaLink="false">http://jamesmallen.net/?p=149</guid>
		<description><![CDATA[I&#8217;ve been working on restoring old arcade machines as a hobby since 2010, and to document my work better I started a blog called 1up Arcade. Since it doesn&#8217;t really fit with the types of things I post over here, &#8230; <a href="http://jamesmallen.net/2011/11/01/arcade/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-150 alignright" title="IMG_3390" src="http://jamesmallen.net/wp-content/uploads/2012/01/IMG_3390-150x150.jpg" alt="" width="150" height="150" /></p>
<p>I&#8217;ve been working on restoring old arcade machines as a hobby since 2010, and to document my work better I started a blog called 1up Arcade. Since it doesn&#8217;t really fit with the types of things I post over here, I won&#8217;t be cross-posting, but if you&#8217;re interested in that sort of thing, you might want to check out <a href="http://www.1up-arcade.com">www.1up-arcade.com</a>. I take lots of pictures and I don&#8217;t speak in code! <img src='http://jamesmallen.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmallen.net/2011/11/01/arcade/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Practical Computer Science (Education) with Python</title>
		<link>http://jamesmallen.net/2010/02/02/practical-computer-science-education-with-python/</link>
		<comments>http://jamesmallen.net/2010/02/02/practical-computer-science-education-with-python/#comments</comments>
		<pubDate>Tue, 02 Feb 2010 21:48:26 +0000</pubDate>
		<dc:creator>jma</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[education]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://jamesmallen.net/?p=80</guid>
		<description><![CDATA[Yesterday I gave a presentation at the eTech Ohio conference titled &#8220;Practical Computer Science with Python.&#8221; For the past two years, I&#8217;ve been teaching computer science to upper schoolers at Hathaway Brown School in Shaker Heights, OH, and in the &#8230; <a href="http://jamesmallen.net/2010/02/02/practical-computer-science-education-with-python/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p><a href="http://www.python.org"><img class="size-full wp-image-90 alignleft" title="Python Logo" src="http://jamesmallen.net/wp-content/uploads/2010/02/python_logo.png" alt="" width="111" height="111" /></a>Yesterday I gave a presentation at the eTech Ohio conference titled &#8220;Practical Computer Science with Python.&#8221; For the past two years, I&#8217;ve been teaching computer science to upper schoolers at Hathaway Brown School in Shaker Heights, OH, and in the presentation I shared some of the reasons why I think Python is an excellent choice for a programming language in an Intro CS course.</p>
<p>I&#8217;ve uploaded the slides from the presentation for your convenience &#8211; next year, I&#8217;ll try to record any presentation(s) and put them online as well!</p>
<p><strong>Slides: </strong><a href="http://jamesmallen.net/wp-content/uploads/2010/02/Practical-Computer-Science-with-Python-eTech-2010.pdf">Practical Computer Science with Python (eTech 2010)</a></p>
<p><strong>Links:</strong></p>
<ul>
<li><a href="http://www.greenteapress.com/thinkpython/thinkpython.html">Think Python: How to Think Like a Computer Scientist</a> (free textbook, great for intro CS courses)</li>
<li><a href="http://www.python.org">Python</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://jamesmallen.net/2010/02/02/practical-computer-science-education-with-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
