<?xml version="1.0" encoding="UTF-8"?>
<rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Beckism.com</title>
	
	<link>http://beckism.com</link>
	<description>Fiction, opinions, and more</description>
	<lastBuildDate>Wed, 08 Sep 2010 17:28:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/beckism" /><feedburner:info uri="beckism" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Splitting a string into lines in Javascript</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/QIj229Yebb4/</link>
		<comments>http://beckism.com/2010/09/splitting-lines-javascript/#comments</comments>
		<pubDate>Wed, 08 Sep 2010 17:28:26 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Adversaria]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=392</guid>
		<description>I recently ran into the question of how to split a string into its component lines using Javascript without knowing beforehand what type of linebreaks were being used. After experimenting with the problem for a while, I finally arrived at the following solution (please note that I haven&amp;#8217;t tested this cross-browser, but it works great [...]</description>
			<content:encoded><![CDATA[<p>I recently ran into the question of how to split a string into its component lines using Javascript without knowing beforehand what type of linebreaks were being used.  After experimenting with the problem for a while, I finally arrived at the following solution (please note that I haven&#8217;t tested this cross-browser, but it works great in Safari/WebKit):</p>
<p><code>
<pre>var lines = text.match(/^.*([\n\r]+|$)/gm);</pre>
<p></code></p>
<p>Or the alternate version if you want to ensure that each line ends with a single linebreak rather than potentially have lines with multiple line breaks at their end (for my purposes this didn&#8217;t matter, but it might for yours):</p>
<p><code>
<pre>var lines = text.match(/^.*((\r\n|\n|\r)|$)/gm);</pre>
<p></code></p>
<p>The code assumes that <code>text</code> is a multiline string, and it utilizes the built-in Javascript String.match() method, which when performed with a regex with the global flag enabled will return an array of matches.  The multiline flag makes sure that the regex matches at the beginning of every line, and the alternatives at the end of the regex match one or more linebreaks or the end of the line (if we are on the last line).  The ultimate result of which is you split the string into a Javascript array with one line per index with the linebreaks preserved.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/QIj229Yebb4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2010/09/splitting-lines-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://beckism.com/2010/09/splitting-lines-javascript/</feedburner:origLink></item>
		<item>
		<title>Houses and hedgehogs and job changes, oh my!</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/w7H3Z7AvAbo/</link>
		<comments>http://beckism.com/2010/08/houses-and-hedgehogs/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 15:36:02 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=390</guid>
		<description>Yesterday I attended a wedding reception for one of my high school friends who reminded me that although he follows this blog, I have been extremely lax in updating it with much beyond descriptions of technical problems and how to surmount them. Whoops. Sometimes I forget that many of my old friends are not into [...]</description>
			<content:encoded><![CDATA[<p>Yesterday I attended a wedding reception for one of my high school friends who reminded me that although he follows this blog, I have been extremely lax in updating it with much beyond descriptions of technical problems and how to surmount them. Whoops. Sometimes I forget that many of my old friends are not into Twitter, which is where I post most of my day-to-day ramblings.</p>
<p>So for those viewers interested in the Life and Times of Ian Beck, here&#8217;s an update on what&#8217;s been happening with me lately.</p>
<p>Probably my biggest news is that my girlfriend Valerie and I bought a townhouse together about 4-5 months ago. This caused no end of consternation amongst our more traditionally-minded relatives (&#8220;You bought a house? You didn&#8217;t get married on the sly did you? WTF, mate?&#8221;), most of whom are still not able to wrap their heads around the concept of a stable long-term relationship that hasn&#8217;t terminated in marriage, kids, and a 50% chance of a messy divorce.  Most of these doubters are now waiting for the other shoe to drop; that is, for Valerie to announce that she&#8217;s pregnant, and for me to run off like the cad that I am and join the Foreign Legion to escape my responsibilities as a father.  Sadly for them, despite growing up in Sumner I developed a working knowledge of contraceptives prior to becoming sexually active.  This is thanks to my junior high P.E. teacher who, in direct defiance of district policy, took us into a classroom one day, closed the blinds, and taught us the mantra &#8220;latex, latex, latex&#8221;.  Thanks, Mrs. B. You&#8217;re a life-saver. Or new life preventer. Whatever.</p>
<p>In any case, we are now happily situated in <a href="http://maps.google.com/maps?f=q&#038;source=s_q&#038;hl=en&#038;geocode=&#038;q=columbia+city,+seattle&#038;sll=37.0625,-95.677068&#038;sspn=38.554089,78.574219&#038;ie=UTF8&#038;hq=&#038;hnear=Columbia+City,+Seattle,+Washington&#038;z=14">Columbia City</a>, which is a great neighborhood in South Seattle. We&#8217;re a block away from the light rail station (which Valerie uses to get to work) and a block away in the other direction is the Columbia City downtown area, including an independent movie theater (which shows blockbusters the week they come out; fantastic place), numerous delicious restaurants, a to-die-for bakery, and other fun things.</p>
<p>A couple months prior to buying the house, expanded our little family unit slightly with the addition of Nal, who is a delightful African pygmy hedgehog:</p>
<p class="center"><a href="http://www.flickr.com/photos/ianbeck/sets/72157623386035638/" title="View more Nal shots on Flickr.com"><img src="http://farm5.static.flickr.com/4135/4852286728_5b12807578.jpg"alt="Nal cooks"/></a></p>
<p>Before you have time to wonder, yes, hedgehogs are covered with quills. Nal in particular likes to show us just how sharp her quills are (she hates being picked up, and occasionally will ball up completely just to try and prove who is boss), but she also has a powerful curiosity and loves to explore. We have since discovered that Nal&#8217;s dislike of initial interactions is a personality quirk; one of Valerie&#8217;s friends recently got a hedgehog from the same breeder (and very similar lineage) who is delightfully friendly, if not so interested in exploring his surroundings as Nal.</p>
<p>On a more individual note, I recently changed employers from Tierra Technology, where I was primarily working on front-end web development, to <a href="http://macrabbit.com/">MacRabbit</a>, where I am doing a mixture of customer support, plugin development, and assorted other tasks as needed.</p>
<p>As you may or may not have picked up from other blog posts, I have been doing plugin development for MacRabbit&#8217;s text editor, Espresso (or Sugars, as they&#8217;re called in MacRabbit parlance) since shortly after the original Espresso beta releases. I also was spending a fair amount of time in the forums, to the point that I was playing unofficial support personnel. Jan (owner of MacRabbit) decided eventually that he needed help reducing distractions from coding, and asked me to come on full time as a part of the company. I happily accepted, since I love Espresso and the other MacRabbit products and looked forward to helping make the software I was using every day even better.</p>
<p>I&#8217;ve been a lot happier since making the switch; in my previous job I was getting frustrated because it seemed like I had learned all I was likely to learn.  My coworkers generally knew less than I about the tasks were doing, so although I had learned quite a lot initially (and gained invaluable experience with web development), I&#8217;d hit the point where it felt like I was just doing the same things day in and day out without ever growing as a programmer.  Working for MacRabbit has not only widened the range of tasks that I do on a day-to-day basis, but has also provided new challenges (and the opportunity to work with someone who knows far more about development than I do).</p>
<p>Speaking of programming, I also recently released my first standalone software offering. <a href="http://onecrayon.com/tapnote/">TapNote</a> is an app for Palm WebOS phones that offers elegant note taking. Working on it is an ongoing learning experience, and although it has not been quite as eagerly adopted by WebOS users as I&#8217;d hoped, it is providing a (very slight) amount of additional income, which is nice.  The reason I started development on TapNote was that I finally switched away from the iPhone (loved the device, hated the network) and since WebOS did not have any note taking apps that made me happy and the core languages are the web languages I&#8217;m already familiar with, it seemed a no-brainer to try my hand at app development.</p>
<p>Other than the house, hedgehog, and job changes life moves on apace. I&#8217;m still working from home (MacRabbit is located in Belgium, and although it would be awesome to visit the commute is a bit long otherwise), and Valerie is still dressing and undressing people at the Seattle Children&#8217;s Theater.</p>
<p>Now that you know absolutely everything about recent big events in my life, I&#8217;ll see about returning to the usual theme of solutions to development problems, occasional opinions about software, books, and movies, and other such boringly normal Beckism.com posts. At least until the next friend gets married and reminds me that people are sometimes interested in my personal exploits rather than my thoughts on WebOS databases and such.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/w7H3Z7AvAbo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2010/08/houses-and-hedgehogs/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://beckism.com/2010/08/houses-and-hedgehogs/</feedburner:origLink></item>
		<item>
		<title>Snippets.sugar for Espresso</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/RnSPgH841ls/</link>
		<comments>http://beckism.com/2010/07/snippets-sugar/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 05:05:56 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=381</guid>
		<description>I&amp;#8217;ve always been intrigued by the concept of a program for storing code snippets, but I&amp;#8217;ve never found one that I could put to any practical use. I inevitably would end up storing a few snippets in it, and then abandoning it for my text editor&amp;#8217;s built-in snippet management because it introduced too many extra [...]</description>
			<content:encoded><![CDATA[<p>I&#8217;ve always been intrigued by the concept of a program for storing code snippets, but I&#8217;ve never found one that I could put to any practical use. I inevitably would end up storing a few snippets in it, and then abandoning it for my text editor&#8217;s built-in snippet management because it introduced too many extra steps when it came to inserting snippets as I code. External snippets managers had some very real benefits, but none that outweighed the usefulness of tab completions and tab stops.</p>
<p>Fortunately, I think I finally have a snippet manager that will work for me. <a href="http://www.snippetsapp.com/">Snippets.app 1.1.1</a> offers a unique new feature: a bridge API that allows third party applications to invoke the Snippets search panel or global menu and then do whatever they need to do with the user&#8217;s selected snippet. While they were working on the feature, Lucky Ants asked me if I&#8217;d like to help them show it off, so I collaborated with them to develop the Snippets.sugar for Espresso (<a href="http://files.snippetsapp.com/Snippets.sugar.zip">download it here</a>).</p>
<p>In case you don&#8217;t have a clear idea of why this is awesome, here&#8217;s what you can do with it:</p>
<ol>
<li>Once the Sugar is installed, choose <strong>Actions&rarr;Snippets.app&rarr;Insert Snippet</strong> (<strong>control-S</strong>) while editing a document in Espresso to jump to the Snippets search panel (or global menu)</li>
<li>Find the snippet you want to insert, and hit enter</li>
<li>The snippet will be inserted into Espresso, and any placeholders in the snippet will be converted into tab stops</li>
</ol>
<p>It&#8217;s that last feature that vastly improves Snippets.app&#8217;s usefulness. Previously, snippets managers were basically just cut and paste. With Snippets.sugar&#8217;s integration into the core application&#8217;s APIs, though, you can leverage the full power of Espresso&#8217;s text snippet syntax.</p>
<p>That&#8217;s fun, but it gets better:</p>
<ul>
<li>Your snippet can contain Snippets.app-style named placeholders or Espresso/Textmate-style numbered placeholders and they&#8217;ll automatically be converted into tab stops</li>
<li>Your snippet can contain Espresso or Textmate special variables like <code>$EDITOR_PATH</code> or <code>$TM_SELECTED_TEXT</code>, allowing your snippet to interact with your selected code, prefill the path to the document, and so forth</li>
<li>Because it&#8217;s an Espresso snippet, you can also use interpolated shell code, placeholder mirrors and transformations, etc.</li>
<li>When inserting a snippet that doesn&#8217;t contain any placeholders, it will be inserted as plain text, so you won&#8217;t have to worry about losing special characters like <code>$</code> that sometimes get messed up in Espresso snippets</li>
</ul>
<p>Additionally, you can move in the other direction. Just select some text in Espresso and choose <strong>Actions&rarr;Snippets.app&rarr;New Snippet</strong> (<strong>control-shift-S</strong>) to create a new snippet in Snippets.app using the selected text.</p>
<p>To choose whether to use the search panel or the global menu, open up the Espresso preferences, switch to the Advanced pane, and make sure that Snippets.sugar is selected in the dropdown at the top. There you&#8217;ll be able to choose what interface you like, force the Sugar to always use a particular type of snippet logic (if that&#8217;s necessary for some reason), and set some defaults for when you&#8217;re creating new snippets:</p>
<p class="center"><img src="http://beckism.com/wp-content/uploads/2010/07/prefs-window.jpg" alt="Snippets.sugar Preferences" /></p>
<p>Although this is a fantastic feature, you&#8217;ll still need to weigh up some pros and cons before you jump straight into it. On the positive side, it&#8217;s now feasible with Snippets.app to have a single, well-organized snippet library that includes advanced tab stopped snippets and can be shared across multiple text editors (for instance, this would make it a breeze to migrate a Textmate snippet collection for use with Espresso). Thanks to Snippets.app&#8217;s synchronization capabilities, you could also use your snippets collection across multiple computers far more easily than when Espresso&#8217;s snippet management features.</p>
<p>The main downside is that although the Snippets.sugar integrates Espreso and Snippets.app far more closely than before, it still is not a seamless integration because Espresso doesn&#8217;t know anything about the snippets until you select them. This means that you can&#8217;t use tab completions to trigger snippets, so the process of selecting the snippet you want to use is still relatively time consuming compared to using native snippets.</p>
<p>For more information about the other goodies available in Snippets.app 1.1.1, see the <a href="http://www.snippetsapp.com/blog/snippets-1-1-1.html">1.1.1 blog announcement</a>. I hope you enjoy Snippets.sugar!</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/RnSPgH841ls" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2010/07/snippets-sugar/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://beckism.com/2010/07/snippets-sugar/</feedburner:origLink></item>
		<item>
		<title>Implementing scene fades in WebOS</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/rZFHoXV7Opw/</link>
		<comments>http://beckism.com/2010/07/scene-fades-webos/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 04:53:45 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[webos]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=378</guid>
		<description>I had a heck of a time implementing a simple scene fade (or &amp;#8220;scroll fades&amp;#8221; as they&amp;#8217;re also called) in TapNote, mainly thanks to the lack of good information surrounding them. Most folks in the Palm forums recommend looking at the Style Matters example project, but Style Matters was apparently coded by someone who also [...]</description>
			<content:encoded><![CDATA[<p>I had a heck of a time implementing a simple scene fade (or &#8220;scroll fades&#8221; as they&#8217;re also called) in <a href="http://onecrayon.com/tapnote/">TapNote</a>, mainly thanks to the lack of good information surrounding them.  Most folks in the Palm forums recommend looking at the Style Matters example project, but Style Matters was apparently coded by someone who also believed that Coding Style Doesn&#8217;t Matter, so screw that.</p>
<p>Sadly, scene fades are only provided for free with some elements (the command menu, for instance), so most of the time you have to implement them by hand.</p>
<p>To get your scene fades up and running, you&#8217;ll need to stick a little extra HTML in your scene, add a CSS snippet to your stylesheet, and copy the image resources into your app.</p>
<h4>HTML</h4>
<p>The HTML is very straight-forward. Just stick this at the very bottom of your scene (don&#8217;t nest it in anything):</p>
<p><code>
<pre>&lt;div class="scene-fade bottom" x-mojo-scroll-fade="bottom">&lt;/div>
&lt;div class="scene-fade top" x-mojo-scroll-fade="top">&lt;/div></pre>
<p></code></p>
<p>Obviously, if you only wanted a top or bottom fade, you&#8217;d only include one or the other.</p>
<h4>CSS</h4>
<p>This CSS snippet is a vastly condensed and improved version of the CSS used by the Style Matters program.  Note that you&#8217;ll probably need to set height: 100% on your HTML and body elements because otherwise the absolute positioning of the scene fades might not work. If you do so and you&#8217;re still not having your bottom scene fade positioned properly, try additionally setting <code>height: 100%</code> on the wrapper element for your scene.</p>
<p><code>
<pre>html, body {
    height: 100%;
}

/* === Scene Fades === */

.scene-fade {
    height: 54px;
    width: 100%;
    position: fixed;
    left: 0px;
    z-index: 100000;
    -webkit-palm-mouse-target: ignore;
}

.scene-fade.top {
    top: 0px;
    background: url(../images/fade-top.png) repeat-x center bottom;
}

.scene-fade.bottom {
    bottom: 0px;
    background: url(../images/fade-bottom.png) repeat-x center bottom;
}</pre>
<p></code></p>
<h4>Images</h4>
<p>The images you need are squirreled away in the WebOS SDK. For instance, the ones I ended up using were located in this folder:</p>
<p><code>
<pre>PalmSDK/0.1/share/samplecode/stylematters/images/</pre>
<p></code></p>
<p>And were called <code>my-scene-fade-bottom.png</code> and <code>my-scene-fade-top.png</code>.</p>
<p>If locating those images is too much effort, though, you can just <a href="http://beckism.com/examples/scene-fades.zip">download the example code</a>.</p>
<p>Finally, you will of course need to drop the images into your root images folder, and adjust the path to them in the CSS if it&#8217;s located more than a single level away from the project root.  Enjoy!</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/rZFHoXV7Opw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2010/07/scene-fades-webos/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://beckism.com/2010/07/scene-fades-webos/</feedburner:origLink></item>
		<item>
		<title>TouchNote is now TapNote</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/iY-TvbKwalc/</link>
		<comments>http://beckism.com/2010/06/introducing-tapnote/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 14:44:12 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tapnote]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=362</guid>
		<description>Although I hadn&amp;#8217;t expected to have an issue with TouchNote.com, they evidently didn&amp;#8217;t like my use of the word &amp;#8220;TouchNote&amp;#8221; (despite using it for a completely different purpose on a platform they don&amp;#8217;t appear to have any interest in) and rather than ask nicely had their lawyers threaten me with a trademark lawsuit. Thanks, guys. [...]</description>
			<content:encoded><![CDATA[<p>Although I hadn&#8217;t expected to have an issue with TouchNote.com, they evidently didn&#8217;t like my use of the word &#8220;TouchNote&#8221; (despite using it for a completely different purpose on a platform they don&#8217;t appear to have any interest in) and rather than ask nicely had their lawyers threaten me with a trademark lawsuit.</p>
<p>Thanks, guys. It&#8217;s always a pleasure to interact with people who skip that whole tedious friendly request stage and go straight to threats.</p>
<p>In any case, I don&#8217;t have the resources for a legal battle (and would not have used the name in the first place if I thought they&#8217;d have a problem with it), so my app is now named <a href="http://onecrayon.com/tapnote/">TapNote</a>.</p>
<p>The name change is going to take a couple of days to percolate through Palm&#8217;s system, but TapNote v1.1 should be in the app catalog probably Friday or Monday, depending on Palm&#8217;s turnaround.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/iY-TvbKwalc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2010/06/introducing-tapnote/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://beckism.com/2010/06/introducing-tapnote/</feedburner:origLink></item>
		<item>
		<title>Data model design in WebOS</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/2P1ZAktt6vI/</link>
		<comments>http://beckism.com/2010/06/data-models-webos/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 16:11:14 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[opinions]]></category>
		<category><![CDATA[webos]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=360</guid>
		<description>When I was first starting to program TapNote I did a lot of reading through Palm&amp;#8217;s documentation and other WebOS developer help sites, but I never was able to find any good information on how to set up a data model. Turns out that there aren&amp;#8217;t any official recommendations. Palm mentions the app/models folder mainly [...]</description>
			<content:encoded><![CDATA[<p>When I was first starting to program <a href="http://onecrayon.com/tapnote/">TapNote</a> I did a lot of reading through Palm&#8217;s documentation and other WebOS developer help sites, but I never was able to find any good information on how to set up a data model.</p>
<p>Turns out that there aren&#8217;t any official recommendations. Palm mentions the <code>app/models</code> folder mainly just to get you thinking about using an <a href="http://en.wikipedia.org/wiki/Model–view–controller">MVC</a> design for your app, I suspect.</p>
<p>While I designed the architecture of my app, however, I thought a fair amount about how to break down the logic, and I ended up coming up with some guidelines that may help other developers with their app design.  Of course, this is probably pretty obvious stuff for people who design with MVC regularly, but I would have found it useful when I was starting out with WebOS programming (particularly because it was complicated by WebOS&#8217;s persistently asynchronous nature).</p>
<h4>Knowledge and responsibilities</h4>
<p>The controller (or assistant, in WebOS parlance) knows these things:</p>
<ul>
<li>The interface for the model</li>
<li>The expected Javascript object schema for the data</li>
<li>Details about the view elements (views being the HTML files for the scene)</li>
</ul>
<p>The controller&#8217;s responsibilities are:</p>
<ul>
<li>Querying the model for new data when needed</li>
<li>Updating view items with data once the model sends it over</li>
</ul>
<p>The model (which should be either a Prototype class or a unique object stored in your <code>app/models</code> directory) knows these things:</p>
<ul>
<li>Exactly what storage system is being used for the data</li>
<li>How to interact with the storage system (SQL queries or whatever else)</li>
<li>The Javascript object schema for the data</li>
</ul>
<p>The model&#8217;s responsibilities are:</p>
<ul>
<li>Gathering data when it is requested</li>
<li>Transforming the data from its raw format into the proper Javascript object</li>
<li>Returning the data using the provided callback</li>
</ul>
<p>A decent metaphor is that of two coworkers in neighboring cubicles.  The controller asks for something from the model, and tells it where to send the results.  The model does what it needs to do to gather those results, then sends them where the controller requested.  Neither can see into the other&#8217;s cubicle to know what exactly what their coworker is doing, but neither one needs to. Either model or controller can change what they&#8217;re doing with the data (how it&#8217;s stored or how it&#8217;s displayed), but this won&#8217;t affect their relationship to one another.</p>
<p>If you ever have something in the controller that depends on knowing what type of storage system is used for the data, you are doing it wrong.  Similarly, if you ever have anything in the model that references or needs to know about specifically what view items are being populated with data, you need to rethink your architecture.</p>
<h4>Basic layout</h4>
<p>Unlike assistants which are automatically loaded by Mojo when their scene is pushed, you will need to add your model class to your app&#8217;s <code>sources.json</code> file by hand:</p>
<p><code>
<pre>
[
    {"source": "app/models/myDataModel.js"},
    {
        "scenes": "Myscene",
        "source": "app/assistants/myscene-assistant.js"
    },
]
</pre>
<p></code></p>
<p>What this does is expose the contents of <code>myDataModel.js</code> globally to your app (so be careful with your globally scoped variable names!).</p>
<h4>Typical round trips</h4>
<p>Based on TapNote&#8217;s design (in which I tried to follow the above guidelines), this is a typical function layout for the controller:</p>
<ul>
<li><strong>Request function:</strong> this is typically triggered by an event in the view, and all it does is request something from the model (passing along any relevant info from the event, along with the callback function reference)</li>
<li><strong>Callback function:</strong> this accepts data from the model, and does whatever needs to be done with it in the view.</li>
</ul>
<p>A typical controller would thus look like this:</p>
<p><code>
<pre>
var MysceneAssistant = Class.create({
    /* Standard function for Prototype classes */
    initialize: function() {
        this.model = new MyDataModel();
        // Always save static bound references to member functions
        this.bound = {
            populateData = this.populateData.bind(this)
        };
    },

    /* ... Setting up events etc. happens here ... */

    /* This function is triggered by an event */
    refreshData: function(event) {
        // Any necessary logic prior to requesting data
        this.model.refreshData(this.bound.populateData);
    },

    populateData: function(dataObject) {
        // Handle populating the view with the data object here
    }
});
</pre>
<p></code></p>
<p>My model ended up being very similar, since it too had an asynchronous call (although if you were accessing data in a depot or cookie you might not need two functions):</p>
<ul>
<li><strong>Request function:</strong> receives requests from the controller, builds the necessary SQL (or whatever) and executes it, binding the callback into the success function of the datastore</li>
<li><strong>Return function:</strong> processes the successful results from the query, and sends the results of processing to the callback</li>
</ul>
<p>Using the previous example code for the controller, here&#8217;s how our model class would look:</p>
<p><code>
<pre>
var MyDataModel = Class.create({
    /* ... Set up the model here ... */

    refreshData: function(callback) {
        // Set up the SQL, etc. here
        // Query the database here binding in our unique callback
        this.db.query(query, {
            onSuccess: this.returnData.bind(this, callback)
        });
    },

    /* Because of the on-the-fly bind, the callback is the first arg */
    returnData: function(callback, results) {
        // Transform results into Javascript object; simple example:
        var resultObject = results[0];
        // Send the object to the controller
        callback(resultObject);
    }
});
</pre>
<p></code></p>
<p>Unlike the controller, in the model we have to do the binding on the fly because otherwise we can&#8217;t pass the callback through. If you can guarantee that there will only ever be one controller requesting data at any given time, you could instead use a <code>this.bound</code> object like the controller and save the callback to a class variable (for instance, <code>this.callback</code>).</p>
<p><strong>Brief side note:</strong> you may notice the unexplained <code>this.db.query()</code> call above. When I was writing TapNote, one of the first things I did was write a generic Database class to abstract away from the heinous syntax of the HTML 5 database connection. This is a generically useful class that I&#8217;ve <a href="http://github.com/onecrayon/database-webos">released for free</a>.</p>
<h4>Implementing in your own app</h4>
<p>The above examples certainly are not the only way to do things (I actually deviated from that design a bit for some data responses when TapNote became a multi-stage app partway through development), and you will likely find yourself changing things up based on the needs of your own app.  However, if you start with this design as a basis and keep in mind the roles and responsibilities of model and controller, then you will hopefully create an app whose code is easy to debug and expand on down the road.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/2P1ZAktt6vI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2010/06/data-models-webos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://beckism.com/2010/06/data-models-webos/</feedburner:origLink></item>
		<item>
		<title>The pricing of TapNote</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/NIUrJtMtWPI/</link>
		<comments>http://beckism.com/2010/06/pricing_of_tapnote/#comments</comments>
		<pubDate>Sun, 06 Jun 2010 16:16:31 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tapnote]]></category>
		<category><![CDATA[webos]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=358</guid>
		<description>Once I&amp;#8217;d finished up the basics for TapNote 1.0, I faced the difficult task of choosing a price for it. After much deliberation, I settled on an asking price of $4.00. This price appealed to me because it was in keeping with the pricing for the better-class note-taking apps available in the app catalog, but [...]</description>
			<content:encoded><![CDATA[<p>Once I&#8217;d finished up the basics for <a href="http://onecrayon.com/tapnote/">TapNote 1.0</a>, I faced the difficult task of choosing a price for it. After much deliberation, I settled on an asking price of $4.00.  This price appealed to me because it was in keeping with the pricing for the better-class note-taking apps available in the app catalog, but wasn&#8217;t a .99 price point (which I hate; I think they&#8217;re dishonest, and even if they perform better&mdash;something I doubt&mdash;I&#8217;d rather provide an upfront price to people rather than trying to trick them into rounding down in their head).</p>
<p>Then Palm approved TapNote, I excitedly posted about it here and on Twitter, and absolutely no one bought it. A week later, my Palm stats have a number of purchases I can count on one hand, and no one has cared enough to leave a star rating, much less a review of the program.</p>
<p>This is, to say the least, discouraging.</p>
<p>Since then I&#8217;ve been vacillating between leaving the price as-is and sharply cutting it.  A fellow WebOS developer on Twitter recommend cutting the base price in half and reducing it further as a promotion to drive initial sales and hopefully get on the Hot Apps list. This was tempting, since the whole reason I released version 1.0 without synch was that I wanted to get it out in the window for Hot Apps.</p>
<p>However, I truly believe that TapNote is worth $4.00 (or more, to be honest; $4.00 won&#8217;t buy you a decent lunch, and what I&#8217;m planning to do with TapNote 1.x is way better than a decent lunch), but what I believe and what the market is willing to pay are two different things, so if I want to sell it I&#8217;m going to need to conform to the market&#8217;s expectations.</p>
<p>After giving this lots of thought, waiting to see specific numbers in Palm&#8217;s download reports, and sleeping on the problem, I&#8217;ve made up my mind: I&#8217;m leaving the price alone. People can either cough up four bucks if they, like myself, aren&#8217;t happy with the existing options for note-taking, or they can settle for one of the existing solutions.  I&#8217;m unlikely to sell many copies up front, and unless a high profile blogger or review site notices TapNote and gives me some favorable press there&#8217;s no way I&#8217;ll even make it into the lower tier of Hot Apps, but I&#8217;m alright with that.</p>
<p>First off, I don&#8217;t need the money. I created TapNote because I badly needed it, and although I&#8217;d like a little recompense for all the time and effort I&#8217;ve spent, I&#8217;ve already got a full time job that&#8217;s paying the mortgage. It makes me a little sad that other people don&#8217;t appreciate TapNote, but it won&#8217;t impact me negatively if TapNote remains in obscurity for a while (and the nonexistent support burden is definitely nice).</p>
<p>Secondly, the whole race to the bottom that continues to occur in app stores leaves a bad taste in my mouth. Developers complain about how they sink months into an app and then people won&#8217;t even give them the cost of a cup of coffee for it, yet they still slash prices down to nothing in an effort to sell.  In the Apple app store, this is about the only option, of course, because the competition is so heavy it&#8217;s virtually impossible to get noticed. For the Palm app catalog, though, there&#8217;s relatively little competition. Just keeping an app on the &#8220;Recently Updated&#8221; pages with regular updates is enough to get a reasonable amount of exposure (based on things I&#8217;ve read in the developer forums).</p>
<p>So cutting the price when I don&#8217;t really need the sales feels to me like devaluing the app for no good purpose.  Increasing prices for high quality apps has to start somewhere, and to be honest $4.00 is hardly a high premium. Based on my competition, a premium price would actually be up in the $7-10 range.</p>
<p>Additionally, I am highly skeptical that vastly reduced prices is actually profitable. Certainly it&#8217;s useful for getting an app into the public eye, but when I look at the apps in the $10,000 bracket of Hot Apps, very few of them cost less than $5 (and of those less than $5, most are at the $3-4 mark).  Palm has been crowing about TweetMe&#8217;s meteoric rise up the charts, but I notice that it remains in the $1,000 bracket, while it&#8217;s higher-priced competitors are looking at a handy $10,000 bonus and a $4 notes app that was featured in the app catalog&#8217;s Feature Apps area has quietly jumped into the $10,000 bracket, as well.</p>
<p>All of which says to me that although cutting prices would probably get TapNote noticed, I would have to time things very carefully in order to not ultimately lose profits. Because Palm&#8217;s download reporting for paid apps is almost a week delayed (!!!) and any price change requires at least 2-3 days while they review it, it is virtually impossible for me to tweak the price lower and then raise it back up when its usefulness has run its course. If I&#8217;m going to lower it, I need to be content with it being lowered for a week at minimum and more like two weeks before I can accurately judge the effectiveness of the change.</p>
<p>None of which is worth it to me. I would rather continue as I have with a solid product and great updates and then see if some marketing efforts once I&#8217;ve integrated synchronization don&#8217;t give it a boost in popularity. That way, I lose nothing, ultimately will likely make more money than if I halved the price and got a $1,000 Hot Apps bonus for it, and I don&#8217;t devalue my app in a market that hasn&#8217;t yet figured out that a lowest-common-denominator price doesn&#8217;t often make for a good user experience.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/NIUrJtMtWPI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2010/06/pricing_of_tapnote/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://beckism.com/2010/06/pricing_of_tapnote/</feedburner:origLink></item>
		<item>
		<title>WebOS first impressions and the making of TapNote</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/4tl5F4srZP8/</link>
		<comments>http://beckism.com/2010/06/making_of_tapnote/#comments</comments>
		<pubDate>Sat, 05 Jun 2010 23:29:23 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tapnote]]></category>
		<category><![CDATA[webos]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=356</guid>
		<description>About two months ago, I switched to a Palm Pre Plus to replace my iPhone. As soon as I got home I of course started playing with my new toy, and it did not take me long at all to realize that although Palm has included an excellent suite of default software and there are [...]</description>
			<content:encoded><![CDATA[<p>About two months ago, I switched to a Palm Pre Plus to replace my iPhone.  As soon as I got home I of course started playing with my new toy, and it did not take me long at all to realize that although Palm has included an excellent suite of default software and there are some wonderful apps in the app store, I was desperately going to miss <a href="http://www.hogbaysoftware.com/products/writeroom">WriteRoom</a> on the iPhone. There were several note-taking apps already out, but none of them offered the features I needed in an attractive package. Most, in point of fact, tended toward feature-bloat by my standards.</p>
<p>And so <a href="http://onecrayon.com/tapnote/">TapNote</a> was born. I created TapNote because I badly needed it, and I released it as a paid app because I figured other people would be interested, too.</p>
<p>Getting into mobile app development using WebOS was an interesting journey, so I wanted to share some of the things that I discovered along the way, as well as discuss the specific design decisions that influenced TapNote&#8217;s development.</p>
<h4>WebOS: a quick intro</h4>
<p>It&#8217;s pretty obvious that developing for WebOS means using web technologies, but what exactly does that mean?</p>
<p>Right now, there are two basic types of WebOS apps and a third on the horizon:</p>
<ol>
<li>SDK apps are coded entirely in HTML, CSS, and Javascript and leverage Palm&#8217;s Mojo framework to interact with the system hardware.</li>
<li>PDK apps are coded in C or C++ and interact directly with frameworks like SDL to display things on the screen and interact with the user. The 3D games that you&#8217;ll find in the app catalog are all PDK apps.</li>
</ol>
<p>The third type of application is one that mixes the web tech SDK with compiled C code in the PDK to leverage the strengths of both. We haven&#8217;t seen any such apps yet, because Palm hasn&#8217;t provided an API for communicating back and forth between Javascript and C.</p>
<h4>The WebOS SDK: not all sweetness and light</h4>
<p>Developing for WebOS has been an intriguing mixture of simplicity and frustration.  I am a front-end web developer by trade, so WebOS sounded perfect to me: no new languages to learn, no need to muck around with compiled code, and the ability to use my current development environment.  Although Palm is pushing Eclipse for development, I was able to whip up an Espresso Sugar for WebOS development my first weekend and hit the ground running the next week.</p>
<p>However, WebOS is not the panacea that it sounds. Web developers get pretty hot under the collar when they hear you can make true applications using HTML and CSS, but here&#8217;s the truth: you can&#8217;t. Coding for WebOS is about Javascript. Yes, you can do a certain amount using CSS animations, but for the most part it&#8217;s Javascript, Javascript, Javascript. Javascript to set up the HTML and register it to be transformed into widgets, Javascript to handle interactions with users, Javascript to set the classes that trigger your CSS animations. If you want to develop for WebOS, you need to know Javascript.</p>
<p>It isn&#8217;t like this is unexpected, of course. HTML+CSS isn&#8217;t optimized for handling touch-based interactions, and there is no concept of URLs for typical apps which means the only way to get new content is via asynchronous Javascript. So although the reliance on Javascript is obvious in retrospect, I mention it because most of the web developers I know have a hazy grasp of Javascript or know only jQuery and I don&#8217;t wish this to come as a rude shock. It&#8217;s also worth mentioning because the Palm documentation is terrible if you&#8217;re a Javascript newcomer.</p>
<p>Thankfully, I am not, but I pity newcomers to the language. Palm&#8217;s documentation is all vanilla Javascript, and filled with references to object prototypes and so forth. Then you boot up their example apps and discover that rather than eat their own dog food, they&#8217;re using the Prototype framework&#8217;s Class object to create a nice classical-inheritance object flow. Had I not been well-versed in the concept of using classical inheritance alongside Javascript&#8217;s prototypal inheritance from my past work with Mootools, getting up and running would have been a major headache.</p>
<p>Additionally, although Palm claims to support the latest web technologies, they do not.  There are two reasons for this:</p>
<p>First, they enforce an awful, non-semantic div soup markup style. If you want to use a Palm widget to speed things up (which you mostly will, particularly the list widget), you have to declare it using a div and it is then automatically filled with a plethora of other divs.  To make matters worse, the Palm example projects rarely use any elements other than divs (even when the element is clearly a header, paragraph, etc.) and there are no reset styles in the CSS that&#8217;s lumped in with the Mojo framework so if you end up trying to code something vaguely semantic you&#8217;ll have to restyle every element. Clearly Palm&#8217;s markup was developed by people who have never worked as front-end developers, and it&#8217;s a crying shame because it makes development on WebOS for people who care about writing elegant markup quite frustrating.  And yes, good markup matters. Aside from making accessibility on the platform easier down the road, simple semantic markup is easier to style, read, and modify, which directly impacts development time.</p>
<p>Second, WebOS is driven by Mobile Webkit. The good side of this is that you have access to a whole new world of CSS and, to a far lesser extent, HTML (without needing to worry about cross-browser debugging! Huzzah!). The bad is that Mobile Webkit&#8217;s support of CSS 3 and so forth is inconsistent at best. For instance, when I was creating TapNote&#8217;s editing interface, I wanted to fade out the header pill when text scrolled under it rather than attaching the header to the top of the page. This was super easy: I just added a CSS transition to fade the opacity of the element down.</p>
<p>But the text remained at full opacity.  After a bunch of experimentation, web searches, and so forth I discovered that Mobile Webkit (or possibly just the version employed by Palm) can&#8217;t apply opacity to an element&#8217;s text for some unknown reason. Not so helpful. (Thankfully in this instance, there was a workaround: Palm&#8217;s Webkit <em>does</em> support rgba() colors, so with some extra styles I was able to make the whole thing fade.)</p>
<p>Don&#8217;t get me wrong: I love WebOS and I think it is hands-down the best mobile OS on the market for developers. However, that doesn&#8217;t mean that you shouldn&#8217;t go into it with eyes open.  WebOS is a great idea, and Palm has done some truly visionary work, but it is by no means perfect.</p>
<h4>Diving in</h4>
<p>I&#8217;ve thought a lot about design over the course of TapNote&#8217;s initial development. When I was browsing through the app store for a note-taking app, what struck me wasn&#8217;t that the available options were bad, per se. They just weren&#8217;t designed to the standards I&#8217;ve come to expect having used Mac OS X and iPhone software for so long.</p>
<p>This doesn&#8217;t mean that they weren&#8217;t visually appealing. For some of them, far from it. However, aesthetically pleasing design is not the same as having a well-designed interface.</p>
<p>A great example of this is Palm&#8217;s own Memos app. It&#8217;s a perfect example of software kitsch: visually appealing, but ultimately useless and reliant on a cheesy metaphor that has no applicability to the medium. A corkboard covered in Post-Its is a worthless conceit on a device where screen real estate is at such a premium, since aside from color you can&#8217;t quickly distinguish between notes without opening them. Add to that the fact that the metaphor has no basis in reality (Post-Its won&#8217;t stick to corkboard) and you&#8217;ve got an app that did not receive terribly deep attention to its design even though someone with great aesthetic sense obviously put some love into the graphics.</p>
<p>In short, the Memos app looks great and feels terrible, which means that it wasn&#8217;t well designed. Truly good design requires thinking deeply about the visual appearance and how it interacts with the app&#8217;s functionality (among other things, like whether a given bit of functionality is even necessary).  Too many of the note-taking apps that I tried seemed like they were focused on implementing a targeted feature list in a visually appealing way, without thinking enough how those features and interface really impact the user experience.</p>
<p>I did not want to rehash these problems with TapNote, so when I started designing it I decided there were only three things I couldn&#8217;t live without:</p>
<ul>
<li>Plain text editing</li>
<li>A document-based layout, <em>a la</em> WriteRoom</li>
<li>Wireless synchronization with my Mac</li>
</ul>
<p>(Only two of those three bullets made it into version 1.0; synchronization sadly didn&#8217;t make the cut for the initial release because I had a soft deadline of releasing the first version during the Hot Apps contest to ensure that this didn&#8217;t become one of those software products that never gets released at all.)</p>
<p>I drew some sketches to make sure that the ideas I was picturing were worth pursuing, and then since most of the app relies on Palm&#8217;s provided styling anyway, I started straight into development.</p>
<p>With a framework like WebOS, I think this was the right move. Were TapNote more visually complicated, I would have needed to create some detailed mockups, but in some ways usability matters even more than visuals for a mobile app, and you won&#8217;t know how usable your app is until it&#8217;s in your hand.</p>
<h4>Simplicity versus obviousness</h4>
<p>For TapNote, I decided the single most important thing to me was interface simplicity rather than making everything as obvious as possible. As a result, I avoided buttons for a lot of the functionality in favor of items in the app menu and contextual menus (which can be accessed by touching and holding an item).</p>
<p>In many ways, this is in keeping with WebOS&#8217;s core design, and is a major difference between WebOS and iPhone OS. On the iPhone, simplicity often comes second place to obviousness. A good example of this is the ubiquitous back button in iPhone apps. The back button takes makes for a more complex interface, but it is also dead obvious how to return to the previous screen. WebOS, on the other hand, provides a universal back gesture that works in every app, obviating the need for the visual clutter of a back button. This increases the visual simplicity of apps, but increases the initial conceptual complexity because users have to learn the back gesture.</p>
<p>Both approaches have their strengths and weaknesses, but deciding which approach to take is a core design decision for any mobile app, particularly on WebOS (you don&#8217;t have as much choice on the iPhone, of course, thanks to the lack of support for back gestures or standardized app menus).</p>
<p>An example of how I followed this design path for TapNote is the &#8220;email document&#8221; function. I added this to the app when it became obvious that synching wasn&#8217;t going to make it for version 1.0, and the most obvious way to do it would have been to put a button with an icon at the bottom of the editing screen. However, this would add visual clutter to the app for an action that most users are going to utilize rarely, so I instead placed an &#8220;Email Document&#8221; item in the app menu for editing documents. Because it is hidden in the app menu, it&#8217;s unlikely that users will discover it without looking for it specifically (the downside) but it also streamlines the main purpose of the app, which is reading and writing text.</p>
<h4>It&#8217;s the details</h4>
<p>It wasn&#8217;t until I created the website for TapNote that I realized it&#8217;s not a visually impressive app. Yes, it looks good and it does exactly what I designed it to do (which is draw your focus to the text in a visually pleasing way), but it&#8217;s not flashy in quite the same way as an app like <a href="http://tweetmeapp.com/">TweetMe</a>. I was originally intending to do the classic &#8220;large phone with screenshot&#8221; approach for the webpage, but it didn&#8217;t work at all because any TapNote screenshot I took was just a bunch of text that distracted from the web page (and not quite enough text that I could fit the marketing verbiage I wanted in there).</p>
<p>Such a realization was a slight shock to me, because I&#8217;d been using TapNote at that point for about a month and it had always felt special to me. When I thought about it, though, it wasn&#8217;t special because it was outstandingly pretty (my designs rarely are; attractive simplicity is my forte), but because I&#8217;d focused my attention on the little details that matter in day to day use.</p>
<p>This is something that is overlooked far too often in mobile development. For instance, when I downloaded other note-taking apps, a common thing I would do was tap the new note button, tap the title, type a title, and then tap right at the bottom of the screen (right above the keyboard, where my hands already were) to place the edit cursor in the main text field.</p>
<p>The only problem with this was that none of the apps I did this in actually placed the cursor in the main editing text area. After my tap, I had to start tapping up near the top of the page, hoping that I&#8217;d hit the nebulous text input so I could start typing.</p>
<p>So in TapNote, although it took a bit of work (and got inadvertently broken several times during the course of development), I made sure that on short documents tapping below the editing area would place the cursor at the end of the editing area.</p>
<p>I&#8217;m a firm believer that this is the type of detail that deserves the most attention in mobile apps (and frankly thanks to my self-imposed deadline I didn&#8217;t focus on quite as many of these little details as I should have; I&#8217;ve been talking up TapNote like it&#8217;s the One True App, but as is always the case in a 1.0 product, my ideals are in a far better place than the actual product ended up).</p>
<h4>Moving forward</h4>
<p>Palm&#8217;s WebOS provides a unique opportunity for web developers to explore a new market and interaction framework for their development, and I have no regrets about investing effort into learning the Mojo framework to develop TapNote. I love creating websites, but designing something that I can carry about in my pocket and use every day has a special kind of appeal.</p>
<p>Although I&#8217;m happy with how TapNote 1.0 turned out, I&#8217;ve got a lot of work still to do. I&#8217;ve barely scratched the surface of my ultimate vision for the app, and for all my lofty ideals of great design I didn&#8217;t spend quite enough time on a few aspects of the app in my attempt to get it out the door.</p>
<p>My hope is that others will find my early experiences and opinions on design useful in their own development processes, whether they agree with my approach or move in an entirely different direction. Developing TapNote has been a great and ongoing learning experience for me, and I hope other people will take the same leap into WebOS development. This is an area where high attention to detail is not yet the norm and (unlike the Apple app store) there&#8217;s lots of room for innovation and improvement on existing solutions because the app catalog is nowhere near as saturated.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/4tl5F4srZP8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2010/06/making_of_tapnote/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://beckism.com/2010/06/making_of_tapnote/</feedburner:origLink></item>
		<item>
		<title>Announcing TapNote</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/9da0CvJIM5o/</link>
		<comments>http://beckism.com/2010/06/announcing_tapnote/#comments</comments>
		<pubDate>Wed, 02 Jun 2010 14:07:15 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tapnote]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=354</guid>
		<description>I&amp;#8217;m very pleased to announce that TapNote, my dead-simple note-taking app for Palm WebOS phones, is now available in the Palm App Catalog for $4.00. I&amp;#8217;ve been working on TapNote ever since I picked up a Palm Pre and discovered that none of the notes apps made me happy. Version 1.0 has all the basic [...]</description>
			<content:encoded><![CDATA[<p>I&#8217;m very pleased to announce that <a href="http://onecrayon.com/tapnote/">TapNote</a>, my dead-simple note-taking app for Palm WebOS phones, is now available in the <a href="http://developer.palm.com/appredirect/?packageid=com.onecrayon.touchnote">Palm App Catalog</a> for $4.00.  I&#8217;ve been working on TapNote ever since I picked up a Palm Pre and discovered that none of the notes apps made me happy.</p>
<p>Version 1.0 has all the basic functionality that I needed to take notes comfortably on my phone, but I&#8217;ve got some fun plans for the 1.x line (easy-as-breathing synchronization being my top priority).  If you have any feature requests or annoyances with the app, <a href="http://onecrayon.com/about/contact/">let me know</a>!</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/9da0CvJIM5o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2010/06/announcing_tapnote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://beckism.com/2010/06/announcing_tapnote/</feedburner:origLink></item>
		<item>
		<title>MobileMe email settings for Palm Pre</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/AhrKQ9p11-Q/</link>
		<comments>http://beckism.com/2010/04/mobileme_palm_pre/#comments</comments>
		<pubDate>Fri, 16 Apr 2010 23:32:26 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Adversaria]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[webos]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=350</guid>
		<description>For the record, I finally bit the bullet and ditched my iPhone for a Palm Pre last week, and I&amp;#8217;m extremely happy with the switch. I&amp;#8217;ll post in more detail about why the Pre (and particularly WebOS) is freaking fantastic soon, but for now here&amp;#8217;s a quick tip for other Palm Pre owners who want [...]</description>
			<content:encoded><![CDATA[<p>For the record, I finally bit the bullet and ditched my iPhone for a Palm Pre last week, and I&#8217;m extremely happy with the switch. I&#8217;ll post in more detail about why the Pre (and particularly WebOS) is freaking fantastic soon, but for now here&#8217;s a quick tip for other Palm Pre owners who want to configure their Pre to use MobileMe and can&#8217;t figure out why it keeps claiming you&#8217;re doing it wrong.</p>
<p>Although some people have apparently had luck using the automatic setup (where you just enter an email address and your password), I needed to use the manual setup in order to get it to use IMAP rather than POP.  I think recent MobileMe accounts don&#8217;t even have POP activated by default, so maybe the age of my account is the problem.  In any case, if the automatic setup booted you into POP3 rather than IMAP, delete the account and recreate it.  From the screen where it asks for your username and password, open the menu and choose &#8220;Manual Setup&#8221; (why they didn&#8217;t just stick a Manual Setup button on the main screen where anybody could find it is beyond me, but I digress).</p>
<p>Here&#8217;s all the settings you&#8217;ll need to get rolling:</p>
<ul>
<li><strong>Incoming mail server:</strong> mail.me.com</li>
<li><strong>Username:</strong> [your username, without @me.com or @mac.com]</li>
<li><strong>Password:</strong> [your password]</li>
<li><strong>Encryption:</strong> SSL</li>
<li><strong>Port #:</strong> 993 <em>(this should be automatically selected when you choose SSL)</em></li>
</ul>
<ul>
<li><strong>Outgoing mail server:</strong> smtp.me.com</li>
<li><strong>User Authentication:</strong> On</li>
<li><em>(Username and password will be auto-filled)</em></li>
<li><strong>Encryption:</strong> TLS (this is what was probably screwing you up if you tried manual setup already)</li>
<li><strong>Port #:</strong> 587</li>
</ul>
<p>These settings work perfectly for me; hopefully they&#8217;ll save other Pre users with MobileMe the headache of &#8220;SMTP setup failed&#8221; errors.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/AhrKQ9p11-Q" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2010/04/mobileme_palm_pre/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://beckism.com/2010/04/mobileme_palm_pre/</feedburner:origLink></item>
		<item>
		<title>Understanding Espresso actions</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/OAVqXRMPsMo/</link>
		<comments>http://beckism.com/2010/01/espresso_actions/#comments</comments>
		<pubDate>Sat, 30 Jan 2010 18:30:08 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[custom solution]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=348</guid>
		<description>A fair number of people in the Espresso forums ask questions like, &amp;#8220;Is there a shortcut to delete the current line the way there is in Textmate?&amp;#8221; Usually the answer is, &amp;#8220;No, why don&amp;#8217;t you create one?&amp;#8221; Yet people remain leery of creating text actions by hand. I understand that; heck it&amp;#8217;s extra work, and [...]</description>
			<content:encoded><![CDATA[<p>A fair number of people in the <a href="http://macrabbit.com/espresso/">Espresso</a> forums ask questions like, &#8220;Is there a shortcut to delete the current line the way there is in Textmate?&#8221;  Usually the answer is, &#8220;No, why don&#8217;t you create one?&#8221;  Yet people remain leery of creating text actions by hand.  I understand that; heck it&#8217;s extra work, and who wants that?  What I think most people don&#8217;t realize is that, particularly for text manipulations like deleting the current line, the amount of work is minimal.  All you need is a basic understanding of how Espresso works and the ability to author simple Javascript and XML.</p>
<h4>Anatomy of an action</h4>
<p>Espresso actions come in two parts:</p>
<ol>
<li>The XML definition, which tells Espresso the action&#8217;s title, what Objective-C class to execute when the action is invoked, and additional information like keyboard shortcuts or tab triggers that should invoke the action.</li>
<li>The Objective-C class (or, if using a plugin like <a href="http://onecrayon.com/tea/">TEA</a> or <a href="http://onecrayon.com/spice/">Spice</a>, the script that defines the action&#8217;s logic)</li>
</ol>
<p>Most often, XML action definitions are included with a Sugar (you can make a Sugar for custom text actions simply by adding a <code>.sugar</code> extension to a folder that contains a TextActions folder with the action XML files in it).  If you wish, you can also define action XML files outside of a Sugar by enabling TEA custom user actions in the Advanced pane of the Espresso Preferences (<a href="http://onecrayon.com/tea/docs/preferences/#actions">more info about TEA custom user actions</a>).</p>
<p>As of Espresso 1.1 there isn&#8217;t an in-program GUI for editing actions yet, but hopefully that will come in time.</p>
<h4>Spice up your actions</h4>
<p><a href="http://onecrayon.com/spice/">Spice</a> is an Espresso Sugar that I&#8217;m currently developing that provides access to the Espresso API using Javascript (thanks to <a href="http://inexdo.com/JSCocoa">JSCocoa</a>), and additionally provides a selection of utility classes that allow you to interact with the API without needing to know anything about Objective-C or the JSCocoa bridge.</p>
<p>The benefits of this should be fairly obvious, but there&#8217;s another reason creating actions with Spice is easier than using TEA or Objective-C; not only are the action scripts not compiled, but you don&#8217;t need to relaunch Espresso to see your changes.  When I&#8217;m coding a Spice action, I usually open the Javascript action in Espresso, and then run the action right there on the Javascript when I need to test it.</p>
<p>Although Spice&#8217;s utility classes make creating custom Espresso actions easier, you still need a basic understanding of how the Espresso API works.</p>
<h4>Contexts, ranges, recipes, and snippets</h4>
<p>When a user invokes an action from the Actions menu, Espresso executes the action&#8217;s class and sends it an object representing the <strong>text or file context</strong> (depending on whether you&#8217;re using a text or file action; I&#8217;ll be focusing only on text actions because the file action API is currently underwhelming).  The text context allows you to access the active file&#8217;s text, information about the selection (or selections, since you can select multiple things at once), line information, preferences (like what line ending or indentation is being used), and access to the syntax system.</p>
<p>When you are ready to change some text in the file, your action messages the text context and tells it what to change and how to do it.</p>
<p>As of Espresso 1.1, the easiest actions to create are ones that are invoked by the user, access and change something about the active file&#8217;s text, and then immediately exit.  It&#8217;s possible to do things that are a bit more complicated or on-going, but at the moment Espresso doesn&#8217;t make it easy.</p>
<p>When you&#8217;re working with text, you&#8217;ll mainly be dealing with <strong>ranges</strong>.  A range represents a section of text in the active file and is composed of a location and a length.  Internally Espresso keeps track of text by counting all of the characters in the active file starting at zero, so the range location is the index of the starting character and the length is the number of characters contained within the range.  Typically you&#8217;ll be dealing with selections, so you&#8217;ll have ranges like {0, 10} (the first ten characters in the file) or {100, 30} (characters 100 through 130).  However, it&#8217;s also possible to have ranges like {10, 0}, which represents the cursor location at character index #10 in the file.</p>
<p>A typical text action will fetch the currently selected ranges from Espresso, manipulate the text within them somehow, and then tell Espresso to change the range(s) accordingly.  In order to queue up changes like this, you&#8217;ll use text recipes.</p>
<p><strong>Text recipes</strong> are something that is unique to Espresso, so far as I know.  Basically, you create a recipe and tell it things like &#8220;delete the text in this range&#8221;, &#8220;replace the text in this second range&#8221;, and &#8220;add this text at a third range&#8221;.  You can compose a multiple step recipe without worrying about tracking how ranges will change; for instance, if you add characters to an early range, you don&#8217;t have to adjust the location of later ranges.  Instead, the recipe does that for you when you apply it to the document.</p>
<p>Text recipes allow you to make complex changes to multiple ranges in the active file, but you can instead insert <strong>text snippets</strong>, as well.  A text snippet is a specially formatted string that allows Espresso to create tab stops, mirrored segments, and more after you&#8217;ve inserted it.  Many of the custom actions bundled with Espresso are little more than text snippets; for instance Wrap Selection In Tag merely grabs the selected text and wraps it in a simple snippet that mirrors the HTML element from the opening tag to the closing tag.  You can do some pretty magical-seeming things with very simple actions simply through tricky use of text snippets.  The one downside to keep in mind for text snippets, however, is that you can only insert one at a time (unlike text recipes, you can&#8217;t insert multiple text snippets over discontiguous selections).</p>
<h4>Bringing it all together</h4>
<p>With an understanding of how the Espresso API works and a quick peek at the <a href="http://onecrayon.com/spice/docs/">Spice docs</a>, setting up an action to delete the current line (to take one example) becomes simple enough:</p>
<ol>
<li>First, we&#8217;ll need to define an action in XML, and create a Javascript file with the action logic</li>
<li>In the Javascript, we&#8217;ll need to query the text context to get the range of the current line, and then create a text recipe to delete that range</li>
</ol>
<p>The action XML is easy enough; simply create the file <code>Actions.xml</code> and place it either in a Sugar&#8217;s TextAction folder or in your Espresso Support folder located here:</p>
<p><code>
<pre>~/Library/Application Support/Espresso/Support/TextActions/</pre>
<p></code></p>
<p>The contents of the action XML definition should be this:</p>
<p><code>
<pre>&lt;action-recipes&gt;
    &lt;action id="com.onecrayon.DeleteLine" category="actions.text.generic"&gt;
        &lt;class&gt;Spice&lt;/class&gt;
        &lt;title&gt;Delete Line&lt;/title&gt;

        &lt;setup&gt;
            &lt;script&gt;delete_line&lt;/script&gt;
            &lt;undo_name&gt;Delete Line&lt;/undo_name&gt;
        &lt;/setup&gt;
    &lt;/action&gt;
&lt;/action-recipes&gt;
</pre>
<p></code></p>
<p>(If you wish to add a keyboard shortcut, you can do that with the <code>key-equivalent</code> entity; see the <a href="http://onecrayon.com/spice/docs/spice-xml/">Spice action XML docs</a>.)</p>
<p>If you&#8217;re using the Support folder option, you&#8217;ll need to enable TEA custom user actions in the preferences and restart the program twice.  Otherwise you&#8217;ll need to make sure the Sugar is installed and restart the program once (action XML definitions are loaded when Espresso boots up; unfortunately as of Espresso 1.1 there isn&#8217;t a way to refresh action XML definitions without a relaunch).</p>
<p>Now that you&#8217;ve got the action defined (and showing up in the Actions menu) you can create the Javascript file <code>delete_line.js</code> (referenced in the <code>script</code> element of the action XML).  If you are using a Sugar, it should be located here:</p>
<p><code>
<pre>MySugar.sugar/Support/Scripts/</pre>
<p></code></p>
<p>If you&#8217;re using custom user actions in the Espresso Support folder, you&#8217;ll save it here:</p>
<p><code>
<pre>~/Library/Application Support/Espresso/Support/Scripts/</pre>
<p></code></p>
<p>The simplest way to delete the current line would be this:</p>
<p><code>
<pre>// Deletes the current line

// require() allows you easy modular access to Spice's helper classes
var textContext = require('text_action_context').textContext;
var TextRecipe = require('text_recipe').TextRecipe;

// exports.main is your primary function, run automatically by Spice
exports.main = function() {
    // Grab the range of the current line
    var linerange = textContext.rangeForLine();
    // Run the actual removal
    return new TextRecipe().remove(linerange).apply();
}</pre>
<p></code></p>
<p>First, the script uses the universal <code>require()</code> function to include the Spice utility object <code>textContext</code> (which contains methods for interacting with the Espresso text context) and utility class <code>TextRecipe</code> (which allows access to Espresso text recipes).</p>
<p>Spice&#8217;s utility classes are provided in a modular system that allows you to only require what you need in order to run your action.  Spice modules have the following naming conventions:</p>
<ul>
<li>The module is named for the primary class, converted to lowercase and with underscores between words (so primary class <code>TextActionContext</code> becomes module <code>text_action_context</code>)</li>
<li>Classes are all camel-case with the first letter capitalized (<code>TextActionContext</code>)</li>
<li>Objects (instantiated versions of a class) are camel-case with the first letter lowercase (<code>textContext</code> is an instantiated version of <code>TextActionContext</code>)</li>
</ul>
<p>You can see what a given module exports in the <a href="http://onecrayon.com/spice/docs/">Spice docs</a> (along with full references to the object methods available).  The <code>text_action_context</code> module is one of the few that exports an object as well as the class, since you&#8217;ll never need more than one object for referencing the text context.</p>
<p>Once you&#8217;ve saved the Javascript file, you&#8217;ve officially created your first Espresso action!  You can immediately run the action from the Actions menu, and it will delete the current line.  If you test it out, though, you may notice that the action behaves differently when you delete the final line in the document; instead of removing the line completely, it only removes all the text.  To fix this, you could modify the action like so:</p>
<p><code>
<pre>// Deletes the current line

// require() allows you easy modular access to Spice's helper classes
var textContext = require('text_action_context').textContext;
var TextRecipe = require('text_recipe').TextRecipe;
var Range = require('range').Range;

// exports.main is your primary function, run automatically by Spice
exports.main = function() {
    // Grab the range of the current line
    var linerange = textContext.rangeForLine();
    // If on the last line of the doc, remove the line break prior to the line
    // This isn't strictly necessary, but it's nice to have
    if (textContext.lineNumber() != 1 &#038;&#038; textContext.rangeForLine(textContext.lineNumber() + 1) === false) {
        linerange = new Range(linerange.location - 1, linerange.length + 1);
    }
    // Run the actual removal
    return new TextRecipe().remove(linerange).apply();
}</pre>
<p></code></p>
<p>The only addition is some logic to check if we&#8217;re on the last line of the document, and if so create a custom <code>Range</code> object that includes the linebreak from the previous line.</p>
<h4>Debugging</h4>
<p>As you work on your own custom actions, you will of course run into problems and errors.  The best way to debug is to keep Console.app open (located in your Applications/Utilities folder), since most errors will be output there.  You can also use the globally available <code>system.log('message')</code> to output directly to the console.  Many Spice utility classes also include a <code>log()</code> method to quickly log the contents of an object.</p>
<p>When using Spice, keep in mind that it&#8217;s still under development (at the time of this writing, it&#8217;s at version 1.0 beta 6).  If you run into something that seems buggy or a limitation of the utility classes, please <a href="http://onecrayon.com/about/contact/">let me know</a>.</p>
<h4>Parting thoughts</h4>
<p>Even if you don&#8217;t use Spice, the basic strategy for adding a custom action to Espresso remains the same.  TEA offers several alternative methods to creating text actions (from Python scripts with full access to the API to scripts in arbitrary languages like Ruby or PHP that have more limited capabilities).  Although the basic editor has a nice interface and some great features, I&#8217;ve found that the extensibility of Espresso is what keeps me coming back for more.  A modicum of effort is often all that&#8217;s required to add a custom text action, so there&#8217;s little excuse for not giving it a try if you find yourself missing functionality you&#8217;ve grown used to in other editors.</p>
<p>If you do write any great custom actions, please think about sharing them either via a Sugar, GitHub, or the Espresso forums!  I&#8217;d also love to hear how people are using Spice; I&#8217;m still planning out the additions I want to make now that I&#8217;ve got most of the basic Espresso API for text actions covered by the utility classes, so your input is extremely valuable.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/OAVqXRMPsMo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2010/01/espresso_actions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://beckism.com/2010/01/espresso_actions/</feedburner:origLink></item>
		<item>
		<title>When the formula falters</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/GSx2KKXvuAM/</link>
		<comments>http://beckism.com/2009/12/formula_falters/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 15:58:45 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[movies]]></category>
		<category><![CDATA[opinions]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=346</guid>
		<description>My girlfriend and I went to see The Princess and the Frog last night, and it was fun. Not great, but fun. Unfortunately Disney has managed to capture the spectacle but little of the soul of past great Disney movies (which is mildly ironic, given the movie&amp;#8217;s setting). The Princess and the Frog was exquisitely [...]</description>
			<content:encoded><![CDATA[<p>My girlfriend and I went to see The Princess and the Frog last night, and it was fun.  Not great, but fun.  Unfortunately Disney has managed to capture the spectacle but little of the soul of past great Disney movies (which is mildly ironic, given the movie&#8217;s setting).  The Princess and the Frog was exquisitely executed (beautiful animation, great voice acting and characters, high-energy music) but something was missing, a core component that left the movie feeling ever so slightly flat.</p>
<p>My first inclination, comparing the film with my Disney favorites Little Mermaid, Beauty and the Beast, and Aladdin was that Princess and the Frog had used those prior movies as a formula and that was what was jarring.  Upon further thought, though, I realized that the use of a formula wasn&#8217;t the problem; I&#8217;d never noticed before Princess and the Frog made me think about it, but Little Mermaid, Beauty and the Beast, and Aladdin follow strict formulas themselves.  Heck, they&#8217;re practically the same movie:</p>
<ul>
<li>The movie opens, and shortly after introducing the main characters our heroine (or hero, but most of them are female for this particular sampling so for simplicity I&#8217;ll stick with the feminine) is brought to the villain&#8217;s attention.  The villain reveals that the heroine has something that makes them uniquely important to the villain&#8217;s personal goals (Ariel is the key to Triton&#8217;s power, Belle is the only girl worthy of conquest, Aladdin is the only one who can gain the power of the lamp)</li>
<li>Early on, our heroine reveals their core motivation via song (Part of Your World, Belle&#8217;s opening song, One Jump Ahead)</li>
<li>A spectacular musical number reawakens our interest (Under the Sea, Be Our Guest, Friend Like Me)</li>
<li>At some point, the villain has a lone musical number, partially spoken or otherwise not as melodic and memorable (Gaston&#8217;s song being something of an exception, likely because he&#8217;s more of a passive antagonist otherwise so they had to compensate somewhere to make him interesting)</li>
<li>Various filler songs occur here and there, typically to advance the plot</li>
<li>A love song occurs at the primary moment one (or both) of the love interests realize their feelings (or otherwise reach a turning point in their relationship)</li>
<li>A showdown occurs with the villain, the heroine triumphs, and the culmination of their triumph is the marriage to the love interest and achievement of their dreams</li>
</ul>
<p>You can break the formula down even further past the musical numbers to specific characters (villain&#8217;s humorous sidekick, heroine&#8217;s non-human helpers, etc.), but you get the idea.</p>
<p>It wasn&#8217;t that The Princess and the Frog followed a formula, then, that impaired the movie.  In point of fact, the way it nails almost every aspect of the Little Mermaid/etc. formula may well be its greatest strength.  Disney obviously brought a lot of budget and creativity to bear to bring the movie to life in the same vein as their old hits (even making the comparison explicitly in their previews, which is what cued me into comparing the two as I was watching it).  Yet unlike Little Mermaid or Aladdin I didn&#8217;t walk out of the theater wanting to see it again, or utterly captivated by the characters, or excited and eager to tell my friends about the movie.  I came out of the theater and thought, &#8220;Well, that was fun.  Don&#8217;t really need to see it again.&#8221;</p>
<p>I&#8217;ve been pondering, and come to the conclusion that what the Disney movies of the early 90&#8242;s that I remember so fondly had that Princess and the Frog lacks is the spark, the soul, the story that needs desperately to be told.  Without that inspiration, the formula falters, the pieces pull slightly apart, and the viewer is left with the realization that there <em>is</em> a formula and that it isn&#8217;t quite working.</p>
<p>Great movies happen because creative people get excited, and if they&#8217;re lucky they have the budget and direction they&#8217;ll need to create something fantastic.  I think that people got excited about Princess and the Frog, but I don&#8217;t think that it was because of the story that drives the entire project forward.  I think they got excited about the spectacle, the fun characters, and the setting.  And in the end, that made the difference between a film destined to be a classic and one that is merely diverting.</p>
<p>The more near misses I see in the theater the more I&#8217;ve come to believe that story is the driving creative force that must exist for any narrative work to succeed, be it cinema, literature, or otherwise.  Certainly, great characters are a part of the puzzle.  A well-tested formula can help clarify and ease the story&#8217;s delivery.  Talented people well directed can breathe a lot of life into any tale.  But unless these things are born out of a story that needs to be told the pieces won&#8217;t quite snap into place.</p>
<p>The Princess and the Frog is not a story that needed to be told.  It&#8217;s a decent story, an amusing story, a story that pleasantly reinforces our own delusions about ourself and our culture; but it isn&#8217;t a story that needs its telling so badly that it grabs the imaginations of its makers and viewers alike and refuses to let go even once the curtain has closed.</p>
<p>I don&#8217;t know where stories come from, or even how crafted and calculated the Disney movies of yore that I loved might have been behind the scenes.  All I know is that in Princess and the Frog Disney has produced a film that sparkles, amuses, and tweaks gently at the heartstrings yet fails to achieve the vivid life bequeathed by story.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/GSx2KKXvuAM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/12/formula_falters/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/12/formula_falters/</feedburner:origLink></item>
		<item>
		<title>Wrap Selection In Link in any program on Mac OS 10.6</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/OqP19-lrlMo/</link>
		<comments>http://beckism.com/2009/11/wrap_in_link_mac/#comments</comments>
		<pubDate>Sat, 07 Nov 2009 20:28:27 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[custom solution]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=344</guid>
		<description>The Mac OS X Services menu got a serious bit of love for 10.6, but until now I haven&amp;#8217;t really played around with it. Today, however, I finally got around to trying it out, and for the first time since I started using OS X years ago, Services are actually becoming useful for me. The [...]</description>
			<content:encoded><![CDATA[<p>The Mac OS X Services menu got a serious bit of love for 10.6, but until now I haven&#8217;t really played around with it.  Today, however, I finally got around to trying it out, and for the first time since I started using OS X years ago, Services are actually becoming useful for me.</p>
<p>The specific need I wanted to address was my inability to easily insert some common HTML elements (particularly links) in <a href="http://www.hogbaysoftware.com/products/writeroom">WriteRoom</a>.  I&#8217;ve owned WriteRoom for years thanks to a software bundle, but I never had any use for it until I discovered <a href="http://www.hogbaysoftware.com/products/quickcursor/">QuickCursor</a>.  Now I can&#8217;t get enough of it; full screen editing for text fields in Safari is brilliant.</p>
<p>The only thing I haven&#8217;t been happy about was needing to type out every blessed character when I needed light HTML. Although WriteRoom&#8217;s Applescript support does not apparently provide access to selected text, the new Services menu does.</p>
<p>To add HTML link insertion to WriteRoom (or any other text editor that supports Services, for that matter) first boot up Automator and create a new Service workflow:</p>
<p class="center"><img src="http://beckism.com/wp-content/uploads/2009/11/service_workflow.jpg" alt="service_workflow.jpg" /></p>
<p>By default, Automator will have you processing selected text in any application.  Check the &#8220;Replaces selected text&#8221; checkbox, and if you&#8217;re only going to be using the action in WriteRoom (or similar application) make sure to use the dropdown to target that app and avoid cluttering up your Services menu:</p>
<p class="center"><img src="http://beckism.com/wp-content/uploads/2009/11/service_config.jpg" alt="service_config.jpg" /></p>
<p>Over at the top right, type &#8220;Applescript&#8221; in the search box to filter the list for the &#8220;Run Applescript&#8221; action (make sure you have the Library highlighted, or it may not show up).  Drag the action into your workflow:</p>
<p class="center"><img src="http://beckism.com/wp-content/uploads/2009/11/services_action.jpg" alt="services_action.jpg" /></p>
<p>Select everything in the text box, and replace it with this:</p>
<p><code>
<pre>on run {input, parameters}
    set linkDefault to (the clipboard as string)
    set linkDefault to my switchText(linkDefault, "\\\"", "\"")
    set targetLink to do shell script "echo \"" &#038; linkDefault &#038; "\"|sed -E \"s/(mailto:)?(.+@.+\\..+)/mailto:\\2/\""
    if targetLink does not start with "mailto:" then
        set targetLink to do shell script "echo \"" &#038; linkDefault &#038; "\"|sed -E \"s/^(([a-zA-Z0-9-]+\\.)*[a-zA-Z0-9-]+\\.[a-zA-Z]{2,4}(\\/.*)?)/http:\\/\\/\\1/\""
        if targetLink does not start with "http" then
            set targetLink to "http://"
        end if
    end if

    return "&lt;a href=\"" &#038; targetLink &#038; "\"&gt;" &#038; input &#038; "&lt;/a&gt;"
end run

on switchText(fromText, targetText, replaceText)
    set d to text item delimiters
    set text item delimiters to replaceText
    set fromText to fromText's text items
    set text item delimiters to targetText
    tell fromText to set fromText to item 1 &#038; ({""} &#038; rest)
    set text item delimiters to d
    return fromText
end switchText</pre>
<p></code></p>
<p>Save your workflow, and you&#8217;re basically done!  When you select some text in WriteRoom or elsewhere and run the action from the Services menu, it will wrap the text with a link.  It also will check the clipboard to see if there&#8217;s a recognizable email address or URL on it, and if so will use it for the link (otherwise defaults to <code>http://</code>).</p>
<p>For maximum productivity benefits, of course, you&#8217;ll want to visit the System Preferences Keyboard pane and give your new Service action a shortcut; I&#8217;m using <code>control-shift-L</code> since that&#8217;s what I&#8217;m used to from Textmate and Espresso.</p>
<p>Worth noting is the fact that the above Applescript doesn&#8217;t display a dialog box to query you for a URL if it can&#8217;t detect one on the clipboard, so for maximum effect you&#8217;ll want to copy your target URL prior to running the action if possible.  The reason for this minor problem is that the dialogs spawned by my Service action never received focus, and for myself mousing over to give the dialog focus is more work than option arrowing a few times to edit the default URL.</p>
<p>You can, of course, add simple Service actions to surround text in other arbitrary HTML tags, as well.  Simply use an Applescript similar to this instead:</p>
<p><code>
<pre>on run {input, parameters}
	return "&lt;strong&gt;" &#038; input &#038; "&lt;/strong&gt;"
end run</pre>
<p></code></p>
<p>The only major downside that I&#8217;ve found of using Services this way is that it isn&#8217;t as quick as I&#8217;d like. I experimented with using shell scripts or Python instead of Applescript, but there were no significant speed boosts; as best I can tell, however Services is harvesting the selected text and then replacing it afterward is simply a slow process.</p>
<p>I&#8217;d love to hear how other people are leveraging the new 10.6 Services menu! I have the feeling that I&#8217;m just scratching the surface with this script.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/OqP19-lrlMo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/11/wrap_in_link_mac/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/11/wrap_in_link_mac/</feedburner:origLink></item>
		<item>
		<title>Comparing StoryMill and Scrivener</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/cMADO3qsT_k/</link>
		<comments>http://beckism.com/2009/10/storymill_and_scrivener/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 15:38:39 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[opinions]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=337</guid>
		<description>I&amp;#8217;m a long-time user of StoryMill (starting when it was originally called Avenir), but I&amp;#8217;m also something of a software junkie, so when Scrivener came out I tried using it for a few projects. Particularly now that StoryMill has a timeline view (as of this writing the only Mac creative writing software to implement the [...]</description>
			<content:encoded><![CDATA[<p>I&#8217;m a long-time user of <a href="http://www.marinersoftware.com/sitepage.php?page=127">StoryMill</a> (starting when it was originally called Avenir), but I&#8217;m also something of a software junkie, so when <a href="http://www.literatureandlatte.com/scrivener.html">Scrivener</a> came out I tried using it for a few projects.  Particularly now that StoryMill has a timeline view (as of this writing the only Mac creative writing software to implement the feature) and Mariner Software is distributing it, it seems like a more and more people are wondering whether they should use StoryMill or Scrivener.</p>
<p>Well, here it is: my definitive StoryMill vs. Scrivener review.  Although StoryMill is my personal application of choice, there&#8217;s a lot to love (and some things to dislike) about both programs.</p>
<h4>Quick and dirty</h4>
<p>Not everyone wants to wade through my periphrastic meanderings (just discovered that word, and it&#8217;s making me really happy; sorry for sounding like a total vocab snob), so here&#8217;s the quick and dirty:</p>
<ul>
<li>If you primarily write fiction and want a program that will provide you with an easy framework for organizing your writing, you&#8217;ll probably prefer StoryMill.</li>
<li>If you primarily write non-fiction or screenplays or write fiction and want a program that will let you do pretty much whatever the hell you want workflow-wise (with a correspondingly higher level of confusion), you&#8217;ll probably prefer Scrivener.</li>
</ul>
<h4>A broader picture</h4>
<p>As is often the case, the fast and dirty comparison is a bit misleading: either program can help you write fiction or non-fiction.  The reason the fiction/non-fiction comparison is common is because StoryMill is explicitly focused on fiction (and doesn&#8217;t support screenplays at all, since that would steal sales from its companion software <a href="http://www.marinersoftware.com/sitepage.php?page=104">Montage</a>) while Scrivener provides a general writing metaphor that can apply to either genre equally well (with limited support for screenplay formatting and footnotes).</p>
<p>The truth is that regardless of your genre the deciding factor for which software to use will be a matter of style.  StoryMill&#8217;s approach is to provide you with a specific framework for writing and organizing, complemented with a focused group of powerful features.  In contrast, Scrivener is much more flexible and offers a larger number of features that you can pick and choose from to form your workflow.  You can do most of the things in Scrivener that you can in StoryMill (with a few key exceptions), but it will be slightly more effort.</p>
<p>If StoryMill&#8217;s framework makes sense to you and you don&#8217;t have an urgent need for any of the features that are Scrivener-only, then StoryMill will be the easiest environment to write in.  However, for some people the time necessary to set up their own framework in Scrivener is well worth the effort because the program&#8217;s flexibility allows them to write most effectively.</p>
<p>To figure out which style, and thus program, is the best choice for you, you&#8217;ll need to consider two big questions: what metaphors do you use for writing, and what specific features are most important for you?</p>
<h4>StoryMill: a novel framework</h4>
<p>The foundation of StoryMill&#8217;s approach to writing and organizing is the scene.  Scenes in StoryMill are the building blocks which create chapters and ultimately the story itself (it&#8217;s worth noting that you can think of scenes and chapters as whatever content blocks make sense for your story; the names don&#8217;t really limit the function).  Though you&#8217;ll track your characters, locations, and so forth elsewhere, the scenes are where you&#8217;ll tie them together.</p>
<p>StoryMill offers several other types of items like characters, locations, research, and even submission tracking for when you complete the novel, but the scenes are the core of the program.  If working with scenes makes sense to you, and you like the ability to directly relate characters to scenes and organize both in plot order and chronological order (the latter via the timeline feature), then StoryMill will likely appeal.</p>
<p>This scene-centric framework has actually taken a page from Scrivener&#8217;s book in recent updates, as well.  You can use scenes either as an outline (in the Scenes view) or as the actual text of the story (in the Chapters view).  Storing text in scenes can be a little bit confusing (particularly since you can still store text in chapters and use scenes purely for organization if you choose), but this allows you to take advantage of the outline-as-text feature that Scrivener executes with such panache.</p>
<p>StoryMill also has some specific stand-out features that influenced my decision to use it.  For me, annotations are one of the biggest.  In StoryMill, you annotate text by selecting it and choosing &#8220;Annotate&#8221;.  The text turns the standard link blue with underline, and a little window opens up in which you can type the annotation&#8217;s title (defaults to the selected text) and add your annotation.  This is great for a number of reasons:</p>
<ol>
<li>Annotated text is clearly marked, yet the annotations themselves are completely invisible unless you want to see them.</li>
<li>Annotations are rich text, so they can contain just about anything.  This includes images, formatted text, etc.</li>
<li>StoryMill handles annotations intelligently: if you open up the annotations window and start moving through the text with your cursor, the displayed annotation will update based on which linked text the cursor is in.  You can also open the annotations window for a given annotation with a hotkey (no clicking the link required).</li>
</ol>
<p>Some people prefer the margin-notes approach to annotations in Pages, Word, etc., but I find those extremely limiting because if you type more than a sentence or two they become unwieldy, it&#8217;s not always easy to tell what text the annotation applies to, and you can&#8217;t have very many on a page before they get out of control.  The only thing they have over StoryMill&#8217;s annotations is that you can view all of them at once, but in practice I&#8217;ve never found this to matter.</p>
<p>Another big draw for StoryMill is its timeline functionality.  Timelines allow you to view and organize scenes in chronological time, even if the flow of the novel is completely different.  This can be fantastically helpful for preventing plot holes and other inconsistencies, and getting a general overview of the flow of time through your novel can be useful in its own right.  The downside to timeline is that it&#8217;s still a young feature; the interface could use a little refinement and it had a bit of a rocky start thanks to some bugs, but there&#8217;s still nothing comparable out there (aside from dedicated timeline software).</p>
<p>StoryMill has numerous other small features that I can&#8217;t live without, as well: the progress meter is a one that I&#8217;ve surprisingly grown to rely on.  It visually tracks how far along you are for both your session and project word goals.  It also can emit a sound when you hit your session goal, which is really nice feedback if you&#8217;re working in full screen.  Full screen is of course another great feature, although one that&#8217;s available in most writing software these days.  The reason I like StoryMill&#8217;s better than Scrivener&#8217;s is that it&#8217;s truly nothing but you and your writing; no annotations, no floating windows, nothing but the text.  Tags and smart views, export templates, and the project-wide find and replace dialog are other reasons to love StoryMill.</p>
<h4>Scrivener: your digital corkboard</h4>
<p>Scrivener takes a slightly different approach to the writing process.  Where StoryMill provides a framework with carefully designed parts, Scrivener offers the user a beautifully executed corkboard metaphor and then hangs potentially useful features around it.</p>
<p>Scrivener&#8217;s corkboard is where it really shines.  The connection between outline, visual organization of &#8220;index cards&#8221;, and your actual text is simple, sensible, and flexible enough to handle virtually any kind of writing.  Want to break things down into beats, then scenes, then chapters, then acts?  Go for it.  Your only real limit is your creativity.  Scrivener&#8217;s central metaphor additionally captures in a digital format a way of working that instantly makes sense to most people who have written by hand.  This is a definite strength over StoryMill, which takes a more relational database-driven approach to organization and writing that may not be as easy to initially access for some people.</p>
<p>Aside from its elegant central metaphor, Scrivener also offers a slew of useful features.  I encourage you to check out the Scrivener website and free trial to figure out which ones you&#8217;ll care about, but the primary things of interest to me are snapshots (saving multiple versions of a single piece of text), wiki-style links to internal documents, the vastly flexible exporting system, and the simple script-writing formatting tools.</p>
<p>It&#8217;s worth taking a moment to dwell on snapshots.  Although StoryMill is planning to implement similar functionality for their next version, this is a key area where Scrivener is clearly the better choice.  Organizing multiple revisions of the same text in StoryMill is extremely kludgy at the current time, while Scrivener handles it with ease.</p>
<p>Additionally, you can (with a little bit of work) mimic some of StoryMill&#8217;s strengths in Scrivener.  For instance, the Document References could be used to associate characters with scenes.  You can also mimic StoryMill&#8217;s annotations to some extent using wiki-links that open in split views (Scrivener&#8217;s built-in annotations are inline with the text, making them only useful for very short notes to yourself that you don&#8217;t mind reading every time you go back over things).  They&#8217;re not as easy to use as StoryMill annotations, sure, but this kind of flexibility is another of Scrivener&#8217;s strengths.  The menus may be confusing and (to my eye) bloated, but all those disparate features mean that with a little work you can achieve numerous different workflows.</p>
<h4>Beyond the software</h4>
<p>Of course, there&#8217;s more to writing than just the software itself.  Both Scrivener and StoryMill have healthy communities and refreshingly responsive developers.  Scrivener has a larger community (and one more inclined to chat about whatever the heck is on their minds), but you may get a faster response in StoryMill&#8217;s forums simply because there aren&#8217;t as many threads.  Your mileage will doubtless vary, but I highly suggest dropping by the forums for whichever software you&#8217;re leaning toward and asking any questions you have.</p>
<p>An additional concern is interoperability between your writing software and other software on your computer.  Both Scrivener and StoryMill store data in proprietary formats but both also offer flexible ways to export that data.  Which export system you like better will probably depend a lot on what you need to export, but both allow you to get all of your data out of the program without much fuss.  If you&#8217;re trying either software&#8217;s free trial, definitely play with the export system before purchasing it.</p>
<p>Scrivener additionally allows easy editing of text in external programs, which can be nice if you like editing text in WriteRoom, BBEdit, or similar.</p>
<h4>Time to write</h4>
<p>Both StoryMill and Scrivener were created because the developers couldn&#8217;t find a tool that fit their respective needs as authors, and the bottom line for any potential user is you should use whichever program makes it easiest for you to write.</p>
<p>For myself, that program is StoryMill.  Its framework makes sense to me and I&#8217;ve become addicted to its overall slimmed-down focus on the features that matter most (not to mention some specific niceties like rich annotations and timelines).</p>
<p>I can certainly appreciate the draw of Scrivener, however.  Every time I open it I&#8217;m amazed anew at how simple and relevant a metaphor for writing it provides.  StoryMill&#8217;s niggling issues with the separation between outline and text are nonexistent in Scrivener thanks to its solid basis in the idea of a corkboard.  Sure, to get the kind of interconnectivity that StoryMill encourages you have to do a bit more work, but with Scrivener&#8217;s large and helpful community figuring out a document layout and workflow shouldn&#8217;t be too painful.</p>
<p>Ironically, in a few short years we&#8217;ve gone from having no great alternative writing environments to Word and the other word processors to having a difficult choice between two strong contenders (and that&#8217;s discounting the scads of similar but less popular software like <a href="http://bartastechnologies.com/products/copywrite/">CopyWrite</a>, <a href="http://www.jerssoftwarehut.com/AboutJNW.shtml">Jer&#8217;s Novel Writer</a>, <a href="http://www.storyist.com/">Storyist</a>, or <a href="http://www.the-soulmen.com/ulysses/">Ulysses</a>, the program that started it all); no choice has exploded into too much choice.  Hopefully by focusing on which general approach and specific features are most helpful for your workflow you&#8217;ll be able to select the best software for you and get on to what&#8217;s really important: your writing.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/cMADO3qsT_k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/10/storymill_and_scrivener/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/10/storymill_and_scrivener/</feedburner:origLink></item>
		<item>
		<title>StoryMill and NaNoWriMo</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/3oYVjzY0y0o/</link>
		<comments>http://beckism.com/2009/10/storymill_nanowrimo/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 05:30:48 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[opinions]]></category>
		<category><![CDATA[personal]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=335</guid>
		<description>Although I find my current work as a web designer interesting and occasionally fulfilling, it is not what I want to do the rest of my life. Since I was a snot-nosed kid in fifth grade, I have instead set my sites on being a novelist. I know that I&amp;#8217;m capable of writing a novel [...]</description>
			<content:encoded><![CDATA[<p>Although I find my current work as a web designer interesting and occasionally fulfilling, it is not what I want to do the rest of my life.  Since I was a snot-nosed kid in fifth grade, I have instead set my sites on being a novelist.  I know that I&#8217;m capable of writing a novel (learned that thanks to my senior thesis), but up until now my writing has been very haphazard.  I&#8217;ll write on vacations (sometimes) or when the mood strikes, but anyone who has tried to write a novel knows that you&#8217;ll never get anything done doing that.  To write a longer work, writing has to be a habit, and I&#8217;ve been finding it a difficult habit to form.</p>
<p>So this year, I&#8217;ve decided to finally jump on the <a href="http://www.nanowrimo.org/">National Novel Writing Month</a> (NaNoWriMo) bandwagon in the hopes that the experience will help me settle into some good writing habits, like writing every morning instead of poking around listlessly online.  I will, of course, be writing in <a href="http://www.marinersoftware.com/sitepage.php?page=127">StoryMill</a> because I can&#8217;t fathom writing in any other software (and yes, I&#8217;ve tried pretty much all of the ones available for Mac).</p>
<p>But upon opening StoryMill and prepping a new document for the fast upcoming November 1st, I realized that my typical approach to writing in StoryMill simply isn&#8217;t going to work for NaNoWriMo.  In order to finish 50,000 words in 30 days, on top of a full time job and other distractions, I&#8217;m going to need to write, write, write.  Outlining, character backstory, notes on locations, research&mdash;all of these will be distractions that could well prevent me from reaching the goal, and yet all of these things are tasks that I regularly undertake in StoryMill.  In fact, the program encourages it; take a look at its default novel document:</p>
<p class="center"><img src="http://beckism.com/wp-content/uploads/2009/10/sm_default_doc.jpg" alt="StoryMill's default document setup" /></p>
<p>This is no good at all.  Keeping track of characters, scenes, etc. is certainly useful, but I&#8217;m going for pure word output, and if the option to procrastinate by expanding on my backstory is available, I&#8217;ll probably take it.  So to start, I decided to axe absolutely everything except the generic Tasks view, which I renamed to Notes (to delete and rename these items right click a view in the sidebar and choose Manage Views; then when you&#8217;re done, right click the smart view and choose Remove View):</p>
<p class="center"><img src="http://beckism.com/wp-content/uploads/2009/10/sm_slimmed_down.jpg" alt="sm_slimmed_down.jpg" /></p>
<p>I can add those views back in when it comes time to clean things up, and in the meantime I can drop any notes on backstory or whatever into the Notes view as I think of them without feeling any pressure to expand on the ideas.  Will my story have more plot holes and inconsistencies than if I&#8217;d left those views in?  Doubtless.  But darn it, I want to win NaNoWriMo!  I cannot afford distractions.</p>
<p><img class="right" src="http://beckism.com/wp-content/uploads/2009/10/sm_chapter_naming.jpg" alt="sm_chapter_naming.jpg" />Next up, I took a look at the chapters view.  I definitely am going to want to write my text in Chapters (the chapters editing window, which you can get to by double clicking a chapter title in the list area, offers numerous incentives like highlighting and annotations that aren&#8217;t as easy to use in other views).  However, worrying about where my chapter breaks fall is going to slow me down and distract me yet again.  I suppose I could just write in a single long chapter, but it would get difficult to manage quickly.  Instead, I think I&#8217;ll add a new chapter every day.  That way I can not only see how many words I was able to write in retrospect (which could be useful info), but I&#8217;ll have the story broken up into easily skimmable chunks if I need to go back over it to remember someone&#8217;s name or whatever.</p>
<p>Just to prevent any temptation, I also right-clicked on the Timeline button in the toolbar and chose &#8220;Remove Item&#8221;.  Sure, it would never have been activated because I don&#8217;t have a scenes view, but the temptation to add a scenes view would be there.</p>
<p>Last, but certainly not least, I double clicked the Progress Meter and set my goals appropriately:</p>
<p class="center"><img src="http://beckism.com/wp-content/uploads/2009/10/sm_progress.jpg" alt="sm_progress.jpg" /></p>
<p>And with that, I&#8217;m ready to start writing, as distraction-free as I&#8217;m likely to get.  I&#8217;m sure this system won&#8217;t work for everyone (heck, it might not even work for me; I&#8217;ve yet to test it out), but my hope is that by slimming down StoryMill to the bare essentials I&#8217;ll be able to get my first draft in there as part of reaching the NaNoWriMo goal of 50,000 words, and then I&#8217;ll be able to add features like the scenes view, characters, and locations back when I get ready to revise so that I can start cleaning up plot holes and putting a little more thought into the novel.  Plus, needing to copy and paste all of my text into scenes will be an excellent excuse to read over it all as part of my revision efforts, anyway.</p>
<p>For other NaNoWriMo participants planning to use StoryMill, here&#8217;s a few generic tips to help you out:</p>
<ul>
<li>Full screen will likely be your best friend.  You can enter full screen quickly from just about any part of the program by hitting command-option-F.  Exit full screen by hitting escape.</li>
<li>As I mentioned above, the Chapters window is probably the best editing experience in StoryMill (aside from full screen).  Double click a chapter in the list or sidebar to see what I mean.</li>
<li>If you&#8217;re using a slimmed-down project like I will, you&#8217;ll probably also want to avoid spending much time adding tags to things.  However, if you drop something in the Notes view it would be a good idea to toss a couple quick tags on it to make sorting through things later easier.  For instance, a note about a character could get a &#8220;character&#8221; tag.  Then when it comes time to add the characters view back in you can make a smart view based on notes to filter for all character items and hit the ground running.</li>
</ul>
<p>Good luck to the other NaNoWriMo participants!</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/3oYVjzY0y0o" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/10/storymill_nanowrimo/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/10/storymill_nanowrimo/</feedburner:origLink></item>
		<item>
		<title>I am crap at networking</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/6IPbwIggH0A/</link>
		<comments>http://beckism.com/2009/10/crap_at_networking/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 02:51:53 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=329</guid>
		<description>I went to the ExpressionEngine Roadshow today where I learned a couple things, was disgusted with EllisLab for their cop-out non-presentation, and awkwardly stood alone in the corner (or, worse, the center of the room) between speeches while people around me did this thing called &amp;#8220;networking&amp;#8221;. I am such crap at networking. I&amp;#8217;ve only attended [...]</description>
			<content:encoded><![CDATA[<p>I went to the <a href="http://www.eeroadshow.com/">ExpressionEngine Roadshow</a> today where I learned a couple things, was disgusted with EllisLab for their cop-out non-presentation, and awkwardly stood alone in the corner (or, worse, the center of the room) between speeches while people around me did this thing called &#8220;networking&#8221;.</p>
<p>I am such crap at networking.  I&#8217;ve only attended two conferences so far (An Event Apart and EE Roadshow), but at both I came to the conclusion that the presentations aren&#8217;t what the thing&#8217;s about.  Both times only about half of the presentations were remotely worthwhile, while the others were either senseless cruft or so bogged down by the speaker&#8217;s fear of public speaking and/or inability to write coherently that by the end I just wanted to bang my head into the nearest wall a few times.  Clearly we aren&#8217;t here because web developers are charismatic individuals with a flair for speech-writing.</p>
<p>So I can only assume that it&#8217;s the times in between, the meal times and parties, that people find the real value.  Those times when you&#8217;re expected to wander around, get to know your fellow developers, swap business cards, and talk shop.</p>
<p>Sadly for me, I have no interest in approaching complete strangers and introducing myself.  I&#8217;ve never had this inclination, which is something that puzzles me.  Engage me in conversation, and you&#8217;ll find I&#8217;m not socially awkward: I am, in fact, an intelligent individual with a good sense of humor who loves interacting with people.  Observe me with a group of my friends or family, and you may think me highly extroverted.  Yet drop me in a room full of strangers, and I clam up instantly.  I know these people are passionate about the same things I&#8217;m passionate about, but unless one of them seeks me out I find it hard to think of things to talk about.</p>
<p>I was thinking about this on the bus ride home (I left early, having deduced from fifteen minutes standing around alone that I wasn&#8217;t going to get anything out of the after-party, particularly since I don&#8217;t drink and thus could not take advantage of the free alcohol), and I&#8217;ve finally realized the problem: I&#8217;m a presenter.  A performer.  I&#8217;m damn good at giving a speech and then talking to people about it afterward, but no good at being just another member of the audience, milling around and networking.</p>
<p>Problem being, of course, that in both the EE community and the web development community as a whole, I&#8217;m a nobody.  I haven&#8217;t written any books, or published any extensions, or been hired by Happy Cog so it&#8217;s unlikely anyone is going to invite me to speak anytime soon.</p>
<p>Guess it&#8217;s time to either start the difficult personal work necessary to overcome my awkwardness at initiating social encounters or start submitting topic proposals to my favorite web conference organizers.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/6IPbwIggH0A" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/10/crap_at_networking/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/10/crap_at_networking/</feedburner:origLink></item>
		<item>
		<title>Cinnamon rolls (in five minutes a day)</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/j5NiUqGLImY/</link>
		<comments>http://beckism.com/2009/09/cinnamon_rolls/#comments</comments>
		<pubDate>Thu, 01 Oct 2009 05:00:10 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[food]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=327</guid>
		<description>Ever since I was a kid, I&amp;#8217;ve loved cinnamon rolls. I remember a particularly glorious few days when my family went to visit my aunt and uncle and discovered that their son was working for Cinnabon that summer. Every evening he&amp;#8217;d bring home left-over Cinnabons and my father and I would eat ourselves sick. Apparently [...]</description>
			<content:encoded><![CDATA[<p>Ever since I was a kid, I&#8217;ve loved cinnamon rolls.  I remember a particularly glorious few days when my family went to visit my aunt and uncle and discovered that their son was working for Cinnabon that summer.  Every evening he&#8217;d bring home left-over Cinnabons and my father and I would eat ourselves sick.  Apparently love of gooey cinnamon pastries runs in the blood.</p>
<p>Despite my love affair with cinnamon rolls, however, I have never had the courage to experiment with them before.  In part, it&#8217;s because yeast scares me (my early experiences with yeast bakes turned out poorly, to say the least).  Mainly, it&#8217;s that I&#8217;ve never really had homemade cinnamon rolls that consistently turned out well.  Mom would make them occasionally, but they were hit and miss; sometimes delicious, other times passable.</p>
<p>Fortunately for me, and unfortunately for my cholesterol levels, I have at last braved the cinnamon roll and discovered something wonderful: I make damn fine cinnamon rolls, and they&#8217;re really, really easy.</p>
<p>Like most of my recent excursions into yeast bakes, my cinnamon rolls start with <a href="http://www.artisanbreadinfive.com/">Artisan Bread in Five Minutes a Day</a> (available via <a href="http://www.amazon.com/dp/0312362919/?tag=beckism-20">Amazon</a> or on <a href="http://www.amazon.com/dp/B001TOCAZO/?tag=beckism-20">Kindle</a>).  I cannot recommend this book highly enough; it is a brilliant introduction to bread baking that makes the task not only easy but quick.  Like any baking, it takes a couple tries to figure out exactly how things work, but although my first attempts at recipes and doughs typically don&#8217;t end up quite like I planned, I&#8217;ve only had a single total disaster (my first attempt at naan was carbonized thanks to following the book&#8217;s instructions to heat the skillet on high prior to cooking the bread).  If you&#8217;ve tried and been frustrated with yeast baking before, you&#8217;ll understand what an astonishing track record that is for a beginning baker.</p>
<p>If you have any interest in making fresh bread, go buy the book.  You&#8217;ll need it to make cinnamon rolls my way, anyway, because they rely on the dough recipes and preparation methods that are the core of the book.  Specifically, Artisan Bread in Five provides a Caramel Sticky Buns recipe on page 187, which will be your starting point.  The key is instead of the rigamarole of coating the bottom of the pan and turning things upside down once you finish baking, etc. you&#8217;ll want to use this easy cinnamon filling:</p>
<p><strong>Cinnamon filling</strong><br />
1 cup packed brown sugar<br />
2 1/2 tablespoons ground cinnamon</p>
<p>Mix the brown sugar and the cinnamon together.  You&#8217;ll have enough for 2-3 batches of cinnamon rolls (depending on how liberal you are with the sugar and how large you make the cinnamon rolls), so store it in a tupperware or similarly air-tight container for later.</p>
<p>After you&#8217;ve rolled the dough out into a rectangle as per the sticky bun recipe, spread all of it except for 1/2-1 inch around the edges with softened butter.  I&#8217;m usually a bit more liberal with the butter if I&#8217;m using the master recipe, but particularly if you&#8217;re using brioche dough (which makes the richest, most desert-like cinnamon rolls) you&#8217;ll want to be a bit conservative with the butter.  You just need enough to coat the dough with a thin layer.</p>
<p>Once you&#8217;ve spread the butter, sprinkle it liberally with the cinnamon-sugar mixture.  You want to have enough cinnamon-sugar that you can&#8217;t see any dough or butter peeking through (except for the strip around the edge of the dough, of course).  If you&#8217;re particularly liberal with the cinnamon-sugar, you&#8217;ll likely end up with a sticky goo at the bottom of the rolls similar to the stuff you&#8217;d find in a Cinnabon.  Use a little less, and you&#8217;ll have a more subtly-flavored rolls that&#8217;s a bit cleaner to eat.</p>
<p>Roll and cut the dough as per the sticky bun recipe.  I usually use a greased 9&#215;9 glass pan, and always end up with nine rolls (counting the two end ones) each about 1-2 inches high.  You can, of course, make more or less depending on how much dough you&#8217;ve got and the size of your pan.  Place the rolls in the pan with a little bit of room between each one (they&#8217;ll spread out as they rise), and cover lightly with plastic wrap.</p>
<p>Whether the rolls rise or not will depend on the temperature of your kitchen.  I often need to place a second 9&#215;9 pan filled with hot water under the one with the rolls for 20-40 minutes of the rising time, since my kitchen tends to be cooler.  Ideally, the rolls should rise upwards and outwards both, so that they are just touching their neighbors.</p>
<p>Bake according to the sticky buns recipe, about 40 minutes.  Baking time will fluctuate depending on how large your rolls are, so start peeking around 30 minutes.  Serve warm, preferably with some icing (I leave it to you to find a good icing recipe online; we typically just mix some powdered sugar with water and drizzle it over the warm rolls).</p>
<p>I&#8217;ve tried using brioche dough and the master recipe both, and the cinnamon rolls turn out great either way.  As you would expect, the brioche-based rolls are richer and more buttery, while the dough of the master recipe rolls takes more of a backseat to the filling.  I&#8217;m itching to try the challah dough because it&#8217;s in between the two as far as eggs and butter content goes.</p>
<p>The only downside to this recipe is that it takes roughly two hours from when you decide to make cinnamon rolls and when they&#8217;re ready to eat, thanks to the rising and baking time (even if it&#8217;s passive time, it still makes it hard to make cinnamon rolls for breakfast before work).  If anyone has any ideas for how to prep the rolls in the evening and have them ready to bake in the morning, I would love to hear them.</p>
<p>Even if I never find a way to cut down on the rising and baking time, though, needing to think ahead two hours is a miniscule price to pay considering that the payout is a dish that has warmed, comforted, and delighted me since childhood.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/j5NiUqGLImY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/09/cinnamon_rolls/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/09/cinnamon_rolls/</feedburner:origLink></item>
		<item>
		<title>One Crayon redesigned</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/VNKm5Hamnh8/</link>
		<comments>http://beckism.com/2009/09/onecrayon_redesign/#comments</comments>
		<pubDate>Tue, 22 Sep 2009 20:21:21 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Adversaria]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=324</guid>
		<description>After working on it for the past couple months, I&amp;#8217;m very happy to announce that my freelancing site, One Crayon, has been redesigned from the ground up. One Crayon now looks several orders of magnitude better than its original design; offers information and documentation for TEA for Espresso, TEA for Coda, and my other projects [...]</description>
			<content:encoded><![CDATA[<p>After working on it for the past couple months, I&#8217;m very happy to announce that my freelancing site, <a href="http://onecrayon.com/">One Crayon</a>, has been redesigned from the ground up.</p>
<p>One Crayon now looks several orders of magnitude better than its original design; offers information and documentation for <a href="http://onecrayon.com/tea/">TEA for Espresso</a>, <a href="http://onecrayon.com/tea/coda/">TEA for Coda</a>, and my <a href="http://onecrayon.com/products/">other projects</a> in a single unified location; and offers numerous other improvements like a <a href="http://feeds.feedburner.com/onecrayon/">news feed</a> for keeping up to date with general One Crayon news and updates to my various software projects.</p>
<p>I&#8217;m not actively seeking freelance work thanks to a busy full time schedule, but I&#8217;ve been wanting to revitalize One Crayon for a while, not least because I wanted to start migrating some of my sites over to ExpressionEngine and One Crayon seemed like a good place to start.</p>
<p>There are still some rough edges (I&#8217;m looking at you, IE 6) and I haven&#8217;t added my website or writing portfolios, but I hope you&#8217;ll enjoy it anyway!</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/VNKm5Hamnh8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/09/onecrayon_redesign/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/09/onecrayon_redesign/</feedburner:origLink></item>
		<item>
		<title>Text Editor Actions for Espresso</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/gpZYmaFdxIg/</link>
		<comments>http://beckism.com/2009/09/tea_for_espresso/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 00:49:38 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[custom solution]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=319</guid>
		<description>I am extremely happy to announce that my Text Editor Actions for Espresso (or &amp;#8220;TEA&amp;#8221; for short) has at last been released as version 1.0. Version 1.0 is available for download, or you&amp;#8217;ll also find it bundled in the upcoming Espresso 1.0.7. So just what the heck is TEA for Espresso? Simply this: A selection [...]</description>
			<content:encoded><![CDATA[<p>I am extremely happy to announce that my Text Editor Actions for Espresso (or &#8220;TEA&#8221; for short) has at last been released as version 1.0.  Version 1.0 is <a href="http://github.com/onecrayon/tea-for-espresso/downloads">available for download</a>, or you&#8217;ll also find it bundled in the upcoming Espresso 1.0.7.</p>
<p>So just what the heck is TEA for Espresso?  Simply this:</p>
<ol>
<li>A selection of my favorite text actions, mostly (but not entirely) copied from Textmate</li>
<li>Generic actions that allow you to create variations on TEA&#8217;s bundled functionality to suit your workflow by editing simple XML</li>
<li>A general framework for coding and running text actions in arbitrary languages without needing to create a Sugar or (for third party Sugars) without needing compiled Objective-C classes</li>
</ol>
<p>Espresso&#8217;s Sugar API was already pretty sweet.  TEA makes it that much better by lowering the barrier to creating custom text actions for users and Sugar developers alike.</p>
<p>Documentation for TEA is currently limited to <a href="http://wiki.github.com/onecrayon/tea-for-espresso">info on creating your own actions</a>, so I&#8217;ll walk you through the basic actions included with the plugin.</p>
<p>The vast majority of TEA&#8217;s built-in actions focus on making HTML easier to edit, because editing HTML is most often why I need a text editor.</p>
<h4>Generic text actions</h4>
<p><strong>Spaces To Tabs&#8230;</strong> and <strong>Tabs To Spaces&#8230;</strong><br />
As you might expect, these actions convert the type of indentation in your document or (if it exists) your selected text.  When you run the actions you&#8217;ll be prompted to enter the number of spaces per tabs you wish to use (it defaults to whatever is in your Espresso preferences, so you can just hit enter most of the time).</p>
<p><strong>Trim Line(s)</strong><br />
Trim Line(s) will, when invoked, either trim all of the lines in your selection or the current line the cursor is on (if no selection exists).  Unlike some trim lines actions, TEA&#8217;s Trim Line(s) attempts to be smart about what whitespace it removes:</p>
<ul>
<li>All whitespace at the end of the line will be stripped</li>
<li>Any whitespace at the beginning of the line that isn&#8217;t part of the indentation will be stripped</li>
</ul>
<p>What the latter means is that if in the Espresso preferences you have the program set to use spaces instead of tabs with four spaces per tab, and the beginning of a line has ten spaces, two of the spaces will be stripped.</p>
<p><strong>Select &rarr; Word</strong>, <strong>Select &rarr; Line</strong>, <strong>Select &rarr; Line Contents</strong><br />
As you might expect, these actions select the word under the cursor, the line under the cursor (including leading and trailing whitespace), or the textual contents of the line under the cursor (excluding leading and trailing whitespace), respectively.</p>
<p><strong>Sorting &rarr; Sort Lines (Ascending)</strong> and <strong>Sorting &rarr; Sort Lines (Descending)</strong><br />
As you might expect, these actions sort all lines in the selection (or document, if no selection) in ascending and descending order, respectively.</p>
<p><strong>Sorting &rarr; Randomize Lines</strong><br />
This randomly sorts all lines in the selection (or document, if no selection).</p>
<p><strong>Sorting &rarr; Remove Duplicate Lines</strong><br />
If for some reason you need to strip all duplicate lines from your selection or document, this is the command for you.</p>
<h4>Formatting commands</h4>
<p><strong>Indent New Line</strong> (command-shift-enter)<br />
One of my favorite parts of Textmate is that after creating an HTML tag, I only have to hit enter once to get a perfectly indented tag pair with the cursor in between and bumped in a level.  The fact that Espresso doesn&#8217;t do this irks me greatly, and so this action allows you to force the issue.  Indent New Line will turn this (pipe represents cursor):</p>
<p><code>
<pre>&lt;div>|&lt;/div></pre>
<p></code></p>
<p>Into this:</p>
<p><code>
<pre>&lt;div>
    |
&lt;/div></pre>
<p></code></p>
<p>If you have any text selected when you run the action, the selected text will be moved to the middle line and indented.</p>
<p><strong>Insert Linebreak(s)</strong> (control-enter)<br />
In HTML, Insert Linebreak(s) will insert a break tag (<code>&lt;br /></code>).  In some other contexts (like PHP double quoted strings), it will insert <code>\n</code>.  In Markdown it will insert two spaces and a linebreak.  If you have one or more selections, the tag or textual linebreak will be inserted at the end of each selection.</p>
<p>In case you didn&#8217;t quite catch that, Espresso allows you to have multiple selections (hold down command while you select multiple items with your mouse), and this action will affect all of them.  This is extremely cool, and one of the features that I&#8217;m still learning to use; before now, I&#8217;d never come across a text editor that allowed me to so much as select multiple items at once.  Of course, it isn&#8217;t all that often that you need to append br tags in a whole bunch of places around a document, but what about when you want tags for&#8230;</p>
<p><strong>Strong</strong> (command-B) and <strong>Emphasize</strong> (command-shift-I)<br />
These do about what you&#8217;d expect.  If you have one or more selections, they&#8217;re surrounded with strong or em tags.  If no selection, you get a tag wrapping your cursor.  Incidentally, if you&#8217;re working with a single selection (or no selection) you&#8217;ll get a text snippet with tab stops, so hit the tab key to edit what&#8217;s inside the tag.</p>
<p>A note on Emphasize&#8217;s shortcut; command-I by default is used to show and hide the navigator sidebar, hence this somewhat odd shortcut for italics.  If you wish to switch the shortcuts, you can do so through the System Preferences Keyboard &amp; Mouse controls.</p>
<h4>HTML actions</h4>
<p><strong>Entities &rarr; Convert To Named Entities</strong> (control-&amp;) and <strong>Entities &rarr; Convert To Numeric Entities</strong><br />
Run one of these actions to have the character immediately to the left of the cursor converted from Unicode into an HTML character entity.  If you have one or more selections, all non-ASCII Unicode characters will be converted to entities of the desired variety.  If using named entities, Unicode characters without a named entity will still be converted to their numeric equivalent.  These actions will also convert ampersands (but will ignore ampersands that are already part of an entity).</p>
<p><strong>Entities &rarr; Insert Non-Breaking Space</strong>, etc.<br />
Use these actions to quickly insert the named HTML entity for the given character.</p>
<p><strong>Expand Abbreviation</strong> (control-,)<br />
This action is much like Textmate&#8217;s &#8220;Insert Open/Close Tag (With Current Word)&#8221; which, when I saw it demoed in a screencast, changed my life.  For far too long had I been toiling away, typing out every blessed less than/greater than symbol.  With Expand Abbreviation, I merely type the HTML tag, hit the shortcut, and voil&agrave;.  I have the complete tag ready to go with barely any effort at all.</p>
<p>And the fun doesn&#8217;t stop there!  The reason for the action&#8217;s name change is that Expand Abbreviation is powered by the fantastic <a href="http://code.google.com/p/zen-coding/">zen coding project</a>, so in addition to Textmate&#8217;s functionality Expand Abbreviation offers the full range of zen coding abbreviations and CSS-selector style syntax to create complex markup from very simple declarations.  Here&#8217;s a quick example of zen coding&#8217;s awesomeness:</p>
<p><code>
<pre>div#stuff.things.booyah</pre>
<p></code></p>
<p>Type that, hit control-, and you&#8217;ll end up with this (pipe represents cursor):</p>
<p><code>
<pre>&lt;div id="stuff" class="things booyah">|&lt;/div></pre>
<p></code></p>
<p>Or if you want to do something a little more complicated:</p>
<p><code>
<pre>div#nav+div#content>p.item$*2</pre>
<p></code></p>
<p>Which leads to this:</p>
<p><code>
<pre>&lt;div id="nav">|&lt;/div>
&lt;div id="content">
	&lt;p class="item1">&lt;/p>
	&lt;p class="item2">&lt;/p>
&lt;/div></pre>
<p></code></p>
<p>And that&#8217;s just the tip of the iceberg.  Zen coding offers <a href="http://code.google.com/p/zen-coding/wiki/ZenHTMLSelectorsEn">numerous other selectors</a> and scads of abbreviations for <a href="http://code.google.com/p/zen-coding/wiki/ZenHTMLElementsEn">HTML</a> and <a href="http://code.google.com/p/zen-coding/wiki/ZenCSSPropertiesEn">CSS</a>.  All of them will work with Expand Abbreviation.</p>
<p>You may also, if you need, use the old Textmate-style tag creation where you type out everything in the tag except the carets, highlight it, and run it through Expand Abbreviation to get a full tag.  For instance, this:</p>
<p><code>
<pre>div style="width:100%;"</pre>
<p></code></p>
<p>Once selected and run through Expand Abbreviation leads to this markup:</p>
<p><code>
<pre>&lt;div style="width:100%;">|&lt;/div></pre>
<p></code></p>
<p>If there is no selection, this action will use the current word regardless of where the cursor falls in it (Textmate will only parse to the left of the cursor).</p>
<p><strong>Wrap Selection In Tag</strong> (control-shift-W)<br />
As you might expect, if you select some text and invoke Wrap Selection In Tag, the selection will be wrapped in an HTML tag.  Just like in Textmate, you can type out tag attributes and they won&#8217;t be mirrored to the closing tag, and moving outside the tag is a tab away.</p>
<p><strong>Wrap Selected Lines In Tag</strong> (command-control-shift-W)<br />
This one acts just like Wrap Selection In Tag, except that each line in the selection is wrapped.</p>
<p><strong>Wrap Selection In Link</strong> (control-shift-L)<br />
Unsurprisingly, selecting some text and invoking this command will wrap it in an HTML link tag.  What makes this action more worthwhile than some of the others is that if you have a recognizable link on your clipboard it will be inserted, and there are several tab stops set up to make removing or editing the link&#8217;s title extremely easy.  Unlike Textmate, this action does not attempt to populate the title from the actual webpage&#8217;s title.  I&#8217;ve had Textmate hang while it waits to retrieve the webpage too many times to want to implement that functionality myself.</p>
<p>If you use this action while editing Markdown or Textile, the selection will be wrapped in a Markdown or Textile link rather than an HTML anchor.</p>
<p><strong>Documentation For Tag</strong> (control-H)<br />
If your cursor is inside an HTML tag, you can run Documentation For Tag to have the word under the cursor (or the selection) searched for in <a href="http://htmlhelp.com/reference/html40/">HTMLHelp.com&#8217;s HTML reference</a>.  If the cursor is inside an HTML tag, you&#8217;ll be taken straight to the first result (almost always the correct tag page).  Otherwise, you&#8217;ll get a Google result listing.</p>
<h4>TEA Preferences</h4>
<p><strong>TEA &rarr; Preferences</strong> offers a GUI to modify some TEA-related preferences.  You&#8217;ll need to have a document open in order to access the prefs due to limitations in how Espresso sets up actions.</p>
<p><strong>General Prefs</strong><br />
Checking &#8220;use XHTML by default&#8221; will cause TEA-based snippets that use the <code>$E_XHTML</code> variable to leave it blank.  At some point in the future, TEA will hopefully be more intelligent about detecting whether a document is HTML or XHTML, but for now you&#8217;ll need to control it using this preference.</p>
<p>Similar to Textmate, anything entered in the Custom Shell Variables section of the preferences will be available as an environmental variable to any shell scripts you run through TEA.  For instance, if you add a variable with the name &#8220;MY_CUSTOM_VARIABLE&#8221; and the contents &#8220;I love TEA!&#8221; then wherever you use the shell environmental variable <code>$MY_CUSTOM_VARIABLE</code> you&#8217;ll get &#8220;I love TEA!&#8221;</p>
<p><strong>Actions</strong><br />
If you check &#8220;Enable custom user actions&#8221; you will be able to create custom actions without needing a custom sugar.  This is useful not only for custom TEA-based actions, but for custom actions using third party sugars, as well.</p>
<h4>Beyond the bundle</h4>
<p>If TEA&#8217;s included actions aren&#8217;t enough for you, it&#8217;s extremely easy to add your own custom actions, port actions from Textmate bundles, and otherwise use TEA to jumpstart your own Espresso customizations.  The <a href="http://wiki.github.com/onecrayon/tea-for-espresso">TEA for Espresso wiki</a> has lots of info on this sort of thing, or you can take a look at the <a href="http://github.com/onecrayon/HTMLBundle.sugar">HTMLBundle.sugar&#8217;s source</a> for an example of porting Textmate snippets and bundle items (the HTMLBundle.sugar may also be of use to other folks who want Textmate&#8217;s HTML tab completions, among other things; <a href="http://github.com/onecrayon/HTMLBundle.sugar/downloads">download it here</a>).</p>
<p>I&#8217;m also usually available in the forums or Espresso IRC channel if you have questions about using TEA, feature requests, bug reports, or other comments.  Alternatively if you have a GitHub account, you can file bug reports and feature requests directly into the <a href="http://github.com/onecrayon/HTMLBundle.sugar/downloads">TEA for Espresso Issues tracker</a>.</p>
<p>I hope you enjoy TEA with your Espresso!</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/gpZYmaFdxIg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/09/tea_for_espresso/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/09/tea_for_espresso/</feedburner:origLink></item>
		<item>
		<title>The ideal feed reader</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/8UPSCIfk4S8/</link>
		<comments>http://beckism.com/2009/07/ideal_feed_reader/#comments</comments>
		<pubDate>Sat, 25 Jul 2009 15:14:03 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[opinions]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=317</guid>
		<description>I have never found a Mac OS X RSS feed reader that, after extended use, I was completely happy with, and this makes me sad because my feed reader is right up there with my email client for regular usage. Every time a new feed reader comes out, I eagerly try it, am often very [...]</description>
			<content:encoded><![CDATA[<p>I have never found a Mac OS X RSS feed reader that, after extended use, I was completely happy with, and this makes me sad because my feed reader is right up there with my email client for regular usage.  Every time a new feed reader comes out, I eagerly try it, am often very happy with it initially, and then inevitably become dissatisfied with its shortcomings after a week or two of use.</p>
<p>I&#8217;ve tried and discarded <a href="http://www.newsfirerss.com/">NewsFire</a>, <a href="http://www.vienna-rss.org/">Vienna</a>, <a href="http://www.newsgator.com/INDIVIDUALS/NETNEWSWIRE/">NetNewsWire</a>, <a href="http://www.thinkmac.co.uk/newsmac/">NewsLife</a>, <a href="http://www.acrylicapps.com/times/">Times</a>, and many others which were on my computer such a short time they don&#8217;t deserve a mention.  None of them fully satisfied my needs.</p>
<p>Most recently, I decided to give <a href="http://feedafever.com/">Fever</a> a try.  Though I highly dislike web apps (I&#8217;ve never found a web app that was remotely as good as its desktop counterparts, mainly thanks to speed and usability issues), I love <a href="http://haveamint.com/">Mint</a> and figured that maybe, just maybe, Shaun Inman would be the one who could write a web app that was actually useable day to day.</p>
<p>Sadly, my hopes were dashed.  Fever is too slow to handle the speed that I can skim through feeds, and has some of the same problems that drove me from NewsFire (like refreshing automatically and losing your place in whatever you&#8217;re viewing after an update).  I find that I never use the &#8220;Hot&#8221; functionality because it is so useless at actually predicting what I&#8217;ll find interesting (partially thanks to my lack of Spark link blogs, but <a href="http://al3x.net/2009/07/18/fever-and-the-future-of-feed-readers.html">others have had similar issues</a>), and as a result Fever for me has turned out to just be a rather unresponsive generic feed reader.</p>
<p>(Side note: I haven&#8217;t been happy with Fever, but I&#8217;d still hesitantly recommend it for some people.  Simply the fact that its capable of standing up with options like NewsFire and NetNewsWire is a big point in its favor if you don&#8217;t mind the Ajaxy slowness.)</p>
<p>Despite my rampant discontent, I still do not want to code a feed reader myself, so on the off chance that someone is trying to make the perfect feed reader, here&#8217;s what it needs.</p>
<p><strong>Make sure keyboard navigation is easy to use.</strong>  This is the part of Fever that I enjoy most. Hit space bar to jump to the next item.  Right arrow opens the item in the browser.  Enter swaps between excerpt and full text.  Left arrow jumps back to the source list to select a different group.  Brilliant.</p>
<p><strong>Allow grouping items by source feed.</strong> NewsFire does this beautifully, but for some reason none of the other feed readers have even attempted it.  I typically want to read or skim items based on which feed they&#8217;re in, and grouping items visually by feed makes it very easy for me to do so.  Sticking the source website in a column, or under the title, or over the title, or next to the title <em>does not work as well</em>.</p>
<p><strong>Don&#8217;t use a three-pane interface.</strong>  Mail is a brilliant application for reading email.  <em>Feeds are not email</em>.  Go use Fever, NewsFire, or Times and find out why designing a great, feed reader-specific workflow is a better plan than rehashing the tired old three-pane news reader.</p>
<p><strong>Settings should be possible to apply per feed, per group, or as application defaults.</strong>  I love that NetNewsWire and Fever both allow me to granularly set behavior preferences for feeds.  Setting refresh rates on a per-feed basis is rarely necessary, but when you need it you&#8217;ve got to have it.  When I was hunting up freelance work, I subscribed to a few Craig&#8217;s List feeds.  I eventually had enough work that the feeds were just noise, so (thanks to NetNewsWire), I stuck them in a group and turned off refreshing for that group.  They were ready for when I needed them in the future, but out of my way for now.</p>
<p><strong>Don&#8217;t sacrifice performance for aesthetics.</strong>  Times, I&#8217;m looking at you.  Times is a beautiful feed reader, with an innovative approach to feed reading, and a great set of features.  I&#8217;d be using it right now if it weren&#8217;t buggier than an anthill.  The somewhat recent 1.1 update fixed a lot of the really annoying bugs, but the program still isn&#8217;t usable.  Maybe in another few point updates.</p>
<p><strong>Don&#8217;t sacrifice aesthetics for performance.</strong>  Hi, NetNewsWire!  To be fair NetNewsWire mitigates this problem somewhat by offering some really top-notch themes, but although the application is certainly solid and obviously has been given a lot of attention to detail, it could still use a bit of the flair of NewsFire, Times, or Fever.  I think there&#8217;s a middle road here, and on that middle road a talented designer and talented developer are collaborating.  Sadly, feed readers appear to be primarily one-man-in-his-basement affairs.</p>
<p><strong>Remember that users will subscribe both to feeds they want to read every word and those they merely want to skim.</strong>  Times and Fever are both best for feeds that you want to focus on every headline.  NewsFire is great for skimming through lots of headlines thanks to its group-by-feed feature.  NetNewsWire is actually pretty good at both, as long as you&#8217;re careful about how you sort feeds into groups.  The problem here is that the needs (and thus best interface) for feeds with lots of signal versus feeds with lots of noise are quite different, yet feed readers invariably only offer a single interface for browsing and accessing feeds (or offer multiple possible interfaces, but you have to switch between them globally for the whole program).  I don&#8217;t know what the perfect solution is here, but I do know that it can only exist if the program recognizes that I have two very different approaches to feed reading and provides options accordingly.</p>
<p>Perhaps I&#8217;ll never see my perfect feed reader, and instead be destined to keep bouncing between substandard options as they release new upgrades and rekindle my hope that maybe this time they&#8217;ll have gotten it right.  Perhaps Mac OS X feed readers simply aren&#8217;t profitable enough to attract the time and care necessary to craft something that does everything I want without being bloated and terrible, and I&#8217;ll eventually just have to suck it up and go with a web app.</p>
<p>But I hope that isn&#8217;t the case.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/8UPSCIfk4S8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/07/ideal_feed_reader/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/07/ideal_feed_reader/</feedburner:origLink></item>
		<item>
		<title>Estimates</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/OQNN1IHTmIY/</link>
		<comments>http://beckism.com/2009/07/xkcd_estimates/#comments</comments>
		<pubDate>Mon, 20 Jul 2009 14:27:10 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Adversaria]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=313</guid>
		<description>My other favorite time estimator is Stuffit, which back when I still used it would tell me that files would be completely unstuffed anywhere from -16,000 to 1,000,000,000 minutes. I never was sure how a file could have been unstuffed in negative minutes. Possibly Stuffit was trying to tell me that it had been unstuffed [...]</description>
			<content:encoded><![CDATA[<p class="center"><a href="http://xkcd.com/612/"><img src="http://beckism.com/wp-content/uploads/2009/07/estimation.png" alt="Estimation" title="They could say 'the connection is probably lost,' but it's more fun to do naive time-averaging to give you hope that if you wait around for 1,163 hours, it will finally finish." /></a></p>
<p>My other favorite time estimator is Stuffit, which back when I still used it would tell me that files would be completely unstuffed anywhere from -16,000 to 1,000,000,000 minutes.  I never was sure how a file could have been unstuffed in negative minutes.  Possibly Stuffit was trying to tell me that it had been unstuffed once before in the past, so why the hell was I opening it again?</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/OQNN1IHTmIY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/07/xkcd_estimates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/07/xkcd_estimates/</feedburner:origLink></item>
		<item>
		<title>Beating the game</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/qizXy4w2eF0/</link>
		<comments>http://beckism.com/2009/06/beating_the_game/#comments</comments>
		<pubDate>Mon, 29 Jun 2009 15:34:27 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[opinions]]></category>
		<category><![CDATA[video games]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=310</guid>
		<description>Shortly after it came out, I beat Braid, a puzzle platformer initially released for the Xbox 360 as an arcade title and incidentally the single best game I&amp;#8217;ve played in years (it is now also available for Mac and PC). Braid was a short game (I finished it in one Saturday with lots of play, [...]</description>
			<content:encoded><![CDATA[<p>Shortly after it came out, I beat <a href="http://braid-game.com/">Braid</a>, a puzzle platformer initially released for the Xbox 360 as an arcade title and incidentally the single best game I&#8217;ve played in years (it is now also available for <a href="http://www.playgreenhouse.com/game/NNONE-000001-01/">Mac and PC</a>).  Braid was a short game (I finished it in one Saturday with lots of play, and a couple hours the following Monday; probably around 6 hours total) but it was one of the most satisfying gaming experiences I&#8217;ve had in a long time.  Braid&#8217;s puzzles all revolve around your ability to affect time, and each one is unique.  No puzzle requires you to travel until you find an appropriate item or hint that makes everything clear.  You could, with patience and a willingness to think outside the box, solve each puzzle sequentially the first time you played the game.  In a world where puzzle and adventure games have mostly devolved into mindless color matching or poking around until you find the hidden lever, Braid is a breath of fresh air.</p>
<p>If you&#8217;d like to get a great feeling for Braid take a moment to read through the <a href="http://braid-game.com/walkthrough/walkthrough.html">Official Braid Walkthrough</a>.  I promise, it won&#8217;t spoil anything.  Quite the contrary.</p>
<p>Early on when I was playing the game, I got frustrated at one of the puzzles and resorted to the internet to find a walkthrough with some pointers.  I stumbled across the official one, read it, and rather sheepishly returned to the game without looking further (incidentally solving the puzzles that I&#8217;d had trouble with after leaving them alone for a while and coming back).</p>
<p>But the day that I beat the game, I cheated for real.  In my defense, one of the puzzles that I sought help-via-walkthrough on was something I probably wouldn&#8217;t have figured out without some sort of hint, dumb luck, or an outside opinion.</p>
<p>For the second puzzle whose solution I looked up, though, I was just being lazy.  I had one puzzle left, as far as I could tell it was impossible, and I wanted to beat the damn game and go to bed.  After reading the solution, I realized that it was far from impossible, that if I had slept on it one more night and come back with a fresh perspective I would doubtless have figured it out for myself, and that I had just cheated myself out of the pleasure of discovering a solution on my own.</p>
<p>Which makes me wonder; when did beating the game become so important to me?</p>
<p>I don&#8217;t really know for sure, but I suspect I have beat maybe only 25% of the video games I&#8217;ve ever played, and most of those I completed before I entered junior high.  This is in part thanks to the fact that my prime game-playing time (high school and college) I spent working for Inside Mac Games where it was more important to play lots of games than to play games to completion.  Even for games that I loved and had a compelling reason to finish (like a few of Spiderweb Software&#8217;s games) I inevitably got interrupted by something new that needed to be played and written up; a few interrupted games I went back to and finished, but many more I simply let fall to the wayside.  The rest of the reason that I have such a rotten record for games that I&#8217;ve beaten compared to when I was young is that I can now afford to just buy a new game if something ends up frustrating or annoying me.  When I was in elementary school, Riven pissed me off more times than I can count.  I constantly came up against impassable obstacles, and there were weeks or more when I would leave the game alone in disgust and frustration.  I couldn&#8217;t afford to buy any other games, though, thanks to my all but non-existant allowance, so I kept coming back to Riven until I finally beat it.</p>
<p>Given my record, beating a game isn&#8217;t high on my list of priorities.  Hell, just looking at my Xbox arcade collection proves that; of the twenty-two I own, I&#8217;ve only beaten two (one of which was Braid).</p>
<p>Which brings me back to the question: why was beating Braid important enough to cheat myself out of further time with it?  I know, both from experience and from the official Braid walkthrough, that the journey is the reward and sometimes all you need is a good night&#8217;s sleep for a puzzle to open up to you.  And I still ruined it.</p>
<p>My temptation is to blame the internet.  The games I remember most fondly are the old LucasArts adventure games (Indiana Jones and the Fate of Atlantis, Sam &#038; Max, Day of the Tentacle, The Dig), and I played them through either before my family had internet, or when walkthroughs were harder to find.  In a way, I couldn&#8217;t find spoilers, so I couldn&#8217;t spoil myself.</p>
<p>That argument, however, is unfair.  The problem isn&#8217;t that walkthroughs exist and are easy to find.  I actually prefer information to be readily available; there&#8217;s nothing worse than having something in a game you can&#8217;t solve that you&#8217;ve been working at for days with no luck, and then being unable to find any information online to help you.  The fault lies somewhere else.</p>
<p>I think the real reason that I became so focused on beating Braid, despite knowing better, was because I have become accustomed to games having some worthwhile content that is then expanded with mountains of filler.  A game of Braid&#8217;s caliber, where every puzzle is lovingly crafted and unique, took me completely by surprise.</p>
<p>And that makes me sad, both because the game industry as a whole is so focused on quantity rather than quality and because I as a gamer have reached a point where I&#8217;m so immured to games without redeemable qualities past the bullet points on their boxes that I unintentionally spoil the few gems that I do come across.</p>
<p>If you have not yet come across Braid, I urge you to learn from my mistakes: don&#8217;t just beat the game; play it.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/qizXy4w2eF0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/06/beating_the_game/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/06/beating_the_game/</feedburner:origLink></item>
		<item>
		<title>Tibia or not tibia…</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/_o3y85dFdHY/</link>
		<comments>http://beckism.com/2009/05/tibia/#comments</comments>
		<pubDate>Tue, 26 May 2009 02:09:54 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Adversaria]]></category>
		<category><![CDATA[humor]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=304</guid>
		<description>Pete Joison&amp;#8217;s artwork, in all its forms, makes me so very, very happy.</description>
			<content:encoded><![CDATA[<p class="center"><a href="http://blurburger.com/shoebox/toons/toons/tibea.png"><img src="http://beckism.com/wp-content/uploads/2009/05/tibea.jpg" alt="Tibia or not tibia..."  /></a></p>
<p>Pete Joison&#8217;s artwork, in <a href="http://www.blurburger.com/">all</a> <a href="http://tihntoun.com/">its</a> <a href="http://www.petejoison.com/">forms</a>, makes me so very, very happy.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/_o3y85dFdHY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/05/tibia/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/05/tibia/</feedburner:origLink></item>
		<item>
		<title>Adventures with Yahoo Pipes</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/484rHL3DSBk/</link>
		<comments>http://beckism.com/2009/04/yahoo_pipes/#comments</comments>
		<pubDate>Sun, 26 Apr 2009 16:10:45 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=298</guid>
		<description>When I was testing Tumblr as a platform for beckbits, I discovered that their RSS feeds didn&amp;#8217;t offer quite what I was hoping. Since I was primarily planning to use beckbits as a link blog, I wanted it to work Daring Fireball-style: link items should go straight to the source material, and all other items [...]</description>
			<content:encoded><![CDATA[<p>When I was testing <a href="http://www.tumblr.com/">Tumblr</a> as a platform for <a href="http://bits.beckism.com/">beckbits</a>, I discovered that their RSS feeds didn&#8217;t offer quite what I was hoping.  Since I was primarily planning to use beckbits as a link blog, I wanted it to work <a href="http://daringfireball.net/">Daring Fireball</a>-style: link items should go straight to the source material, and all other items should be permalinks back to the site.  I&#8217;ve always thought that was a brilliant design choice on John Gruber&#8217;s part, and I&#8217;ve always been a big believer in integrating aspects of great design that I find around the web into my own projects.</p>
<p>In the hopes that I could take the RSS feed and remix it easily on my own, I turned to <a href="http://pipes.yahoo.com/pipes/">Yahoo Pipes</a>.  Yahoo Pipes provides a relatively easy graphical interface to parse, modify, and combine data streams, JSON, and RSS and spit it back out as RSS, JSON, or PHP serialized code.  I first discovered Pipes when I found someone&#8217;s &#8220;lifestream&#8221;, a website that displayed a list of their activity across numerous different services using Yahoo Pipes.  These kind of RSS feed mashups seem to be the most common use of the service, but the service is quite flexible so it seemed well suited for repurposing Tumblr&#8217;s RSS feed to my own uses.</p>
<p>Over the course of creating the feed, I discovered some interesting features that I feel are worth sharing.  For those of your who are curious about my specific implementation, here&#8217;s the <a href="http://pipes.yahoo.com/pipes/pipe.info?_id=uCxBbzww3hGB9ClS6ycw5g">actual pipe that is powering beckbits</a>.</p>
<h4>Moving data between elements</h4>
<p>Very early on in my exploration of the default Tumblr RSS feed I realized that I was going to need to use the <a href="http://www.tumblr.com/docs/api">Tumblr API</a> if I wanted to get direct access to the various components that make up Tumblr posts.  Of course, the API provides completely different elements than an RSS feed, so one of the main tasks of my pipe is to move data around between elements.</p>
<p>For things with a one-to-one relationship, the &#8220;Rename&#8221; operator typically does the trick.  For instance, using the external site&#8217;s URL for the RSS item link on Tumblr link items was as easy as throwing in a Rename with the rule &#8220;<em>item.link-url</em> renamed to <em>link</em>&#8220;.</p>
<p>But what about when I needed to combine multiple fields into one?  Rename certainly wasn&#8217;t going to help me there, and I couldn&#8217;t find any way to pipe data between operators and string functions.</p>
<p>Fortunately, the Regex operator came to the rescue.</p>
<p>Although I couldn&#8217;t find any documentation for this, the regex module offers a couple great features:</p>
<ul>
<li>If you reference an element in the first column that doesn&#8217;t exist, it will be created.</li>
<li>
<p>You can include the contents of other elements using the &#8220;named backreference&#8221; syntax (<code>${element-name}</code>).  For instance, when I wanted my description element to include both the Tumblr &#8220;quote-text&#8221; and &#8220;quote-source&#8221; elements the &#8220;replacement&#8221; column looked something like this:</p>
<p><code>
<pre>&lt;blockquote&gt;${quote-text}&lt;/blockquote&gt;&lt;p&gt;&lt;cite&gt;${quote-source}&lt;/cite&gt;&lt;/p&gt;</pre>
<p></code>
</li>
</ul>
<h4>Simple conditionals using regex</h4>
<p>Thanks to the fact that everything in a Yahoo pipe is evaluated sequentially, you can use the regex operator to setup simple conditionals.  For instance, regular Tumblr posts have an optional title.  If the title existed, I wanted to use it as my RSS item&#8217;s title; otherwise it should default to a short excerpt of the text.  To accomplish this, I setup the following rules:</p>
<p><strong>Rename</strong><br />
<em>item.regular-title</em> copy as <em>title</em></p>
<p><strong>Regex</strong><br />
In <em>item.title</em> replace <code>(.*)</code> with <code>$1```${excerpt}</code><br />
In <em>item.title</em> replace <code>^```(.*)$</code> with <code>$1</code><br />
In <em>item.title</em> replace <code>^(.+?)```.*</code> with <code>$1</code></p>
<p>The basic idea is to combine two fields into one separated by some delimiter characters that are unlikely to ever show up otherwise.  I chose to use three backticks, since it kept things pretty legible and I rarely use backticks.  If you&#8217;re not comfortable with regex, the rules in order say:</p>
<ol>
<li>Copy regular-title to title (because regular-title might not exist, this may result in an empty title element)</li>
<li>Append <code>```</code> plus the excerpt element to whatever is in the title element</li>
<li>If the title element starts with backticks (<code>^```</code>), replace its contents with whatever follows the backticks (the excerpt)</li>
<li>If the title element starts with one or more characters followed by backticks (<code>^(.+?)```</code>), replace everything with that starting content</li>
</ol>
<h4>Replacing your site feed with a pipe</h4>
<p>Once I&#8217;d created my pipe it was time to replace beckbits&#8217; feed with the pipe, and I discovered that Yahoo Pipes has a serious downside when it comes to using it instead of your default site feed: the pipe&#8217;s output always links back to the pipe page as the feed&#8217;s homepage.  Although this wouldn&#8217;t be a huge deal, it has the unfortunate side effect of causing the favicon associated with your feed to be the Yahoo Pipes favicon, which is extremely non-ideal.  In order to fix this, you actually have to post-process the pipe output.</p>
<p>For myself, I opted to do this by reading in the pipe as serialized PHP and then constructing my own simple RSS feed.  If you&#8217;re interested in doing something similar and would like a starting point, <a href="http://gist.github.com/102081">here&#8217;s the gist of it</a>.</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/484rHL3DSBk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/04/yahoo_pipes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/04/yahoo_pipes/</feedburner:origLink></item>
		<item>
		<title>Introducing beckbits</title>
		<link>http://feedproxy.google.com/~r/beckism/~3/nPAcQ96VdD4/</link>
		<comments>http://beckism.com/2009/04/beckbits/#comments</comments>
		<pubDate>Sat, 25 Apr 2009 17:15:06 +0000</pubDate>
		<dc:creator>Ian Beck</dc:creator>
				<category><![CDATA[Flow]]></category>
		<category><![CDATA[news]]></category>
		<category><![CDATA[personal]]></category>

		<guid isPermaLink="false">http://beckism.com/?p=296</guid>
		<description>If you ask my supervisor, she&amp;#8217;ll tell you that I&amp;#8217;m the Director of Web Services. This is bullshit, but it sounds professional and presumably the clients love it. So that&amp;#8217;s alright. The truth is, I&amp;#8217;m a problem-solver. Every day, I sit down at my computer and I solve people&amp;#8217;s problems. Perhaps the problem is that [...]</description>
			<content:encoded><![CDATA[<p>If you ask my supervisor, she&#8217;ll tell you that I&#8217;m the Director of Web Services.  This is bullshit, but it sounds professional and presumably the clients love it.  So that&#8217;s alright.</p>
<p>The truth is, I&#8217;m a problem-solver.  Every day, I sit down at my computer and I solve people&#8217;s problems.  Perhaps the problem is that Client A wants a site that they can update themselves.  Or maybe my coworker needs me to figure out why the heck their code is breaking in some browsers but not others.  And sometimes Client C just has to have a rainbow unicorn spring out of the middle of the page and dance on the user&#8217;s mouse cursor in a paroxysm of misused Javascript.  The problems change day to day and project to project.</p>
<p>I&#8217;ve now been solving problems professionally for over a year and a half, and I&#8217;ve found that in the course of solving problems I often discover information and tools online that are extremely useful for web work.  Up until now, I haven&#8217;t done much with these tidbits aside from occasionally bookmarking them.</p>
<p>No longer!  I am pleased to announce <a href="http://bits.beckism.com/">beckbits</a>, a collection of links, tips, and other tidbits that I discover during my day job and would like to share with other web problem-solvers.  Aside from links to useful resources that I&#8217;ve discovered, I may occasionally post software or productivity tips, links to my most recently completed sites, and other minor items that relate to my work as a web professional.</p>
<p>Enjoy!</p>
<img src="http://feeds.feedburner.com/~r/beckism/~4/nPAcQ96VdD4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://beckism.com/2009/04/beckbits/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://beckism.com/2009/04/beckbits/</feedburner:origLink></item>
	</channel>
</rss>
