<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Theodicius &#187; Technology</title>
	<atom:link href="http://www.theodicius.net/archives/category/technology/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theodicius.net</link>
	<description>Good. Evil. Bratwurst.</description>
	<lastBuildDate>Mon, 14 Nov 2011 18:01:53 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Choose Your Own Coding Adventure?</title>
		<link>http://www.theodicius.net/archives/2011/11/14/choose-your-own-coding-adventure/</link>
		<comments>http://www.theodicius.net/archives/2011/11/14/choose-your-own-coding-adventure/#comments</comments>
		<pubDate>Mon, 14 Nov 2011 18:01:53 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=472</guid>
		<description><![CDATA[You remember the Choose Your Own Adventure series? You&#8217;d read a paragraph or two, then be presented with a question, the answer determining which of several pages you&#8217;d turn to in order to continue the story. I may be giving too much credit to Mike Stackpole, Rick Loomis and the rest of the crew at [...]]]></description>
			<content:encoded><![CDATA[<p>You remember the Choose Your Own Adventure series? You&#8217;d read a paragraph or two, then be presented with a question, the answer determining which of several pages you&#8217;d turn to in order to continue the story.</p>
<p>I may be giving too much credit to Mike Stackpole, Rick Loomis and the rest of the crew at Flying Buffalo for inventing the genre, but I give them credit for coming up with an interesting way of bringing interactivity to paper.</p>
<p>Creative as it was, the resulting stories were difficult to read.<span id="more-472"></span> I had to stop every few sentences to turn pages, and jumping around through the book like a peripatetic kangaroo kept me from getting involved in the story itself, kept me all too aware of the medium rather than the message.</p>
<p>Yet how many of us today follow this noble, but failed, experiment when writing our code?</p>
<p>We begin writing our methods with the best of intentions. We lay out the opening scene (the arguments) and launch into the gripping tale of what is happening to them.</p>
<p>Yet only a few lines into the story, we stop. We interrupt the narrative flow in order to make a decision and send the reader off to somewhere else, with no regard for what is happening in the main storyline.</p>
<p>It might be something simple. We might break the reader’s concentration with something like:</p>
<p><code>id = params[:id].nil? ? 1 : params[:id]<br />
Model.find(id)</code></p>
<p>Not only that, but if you wanted to be sure you weren&#8217;t getting slipped something troubling, you&#8217;d also have to check to see if what you were handed as the id actually is a numeric, and if not, handle that separately. It may be a small thing, but it distracts the reader (and ourselves) from the main point of the adventure, which is what we’re about to do with that id.</p>
<p>But we have to be sure there’s something both safe and useful in that id before we use it, I hear you say? Of course we do. It&#8217;s just there’s a better, more reader-friendly, way to word that. A way that will do less to distract our reader from our main plot.</p>
<p>If we use the fetch() method instead of simply [] to get the value, we can specify a default to use if the index is unset. This means we&#8217;ll get a real value back, no matter what, and won&#8217;t have to test for Nil and do any conditional branching to handle it as a special case.</p>
<p>Adding the .to_i method at the end of that (something we couldn&#8217;t do so long as the possibility of getting a Nil remained) will make the received value safer to use, by returning zero (a number) if the id value is anything but a number, which means the find method will always have a parameter it can work with, so we can drop it directly into the find:</p>
<p><code>Model.find(params.fetch(:id, 1).to_i)</code></p>
<p>This single line pulls from the model by id, supplies a default value of 1 if the id has not been given, and makes sure the given id is in fact a number, returning a zero if it isn&#8217;t.</p>
<p>By doing this we&#8217;ve handled the problems of Nil and non-numeric input at the same time, so we can guarantee the model will get a type of input it can use; failure in finding the zero id (the result of trying a non-numeric id) can be handled exactly the same as any failure to find an id not present in the database.</p>
<p>Look at your own code, this time realizing you&#8217;re telling the story of what happens to the data it encounters. Remember, the code you write today will be read tomorrow, either by yourself or someone else. Use good storytelling techniques to make that easier.</p>
<p>Tell the story of your code clearly, keeping digressions like error handling out if the main narrative flow as much as possible. Keep the main purpose of the code in a smooth unified narrative flow, so as not to confuse your reader. Your reader (who might also be yourself at some future date) will thank you for it.</p>
<p>And so will your code.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2011/11/14/choose-your-own-coding-adventure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby 1.9 and Nginx on FreeBSD</title>
		<link>http://www.theodicius.net/archives/2011/11/01/ruby-1-9-and-nginx-on-freebsd/</link>
		<comments>http://www.theodicius.net/archives/2011/11/01/ruby-1-9-and-nginx-on-freebsd/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 01:10:54 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=466</guid>
		<description><![CDATA[Noticed some, um, interesting, gotchas when setting up ruby 1.9 and the nginx web server on FreeBSD. The issue with the ruby install is subtle, and doesn&#8217;t really show up until long after you have installed it. The issue is it points the gem repository to the wrong place. It points the gem repository to [...]]]></description>
			<content:encoded><![CDATA[<p>Noticed some, um, interesting, gotchas when setting up ruby 1.9 and the nginx web server on FreeBSD.</p>
<p>The issue with the ruby install is subtle, and doesn&#8217;t really show up until long after you have installed it. The issue is it points the gem repository to the wrong place. It points the gem repository to /usr/local/lib/ruby/gems/1.8 which is where the 1.8 gems should reside, not the 1.9 gems.<span id="more-466"></span></p>
<p>The ruby 1.9 gems should reside at /usr/local/lib/ruby/gems/1.9. And the default install doesn&#8217;t set that up. A sure way to make that happen is to put:</p>
<p><code>RUBY_DEFAULT_VER=1.9</code></p>
<p>in the /etc/make.conf file. It&#8217;s possible that adding the &#8220;-E RUBY_DEFAULT_VER=1.9&#8243; flag on the make command will do the same thing, but I found the make.conf change worked, so I stopped at that point.</p>
<p>Make that change before you install ruby19 from the ports:</p>
<p><code>cd /usr/ports/lang/ruby19<br />
make install clean</code></p>
<p>After that, the gems will install in the right location and everything will be work the way it&#8217;s supposed.</p>
<h3>Nginx</h3>
<p>The regular ports install for Nginx, on the other hand, is defective from the get-go. While the ruby issue is a subtle one that may not even pose a problem in some circumstances, the ningx issue will prevent the server from responding to any control scripts.</p>
<p>The issue here is the default configuration script points the .pid file to the wrong location. In the default nginx.conf file installed by the ports system is the line:</p>
<p><code>pid        logs/nginx.pid;</code></p>
<p>This means the control scripts will not be able to find the nginx.pid file in order to send it signals. Instead the line needs to read:</p>
<p><code>pid        /var/run/nginx.pid;</code></p>
<p>This will locate the nginx.pid file where the control scripts can find it, and everything will work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2011/11/01/ruby-1-9-and-nginx-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Rails 3.0.3/Nginx/Passenger Up On Dreamhost VPS</title>
		<link>http://www.theodicius.net/archives/2011/10/21/getting-rails-3-0-3nginxpassenger-up-on-dreamhost-vps/</link>
		<comments>http://www.theodicius.net/archives/2011/10/21/getting-rails-3-0-3nginxpassenger-up-on-dreamhost-vps/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 20:12:46 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=450</guid>
		<description><![CDATA[(Edited 2001/10/24 to add apache notes at end.) Rails isn&#8217;t always an easy proposition on Dreamhost, and this was no exception. BTW, this is *not* the rvm version. I wanted to get the Dreamhost default setup working before I started playing with rvm. I&#8217;ll probably post an rvm-related set of instructions later. In this case, [...]]]></description>
			<content:encoded><![CDATA[<p>(Edited 2001/10/24 to add apache notes at end.)</p>
<p>Rails isn&#8217;t always an easy proposition on Dreamhost, and this was no exception. BTW, this is *not* the rvm version. I wanted to get the Dreamhost default setup working before I started playing with rvm. I&#8217;ll probably post an rvm-related set of instructions later.</p>
<p>In this case, I wanted to move some sites over to NginX as a trial, because the apache/passenger combination had been seeming rather slow and memory-intensive of late. I wanted to see how much time and RAM NginX would save me.<span id="more-450"></span></p>
<p><a href="http://www.theodicius.net/wp-content/uploads/2011/10/dhcp.png"><img src="http://www.theodicius.net/wp-content/uploads/2011/10/dhcp.png" alt="Dreamhost Control Panel Settings -- NginX on and mod_php off" title="dhcp" height="200" style="float:left;padding:10px;" /></a>The first bits were simple. Setting up the VPS using the Dreamhost CP went easily, then came time to configure it. The settings are pretty much self-explanatory, as you can see. The idea is to select the NginX web server, then turn mod_php off. (I did the latter just because I&#8217;m anal-retentive: mod_php is an apache module, so it wouldn&#8217;t work with NginX anyway. But even if it did, I wouldn&#8217;t want it; I want to run PHP as a fastCGI/FPM process, anyway.)</p>
<p>Setting those gives you the basic setup for the domain. Unfortunately, that in itself isn&#8217;t enough to get the default Rails setup on Dreamhost (Rails 3.0.3 at the time of this writing) working properly. The fun starts now.</p>
<p>After<br />
<code><br />
rails new appname --database=mysql<br />
bundle install<br />
</code><br />
builds the rails app, but there are more issues to come. The first is that Passenger doesn&#8217;t find the bundler to load. This is because it&#8217;s not looking for it (and, by extension, <em>all</em> your site&#8217;s gems) in the right place.</p>
<p>I recommend covering this in a couple of places, because this is something that will end up biting you again and again if you don&#8217;t. So, first, in the .bashrc file of your home directory you&#8217;ll want:</p>
<p><code>export GEM_HOME="$HOME/.gems/"<br />
export GEM_PATH="$GEM_HOME:/usr/lib/ruby/gems/1.8"<br />
export PATH="$HOME/bin:$HOME/.gems/bin:$PATH"<br />
</code></p>
<p>This will make sure your deployment tools, like capistrano, will see the gems. The &#8216;/user/lib/ruby/gems/1.8&#8242; path is the default path Dreamhost is storing its own set of gems. You should check to ensure that&#8217;s where it is on your system, and if it&#8217;s different change it to whatever it is on your site.</p>
<p>Then you need to do something similar in /config/setup_load_paths.rb (you&#8217;ll need to create the file yourself, it&#8217;s not in the standard Rails 3.0.3 setup):</p>
<p><code>ENV['GEM_HOME']='/home/username/.gems'<br />
# You can also set GEM_PATH if needed<br />
ENV['GEM_PATH']="#{ENV['GEM_HOME']}:/usr/lib/ruby/gems/1.8"</code></p>
<p>You need it here, so that Rack can find the gems; it loads before Rails, after all, so putting them in the Rails config area wouldn&#8217;t help.</p>
<p>You&#8217;re probably not done yet. There&#8217;s another bug waiting to bite you in your Gemfile. I built this Rails app for mySQL, remember? This line:</p>
<p><code>gem 'mysql2'</code></p>
<p>was put in the Gemfile by Rails as a default. It resulted (in my case) in bundler using the Dreamhost-supplied mysql2-0.3.7 gem. And you&#8217;ll probably trigger an ActiveRecord error with that, along the lines of &#8220;this version of mySQL2 doesn&#8217;t ship with the ActiveRecord adapter.&#8221; Oops.</p>
<p>The solution is to drop back to a previous version of the mysql2 adapter for this, by changing the mysql2 line in your Gemfile to be</p>
<p><code>gem 'mysql2', '< 0.3'</code></p>
<p>That tells bundler you want one earlier than 0.3. I've seen it work with 0.2.7 and 0.2.13, so it doesn't seem to be too picky. It may even work with later ones than that; all I can say is I know 0.3.7 doesn't work with it.</p>
<p>That was the extra work it took me up front to get just a vanilla Rails install functioning on Dreamhost VPS. Hope it saves someone else the hours of searching and trial and error I spent getting it to work.</p>
<h4>And Of Course Apache Is Different</h4>
<p>It can't be so simple as to be the same changes with both. With apache, you need to place the gem path code at the top of config.ru:<br />
</code><code><br />
ENV['GEM_HOME']='/home/demorails/.gems'<br />
# You can also set GEM_PATH if needed<br />
ENV['GEM_PATH']="#{ENV['GEM_HOME']}:/usr/lib/ruby/gems/1.8"<br />
</code><br />
and it doesn&#8217;t need the setup_load_paths.rb file to be present.</p>
<p>Of course, you can always put the path code in both places. Having the setup_load_paths.rb file doesn&#8217;t seem to disturb apache and the extra code in config.ru doesn&#8217;t bother NginX. It&#8217;s not DRY, no, but it&#8217;s also not something that will be changing very often, if at all, so I can live with it.</p>
<h4>Credits</h4>
<ul>
<li><a href="http://iceboundflame.com/2010/12/setting-gem_home-on-phusion-passenger-3" title="David Liu">David Liu</a></li>
<li><a href="http://stackoverflow.com/questions/3467054/problem-with-mysql2-and-rails3-bundler" title="mysql2 issue">Trinitronix</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2011/10/21/getting-rails-3-0-3nginxpassenger-up-on-dreamhost-vps/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lemme Get This Straight</title>
		<link>http://www.theodicius.net/archives/2011/10/12/lemme-get-this-straight/</link>
		<comments>http://www.theodicius.net/archives/2011/10/12/lemme-get-this-straight/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 22:06:07 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=442</guid>
		<description><![CDATA[More and more I hear the refrain that as a developer you can &#8220;circumvent&#8221; Apple&#8217;s AppStore and &#8220;walled garden&#8221; by developing web apps for iOS devices. I even hear Apple and Steve Jobs positioned as wanting to &#8220;destroy the web&#8221; with their focus on &#8220;native apps.&#8221; That their &#8220;focus on native apps&#8221; is &#8220;splintering the [...]]]></description>
			<content:encoded><![CDATA[<p>More and more I hear the refrain that as a developer you can &#8220;circumvent&#8221; Apple&#8217;s AppStore and &#8220;walled garden&#8221; by developing web apps for iOS devices.</p>
<p>I even hear Apple and Steve Jobs positioned as wanting to &#8220;destroy the web&#8221; with their focus on &#8220;native apps.&#8221; That their &#8220;focus on native apps&#8221; is &#8220;splintering the web.&#8221;<span id="more-442"></span></p>
<p>Now that I&#8217;ve laughed myself silly at the irony, it&#8217;s time to take a closer look at the facts in the case. But before we do so, some full disclosure. I use more than one Apple product. I also build Windows machines from parts for my church, contribute to Open Source projects, and run Ubuntu as well as Windows 7 and OSX in my house (in fact, there are more Windows licenses than OSX licenses around here). My prime work is done on OSX, not because it&#8217;s perfect, but because it and I get along better than Windows or Ubuntu and I. If that changes, I&#8217;ll have no compunction about switching. My computer is a tool, and like any competent workman I use the tool that fits my hand best.</p>
<p>So let&#8217;s turn back the pages of time and look at the iPhone launch. A <a href="http://www.engadget.com/2007/06/11/apple-announces-third-party-software-details-for-iphone/" title="Chris Ziegler's Note">note from Chris Zeigler</a> on Engadget from that time says Apple was encouraging developers to code web apps and download them from their own servers. If Chris&#8217;s word isn&#8217;t good enough for you, here&#8217;s <a href="http://www.apple.com/pr/library/2007/06/11iPhone-to-Support-Third-Party-Web-2-0-Applications.html" title="iPhone Supports 3rd party apps">an official Apple press release</a>: that says the same thing. Apple even set up <a href="http://www.apple.com/webapps/" title="Apple's Web Apps Directory">a directory</a> specifically to point to those web apps.</p>
<p>But the devs in Apple&#8217;s customer base clamored for the ability to write native apps, so Apple shipped an SDK, and created the AppStore to distribute those apps. No, not out of the goodness of their hearts. Of course they knew they would make money off it.</p>
<p>But note the chronology, here. Apple intended, even encouraged, devs to write web apps that could be hosted on their (the devs&#8217;) servers, uncontrolled by Apple. In short, Apple was pushing open web access on Day One of the iPhone launch. And, so far as I can tell, has never backed off that.</p>
<p>So go ahead and build web apps. It&#8217;s fun, the technology is open to all, you can build and ship what you like and keep all the money for yourself, if you wish. Just don&#8217;t say you&#8217;re &#8220;circumventing Apple&#8217;s iron control&#8221; when you do it. Have the integrity to say you&#8217;re taking Steve Jobs advice for how to develop for the iPhone, because that&#8217;s <em>really</em> what you&#8217;re doing.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2011/10/12/lemme-get-this-straight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just Not Git-ing It</title>
		<link>http://www.theodicius.net/archives/2010/09/15/just-not-git-ing-it/</link>
		<comments>http://www.theodicius.net/archives/2010/09/15/just-not-git-ing-it/#comments</comments>
		<pubDate>Wed, 15 Sep 2010 05:00:39 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=414</guid>
		<description><![CDATA[Phil Taylor recently tried to get up close and personal with git. He ran into difficulties, in no small part because he treated git like subversion, which it decidedly isn&#8217;t. So in the interests of helping out anyone else out there with the same idea, that of wanting to try out something new in hopes [...]]]></description>
			<content:encoded><![CDATA[<p>Phil Taylor <a href="http://www.phil-taylor.com/2010/09/13/installing-git-on-a-cpanel-based-linux-server/">recently tried</a> to get up close and personal with git. He ran into difficulties, in no small part because he treated git like subversion, which it decidedly isn&#8217;t.</p>
<p>So in the interests of helping out anyone else out there with the same idea, that of wanting to try out something new in hopes of finding something better, here&#8217;s a quick-and-dirty glimpse at the way I use git around here.<br />
<span id="more-414"></span></p>
<h3>Git isn&#8217;t SVN</h3>
<p>The first thing to remember is that git isn&#8217;t svn. It&#8217;s not server-based. It&#8217;s a distributed code management system, meaning there could be potentially hundreds of repositories involved. You can use it just like svn, and have a single repository on a single server, but that would be like buying a minivan to drive two people around town. Of course, I have a repository on my server (and I honestly question the wisdom of anyone who doesn&#8217;t) but that&#8217;s only one repository, and it isn&#8217;t the first one I create.</p>
<p>I start out by creating the repository in my project directory on my development machine:<br />
<code><br />
git init<br />
git add .<br />
</code></p>
<p>Those two lines of code initialize an empty repository and then add every file in my current directory to the repository. The second line might instead be broken into several lines, if I didn&#8217;t want to add every file, but this is the quickest. (If there arejust a few files you want to leave out of the repository, you&#8217;ll want to check out how <a href="http://book.git-scm.com/4_ignoring_files.html">&#8220;git ignore&#8221;</a> works.)</p>
<h3>What About The Server?</h3>
<p>Well, that&#8217;s all fine and good for your local development, but what about shared development? Don&#8217;t you need a server for that?</p>
<p>Yes, but you don&#8217;t need git on the server. After all, a git repository is simply files. All you really need is ssh access to the server.<br />
<code><br />
ssh user@server.com<br />
mkdir projectname.git<br />
cd projectname.git<br />
git init<br />
</code><br />
The first line above gets you into the server, the second line creates the directory you&#8217;ll be using for your remote repository. The final two lines above create the empty repository. After those, you can log out and return back to your local machine.</p>
<p>You send your changes from your local repository to your remote one by using the &#8220;git push&#8221; command. But first you&#8217;ll need to tell git where the remote repository is:<br />
<code><br />
git remote add origin user@server.com:projectname.git<br />
</code><br />
This line creates a reference to a remote repository and calls it &#8220;origin&#8221; (it&#8217;s a longstanding custom that the main remote repository be called origin, but it&#8217;s not a necessity). It points &#8220;origin&#8221; at the remote repository we set up earlier.</p>
<p><code><br />
git push origin master<br />
</code><br />
This line pushes the changes in the local repository up to the remote one identified as origin.</p>
<p>Now you can continue to develop on your local machine, committing changes to your local repository, and once you&#8217;re finished, you can push all (or just some of) the changes up to the server.</p>
<p>(And yes, the obvious &#8220;git pull&#8221; would be how you bring changes pushed to the server by other members of the team down to your local repository.)</p>
<p><a href="http://www.kernel.org/pub/software/scm/git/docs/everyday.html">A quick sheet of &#8220;normal&#8221; git commands.</a></p>
<p><a href="http://www.kernel.org/pub/software/scm/git/docs/user-manual.html">Git User&#8217;s Manual</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2010/09/15/just-not-git-ing-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Generational Change</title>
		<link>http://www.theodicius.net/archives/2010/07/14/generational-change/</link>
		<comments>http://www.theodicius.net/archives/2010/07/14/generational-change/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 16:31:40 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=396</guid>
		<description><![CDATA[Come gather &#8217;round people wherever you roam And admit that the waters around you have grown And accept it that soon you&#8217;ll be drenched to the bone. If your time to you is worth savin&#8217; Then you better start swimmin&#8217; or you&#8217;ll sink like a stone For the times they are a-changin&#8217;. It always happens. [...]]]></description>
			<content:encoded><![CDATA[<blockquote><p>Come gather &#8217;round people wherever you roam<br />
And admit that the waters around you have grown<br />
And accept it that soon you&#8217;ll be drenched to the bone.<br />
If your time to you is worth savin&#8217;<br />
Then you better start swimmin&#8217; or you&#8217;ll sink like a stone<br />
For the times they are a-changin&#8217;.
</p></blockquote>
<p>It always happens. Something comes along and catches on with the new kids, while the old fogeys pooh-pooh it as nothing special. Change comes, and only the agile survive. The gesture-based interface made popular on the iPhones and iPads is the change this time around.<br />
<span id="more-396"></span><br />
I&#8217;m not going to insist the specific iOS gesture interface will be the final winner, but I am going to insist that <strong>a</strong> gesture-based interface will be. If you don&#8217;t believe me, hand a gesture-based device to a child and see how quickly they figure it out. <em>Any</em> interface that can be picked up that quickly by a bright toddler is <em>going</em> to succeed, no matter what you or I think about it, and no matter how hard you fight against it.</p>
<p>And if we (web designers and developers) want our work to stay relevant as time marches on, we have to  listen to Dylan. We had better start swimming or we&#8217;ll sink like a stone. Or like a WordStar. We need to stop thinking in terms of specific interface actions, and shift into more portable semantic abstractions.</p>
<h3>Stop Hovering Around and Get Semantic On It</h3>
<p>Stop thinking in terms of &#8220;hover.&#8221; There is <em>no cursor</em> in a gesture-based interface, so hover-based actions no longer make sense. Apples&#8217; iOS turns that event into &#8220;touch and hold&#8221;, but future interfaces may even dispense with touch, so don&#8217;t count on that being the replacement as the gesture-based interfaces mature.</p>
<p>That&#8217;s right. The gestures aren&#8217;t completely worked out, yet. Apple has a leg up on defining them, but first doesn&#8217;t equal winner in this game. If things are going to keep changing, how can we cope today?</p>
<p>We can come out of our denial, first of all. Remember when the mouse was sneered at? Remember when the WordStar folks claimed &#8220;the mouse is the ideal computer interface &mdash; for those with three hands&#8221;? I&#8217;ll bet you don&#8217;t even remember WordStar, do you?</p>
<p>And that&#8217;s my point. We need to change our thinking, now, or we&#8217;ll be tomorrow&#8217;s WordStar.</p>
<p>Instead of thinking about cursors and pointers, about specific interface actions like &#8220;hover&#8221; and &#8220;mouseout&#8221;, think instead of semantics. For example, what we think of as a hover action today (touch and hold in iOS) is really a &#8220;more info&#8221; action. When you design, define it that way: &#8220;triggering MoreInfo on this link will show a further set of menu selections&#8221; or &#8220;triggering MoreInfo on this term will bring up a definition of it.&#8221;</p>
<p>Don&#8217;t stop with hover. Continue this process for every action. When you write your scripts, don&#8217;t name the objects after specifics like &#8220;hover&#8221; or &#8220;tap&#8221; or even &#8220;rollover&#8221;. Name the objects after the response, such as &#8220;MoreInfo&#8221; and then apply that object to every UI element that triggers it.</p>
<p>Not only that, use those terms in your presentations. Speaking to clients in terms of &#8220;action/response&#8221; can help keep you from getting bogged down in implementation minutia during the presentation (&#8220;Should that be left-click always? Shouldn&#8217;t it be right-click for left-handed people? What if there are 1/3/9 buttons on the mouse?&#8221;). You&#8217;ll keep your meetings on track, and have more time to build.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2010/07/14/generational-change/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Customizing Safari Reader</title>
		<link>http://www.theodicius.net/archives/2010/06/10/customizing-safari-reader/</link>
		<comments>http://www.theodicius.net/archives/2010/06/10/customizing-safari-reader/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 16:14:33 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=389</guid>
		<description><![CDATA[OK, so the new Safari (version 5) is out, and it includes a &#8220;reader&#8221; feature that&#8217;s been taking some heat. The complaints are justified &#8212; what it does to links is insufficient for some vision-impaired users, and justified text looks horrible without good hypenation, which Safari doesn&#8217;t do, just to name the two most obvious. [...]]]></description>
			<content:encoded><![CDATA[<p>OK, so the new Safari (version 5) is out, and <a href="http://www.apple.com/safari/whats-new.html#reader">it includes a &#8220;reader&#8221; feature</a> that&#8217;s been <a href="http://www.flickr.com/photos/fraying/4681109486/">taking some heat</a>.</p>
<p>The complaints are justified &#8212; what it does to links is insufficient for some vision-impaired users, and justified text looks horrible without good hypenation, which Safari doesn&#8217;t do, just to name the two most obvious.</p>
<p>But that can be fixed.<br />
<span id="more-389"></span><br />
The proper way to adjust Safari&#8217;s defaults is through a custom user style sheet. But that doesn&#8217;t work here, because Safari doesn&#8217;t load the user style sheet when the Reader is engaged. Hopefully Apple will fix this bug (and yes, it should be considered a bug) in the near future.</p>
<p>But that doesn&#8217;t mean you have to wait until they do in order to change the reader style defaults. It just means you have to go a little deeper to do it.</p>
<ol>
<li>Open your <strong>Applications</strong> folder</li>
<li>Right- (or control-) click on Safari</li>
<li>Select &#8220;Show Package Contents&#8221; from the contextual menu</li>
<li>Open the &#8220;Contents&#8221; folder</li>
<li>Open the &#8220;Resources&#8221; folder</li>
</ol>
<p>There you will find the file &#8220;Reader.html,&#8221; which is the template for displaying pages in Safari Reader. In order to change it, you will need to open it in your usual text editor. (Neither Pages nor TextEdit are up to doing this. I used BBEdit to change mine, but Text Wrangler, Textmate, or Coda should be up to the challenge as well. You may be warned about the ownership of the file when you make changes to it.) All of the styles you want to change will be inside the style block with the ID &#8220;article-content.&#8221; For example:<br />
<code><br />
        .page a {<br />
            text-decoration: none;<br />
            color: rgb(32, 0, 127);<br />
        }<br />
</code></p>
<p>is the code block that sets the colors and removes the underline from the links, and<br />
<code><br />
        .page {<br />
            font: 20px Palatino, Georgia, Times, "Times New Roman", serif;<br />
            line-height: 160%;<br />
            text-align: justify;<br />
        }<br />
</code></p>
<p>is where it sets the text to be justified, instead of ragged-right.</p>
<p>If you want the links underlined, change &#8220;text-decoration: none&#8221; to &#8220;text-decoration: underline&#8221; and if you want ragged-right paragraphs, change &#8220;text-align: justify&#8221; to &#8220;text-align: left&#8221; and save the file (the system will prompt you for the password when you save the file). Your Reader will now pick up your new settings.</p>
<p>The usual warnings apply to making this sort of change. It&#8217;s best to save an unchanged copy of Reader.html to fall back to, and any changes you make may be erased by a future update to Safari, so you might want to store a copy of the changed file in your documents folder, as well. But, hopefully, the next time Apple updates Safari it will fix the bug that prevents user style sheets from being applied to Reader. If/When that happens, I&#8217;ll follow up with instructions for creating a sheet to do that, as well.</p>
<p>(Edited 6/14 to correct &#8220;left/right&#8221; typo. Mea Culpa. Meus bardus.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2010/06/10/customizing-safari-reader/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Frameworks over CMS&#8217;s</title>
		<link>http://www.theodicius.net/archives/2010/02/25/frameworks-over-cmss/</link>
		<comments>http://www.theodicius.net/archives/2010/02/25/frameworks-over-cmss/#comments</comments>
		<pubDate>Thu, 25 Feb 2010 17:34:04 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=378</guid>
		<description><![CDATA[I gave a presentation recently at Web414 that promoted the idea that frameworks were the future of web development. The presentation didn&#8217;t go well (It started its slide downhill when I realized too late there would be no way to show my slides. I switched to a more interactive, discussion-oriented presentation, which of course I [...]]]></description>
			<content:encoded><![CDATA[<p>I gave a presentation recently at Web414 that promoted the idea that frameworks were the future of web development. The presentation didn&#8217;t go well (It started its slide downhill when I realized too late there would be no way to show my slides. I switched to a more interactive, discussion-oriented presentation, which of course I hadn&#8217;t properly prepared for, which in turn only contributed to a further slide.) Still, it served to clarify a little more my thinking on the subject. (Half the reason to make presentations at your local user&#8217;s group is to help you view a subject from a different perspective; think of them as &#8220;code reviews for your mind.&#8221;)</p>
<p>The fundamental point I was making, that the future of web development lies with web application frameworks and not in traditional CMS&#8217;s, relies on two rather finely drawn (I cheerfully admit) lines.</p>
<p><span id="more-378"></span>The first is on the difference between implementing a CMS and developing for the web. To implement a CMS you typically need specialized knowledge and skill concerning which modules to employ to achieve the aim. The user group got hung up on this distinction, I suspect because many of the CMS implementors thought I was denigrating what they do. I wasn&#8217;t. I was simply saying that particular skill set is different from a developer&#8217;s skill set. It&#8217;s the difference between a production designer and a graphic artist &#8212; the graphic artist creates the images the production designer uses. The one who implements the CMS (I&#8217;ll call that particular skill set &#8220;systems integrator,&#8221; for lack of a better term) has a specialized knowledge that comes into play as the modules are assembled to make a web site. The developer&#8217;s skill set creates the modules the systems integrator selects from. In the world of the CMS, both skill sets are required, and they are generally found in different people.</p>
<p>The second line is between a traditional CMS and a framework. This line is becoming even finer, as more CMS&#8217;s (such as <a href="http://radiantcms.org/">Radiant</a> or <a href="http://expressionengine.com/">Expression Engine</a>) are developed that rest upon published frameworks (such as <a href="http://codeigniter.com/">CodeIgniter</a> or <a href="http://rubyonrails.org/">Rails</a>). For my purposes, I&#8217;ll define the CMS as a collection of software modules that require no (or minimal) coding in anything other than the standard languages of the web (HTML and CSS) to implement. WordPress, for example, requires little or no knowledge of PHP (the language it&#8217;s written in) in order to be installed and used.</p>
<p>I received a lot of push-back when drawing the first line; it seemed to me a lot of the noise was being generated by the implicit assumption that I was saying the systems integrator skill set was somehow inferior to the developer skill set. This isn&#8217;t the case at all.</p>
<p>What I <em>was</em> saying was that the systems integrator skill set wasn&#8217;t interesting to the developer. This isn&#8217;t saying it&#8217;s inferior; I could say the same thing about the developer skill set not being interesting to the integrator. It&#8217;s not interesting, because at root it&#8217;s not relevant to what they do best. Just as excellent graphic artists can make bad production designers, excellent developers can make bad integrators, and vice versa.</p>
<p>These days it&#8217;s possible to put together a CMS that adequately meets 80% of most customer&#8217;s business needs from a free or low-cost CMS, using off-the-shelf modules. If a developer plans on making more than a subsistence living in that market, it can only be by giving up or seriously limiting the amount of time spent doing what a developer does best (if satisfactory extensions are free, there&#8217;s not a good economic case for getting paid to write them from scratch) and instead turning into a systems integrator. Some developers can do this, some can&#8217;t, but even those who <em>can</em> do this only succeed by, in effect, ceasing to be a developer.</p>
<p>Therefore the developer has to step out in a different direction. One possibility is to build completely custom coded websites, while another is to develop and sell modules for the systems integrators to use.</p>
<p>If a developer chooses to go the custom-code route, a framework will provide a solid foundation to build off of. Frameworks provide stub code and basic functionality which can easily be extended to cover the precise needs of the site at hand, without incurring the burden of unnecessary code.  Built-in or otherwise available framework modules to handle user authentication, for example, form the basis for a more complete user profile system, only requiring the custom features of the user profile required by the community site under development to be written by the developer. The framework does the heavy lifting, while the developer supplies the chrome and the custom business logic, tailored to 100%  of the site owner&#8217;s needs. Instead of off-the-rack, the result is a custom-tailored fit.</p>
<p>This road isn&#8217;t easy. Off-the-rack suits fit most bodies reasonably well, so the potential market is smaller. But at the same time it&#8217;s more lucrative, so the two balance. And with a good framework, a creative and knowledgeable developer can provide enough of a value add to make the time and cost more than worth it to the customer. If the &#8220;standard&#8221; CMS yields 80% of the goal, a good framework under it can often make the other 20% easier to reach.</p>
<p>If the developer chooses to build and sell CMS modules or extensions, the market is tighter. There will be a lot of competition from low- (or no-) cost alternatives exerting downward pressure on the market, still it&#8217;s possible for a developer to make a living there. But in taking that route, the developer <em>still</em> is using a framework. In this case, the internals of the CMS itself form the framework that is used to build the extension. Sometimes that&#8217;s explicitly designated as a framework, as with Expression Engine or Joomla, and sometimes it&#8217;s just a published API, as with WordPress or Drupal. But whether it&#8217;s officially named that or not, it&#8217;s still a framework.</p>
<p>So what&#8217;s the &#8220;action list&#8221; for you as a developer? </p>
<ul>
<li><strong>Look at the framework first.</strong> Don&#8217;t (please, just &#8230; don&#8217;t) write your own framework from scratch. There are plenty of Open Source ones out there to contribute to; find one you can live with and while you&#8217;re learning it, fix some bugs and add some features to make it better. It&#8217;ll be easier to add the features you want to an existing framework than write an entire framework from scratch around those features.</li>
<li><strong>What CMS choices are built on it?</strong> This will feed into the next decision you make. If there are some good CMS choices on the framework, it will make it easier for you to write extensions for others to use, expanding your reach and your market. And, hopefully, your bank account. (Yes, money isn&#8217;t everything but the lack of it makes it hard to buy new hardware.)</li>
<li><strong>Decide &#8212; Custom Code or CMS extensions.</strong> Make this decision on top of the best framework you can find. The framework itself will provide some of the tools you&#8217;ll be using to build the modules, after all, and no one likes working with inferior tools.</li>
</ul>
<p>There&#8217;s you road map. Start your journey.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2010/02/25/frameworks-over-cmss/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bad Behavior and Arrogance</title>
		<link>http://www.theodicius.net/archives/2010/02/21/bad-behavior-and-arrogance/</link>
		<comments>http://www.theodicius.net/archives/2010/02/21/bad-behavior-and-arrogance/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 00:29:33 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=370</guid>
		<description><![CDATA[How far can you reach when someone&#8217;s behavior becomes offensive? Is guilt by association ever permissable? Robert Vining, newly minted chief spokesman and admin for All Together As A Whole is finding that out, right now. He writes about it in this blog post. I&#8217;ve been there, Robert. You made the right choice. In a [...]]]></description>
			<content:encoded><![CDATA[<p>How far can you reach when someone&#8217;s behavior becomes offensive? Is guilt by association ever permissable?</p>
<p>Robert Vining, newly minted chief spokesman and admin for <a href="http://www.alltogetherasawhole.org/">All Together As A Whole</a> is finding that out, right now. He writes about it in <a href="http://www.joomstew.com/10-minutes-truth/pirate-ship">this blog post</a>.</p>
<p>I&#8217;ve been there, Robert. You made the right choice.</p>
<p>In a nutshell, he was told he was going to be removed from helping with the joomla.org forums unless, now that he&#8217;s in charge, he bans an individual from an unaffiliated website. (It says &#8220;independent&#8221; in the tagline, in case you&#8217;re easily confused.)<br />
<span id="more-370"></span><br />
Now let&#8217;s note that this person was banned from joomla.org, and from all appearances the banning was certainly with cause. But note also this individual has not given cause to be banned from the site Robert administers. And <em>that&#8217;s</em> the crux of this.</p>
<p>Let me speak to this from direct experience. I used to organize chess tournaments; my events were among the strongest held in my state every year. And more than once I had to listen to players from a neighboring state expressing &#8220;sympathy&#8221; for me for having to put up with another player from their state. And every time one of these &#8220;helpful&#8221; people said that, I responded that the person in question is better behaved in my events than most other players, including themselves. I don&#8217;t know what their issue was, and I don&#8217;t care. I just know that when he was in <em>my</em> house he behaved himself well, and I wasn&#8217;t going to let them litter <em>my</em> yard with <em>their</em> garbage.</p>
<p>I loaned money to a player once, and was instantly told (by my partner, no less) that I was making a mistake, and I&#8217;d never see the money again. And the next day, before play began, I got my money back.</p>
<p>This is the lesson I learned long ago, from direct experience. Behavior in one location, among one set of people, under one set of conditions, does not dictate forever behavior in other locations, among other people, under other conditions. And to assert otherwise is dangerously stupid.</p>
<p>I&#8217;m leaving names other than Robert&#8217;s out of this for a reason. The point here is one of principle, and is not in any way personal. Let me say that I would certainly have voted in favor of the original ban, had I had a vote, so in no sense is this aimed at criticizing the original ban, nor should it be seen as excusing or condoning the behavior that caused the ban. Let the joomla.org ban stand unchallenged, by all means. It is instead aimed at the presumption behind further opinions expressed during discussion of this by two members of the project leadership that this person should not be allowed the chance to prove he has changed and that he can participate somewhere else without giving offense. In effect, they assert he should never be forgiven.</p>
<p>I find that attitude dangerously arrogant, and deeply offensive. Almost as offensive, in fact, as the original conduct. People <em>can</em> change. I have first-hand knowledge that people <em>can</em> learn how to behave themselves. Not only have I seen it around me, I&#8217;ve seen it in myself.</p>
<p>We all know that we can blow it for ourselves by our own conduct. That&#8217;s how it should be. But how comfortable can we be around people  knowing they&#8217;ll turn on us, and turn us out, when our only offense is to have the grace to give someone whose only transgression is words a second chance?</p>
<p>I honestly don&#8217;t know. And that worries me.</p>
<p>(Full Disclosure: I edited this post after it was published. I broke what was paragraph #3 into what is currently paragraphs #3 and #4, to make it more readable.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2010/02/21/bad-behavior-and-arrogance/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Lies and Marketing</title>
		<link>http://www.theodicius.net/archives/2010/01/30/lies-and-marketing/</link>
		<comments>http://www.theodicius.net/archives/2010/01/30/lies-and-marketing/#comments</comments>
		<pubDate>Sun, 31 Jan 2010 04:57:39 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=364</guid>
		<description><![CDATA[Lee Brimelow made this wonderful post ridiculing the iPad&#8217;s lack of flash. Only one problem with it. It&#8217;s a lie. And that&#8217;s a problem. Apparently, he made those wonderful claims of his without ever once checking the reality of them. Most of those sites that supposedly don&#8217;t show anything, actually do. As this set of [...]]]></description>
			<content:encoded><![CDATA[<p>Lee Brimelow made <a href="http://theflashblog.com/?p=1703">this wonderful post</a> ridiculing the iPad&#8217;s lack of flash. Only one problem with it.</p>
<p>It&#8217;s a lie.</p>
<p>And that&#8217;s a problem. Apparently, he made those wonderful claims of his without ever once checking the reality of them. Most of those sites that supposedly don&#8217;t show anything, actually do. As <a href="http://www.flickr.com/photos/kigiphoto/4314276957/">this set of screen captures</a> shows.<br />
<span id="more-364"></span><br />
Which means he wasn&#8217;t interested in truth at all, nor even in the experience of web users, as he claims. All he wanted to do was complain because that Big Meanie over at One Infinite Loop in Cupertino didn&#8217;t want to let him bring his own toys to the iPad and iPhone party. Boo hoo.</p>
<p>Let&#8217;s get something straight right up front. I ain&#8217;t no fanboy. I don&#8217;t own an iPhone, nor will I be queueing up on day one to get an iPad. I&#8217;ve been an Adobe customer for as long as I&#8217;ve been an Apple customer, since Photoshop version 2.x. I even stayed an Adobe customer after they deliberately killed the best illustration program I&#8217;ve ever used (Freehand &#8212; after two earlier failed attempts they finally managed, not to beat it in the marketplace, but rather they kept buying companies in a repeated attempt to get it off the market). I&#8217;ll admit to a point of view, here. I&#8217;m amused by the flash fanboys who can&#8217;t seem to realize their own playground is just as proprietary, just as limited and controlled, as Apple&#8217;s.</p>
<p>Yes, it&#8217;s amusing to watch Adobe, from their closed proprietary yard, cry foul at Apple&#8217;s closed proprietary yard (pot, meet kettle) but that&#8217;s about it. The world, and the web, will do fine, with or without Flash. Right now, there are far more examples of bad Flash use than bad HTML5 Video use, but I&#8217;m sure that will level out eventually &#8212; flash developers have certainly not cornered the market on ineptitude. It only seems that way, sometimes.</p>
<p>Professionals know the iPad is just another device we have to deal with, just like we know Flash is just another tool in the box, and no tool is the right choice for every device, and probably never will be. So we plow around the rocks in the field that we can&#8217;t lift. For simple video, the solution is fairly obvious: do your video in H.264, because that will give you the widest access to your customers. As John Nack pointed out in <a href="http://blogs.adobe.com/jnack/2010/01/sympathy_for_the_devil.html">a post on a more official site</a> Flash will deliver H.264 as well as native flash format. So you do the video in H.264, and use Flash as the ancillary system to deliver the H.264 to the clients that can&#8217;t see it natively. Problem solved, the same way we&#8217;ve been working around IE&#8217;s limitations for years (thanks for the practice, MS).</p>
<p>John raises other issues about why Flash is such a hog on OSX, and while they may or may not be true (I admit I don&#8217;t know) I really can&#8217;t see why I, as a professional web builder, should care. It is what it is, and I have to deal with it the way it is, not the way John Nock or Steve Jobs, or anyone else, for that matter, wants it to be. And the way it is, the performance of Flash on OSX is sub-par. That&#8217;s reality, and it&#8217;d be far more productive to fix that than stand around pointing fingers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2010/01/30/lies-and-marketing/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

