<?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</title>
	<atom:link href="http://www.theodicius.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theodicius.net</link>
	<description>Good. Evil. Bratwurst.</description>
	<lastBuildDate>Wed, 14 Jul 2010 16:31:40 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<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. Something comes along and catches on [...]]]></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.
But that [...]]]></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>Missing the Point</title>
		<link>http://www.theodicius.net/archives/2010/05/09/missing-the-point/</link>
		<comments>http://www.theodicius.net/archives/2010/05/09/missing-the-point/#comments</comments>
		<pubDate>Sun, 09 May 2010 05:10:29 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=383</guid>
		<description><![CDATA[Giorgio Sironi writes about (among other things)his first experience with Rails over at Web Builder Zone:
class Post &#60; ActiveRecord::Baseend
Oh thanks, now I&#8217;m enlightened. No fields, no scope, no getters or setters. What is going on here? Where is the business logic?

It&#8217;s a common enough reaction from Rails newcomers, but it completely misses the point.

There are [...]]]></description>
			<content:encoded><![CDATA[<p>Giorgio Sironi writes about (among other things)<a href="http://css.dzone.com/articles/php-and-ruby-rails">his first experience with Rails</a> over at Web Builder Zone:</p>
<blockquote><p><code>class Post &lt; ActiveRecord::Base<br />end</code></p>
<p>Oh thanks, now I&#8217;m enlightened. No fields, no scope, no getters or setters. What is going on here? Where is the business logic?</p>
</blockquote>
<p>It&#8217;s a common enough reaction from Rails newcomers, but it completely misses the point.</p>
<p><span id="more-383"></span></p>
<p>There are no fields, etc., shown because they are all supplied by Rails by default. <em>You don&#8217;t need to write them, and their operation is so obvious you don&#8217;t need to see the code for them.</em> There&#8217;s no business logic because as yet he hasn&#8217;t supplied any; any attempt by the system to automatically create some at this point is doomed to fail because of insufficient information.</p>
<p>You want to see the database fields you&#8217;ve created, check the schema.rb file&mdash;that&#8217;s where you&#8217;ll find them. You want your code to access them? Post.fieldname does that; set the value by assigning to it, get the value by reading from it.</p>
<p>To be sure, the context of the article is not supposed to be explaining either Ruby or Rails, but rather what the next generation of PHP frameworks have learned, either from Rails or from their own past. But when he extols the development in Doctrine 2 that allows you to override the default getters and setters with entries in a class file located in a special location in the hierarchy, he doesn&#8217;t appear to realize that the Ruby file he was just complaining about being empty performs that same exact function. (Instead, he implies that you can&#8217;t do it at all in ActiveRecord, which is patently untrue.)</p>
<p>To override the default getter for the field &#8220;date&#8221;, for example, you would create a method for date in the existing file (why you&#8217;d want to override the default getter for a database field, is another question). Or to create a new field based on it, let&#8217;s use &#8220;creation_year&#8221; for an extremely simple example, you would create a method entitled &#8220;creation_year&#8221; which would take the date created and pull out just the year. In like manner, to create a custom setter for a field such as, say, &#8220;permalink&#8221; (to keep with his blog example) you would create a method entitled &#8220;=permallink&#8221;&mdash;Ruby-ese for creating a setter&mdash; and inside that method place the business logic for creating a permalink.</p>
<p>I suspect the source of this error is he expected Ruby to work like PHP. It doesn&#8217;t, but often it takes a while for newcomers to the language to understand that. Ruby may bear a superficial resemblance to it on the surface, but trust me; it&#8217;s horse of a completely different color. It might even be a zebra.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2010/05/09/missing-the-point/feed/</wfw:commentRss>
		<slash:comments>0</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 nutshell, he was [...]]]></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 screen captures [...]]]></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>
		<item>
		<title>Why don&#8217;t they test?</title>
		<link>http://www.theodicius.net/archives/2010/01/13/why-dont-they-test/</link>
		<comments>http://www.theodicius.net/archives/2010/01/13/why-dont-they-test/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 17:32:17 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Lean]]></category>
		<category><![CDATA[Testing]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=358</guid>
		<description><![CDATA[I&#8217;ve heard from some more developers on the subject of testing, who claim they aren&#8217;t allowed to do unit testing because there isn&#8217;t time. I&#8217;m not blaming the developers here, but their management for being just plain stupid. An elementary analysis of the question proves just how wrongheaded they are.
The first question to ask is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve heard from some more developers on the subject of testing, who claim they aren&#8217;t allowed to do unit testing because there isn&#8217;t time. I&#8217;m not blaming the developers here, but their management for being just plain stupid. An elementary analysis of the question proves just how wrongheaded they are.</p>
<p>The first question to ask is do they test the software at all before they supply it to the customer. It&#8217;s possible they don&#8217;t, in which case they have a point that testing will take more time, and my only advice, to both the developers there and to their customers, is &#8220;Run Away!&#8221; It&#8217;s irresponsible and unprofessional to make people pay for untested software.<br />
<span id="more-358"></span><br />
Let&#8217;s assume they actually <em>do</em> test the software before releasing it to the customer. So, now we have the question of &#8220;When?&#8221; Most likely, they&#8217;re waiting until the end of the development process. Which means that if a bug is detected at that point, not only is there a lot of code to sift through to find it, there is also the very real risk that other code has been built upon the original buggy code and it may have to be reworked as well as just the buggy code itself. Making the cost in time required to both find and fix the bug much higher than it would have been if the bug were caught earlier.</p>
<p>Obviously, then, the earlier in the process the bug is detected, the easier and cheaper it will be to fix it. One way to detect it earlier is to move testing farther up in the process by breaking the testing up into stages, and testing what&#8217;s been developed in that particular stage. Then you catch the bugs earlier, making it cheaper to find and fix them. But if you do that, you&#8217;ll still need to retest everything from the previous stage, to be sure you haven&#8217;t broken something along the way.</p>
<p>It&#8217;s cheap-<em>er</em> but not cheap-<em>est</em>. The logical extreme of this approach will be to test all code immediately after writing it. But there&#8217;s still a cheaper way to do it.</p>
<p>Let&#8217;s take a step back from the word &#8220;testing&#8221; and consider the entire development process. Before writing any piece of code, the developer must first know what the code is expected to do. (The idea of starting to write and just going where the code takes you, like fiction writers do, just doesn&#8217;t scale.) This idea is captured in the documentation somewhere (the precise where and format is procedure-dependent) and then the developer starts to write the code. And, at some later point, tests are devised to make sure the code does what it is supposed to do.</p>
<p>This means documentation of what the code will do is written, then it and/or the code itself is later studied to derive tests to be performed on it. What if we combined those steps into one? We&#8217;ll think about what this particular piece of code to be developed will be doing, and instead of writing it out in english or pseudo-code or whatever, we document it by writing a test that says when this input is received, this output should be produced. It will take less time, because the same person that writes the spec will write the test, so no time is spent transferring the knowledge from one to the other.</p>
<p>But we can find a better way even than that to speed the process: if the developer who will write the code writes the tests, it will help fix in the developer&#8217;s mind a clear image of exactly what the code should be expected to do, making the coding itself take less time. (A good developer will consider the problem and the edge cases anyway, all we&#8217;re doing is writing them down in the form of the test.) And, while doing the actual coding, if there are determined to be better ways to handle the task than the one originally chosen, adding new tests or editing existing ones will perform the same clarifying function for this new direction. What&#8217;s more, if the tests are used as the documentation of the expected function of the code, the documentation will always be current, instead of having to be updated at a later point (or worse, left to &#8220;rot&#8221;).</p>
<p>Tests only take a few seconds to run. (One major project I&#8217;ve been involved with has over 2000 tests written so far, and the entire suite takes a little over a minute to run, testing several thousand lines of code. Any one segment of the testing is done in a mere handful of seconds.) If the tests are written first, and done right, the developer can have confidence that the task is complete, because the tests say so.</p>
<p>There&#8217;s a little startup cost, in terms of time, when you first begin this approach, because it will take a little time to get up to speed on writing tests, but it won&#8217;t take long. Good developers see &#8220;edge cases&#8221; for their code rapidly, so test cases will not be difficult to come up with at the start, and will take less time with every cycle. Developing the ability to find these cases quickly and easily through this practice will only make for a better developer. There really is no downside to this practice.</p>
<p>We&#8217;ve seen writing tests before coding leads to finding bugs faster, fixing them more cheaply, developing finished code faster, and I&#8217;m not done, yet.</p>
<p>How many times have developers &#8220;fixed&#8221; a bit of code, only to break the code somewhere else? (Come on, be honest, we&#8217;ve all done that a few times.) Or added a new feature that breaks an older one? Rerunning the entire test suite on a regular basis (called &#8220;regression testing&#8221;) will catch those events quickly, again when the bugs are most easily found and fixed. This means the code resulting from this practice will be better code, as well. Setting up the entire suite to be automatically run on every check-in will precisely locate the files where the bug was introduced. No more hunting through thousands of lines in hundreds of files. Again, a speed gain, not a loss.</p>
<p>When a bug escapes detection and is found &#8220;in the wild,&#8221; the first thing to do is write a test case for that bug. Then code the fix, rerun the tests and see that not only has the bug been fixed, but no new bugs were introduced. Keeping the bug test cases around will prevent the bug from resurfacing after some later changes. Once again, higher quality code is achieved.</p>
<p>Management Summary: Far from costing you time, not only does the practice of writing tests up front ultimately speed up your development, it will also raise the overall quality of the code <em>and</em> make maintenance easier. The only possible way it won&#8217;t is if your developers are perfect, and never make mistakes. Didn&#8217;t think so.</p>
<p>Don&#8217;t have the time to write tests? Son, I&#8217;m too busy <em>not</em> to write tests.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2010/01/13/why-dont-they-test/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Some Capistrano Recipes for Radiant</title>
		<link>http://www.theodicius.net/archives/2009/09/30/some-capistrano-recipes-for-radiant/</link>
		<comments>http://www.theodicius.net/archives/2009/09/30/some-capistrano-recipes-for-radiant/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 13:45:02 +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=351</guid>
		<description><![CDATA[I&#8217;ve been dipping my toes into the Radiant CMS lately (a side-effect of my love affair with Ruby on Rails) and have run into several interesting moments. On the assumption I&#8217;m not alone in that, I thought I&#8217;d share some of my favorite recipes for deploying a Radiant app to an Apache-Phusion Passenger combination.
As I [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been dipping my toes into the <a href="http://radiantcms.org/">Radiant CMS</a> lately (a side-effect of my love affair with <a href="http://rubyonrails.org/">Ruby on Rails</a>) and have run into several interesting moments. On the assumption I&#8217;m not alone in that, I thought I&#8217;d share some of my favorite recipes for deploying a Radiant app to an Apache-<a href="http://www.modrails.com/">Phusion Passenger</a> combination.</p>
<p>As I look at my deploy.rb file I&#8217;m reminded of the old Tom Lehrer ditty, &#8220;Lobachevsky&#8221;:</p>
<blockquote><p>I am never forget the day I first meet the great Lobachevsky.<br />
In  one word he told me secret of success in mathematics:<br />
Plagiarize!</p>
<p>Plagiarize,<br />
Let no one else&#8217;s work evade your eyes,<br />
Remember why the good Lord made your eyes,<br />
So don&#8217;t shade your eyes,<br />
But plagiarize, plagiarize, plagiarize -<br />
Only be sure always to call it please &#8216;research&#8217;.</p></blockquote>
<p>So here is the result of my &#8216;research&#8217; (where I remember where I got the code from, I will also quote the source; where I don&#8217;t remember, I apologize in advance):<br />
<span id="more-351"></span></p>
<p>First, there are the Passenger-specific recipes:</p>
<p><code>  desc "Restarting mod_rails with restart.txt"<br />
  task :restart, :roles => :app, :except => { :no_release => true } do<br />
    run "touch #{current_path}/tmp/restart.txt"<br />
  end<br />
  desc "Starting mod_rails with restart.txt"<br />
  task :start, :roles => :app, :except => { :no_release => true } do<br />
    run "touch #{current_path}/tmp/restart.txt"<br />
  end</p>
<p>  desc "stop task is a no-op with mod_rails"<br />
  task :stop, :roles => :app do<br />
  end<br />
</code></p>
<p>This code block is one of those I found so long ago I&#8217;ve forgotten where I picked it up from. Passenger is usually run in &#8216;production&#8217; mode, which means the server needs to be restarted whenever a code change is mode. Rather than taking apache down, this a accomplished by &#8220;touch&#8221;-ing a file called &#8220;restart.txt&#8221; and when the server notes the change it reloads the code. This code block will do that, except when the no_release option is active (no_release after all means no changes have been made, so there&#8217;s no need to force a restart).</p>
<p>I put the same code in for &#8220;start&#8221; as for &#8220;restart&#8221;, not that it&#8217;s needed. I was just being anal about having a recipe for that; if I ever find I need that function (as opposed to restart) I&#8217;ll have to work out first of all if it&#8217;s possible even to do it in capistrano. Likewise with &#8220;stop;&#8221; the recipe is a placeholder for functionality I&#8217;ve never needed.</p>
<p>This next recipe came to me from <a href="http://blog.matt-darby.com/posts/759-capistrano-make-sure-there-is-something-to-deploy">Matt Darby</a> who in turn got it from <a href="http://blog.ninjahideout.com/">Darcy Laycock</a>:</p>
<p><code>  desc "Make sure there is something to deploy"<br />
  task :check_revision, :roles => [:web] do<br />
    unless `git rev-parse HEAD` == `git rev-parse origin/master`<br />
      puts ""<br />
      puts "  \033[1;33m**************************************************\033[0m"<br />
      puts "  \033[1;33m* WARNING: HEAD is not the same as origin/master *\033[0m"<br />
      puts "  \033[1;33m**************************************************\033[0m"<br />
      puts ""</p>
<p>      exit<br />
    end<br />
  end<br />
</code></p>
<p>(when using, preface the deploy namespace with:<br />
<code>before "deploy", "deploy:check_revision"</code><br />
so it runs before the deploy.)</p>
<p>The one qualm I have with this recipe concerns the "rev-parse" -- when I get the time and inclination I'm going to look at using "ls-remote" instead. Not sure at the moment which way is "the right way" but this works so changing it isn't high on my priority list.</p>
<p>The principle here is to stop me from wasting time. I've been working for days on some changes, and they're committed to my local repo, but somehow I forgot to push the changes up to origin, but instead I just deploy. And I sit there waiting for the deploy to finish, only to find the new version has the same bugs as the old. This recipe checks the local repo against origin and if they're not the same, drops you out of the deploy with a message that you forgot to push before deploying.</p>
<p>(I toyed with the idea of just automatically doing the push instead of the message, but decided that wouldn't be a good idea, as I might need to do something else before/after the push, and even if not, typing one extra command line didn't seem a huge penalty to pay for absent-mindedness. Feel free to disagree with me.)</p>
<p>I pulled this post-deploy recipe from the <a href="http://github.com/ehaselwanter/radiant-capistrano-extension">ehaselwanter-radiant-capistrano-extension</a>:</p>
<p><code>  after "deploy:cold", "deploy:radiant:bootstrap"<br />
  after "deploy:migrate", "deploy:radiant:migrate:extensions"<br />
  after "deploy:update" do<br />
    run "mkdir #{latest_release}/cache"<br />
    #run "cp #{latest_release}/config/database_eyecatch.yml #{latest_release}/config/database.yml"<br />
    run "chmod -R g+w #{deploy_to}"<br />
    run "[ ! -d #{shared_path}/assets ] &#038;&#038; mkdir #{shared_path}/assets; true"<br />
    run "[ ! -d #{shared_path}/galleries ] &#038;&#038; mkdir #{shared_path}/galleries; true"<br />
    run "[ ! -d #{shared_path}/uploads ] &#038;&#038; mkdir #{shared_path}/uploads; true"<br />
    run "ln -s #{shared_path}/assets #{latest_release}/public/assets"<br />
    run "ln -s #{shared_path}/galleries #{latest_release}/public/galleries"<br />
    run "ln -s #{shared_path}/uploads #{latest_release}/public/uploads"<br />
  end<br />
</code></p>
<p>I&#8217;m using a few other recipes from that file as well, but I&#8217;m not convinced about them, and am still looking to revise/replace them, so I&#8217;ll not post them here.</p>
<p>Also, I&#8217;m rather interested in taking a peek at <a href="http://tempe.st/?s=medlar">Giovanni Intini&#8217;s</a> set of recipes but the link there doesn&#8217;t seem to work.</p>
<p>I&#8217;m still looking for useful recipes, so please point me to others, especially for bootstrap and migrations, as the ones I&#8217;m using aren&#8217;t yet reliable enough to publish.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2009/09/30/some-capistrano-recipes-for-radiant/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Reactive Layout, Dealing With the Window</title>
		<link>http://www.theodicius.net/archives/2009/09/12/reactive-layout-dealing-with-the-window/</link>
		<comments>http://www.theodicius.net/archives/2009/09/12/reactive-layout-dealing-with-the-window/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 16:35:05 +0000</pubDate>
		<dc:creator>arlen</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Web Design]]></category>

		<guid isPermaLink="false">http://www.theodicius.net/?p=345</guid>
		<description><![CDATA[One of the first things our layout will have to deal with is window size. Designs too wide for the window frustrate users as they scroll left and right, but designs too narrow can also be frustrating, as they string boxes out vertically, when they would fit on screen. What to do, what to do?
Some [...]]]></description>
			<content:encoded><![CDATA[<p>One of the first things our layout will have to deal with is window size. Designs too wide for the window frustrate users as they scroll left and right, but designs too narrow can also be frustrating, as they string boxes out vertically, when they would fit on screen. What to do, what to do?</p>
<p>Some designer&#8217;s deal with this by choosing to submit to the lesser evil. The frustration of having to scroll horizontally is higher than the frustration of having to scroll vertically, so they fix the width of their design. They choose a width that will fit within the vast majority (75-80%) of their visitors&#8217; windows. What width they choose depends upon their intended audience: if they make it too narrow, the frustration of those with wider windows grows, and if they make it too wide, the number frustrated horizontal scrollers improves.</p>
<p>There&#8217;s no perfect number, so they try to balance them as best they can. So, how would someone practicing Reactive Layout approach this problem?<br />
<span id="more-345"></span></p>
<p>We would start by reviewing the principles, looking to apply them. &#8220;The web is not paper&#8221; tells us window sizes can change, but also that layout can change, as well. Unlike with paper, the web does not force us to stay with one layout, though we can if we want. &#8220;The Web is a two-way medium&#8221; gives us another hint: the user&#8217;s browser can help us by telling us what the window size is. We don&#8217;t have that information now, but we can have it for the asking, in multiple ways. &#8220;Unity is not unison&#8221; gives us another hint &mdash; maybe every browser doesn&#8217;t need to see the exact same layout to make the site work. And the Hippocratic-sounding &#8220;Do No Harm,&#8221; while it doesn&#8217;t directly help us here, it constantly reminds us that whatever we do shouldn&#8217;t break things for others.</p>
<h4>Stretching Exercises</h4>
<p>One way we can approach the problem is to make our design stretch with the window. The way to do this is to convert all horizontal measurements to percentages of the window width. For example:<br />
<code><br />
body { width: 90%; margin 10px auto; }<br />
</code><br />
This results in the body being centered in the window. If the window width is 1200px, then the body is 1080px wide, if the window width is 900px, then the body is 810px wide. The content for the page is then flowed inside this container, and the page gets longer when the window narrows. Boxes placed inside the body should also be sized as percentages to preserve their elasticity:<br />
<code><br />
#menu { width: 25%; padding: 0 2%; float: left; }<br />
#main { width: 66.5%; padding: 0 2%; float: left; }<br />
</code><br />
This would result in two boxes placed side-by-side, and they would stretch with the window. (Note the percentages add up to 99.5%, not 100%. This was intentional, though the fraction itself is arbitary. It&#8217;s necessary because of rounding errors that can happen when working in percentages. When sizing a box by percentages, remember that the final size of the box will be in whole pixels, no matter what the math works out to. If the browser rounds up, the box may become a pixel wider than you expected, and that would mean there wouldn&#8217;t be room for the second box, and the design would break. If you deliberately make your percentages add up to less than 100%, you avoid this sort of breakage.)</p>
<p>The advantage of using this method is simplicity; you have only one layout to work with and tune. But the disadvantage of this method is that it can create extremely long reading lines. And while this isn&#8217;t fatal, you can do something to limit the damage:<br />
<code><br />
#main {<br />
width: 66.5%;<br />
padding: 0 2%;<br />
float: left;<br />
column-width: 13em !important;<br />
column-gap: 1em !important;<br />
column-rule: 1px dotted black !important;<br />
-moz-column-width: 13em;<br />
-moz-column-gap: 1em;<br />
-moz-column-rule: 1px dotted black;<br />
-webkit-column-width: 13em;<br />
-webkit-column-gap: 1em;<br />
-webkit-column-rule: 1px dotted black;<br />
}<br />
</code><br />
This code takes advantage of the column-flow rules in CSS3. WebKit and Mozilla based browsers will recognize the vendor-specific rules, but as the specification gets approved, more browsers will recognize the standard-compliant rules at the front. By placing those rules before the vendor-specific ones and marking them as important, we future-proof the CSS, indicating that the standards-based interpretation should be used, when available. Not all browsers support them, but those that don&#8217;t won&#8217;t be adversely affected by these rules (&#8220;Do No Harm&#8221;). And those browsers that <strong>do</strong> support these rules will take advantage of the extra room to create more columns (&#8220;Unity is not unison&#8221;).</p>
<p>This isn&#8217;t a solution for every layout, however. Long stories will be broken into two columns, with each column possibly flowing outside of the window, causing even <em>more</em> vertical scrolling. I prefer to use this particular approach only when I&#8217;m fairly certain the text will be contained within a single window, but if you decide to use it even when there is a potential for longer stories, be kind enough to your readers to place a link at the bottom of the story&#8217;s block that will automatically take them back to the top of the story. Saves them scroll time.</p>
<h4>Follow The Script</h4>
<p>A second technique you can apply here is javascript-based. It was given the name &#8220;Switchy McLayout&#8221; by Mark van den Dobbelsteen when <a href="http://www.alistapart.com/articles/switchymclayout/">he wrote about it for A List Apart</a> and I kept the name as a nod to him when I wrote my <a href="http://github.com/Paladin/McLayout/tree/fcca9b8cf3a6c45bfb7be97466d3cfe2a1fa269a">MooTools plugin</a>.</p>
<p>Follow the links for details, but the basic idea is to read the window width with Javascript (The Web is a Two-Way Medium) and attach a class name to the body tag based on the width. That class name can be used in the CSS to change the page layout (Unity is not Unison &mdash; narrower pages use fewer columns, so the main content doesn&#8217;t get squished).</p>
<p>Not everyone has Javascript enabled, so the proper way to implement this is to select a &#8220;default&#8221; state (Do No Harm). Then we use the classes and the specificity rules to make changes in the default layout like this sample from a past layout of mine:<br />
<code><br />
#sidebar {<br />
display: block;<br />
clear: both;<br />
float: none;<br />
padding: 0 0.5em;<br />
border: none;<br />
}<br />
body.wide #sidebar {<br />
width: 23%;<br />
float: right;<br />
padding: 0 0.5em;<br />
border-left: 1px dotted #999;<br />
}<br />
</code><br />
This describes the sidebar as a block that displays where it falls in the regular flow of the document <em>unless</em> the window is wide enough to support an extra column, when the sidebar will float out to the right edge instead.</p>
<p>The advantage to this approach is that it leverages the flexibility of CSS to provide multiple layouts for the same markup (see <a href="http://www.csszengarden.com/">The CSS Zen Garden</a> for hundreds of inspiring examples of just how much flexibility there is in CSS) and uses Javascript to determine which layout should be used.</p>
<p>Of course, no advantage goes unpaid for. Visitors with Javascript disabled get your default view. Of course, if you select the default view in accordance with the principle of &#8220;Do No Harm,&#8221; that in itself won&#8217;t be an issue. But a further disadvantage is the creation of multiple layouts. Even though you can limit this effort with proper forethought, it is <em>still</em> an effort. Is the extra effort worth giving a better, friendlier design to a portion of your audience? That&#8217;s a question only you can answer. My task is to tell you <em>how</em> to use it, you have to decide for yourself <em>if</em> you&#8217;ll use it.</p>
<h4>Questioning The Media</h4>
<p>A third approach to this is using media queries. <a href="http://www.w3.org/TR/css3-mediaqueries/">Media queries</a> are a Candidate Recommendation for part of CSS3, and are supported by some browsers (as of this writing, all current versions of the Big 4 support it, I believe). How do they work?<br />
<code><br />
@media screen and (min-width: 800px){<br />
  #sidebar {<br />
    width: 23%;<br />
    float: right;<br />
    padding: 0 0.5em;<br />
    border-left: 1px dotted #999;<br />
   }<br />
}<br />
</code><br />
The style block above sets out style selectors and rules to be applied if the window is less than or equal to 800px. It basically does the same thing as the previous javascript example would do, if the threshold for the &#8220;wide&#8221; class was 800px.</p>
<p>The advantage of this technique is that it works even when Javascript is turned off. The disadvantage is that users of less-than-current browsers won&#8217;t see any styles inside the media queries. The odds are great that, for today at least, you&#8217;ll reach more visitors with Javascript than with media queries. But time is on the side of media queries, because while people who surf with Javascript turned off will probably <em>always</em> do so, people <em>do</em> upgrade their browsers, so eventually more people will be served by media queries than by Javascript.</p>
<p>Once again, you&#8217;ll have to weight the effort of this against the benefit to your visitors for yourself, but even if you decide not to do it for now, I&#8217;d recommend playing around a little with <a href="http://virtuelvis.com/gallery/mediaqueries/">this code</a> to get familiar with them. You <em>will</em> (eventually) find them useful, perhaps even indispensable. For one thing, they may be the most reliable way to target cell phones and PDA&#8217;s in your audience.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2009/09/12/reactive-layout-dealing-with-the-window/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why Is Online Advertising Different?</title>
		<link>http://www.theodicius.net/archives/2009/08/10/why-is-online-advertising-different/</link>
		<comments>http://www.theodicius.net/archives/2009/08/10/why-is-online-advertising-different/#comments</comments>
		<pubDate>Mon, 10 Aug 2009 15:53:36 +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=340</guid>
		<description><![CDATA[Media Week writes about a new trend in online ads. The first question that occurs to me is: why?
The complaint is that people aren&#8217;t seeing the ads on web pages, so the proposed solution is &#8220;don&#8217;t let them see the web page until after they see the ad.&#8221; My first reaction: Your only synapse just [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mediaweek.com/mw/content_display/news/digital-downloads/broadband/e3i8a55a31083e024091f94c42ebdf231f9">Media Week</a> writes about a new trend in online ads. The first question that occurs to me is: why?</p>
<p>The complaint is that people aren&#8217;t seeing the ads on web pages, so the proposed solution is &#8220;don&#8217;t let them see the web page until after they see the ad.&#8221; My first reaction: Your only synapse just died of loneliness, didn&#8217;t it?</p>
<p>Why should you expect web ads to be different from print ads? Few if any of us consciously look at print ads, either.<br />
<span id="more-340"></span></p>
<p>That fact was brought home to me years ago. Back in a previous life, before I got seduced by web building, I was a subscriber to Information Week, and they sent a researcher to my office to test the effectiveness of their ads. It was a simple study: take this copy of the magazine, hit your two favorite sections of it, then answer some questions.</p>
<p>The questions were about ads that had been placed around the stories, and I failed. I remembered the stories, no problem. But I didn&#8217;t remember seeing a single ad on the pages I looked at. I knew there were ads there, could even tell the researcher where they were on the pages, including the two-page ad spread in the middle of one story. I just didn&#8217;t remember what the ad was about. My mind had classed it as &#8220;irrelevant&#8221; and moved on.</p>
<p>Now we have made the discovery people do the same thing on web pages, and somehow it means traditional web ads are bad, and we need a more intrusive model (intrusive is my word, not theirs, though their word &#8212; interruptive &#8212; is hardly less pejorative).</p>
<p>All this proves is they Just Don&#8217;t Get It. My visit on the web isn&#8217;t about them, it&#8217;s about me. I want some information, or a product, or a service. Drop a video ad in front of me to block me, and I&#8217;ll just move on to the next site on my search list. Do it often enough and I may just stop coming to their site at all.</p>
<p>The main purpose of advertising is to give me a good feeling about the product/service, right? Well, like most people these days, I already think I waste too much time looking for things on the web. Delay me in this quest, and just how do they suppose I&#8217;ll manage to come up with a good feeling for them?</p>
<p>The ad agency doesn&#8217;t care; they&#8217;ve already got their money, and in any case, I won&#8217;t hold it against them. But just what will be my disposition towards HP, for example, if I&#8217;m detoured from the information I&#8217;m seeking because the ad agency felt their ad was more important than my search? If I&#8217;m nice, all I&#8217;ll do is make sure their sales rep gets needlessly delayed in my waiting room for a few hours before not making a sale.</p>
<p>The arrogance of you advertisers is one of the wonders of the modern age. No, your message is *not* more important than my search for information. No, you do not have the right to interrupt my business to try and sell me something I&#8217;m not looking for at the moment. You wouldn&#8217;t think of grabbing random passersby off the street and forcing them against their will into a small room to pitch a product to them. Why do you think I&#8217;ll take to hijacking my web search and holding it for ransom any better?</p>
<p>Your excuse is &#8220;It&#8217;s like a TV commercial.&#8221; No, it&#8217;s not. It would be if what I was coming to see was a video. But you&#8217;re putting it in the Wall Street Journal, not a video site!</p>
<p>Still, if that&#8217;s what you want to do, I guess I can&#8217;t stop you. Oh, wait a minute. It&#8217;s <em>my</em> computer. <em>I</em> get to choose the sites it goes to and the software that runs on it. I give this new trend 30 days before blocker software is available that redirects the intrusive ad into nothingness.</p>
<p>See? That&#8217;s the trouble with being intrusive. With the print-style ad placement, I usually don&#8217;t see the ads, but occasionally, I&#8217;ll have a look. I&#8217;m not always single-mined about the search for information. Sometimes I&#8217;m looking for something new and different, so I&#8217;ll deliberately look at the banners or the page ads. I can do that because I have the choice.</p>
<p>That&#8217;s what clever and well placed ads get you. They get you my attention, when I&#8217;m in the mood to give it. And from that, they get you my business.</p>
<p>I suspect I&#8217;m not alone in choosing to look at ads occasionally. But take that choice away from us, and we&#8217;ll choose &#8220;never&#8221; over &#8220;always&#8221; every single time. Ok, so maybe that means we lose once in a while, when we miss something we would have looked at otherwise.</p>
<p>But you, advertiser? You&#8217;ll lose every single time. And so will you, site operator, as inescapable intrusive ads encourage us to find (or even create) other outlets.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.theodicius.net/archives/2009/08/10/why-is-online-advertising-different/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
