<?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"
	>

<channel>
	<title>The Handheld Mac</title>
	<atom:link href="http://www.standalone.com/blog/index.php?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://standalone.com/blog</link>
	<description>Mac and Handheld Development Thoughts</description>
	<pubDate>Fri, 28 Mar 2008 00:57:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
	<language>en</language>
			<item>
		<title>iPhone-Optimized!</title>
		<link>http://standalone.com/blog/?p=19</link>
		<comments>http://standalone.com/blog/?p=19#comments</comments>
		<pubDate>Tue, 25 Mar 2008 16:19:34 +0000</pubDate>
		<dc:creator>Glenn</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[Site]]></category>

		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://standalone.com/blog/?p=19</guid>
		<description><![CDATA[To coincide with our recent Crosswords for iPhone announcement, we&#8217;ve optimized our website for iPhone and iPod touch users! If you&#8217;re reading this via Safari on your iPhone or iPod touch, you should see an easier to navigate  website - no more pinching or pulling!
We&#8217;ve also added a new sub-forum to our support forum*, [...]]]></description>
			<content:encoded><![CDATA[<p>To coincide with our recent <a HREF="http://www.standalone.com/iphone/crosswords">Crosswords for iPhone announcement</a>, we&#8217;ve optimized our website for iPhone and iPod touch users! If you&#8217;re reading this via Safari on your iPhone or iPod touch, you should see an easier to navigate  website - no more pinching or pulling!</p>
<p>We&#8217;ve also <a HREF="http://standalone.com/forum/viewforum.php?f=25">added a new sub-forum</a> to our support forum*, specifically for iPhone app queries. Feel free to check it out and chime in!</p>
<p>As always, if you have any questions, comments or feedback, please feel free to contact us!</p>
<p>* Unfortunately, iPhone-optimization for the forum is still in development.</p>
]]></content:encoded>
			<wfw:commentRss>http://standalone.com/blog/?feed=rss2&amp;p=19</wfw:commentRss>
		</item>
		<item>
		<title>iPhone AutoSync</title>
		<link>http://standalone.com/blog/?p=18</link>
		<comments>http://standalone.com/blog/?p=18#comments</comments>
		<pubDate>Tue, 11 Sep 2007 00:59:34 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[iPhone]]></category>

		<guid isPermaLink="false">http://standalone.com/blog/?p=18</guid>
		<description><![CDATA[After two months of work we recently put the finishing touches on our first &#8216;real&#8217; Mac product: iPhone AutoSync.

What is it?
Out of the box, the iPhone does a great job of synchronizing with the Mac&#8217;s built in PIM applications, Address Book and iCal, and bookmarks, courtesy of Safari. After years of somewhat kludged together sync [...]]]></description>
			<content:encoded><![CDATA[<p>After two months of work we recently put the finishing touches on our first &#8216;real&#8217; Mac product: iPhone AutoSync.</p>
<p><center><img HEIGHT="202" WIDTH="300" BORDER="0" ALT="iPAS.jpg" SRC="http://standalone.com/blog/wp-content/uploads/2007/09/ipas.jpg" /></center></p>
<h3>What is it?</h3>
<p>Out of the box, the iPhone does a great job of synchronizing with the Mac&#8217;s built in PIM applications, Address Book and iCal, and bookmarks, courtesy of Safari. After years of somewhat kludged together sync solutions on the Palm and Windows Mobile (at least on the Mac side of the fence), the iPhone feels great. One thing quickly becomes apparent, however: after editing a friend&#8217;s number in Address Book, I finished a few things, grabbed my phone, and was out the door. When I went to call him, I noticed that my recent edit was not reflected on the iPhone. As it turns out, the iPhone syncs only when it&#8217;s placed into its dock (or, manually, when you right-click on it in iTunes and select &#8220;Update&#8221;). Any changes you make between docking and undocking, however, are lost. Since my phone spends most of its time in the dock, these have to wait until the next time I come back to my computer.Enter iPhone AutoSync! iPhone AutoSync monitors your three synced applications, and, when changes are made, makes a note. After a few minutes, if no more changes have been made, it triggers a sync with your phone. Thus all your information in up to date in both places, pretty much all the time.</p>
<h3>The Fiddly Bits</h3>
<pre>Warning: Here there be geekery. <a HREF="#finally">Skip</a> past if you&#8217;re not interested in the behind-the-secenes.</pre>
<p>The main challenge when writing a faceless app is to minimize resource usage. Since iPhone AutoSync is always running, we don&#8217;t want to hog too much memory, processor time, or other system resources. However, we also want to make sure we are responsive, and the user doesn&#8217;t have to wait too long for us to kick in.Our first attempt used <a HREF="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man2/kqueue.2.html">kqueues</a>. Mark Dalrymple and Aaron Hillegass&#8217;s wonderful book, <a HREF="http://www.amazon.com/Advanced-Mac-Programming-Core-Unix/dp/0974078514/ref=pd_bbs_sr_2/104-2304625-8270324?ie=UTF8&amp;s=books&amp;qid=1189468737&amp;sr=8-2">Advanced Mac OS X Programming</a> has a great set of examples making use of kqueues. In a nutshell, a kqueue will allow you (among other things; they&#8217;re very powerful) to watch a directory for changes. When any application reads or modifies files at that path, your application gets notified.Pretty much just the ticket, right? As it turns out, we were using far too big a hammer here. On a tip from Dave Nanian, we grabbed <a HREF="http://www.tildesoft.com/Programs.html">Notification Watcher</a>, and found that each time you edit an Address Book entry, or modify an iCal event, a series of global notifications gets sent. By listening for those, we were able to find out each time the user&#8217;s data is modified, in a much lighter-weight system than kqueue.iPhone AutoSync has a giant bottle-neck, however, and that&#8217;s iTunes. Since we keep close watch on our target applications, we <em>could</em> immediately sync the phone each time they change. However, a sync is a relatively expensive operation: we don&#8217;t want the user&#8217;s iTunes hogging CPU and changing its UI every 30 seconds as they plan out their week&#8217;s schedule. The answer here was an aggregator: each time a change event occurs, we set (or reset) a timer. Once no change events have fired for a few minutes, we assume the user has finished editing, and fire the sync. This meant that there would be a slight delay between a change and the iPhone being totally up-to-date, but after a bit of experimentation, we think we&#8217;ve found the right mixture between the two extremes.<a CLASS="" TITLE="finally" NAME="finally"></a></p>
<h3>Finally</h3>
<p>Getting iPhone AutoSync out the door reminded me how hard the last 10% of a software release can be. This post was written using Daniel Jalkut&#8217;s brilliant new blog tool, <a HREF="http://www.red-sweater.com/marsedit/">MarsEdit 2</a>, just released. Congrats to Daniel on a great product, and conquering that last 10%; I feel your pain (though MarsEdit is of course a much bigger production than iPhone AutoSync.)</p>
]]></content:encoded>
			<wfw:commentRss>http://standalone.com/blog/?feed=rss2&amp;p=18</wfw:commentRss>
		</item>
		<item>
		<title>Our Redesign</title>
		<link>http://standalone.com/blog/?p=16</link>
		<comments>http://standalone.com/blog/?p=16#comments</comments>
		<pubDate>Fri, 07 Sep 2007 21:18:07 +0000</pubDate>
		<dc:creator>Glenn</dc:creator>
		
		<category><![CDATA[News]]></category>

		<category><![CDATA[Site]]></category>

		<guid isPermaLink="false">http://standalone.com/blog/?p=16</guid>
		<description><![CDATA[Welcome back!
As you may have noticed, we&#8217;ve revamped our site!  First, let me introduce myself: My name is Glenn, and I&#8217;m the Stand Alone, Inc. web guy, and I oversaw and implemented our recent redesign. The redesign, as conceptualized by Ben and myself, was intended to make the site easier and more intuitive to navigate without sacrificing the more advanced features that our users enjoy, and I believe [...]]]></description>
			<content:encoded><![CDATA[<h4>Welcome back!</h4>
<p>As you may have noticed, we&#8217;ve revamped our site!  First, let me introduce myself: My name is Glenn, and I&#8217;m the Stand Alone, Inc. web guy, and I oversaw and implemented our recent redesign. The redesign, as conceptualized by Ben and myself, was intended to make the site easier and more intuitive to navigate without sacrificing the more advanced features that our users enjoy, and I believe we succeeded!</p>
<p>While most of the redesign was focused on layout and presentation, there are a few new site features, such as a smarter download page that automatically serves up the best download based on your browser. We also streamlined our catalog and download index pages, made our version pickers more obvious, and a bunch of other minor tweaks that make the site a bit easier to peruse.</p>
<p>As always, we love to hear comments and suggestions on how to improve the site, so please let us know what you like, what you don&#8217;t like, or what you&#8217;d like to see added or improved!</p>
]]></content:encoded>
			<wfw:commentRss>http://standalone.com/blog/?feed=rss2&amp;p=16</wfw:commentRss>
		</item>
		<item>
		<title>The Wikipath of Least Resistance</title>
		<link>http://standalone.com/blog/?p=15</link>
		<comments>http://standalone.com/blog/?p=15#comments</comments>
		<pubDate>Tue, 08 May 2007 13:34:53 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
		
		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Wiki]]></category>

		<guid isPermaLink="false">http://standalone.com/blog/?p=15</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[
]]></content:encoded>
			<wfw:commentRss>http://standalone.com/blog/?feed=rss2&amp;p=15</wfw:commentRss>
		</item>
		<item>
		<title>The More Things Change</title>
		<link>http://standalone.com/blog/?p=14</link>
		<comments>http://standalone.com/blog/?p=14#comments</comments>
		<pubDate>Sun, 15 Apr 2007 03:42:54 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
		
		<category><![CDATA[Palm]]></category>

		<guid isPermaLink="false">http://standalone.com/blog/?p=14</guid>
		<description><![CDATA[On Tuesday, Palm released the first official word on their new, Linux-based operating system. Palm&#8217;s announcement was a welcome dose of déjà vu.
Back when we started out on Newton, Palm was the new kid on the block. As we watched, it became the dominant player, and Newton began to fade. In February of 1998, Apple [...]]]></description>
			<content:encoded><![CDATA[<p>On Tuesday, Palm released the first official word on their new, Linux-based operating system. Palm&#8217;s <a HREF="http://www.theage.com.au/news/phones-pdas/palm-unveils-a-new-foundation/2007/04/11/1175971136619.html">announcement</a> was a welcome dose of déjà vu.</p>
<p>Back when we started out on <a HREF="http://en.wikipedia.org/wiki/Apple_Newton">Newton</a>, Palm was the new kid on the block. As we watched, it became the dominant player, and Newton began to fade. In February of 1998, Apple pulled the plug on Newton. Fortunately, we&#8217;d already begun the migration to Palm, so this just accelerated our actions. However, the loss of a platform is never enjoyable (especially one that was as fun as the Newton was). For the past several years, we&#8217;ve watch Palm cede more and more of the market to other operating systems (Windows Mobile and Blackberry, here in the US; Symbian in Europe).</p>
<p>Palm&#8217;s &#8216;new foundation&#8217;, however, is pretty much the &#8216;low fuel&#8217; light for Palm OS as we know it. Sure, the new devices will most likely run OS 5 (Garnet) applications, but all the new, cool features will not be available unless you&#8217;re running natively.</p>
<p>So, again, we&#8217;ll be making a platform transition. However, this is now a known path for us: after the jump from Newton to Palm, the Palm to Linux switch will be smoother and more predictable. In addition, after shedding the limits that Garnet has imposed upon us, a fresh new OS with a solid core is going to be a breath of fresh air.</p>
]]></content:encoded>
			<wfw:commentRss>http://standalone.com/blog/?feed=rss2&amp;p=14</wfw:commentRss>
		</item>
		<item>
		<title>Iron Coding</title>
		<link>http://standalone.com/blog/?p=1</link>
		<comments>http://standalone.com/blog/?p=1#comments</comments>
		<pubDate>Wed, 04 Apr 2007 04:04:27 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
		
		<category><![CDATA[Iron Coder]]></category>

		<category><![CDATA[Mac]]></category>

		<category><![CDATA[Wiki]]></category>

		<guid isPermaLink="false">http://standalone.com/blog/?p=1</guid>
		<description><![CDATA[Hello World!
We&#8217;ve been meaning to start a blog for a while, this seemed like a good excuse: over the weekend, I entered the Iron Coder contest and won!
Iron Coder is based on the Iron Chef concept: you&#8217;re given an area of the operating system to work in (in this case the Screen Saver framework), and [...]]]></description>
			<content:encoded><![CDATA[<h4>Hello World!</h4>
<p>We&#8217;ve been meaning to start a blog for a while, this seemed like a good excuse: over the weekend, I entered the <a HREF="http://ironcoder.org/blog/">Iron Coder</a> contest and <a HREF="http://ironcoder.org/blog/2007/04/03/ironcoder-v-winner-wikipath/">won</a>!</p>
<p>Iron Coder is based on the Iron Chef concept: you&#8217;re given an area of the operating system to work in (in this case the Screen Saver framework), and a theme (here it was &#8220;Life&#8221;). With those two constraints, you&#8217;ve got two days to put something, anything, together.</p>
<h4>What to write?</h4>
<p>With the work we&#8217;ve done on <a HREF="http://standalone.com/palmos/quickipedia/">Quickipedia</a>, I&#8217;ve developed a familiarity with <a HREF="http://en.wikipedia.org/wiki/Main_Page">Wikipedia</a> and its layout, so some sort of Wiki-based screen saver seemed a good place to start. One of my favorite features of Wikipedia is its &#8216;Random Article&#8217; function. I like to request a random article, and then follow its links, picking up odd bits of knowledge along the way. I figured I could recreate this sort of &#8216;random walk&#8217; in a screen saver.</p>
<h4>Wikipath</h4>
<p><a HREF="http://ironcoder.org/entries/ironcoder_5/Wikipath.dmg">Wikipath</a> starts with a random Wikipedia page, and draws a portion of it on screen. It then randomly jumps to one of the wiki-links on that page, and draws it next to the original. It keeps this up until it hits a dead end page or runs out of room, then it starts over.</p>
<p><center><a HREF="http://standalone.com/blog/wp-content/uploads/2007/04/wikipath_screenshot.png"><img HEIGHT="250" SRC="http://standalone.com/blog/wp-content/uploads/2007/04/wikipath_screenshot.png" /></a></center>You can download the disk  <a HREF="http://ironcoder.org/entries/ironcoder_5/Wikipath.dmg">image</a> from the Iron Coder website (containing  screen saver and all the source code, if you&#8217;re interested.)</p>
<h4>A Plan</h4>
<p>With my goal firmly in mind, I now had to figure out a way to get there. The first order of business was to figure out how to display a fragment of a webpage, using as little memory as possible (I wanted to have a whole bunch of them onscreen at once, so creating a lot of WebViews would blow memory usage way out of line for a screen saver.) With a little research on <a HREF="http://webkit.org/">WebKit</a>, I was able to create a WebView with a random Wikipedia page, and then use a handy method of NSView to pull out a thumbnail image:</p>
<pre>	- (NSData *) dataWithPDFInsideRect: (NSRect) aRect</pre>
<p>Taking this data, and then creating an NSImage with it, gave me a pretty decent snapshot of the page. I could then re-use the same WebView for additional downloads, and save on memory. Now, I had to figure out a way to extract all the links on the page, so I could randomly jump to one. I considered manually hunting for them, or perhaps using ruby or perl to pull them out. I recalled that JavaScript lets you access all the links on a page with a simple array. Looking at the WebView docs, I found the perfect method,</p>
<pre>	- (NSString *) stringByEvaluatingJavaScriptFromString: (NSString *) script</pre>
<p>The JavaScript I wanted to use was dead simple:</p>
<pre>	"document.links"</pre>
<p>You have to be a little tricky here, since you can&#8217;t just convert from whatever JavaScript returns to a nice, usable NSString object. First I needed to grab the number of links, and then iterate in Objective-C through them. The source code is included in the download, for those who want to see the nitty-gritty details.</p>
<p>Finally it was just a matter of adding a few (primitive) graphics so that you could visually follow the page as it wends its way around your screen.</p>
<h4>I&#8217;m a Winner, Baby!</h4>
<p>The upshot of all this is I won a free to ticket to <a HREF="http://rentzsch.com/c4/">C4</a>, Jonathan &#8216;Wolf&#8217; <a HREF="http://rentzsch.com/">Rentzsch&#8217;s</a> awesome Mac development conference, hosted right here in Chicago. In addition, I inherit the judging duties for the <em>next</em> Iron Coder, which promises to be an adventure.</p>
<h4>Thanks!</h4>
<p>Many thanks to the Judge of Iron Coder V, <a HREF="http://toxicsoftware.com/blog/">Jonathan Wight</a>. I think there were nearly twice as many entries as the previous contest, and Jon put in a lot of time evaluating &#8216;em. Check out some of the other great <a HREF="http://ironcoder.org/entries/Ironcoder_5.dmg">screen savers and applications</a>!</p>
<h4>What&#8217;s Next?</h4>
<p>Wikipath isn&#8217;t done yet. Right now I&#8217;m working on the ability to select a page that strikes your fancy, and jump to that in your web browser. Hopefully I&#8217;ll have that up and running over the weekend. A couple of optimizations are also planned, so it&#8217;ll run a bit more smoothly and not hog all the processor. Stay tuned!</p>
]]></content:encoded>
			<wfw:commentRss>http://standalone.com/blog/?feed=rss2&amp;p=1</wfw:commentRss>
		</item>
	</channel>
</rss>
