<?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>Atomic Spatula &#187; Code</title>
	<atom:link href="http://atomicspatula.com/category/code/feed" rel="self" type="application/rss+xml" />
	<link>http://atomicspatula.com</link>
	<description>Greg Nichols</description>
	<lastBuildDate>Mon, 30 Apr 2012 15:57:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Free Range Social Networking &#8211; Part 1</title>
		<link>http://atomicspatula.com/2010/05/21/free-range-social-networking-1</link>
		<comments>http://atomicspatula.com/2010/05/21/free-range-social-networking-1#comments</comments>
		<pubDate>Fri, 21 May 2010 17:01:04 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[internet tools]]></category>
		<category><![CDATA[Social Internet]]></category>

		<guid isPermaLink="false">http://atomicspatula.com/?p=608</guid>
		<description><![CDATA[I was thinking about why Facebook is so popular, despite really adding nothing new to the Internet. It&#8217;s really the packaging: type in a URL, go there, look for friends, read posts, post things, etc. Anyone can do it. The downsides: confusion about how it works &#8211; who sees what, privacy issues, and the fact [...]]]></description>
			<content:encoded><![CDATA[<p>I was thinking about why Facebook is so popular, despite really adding nothing new to the Internet.    It&#8217;s really the packaging:  type in a URL, go there, look for friends, read posts, post things, etc.   Anyone can do it.    The downsides: confusion about how it works &#8211; who sees what, privacy issues, and the fact that it&#8217;s really just a spam engine, are generally lost on less sophisticated users.</p>
<p>Before trying to tackle the usablity and packaging issues, I think it would be interesting to come up with a guide on how to do social networking with standard, open protocols, open source tools, etc., in a way that lets the participants own their network.    With this first instalment of what I hope is a series, I want to lay out what social networking on the internet really is, at a conceptual and user scenario level.   I&#8217;m going to ramble a bit, but this is a blog, not a textbook, so cut me some slack.</p>
<p>To get started, you need a way to find people and initiate a connection.   This connection has privileges &#8211; people you&#8217;re connected to see your broadcast information, and information they send to you, either directly, or broadcast, gets special treatment.  For now, let&#8217;s call this list of people a whitelist.    Facebook treats these connections as reciprocal, but I&#8217;m not sure they have to be.<br />
So there are two steps to getting started: finding people, and asking for permission/participation in communication.</p>
<p><strong>Finding People</strong><br />
The history of the internet makes this difficult.   E-mail addresses are the most important way to identify people, as they are unique.   But we there&#8217;s no easy way to find someone&#8217;s e-mail address.   Also, people&#8217;s e-mail addresses change over time.   Worse still, the history of spam, malware, and scams has made people understandably hesitant to publish there e-mail address.<br />
So we&#8217;re left with services/sites like Facebook and linked-in, Google profiles, as well as simple web searches to find people and a way to contact them.</p>
<p><strong>White-Lists</strong><br />
For e-mail, white-lists can be implemented in the e-mail client via filters.     Blogs such as WordPress can be configured so that comments require moderation.   Once a comment has been approved, the sender of the comment is essentially whitelisted.</p>
<p>Once we have our network, in the form of people and their whitelists, we need to have some means of communication.    I think there are three important types:</p>
<p><strong>1) Direct</strong><br />
A direct, person-to-person communication.  Examples are e-mail to a single person, or an IM message.</p>
<p><strong>2) Multicast</strong><br />
A direct communication to a list of recipients.  E-mail lists, and e-mails with multiple recipients are multicast communication.</p>
<p><strong>3) Broadcast</strong><br />
In essence, this is publishing information on the web, often via a blog, or a posting on some other web site.  </p>
<p>Note that one large issue with Facebook is that its users are lead to believe that their postings are Multicast (to their Friends), but in fact they&#8217;re essential Broadcast, via Facebooks&#8217; Friend-of-Friend exposure, plus their willingness to provide APIs to partners, and the general complexity of their privacy model and its implications.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicspatula.com/2010/05/21/free-range-social-networking-1/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IPad I Told You So</title>
		<link>http://atomicspatula.com/2010/04/05/ipad-i-told-you-so</link>
		<comments>http://atomicspatula.com/2010/04/05/ipad-i-told-you-so#comments</comments>
		<pubDate>Mon, 05 Apr 2010 13:20:10 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Gear]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[internet tools]]></category>

		<guid isPermaLink="false">http://atomicspatula.com/?p=533</guid>
		<description><![CDATA[Back in October, I joined the ranks of those speculating about the IPad, stating that it should really be just a bigger IPhone. Well, it seems Apple agreed, and delivered a bigger IPhone, much to everyone&#8217;s universal praise and condemnation. The media coverage and general noise is kind of frightening, and even I have to [...]]]></description>
			<content:encoded><![CDATA[<p>Back in October, I joined the ranks of those speculating about the IPad, stating that <a href="http://atomicspatula.com/2009/10/01/why-apples-tablet-should-be-a-bigger-iphone">it should really be just a bigger IPhone.</a>    Well, it seems Apple agreed, and delivered a bigger IPhone, much to everyone&#8217;s universal praise and condemnation.    The media coverage and general noise is kind of frightening, and even I  have to add one more post to it.</p>
<p>I won&#8217;t be buying one, as I don&#8217;t have $500 to blow on upgrading my IPod touch, or money for a cellular data plan.    If I did, I&#8217;d rather spring for an Android mobile phone, or wait for an Android or Lunix-based tablet, mainly because the closed-source, walled-garden approach is not something I can continue to feel good about supporting, and is already lagging behind more open technology and business models (see IPhone cut and paste, lack of IPad camera(s), etc.).</p>
<p>So, great prototype, Apple.  </p>
]]></content:encoded>
			<wfw:commentRss>http://atomicspatula.com/2010/04/05/ipad-i-told-you-so/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>My Code Got Hosted</title>
		<link>http://atomicspatula.com/2009/12/03/my-code-got-hosted</link>
		<comments>http://atomicspatula.com/2009/12/03/my-code-got-hosted#comments</comments>
		<pubDate>Fri, 04 Dec 2009 03:31:24 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://atomicspatula.com/?p=370</guid>
		<description><![CDATA[Ever have that dream were you realize half way through a normal day that you&#8217;ve got no clothes on? Well, this feels a little like that. I&#8217;ve been working on a test suite for a while now, and technically it&#8217;s been open-source (GPL), but it wasn&#8217;t publicly accessible. That changed today, as it&#8217;s now a [...]]]></description>
			<content:encoded><![CDATA[<p>Ever have that dream were you realize half way through a normal day that you&#8217;ve got no clothes on?    Well, this feels a little like that.    I&#8217;ve been working on a test suite for a while now, and technically it&#8217;s been open-source (GPL), but it wasn&#8217;t publicly accessible.   That changed today, as it&#8217;s now a Fedora Hosted Project called &#8220;v7&#8243;.    So stop by, ridicule my code, fix it, break it, or what ever.    Even if you don&#8217;t do any of that, it&#8217;s a little weird to think that all the code I&#8217;ve been writing is now in public view.</p>
<p><a href="https://fedorahosted.org/v7/">v7 on Fedora Hosted</a></p>
]]></content:encoded>
			<wfw:commentRss>http://atomicspatula.com/2009/12/03/my-code-got-hosted/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RacePro</title>
		<link>http://atomicspatula.com/2009/02/27/racepro</link>
		<comments>http://atomicspatula.com/2009/02/27/racepro#comments</comments>
		<pubDate>Fri, 27 Feb 2009 13:52:54 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[fake racing]]></category>

		<guid isPermaLink="false">http://atomicspatula.com/?p=128</guid>
		<description><![CDATA[I&#8217;ve been playing RacePro, a new racing game on the 360 that claims to be the most realistic racing simulator ever. I have my doubts about this, but more importantly, I don&#8217;t think it&#8217;s a good game. They knew the game had problems before they released it. It was offered for $40 via pre-order, as [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been playing RacePro, a new racing game on the 360 that claims to be the most realistic racing simulator ever.    I have my doubts about this, but more importantly, I don&#8217;t think it&#8217;s a good game.</p>
<p>They knew the game had problems before they released it.  It was offered for  $40 via pre-order, as compared to the usually fixed-price of $60.  That&#8217;s why I&#8217;m not surprised that the game has issues, but I went for the pre-order despite this.</p>
<p>They did a good job for a driving simulator. I can&#8217;t comment on how realistic it is, as I&#8217;ve never raced in real life, but I&#8217;m not sure that matters. But the AI and their private physics model kind of ruins the single-player for me, turning it into a hot lap exercise. I hear the multiplayer is a lot of fun, but I can&#8217;t really try it yet given that most players are way ahead of me in unlocking cars. I&#8217;ll stick with it at least that far just to see.</p>
<p>So far, it&#8217;s been worth my time just in the sense of a break from Forza, some new tracks and new cars. That said, I&#8217;d rather be playing a Forza expansion pack with the new tracks and the open-wheel cars.</p>
<p>There&#8217;s a bigger issue that really bugs me about racing games in particular. They don&#8217;t seem to be getting better, with the exception of graphics, and RacePro falls short even here. Perhaps its my background via my day-job, but I can&#8217;t help but think that it&#8217;s due to the proprietary nature of game development. Each game has to re-invent the wheel. And industry pressures mean that companies producing good results get new projects in other genres, for example DICE and Rallisport Challenge.  </p>
<p>I have no experience with PC-based games, perhaps it&#8217;s different there. Maybe this will change with business models, where these games go the way of WOW, a dedicated subscription service, and these monolithic console sequel releases are a thing of the past. </p>
]]></content:encoded>
			<wfw:commentRss>http://atomicspatula.com/2009/02/27/racepro/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>RIP Garmin 305</title>
		<link>http://atomicspatula.com/2009/02/11/rip-garmin-305</link>
		<comments>http://atomicspatula.com/2009/02/11/rip-garmin-305#comments</comments>
		<pubDate>Wed, 11 Feb 2009 18:59:32 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Cycling]]></category>
		<category><![CDATA[Gear]]></category>
		<category><![CDATA[GPS]]></category>

		<guid isPermaLink="false">http://atomicspatula.com/?p=119</guid>
		<description><![CDATA[I tried to use my Garmin 305 yesterday, and it was not responding to any button presses. So, back it goes. I may try and get a replacement.]]></description>
			<content:encoded><![CDATA[<p>I tried to use my Garmin 305 yesterday, and it was not responding to any button presses.    So, back it goes.   I may try and get a replacement.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicspatula.com/2009/02/11/rip-garmin-305/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Garmin Forerunner 305 on Fedora</title>
		<link>http://atomicspatula.com/2009/02/06/garmin-forerunner-305-on-fedora</link>
		<comments>http://atomicspatula.com/2009/02/06/garmin-forerunner-305-on-fedora#comments</comments>
		<pubDate>Fri, 06 Feb 2009 18:12:06 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Cycling]]></category>
		<category><![CDATA[Gear]]></category>

		<guid isPermaLink="false">http://atomicspatula.com/?p=109</guid>
		<description><![CDATA[I got a Garmin Forerunner 305. I&#8217;m trying to get it running on my Fedora 10 system, as well as my Mac Mini. So far, pytrainer just won&#8217;t work. It seems to rely on an old blacklisted driver gps_garmin. I have gotten gpsbabel working, via a usb permissions rule change: I added the file /etc/udev/rules.d/51-garmin.rules [...]]]></description>
			<content:encoded><![CDATA[<p>I got a Garmin Forerunner 305.   I&#8217;m trying to get it running on my Fedora 10 system, as well as my Mac Mini.</p>
<p>So far, pytrainer just won&#8217;t work.  It seems to rely on an old blacklisted driver gps_garmin.   I have gotten<br />
gpsbabel working, via a usb permissions rule change:</p>
<p>I added the file  /etc/udev/rules.d/51-garmin.rules with the following contents:</p>
<p>SYSFS{idVendor}==&#8221;091e&#8221;, SYSFS{idProduct}==&#8221;0003&#8243;, MODE=&#8221;0666&#8243;</p>
<p>With that, I could run:</p>
<p>gpsbabel -t -r -w -i garmin -f usb: -o gpx -F outputfile.gpx</p>
<p>This is a nice XML file.  But what can I read it into?</p>
<p>On the mac, it gets a little wierd.  The Garmin Training Center wouldn&#8217;t detect the device at all.<br />
I downloaded the latest version.  It still had a lot of trouble detecting the device, asking me<br />
to reboot the 305 several times.    There seems to be a hint that some maps are included<br />
in the application, but no luck downloading them.   It&#8217;s odd that the &#8220;supported&#8221; platform doesn&#8217;t<br />
even work as well as Fedora.</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicspatula.com/2009/02/06/garmin-forerunner-305-on-fedora/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Day in 40 seconds</title>
		<link>http://atomicspatula.com/2009/01/29/a-day-in-40-seconds</link>
		<comments>http://atomicspatula.com/2009/01/29/a-day-in-40-seconds#comments</comments>
		<pubDate>Fri, 30 Jan 2009 03:02:18 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://atomicspatula.com/?p=104</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p><object width="640" height="505"><param name="movie" value="http://www.youtube.com/v/2uJSVUm-RdY&#038;hl=en&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/2uJSVUm-RdY&#038;hl=en&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="505"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://atomicspatula.com/2009/01/29/a-day-in-40-seconds/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web Cam and Time Lapse</title>
		<link>http://atomicspatula.com/2009/01/28/web-cam-and-time-lapse</link>
		<comments>http://atomicspatula.com/2009/01/28/web-cam-and-time-lapse#comments</comments>
		<pubDate>Thu, 29 Jan 2009 03:34:28 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://atomicspatula.com/?p=95</guid>
		<description><![CDATA[I&#8217;ve got a web camera attached to my Mac Mini. First, I wanted to set it up to take pictures out of my office window every 5 minutes or so, and upload them to this site. That might seem like a simple thing, but none of the easy-to-use Apple applications offered any help. With a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve got a web camera attached to my Mac Mini.   First, I wanted to set it up to take pictures out of my office window every 5 minutes or so, and upload them to this site.   That might seem like a simple thing, but none of the easy-to-use Apple applications offered any help.  With a little poking around, I found <a href="http://www.intergalactic.de/pages/iSight.html">isightcapture</a>, and wrote a short python script to call it every 5 minutes and ftp the resulting picture to my server.</p>
<pre>
while True:
    # take a picture
    timestamp = datetime.datetime.now().strftime("%Y-%m-%d-%H-%M-%S")
    filename = "/tmp/pic-%s.jpg" % timestamp
    print "Say Cheese!"
    os.system('isightcapture -w 960 -h 720 %s' % filename)

    # upload it
    try:
        file = open(filename, 'r')
        print "uploading..."
        connection = ftplib.FTP('ftp.atomicspatula.com', 'henry@atomicspatula.com', 'password')
        connection.storbinary('STOR pic.jpg', file)
        file.close()
        connection.quit()
        print "done"
    except exception:
        print exception
    time.sleep(60)
</pre>
<p>This code writes timestamped pictures into /tmp, and uses it to upate a single file on the server.</p>
<p>With a nice sequence of pictures, I wanted to use QuickTime to make a nice time-lapse movie.  But QuickTime seems to require that the pictures all have the same name with a sequence number, such as  pic00001.jpg, pic0002.jpg, etc.   Why Apple couldn&#8217;t have just suck in all the pictures in the folder in alpha-numeric order is beyond me.   So, I wrote another little script to rename them:</p>
<pre>
rootdir = "/Users/henry/time-lapse"
files = sorted(os.listdir(rootdir))
i = 1
for file in files:
    print file
    shutil.move(file, "pic%.6d.jpg" % i)
    i = i  + 1
</pre>
<p>Tomorrow, I&#8217;m going to run it all day at 1 picture per minute, and see what that looks like at 15 fps.</p>
<p>Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicspatula.com/2009/01/28/web-cam-and-time-lapse/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spreading the Word</title>
		<link>http://atomicspatula.com/2008/10/08/spreading-the-word</link>
		<comments>http://atomicspatula.com/2008/10/08/spreading-the-word#comments</comments>
		<pubDate>Thu, 09 Oct 2008 00:59:32 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[parenting]]></category>

		<guid isPermaLink="false">http://blog.atomicspatula.com/?p=78</guid>
		<description><![CDATA[I set my 12 year-old daughter up with Fedora 9 and KDE 4. Her initial experiences are proving to be thought-provoking. What little computer experience she has is mostly with Windows, but she has run iTunes on OSX. Her mom&#8217;s (my ex-wife) first question was, &#8220;Can&#8217;t it run Windows? That&#8217;s what she needs for school&#8221;. [...]]]></description>
			<content:encoded><![CDATA[<p>I set my 12 year-old daughter up with Fedora 9 and KDE 4.   Her initial experiences are proving to be thought-provoking.   What little computer experience she has is mostly with Windows, but she has run iTunes on OSX.</p>
<p>Her mom&#8217;s (my ex-wife) first question was, &#8220;Can&#8217;t it run Windows?  That&#8217;s what she needs for school&#8221;.  I explained that the system didn&#8217;t come with Windows, and that Fedora was free, and easy to keep up to date.   Also,  any documents could be saved in formats readable by Microsoft applications.   It&#8217;s really a shame they don&#8217;t run Linux/OO at school.</p>
<p>Still, I have to admit some misgivings about this experiment.  Is Linux ready for teenagers?    I like to thing that subjecting my daughter to an environment where she has to figure things out will be good for her, as opposed to letting her run Windows, where she can go ask adults for help (often getting bad advice) at every turn.</p>
<p>We&#8217;ll see how this goes</p>
]]></content:encoded>
			<wfw:commentRss>http://atomicspatula.com/2008/10/08/spreading-the-word/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Death of the Internet</title>
		<link>http://atomicspatula.com/2008/08/26/the-death-of-the-internet</link>
		<comments>http://atomicspatula.com/2008/08/26/the-death-of-the-internet#comments</comments>
		<pubDate>Wed, 27 Aug 2008 02:47:52 +0000</pubDate>
		<dc:creator>greg</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[internet tools]]></category>

		<guid isPermaLink="false">http://blog.atomicspatula.com/?p=72</guid>
		<description><![CDATA[It looks like we&#8217;re down to 2 or 3 public internet service providers, depending on how you count. Comcast seems to be taking the lead on assuming ownership of it&#8217;s tubes, and redefining what &#8220;internet service&#8221; really means &#8211; web access and e-mail (httpd, snmp) to partner sites and services, using approved devices. IP will [...]]]></description>
			<content:encoded><![CDATA[<p>It looks like we&#8217;re down to 2 or 3 public internet service providers, depending on how you count.  Comcast seems to be taking the lead on assuming ownership of it&#8217;s tubes, and redefining what &#8220;internet service&#8221; really means &#8211; web access and e-mail (httpd, snmp) to partner sites and services, using approved devices.</p>
<p>IP will transition from the defining protocol of the Internet, to being merely a convenient implementation of services.  Independent web sites like this one will be replaced by Facebook pages.</p>
<p>Am I being alarmist?   What about the FCC in the US?  What about the rest of the world?   Can these large media corporations be stopped from turning the Internet into Cable 2.0?      </p>
<p>I don&#8217;t see nearly enough consumer unhappiness or even awareness of this issue.   So long as these services are &#8220;faster&#8221;, &#8220;higher speed&#8221;, people seem to be happy.</p>
<p>At best, the present public internet will fragment into layers, some AOL-like services, some private corporate, and perhaps some underground networks beyond control of media corporations.   </p>
]]></content:encoded>
			<wfw:commentRss>http://atomicspatula.com/2008/08/26/the-death-of-the-internet/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

