<?xml version="1.0" encoding="utf-8"?>
<!-- generator="wordpress/2.1.2" -->
<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/"
	>

<channel>
	<title>Professional PHP</title>
	<link>http://www.procata.com/blog</link>
	<description>PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.</description>
	<pubDate>Mon, 12 May 2008 05:04:21 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1.2</generator>
	<language>en</language>
			<item>
		<title>The Problem with Markup Languages</title>
		<link>http://www.procata.com/blog/archives/2007/03/14/the-problem-with-markup-languages/</link>
		<comments>http://www.procata.com/blog/archives/2007/03/14/the-problem-with-markup-languages/#comments</comments>
		<pubDate>Wed, 14 Mar 2007 17:30:14 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[PHP]]></category>

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

		<category><![CDATA[Software Design]]></category>
<category>html markup</category><category>input filtering</category><category>markup languages</category><category>regular expressions</category><category>security</category><category>wiki syntax</category><category>wordpress</category>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/03/14/the-problem-with-markup-languages/</guid>
		<description><![CDATA[Chris Shiflett has a post today, Allowing HTML and Preventing XSS.  The problem is how to allow users to format their contributed content without introducing security vulnerabilities.  The answer is usually some sort of markup language or filtering and sanitization of HTML.
BBCODE was designed for this purpose.  There is no actual standard, [...]]]></description>
			<content:encoded><![CDATA[<p>Chris Shiflett has a post today, <a href="http://shiflett.org/blog/2007/mar/allowing-html-and-preventing-xss">Allowing HTML and Preventing XSS</a>.  The problem is how to allow users to format their contributed content without introducing security vulnerabilities.  The answer is usually some sort of markup language or filtering and sanitization of HTML.</p>
<p>BBCODE was designed for this purpose.  There is no actual standard, but the core syntax seems fairly uniform.  It&#8217;s good for those used to forums, where it seems to norm.</p>
<p>HTML markup is nice because it is a standard, even if varying subsets are supported.  Learning a little HTML isn&#8217;t going to hurt anyone, at least for the next 20 years or so.  The problem is that HTML was never intended to be hand edited.  The syntax is not the most inviting, and different HTML-like markup languages handle whitespace differently than the HTML standard.</p>
<p>Wiki markup syntaxes were designed to be human friendly. The main problem I have with wiki syntax is that there is no standard.  It seems like every wiki has a different way to formulate a link, for example.  I guess there is some progress with <a href="http://www.wikicreole.org/">Wiki Creole</a>, but I still have a bad taste in my mouth.</p>
<p>The other problem I have with wiki markup is that I find it to be non-deterministic.  When I edit any given wiki and try to use more than basic formatting, I never know what I am going to get.  Most of the markup processing engines for these wikis are impenetrable morasses of regular expressions.  It can be hard to gauge interactions.  Are you really sure they are secure?</p>
<p>Speaking of impenetrable morasses of regular expressions, have you ever looked at WordPress&#8217;s input path?  I&#8217;m sure every one with a WordPress blog who likes to blog about PHP code knows that it is a code eater.  I&#8217;ve been particularly disappointed with WordPress in this area.  Most the &#8220;code formatting&#8221; plugins still have problems protecting code from WordPress&#8217; heavy hand.</p>
<p>But the WordPress preg_replace gauntlet doesn&#8217;t just mangle code.  I have a post which has been sitting in draft mode for several weeks because I can&#8217;t figure out how to give it the proper markup.  WordPress is somehow taking my perfectly balanced input markup and producing &#8220;unbalanced&#8221; output markup.  I haven&#8217;t yet tracked down the problem to either submit a fix or to do a good bug report.  Frankly, I&#8217;m not looking forward to trudging through all those regular expressions.</p>
<p>In Chris&#8217; post, he takes the regular expression approach.  Folks in the comments have pointed out a few problems with his approach, including the problem of interleaved tags.  If you can&#8217;t tell by now, I am not a fan of the regular expression gauntlet approach to markup languages.  I prefer a defined syntax and a traditional computer science style parser (which may use regular expressions).</p>
<p>The other must-have is a preview option.  With so much variation in markup languages, not having a preview leaves the user to play Russian roulette with their submitted content.  I&#8217;ve talked about that before in the <a href="http://www.procata.com/blog/archives/2005/03/31/the-usability-of-input-filtering/">usability of input filtering</a>.  This is another area where WordPress leaves the user high and dry.  </p>
<p>The complex input path in WordPress combined with its reliance on global variables seems to leave it unable to do an in-page preview.  The admin area preview is an IFRAME so that it launches a separate request.  The various live preview plugins are JavaScript based and don&#8217;t work when it is disabled.  They also don&#8217;t pass the input through the same input path that WordPress uses, so they are not a true preview.</p>
<p>I don&#8217;t mean for this to be a WordPress rant, on the whole, I like WordPress.  Rather, I just wanted to point out how hard it can be to do good input filtering, that is safe, reliable, deterministic, and usable.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/03/14/the-problem-with-markup-languages/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Looking forward to 2007</title>
		<link>http://www.procata.com/blog/archives/2007/01/04/looking-forward-to-2007/</link>
		<comments>http://www.procata.com/blog/archives/2007/01/04/looking-forward-to-2007/#comments</comments>
		<pubDate>Fri, 05 Jan 2007 03:49:50 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Misc]]></category>

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

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

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[Software Design]]></category>
<category>books</category>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2007/01/04/looking-forward-to-2007/</guid>
		<description><![CDATA[Well, I&#8217;m finally back in town after the holidays.  Let me tell you, I&#8217;m glad to be home.  Between multiple holidays and taking my grandma to her cancer treatments in Ann Arbor, I was gone far too much of last month.
My Grandma is doing well.  They used an experimental new procedure called [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I&#8217;m finally back in town after the holidays.  Let me tell you, I&#8217;m glad to be home.  Between multiple holidays and taking my grandma to her cancer treatments in Ann Arbor, I was gone far too much of last month.</p>
<p>My Grandma is doing well.  They used an experimental new procedure called radio frequency ablation to remove the meta-static colon cancer tumors from her lungs.  This procedure is amazing compared to the standard treatment.  The doctors at the University of Michigan were impressive.  We&#8217;ll know the results in a couple months when her lungs look a little less like scrambled eggs.  We&#8217;re hopeful.</p>
<p>I&#8217;m not much for retrospectives.  Looking forward into 2007, I have a few major goals.  I joined a gym today.  I&#8217;m going to get a new laptop and refresh my development environment next week after MacWorld.  I want to get at least a beta release of WACT out by May.  I have to prepare for php|tek.  I need to find a new place to live by this fall.  (Ann Arbor?) I want to move by the end of the year.</p>
<p>I loved all my christmas and birthday gifts this year.  (My birthday is December 28th.)  This year I pointed everyone to my Amazon.com wishlist and I ended up with a ton of good books to read.  Jason Gillmore from Apress also sent me some web development books.  My to-read stack for 2007 includes:</p>
<ul>
<li><a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/0440509017&#038;tag=procata&#038;camp=1789&#038;creative=9325">The Promise of Sleep</a> - A survey of the subject of sleep for laymen, written by a top sleep researcher.  I&#8217;m almost done with this one.  This book has a bunch of sleep deprivation horror stories and a good survey of what is known about sleep, which is not much.  Its incredible that we know so little about something we spend so much time doing.  Its also amazing how many people have easily treatable sleep disorders that don&#8217;t even know it.  Do you snore?</li>
<li><a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/0321344758&#038;tag=procata&#038;camp=1789&#038;creative=9325">Don&#8217;t make me Think</a> - Looks like a nice overview book on web usability.</li>
<li><a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/0321125215&#038;tag=procata&#038;camp=1789&#038;creative=9325">Domain Driven Design</a> - Recommended by Jason and Marcus.  How did I get this far without reading this book?</li>
<li><a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/1400079179&#038;tag=procata&#038;camp=1789&#038;creative=9325">Da Vinci Code</a> - Wasn&#8217;t on my wishlist, but I&#8217;ll read it anyway.  I read so little fiction these days.  Where is a beach when you need one?</li>
<li><a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/0142000280&#038;tag=procata&#038;camp=1789&#038;creative=9325">Getting Things Done</a> - I&#8217;m almost through this one.  It is a testimony to the power of the ideas that this book expresses that so many people recommend it, despite its being so incredibly dull.  Useful?  Yes.  Inspiring?  No.  But, then I&#8217;ve read enough of these self help / personal productivity type books for a lifetime.  Anyone want to buy a Franklin Planner?  I used mine until I got a cell phone.</li>
<li><a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/1590597532&#038;tag=procata&#038;camp=1789&#038;creative=9325">Practical Subversion</a> - I&#8217;m really liking subversion.  If you haven&#8217;t tried it, do so.  I&#8217;m hoping to combine this with Greg Beaver&#8217;s book, <a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/1904811191&#038;tag=procata&#038;camp=1789&#038;creative=9325">The PEAR installer manifesto</a> &#8212; the book on my wishlist I most wanted that I didn&#8217;t get, to create a new deployment process.</li>
<li><a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/159059732X&#038;tag=procata&#038;camp=1789&#038;creative=9325">Pro CSS Techniques</a> - A CSS book that tackles maintainability?  I&#8217;m really looking forward to this one.</li>
<li><a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/159059505X&#038;tag=procata&#038;camp=1789&#038;creative=9325">Pro MySQL</a> - The last MySQL book I read was a couple years ago, yet I use it almost every day.  I&#8217;m due for a refresh.  This one looks good.</li>
<li><a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/1590595084&#038;tag=procata&#038;camp=1789&#038;creative=9325">Pro PHP Security</a> - Never hurts to brush up.  This one looks like it has alot on encryption, SSL and SSH; not strong areas for me.</li>
<li><a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/0471606952&#038;tag=procata&#038;camp=1789&#038;creative=9325">Pattern-Oriented Software ARchitecture Volume 2</a> - The first volume, <a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/0471958697&#038;tag=procata&#038;camp=1789&#038;creative=9325">A system of patterns</a>, is one of my &#8220;always within reach when developing&#8221; books.  Nice to add to the set.</li>
</ul>
<p>Thanks for the books, guys.  I&#8217;ll have in-depth reviews of some of these here in the future.</p>
<p>Happy New Year.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2007/01/04/looking-forward-to-2007/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Meta Tag Refresh Faux Paux</title>
		<link>http://www.procata.com/blog/archives/2006/07/17/meta-tag-refresh-faux-paux/</link>
		<comments>http://www.procata.com/blog/archives/2006/07/17/meta-tag-refresh-faux-paux/#comments</comments>
		<pubDate>Mon, 17 Jul 2006 22:14:52 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Usability]]></category>

		<category><![CDATA[Web Design]]></category>
<category>meta tag</category><category>meta tag refresh</category>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2006/07/17/meta-tag-refresh-faux-paux/</guid>
		<description><![CDATA[If, for some unfathomable reason, you put a meta tag refresh on every page of your site, you may want to consider not putting it on any page with a form on it.  Especially a long complicated form.  30 minutes may seem like a long time to fill out a form, but sometimes [...]]]></description>
			<content:encoded><![CDATA[<p>If, for some unfathomable reason, you put a meta tag refresh on every page of your site, you may want to consider not putting it on any page with a form on it.  Especially a long complicated form.  30 minutes may seem like a long time to fill out a form, but sometimes people answer the phone or get up for a coffee break.  Perhaps the refresh may even make them decide that they have better things to do than pursuing a transaction with your lame site.  (Like blog about how lame you are.)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2006/07/17/meta-tag-refresh-faux-paux/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Paradox of Choice</title>
		<link>http://www.procata.com/blog/archives/2006/07/13/the-paradox-of-choice/</link>
		<comments>http://www.procata.com/blog/archives/2006/07/13/the-paradox-of-choice/#comments</comments>
		<pubDate>Fri, 14 Jul 2006 05:23:10 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Usability]]></category>
<category>barry schwartz</category><category>books</category><category>decision making</category><category>paradox of choice</category><category>simplicity</category>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2006/07/13/the-paradox-of-choice/</guid>
		<description><![CDATA[I don&#8217;t like to just link to stuff, but outsourcing choice at 37 signals is worth linking to.  The post talks about designing interfaces with fewer choices.  Really, the interesting thing here is Barry Schwartz and his book, The paradox of Choice.  The paradox of choice being that having more choices makes [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t like to just link to stuff, but <a href="http://37signals.com/svn/archives2/outsourcing_choice.php">outsourcing choice</a> at 37 signals is worth linking to.  The post talks about designing interfaces with fewer choices.  Really, the interesting thing here is Barry Schwartz and his book, <a href="http://www.amazon.com/exec/obidos/redirect?link_code=as2&#038;path=ASIN/0060005688&#038;tag=procata&#038;camp=1789&#038;creative=9325">The paradox of Choice</a>.  The paradox of choice being that having more choices makes you unhappy.  Well, there is more to it than that.  The <a href="http://www.newyorker.com/critics/books/?040301crbo_books">New Yorker</a> has a good summary of the book.</p>
<p>I watched a bunch of google tech talk presentations a few months ago.  By far the best presentation was Barry Schwartz explaining <a href="http://video.google.com/videoplay?docid=6127548813950043200&#038;q=type%3Agoogle">The paradox of Choice</a>.  This video is worth watching.</p>
<p>I think these are important ideas in the quest for <a href="http://www.procata.com/blog/archives/2006/03/01/extreme-simplicity/">extreme simplicity</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2006/07/13/the-paradox-of-choice/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Extreme Simplicity</title>
		<link>http://www.procata.com/blog/archives/2006/03/01/extreme-simplicity/</link>
		<comments>http://www.procata.com/blog/archives/2006/03/01/extreme-simplicity/#comments</comments>
		<pubDate>Thu, 02 Mar 2006 03:52:22 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Usability]]></category>

		<category><![CDATA[Web Design]]></category>

		<category><![CDATA[Software Design]]></category>
<category>apple</category><category>decision making</category><category>simplicity</category>
		<guid isPermaLink="false">http://www.procata.com/blog/?p=175</guid>
		<description><![CDATA[Could this be the manifesto of &#8220;Extreme Simplicity?&#8221;

10 fundamental rules for the age of user experience technology:

More features isn&#8217;t better, it&#8217;s worse.
You can&#8217;t make things easier by adding to them.
Confusion is the ultimate deal-breaker.
Style matters
Only features that provide a good user experience will be used.
Any feature that requires learning will only be adopted by a [...]]]></description>
			<content:encoded><![CDATA[<p>Could <a href="http://www.acm.org/ubiquity/views/v7i07_pfeiffer.html">this</a> be the manifesto of &#8220;Extreme Simplicity?&#8221;</p>
<blockquote><p>
10 fundamental rules for the age of user experience technology:</p>
<ol>
<li>More features isn&#8217;t better, it&#8217;s worse.</li>
<li>You can&#8217;t make things easier by adding to them.</li>
<li>Confusion is the ultimate deal-breaker.</li>
<li>Style matters</li>
<li>Only features that provide a good user experience will be used.</li>
<li>Any feature that requires learning will only be adopted by a small fraction of users.</li>
<li>Unused features are not only useless, they can slow you down and diminish ease of use</li>
<li>Users do not want to think about technology: what really counts is what it does for them.</li>
<li>Forget about the killer feature. Welcome to the age of the killer user-experience.</li>
<li>Less is difficult, that&#8217;s why less is more</li>
</ol>
</blockquote>
<p><a href="http://www.apple.com/ipod/">Consumer devices</a> or <a href="http://www.rubyonrails.org/">frameworks</a>, we are a product of our times.  </p>
<p><a href="http://youtube.com/watch?v=aeXAcwriid0">Watch</a> and contemplate.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2006/03/01/extreme-simplicity/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Delicious Outage Link Dump</title>
		<link>http://www.procata.com/blog/archives/2005/12/19/delicious-outage-link-dump/</link>
		<comments>http://www.procata.com/blog/archives/2005/12/19/delicious-outage-link-dump/#comments</comments>
		<pubDate>Mon, 19 Dec 2005 18:21:53 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Misc]]></category>

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

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

		<category><![CDATA[Agile Methods]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Web Design]]></category>

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

		<category><![CDATA[Software Design]]></category>

		<guid isPermaLink="false">http://www.procata.com/blog/?p=168</guid>
		<description><![CDATA[Del.icio.us has been down for a while.  I use it for my public bookmarks, which are listed on the side of this blog.  Here is a post with some recent random things that I would bookmark if I could.

The departure of the hyper-enthusiasts - &#8220;The Java hyper-enthusiasts have left the building&#8221;  (along [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.del.icio.us/blog/2005/12/continued_hiccu.html">Del.icio.us has been down</a> for a while.  I use it for my public bookmarks, which are listed on the side of this blog.  Here is a post with some recent random things that I would bookmark if I could.</p>
<ul>
<li><a href="http://www.artima.com/weblogs/viewpost.jsp?thread=141312">The departure of the hyper-enthusiasts</a> - &#8220;The Java hyper-enthusiasts have left the building&#8221;  (along the lines of <a href="http://www.procata.com/blog/archives/2005/09/29/why-isnt-php-the-natural-successor-to-java/">this</a>.)</li>
<li><a href="http://martinfowler.com/articles/newMethodology.html">The New Methodology</a> - Martin Fowler describes Agile methodologies &#8212; recently updated.</li>
<li><a href="http://wiki.caucho.com/PHP_Hello_World">PHP on Caucho</a> - PHP on the JVM.</li>
<li><a href="http://norman.walsh.name/2004/11/10/xml20">XML 2.0</a> - some thoughts on XML 2.0.</li>
<li><a href="http://www.webpatterns.org/">Web Patterns</a> - Under construction &#8212; check back later.</li>
<li><a href="http://www.welie.com/patterns/">Web Design Patterns</a>.</li>
<li><a href="http://www.agilealliance.org/resources/carnivaloftheagilists">Carnival of the Agilists</a>.</li>
</ul>
<p>I&#8217;m currently adding UTF-8 support to and generally improving WACT&#8217;s &#8220;liberal&#8221; xml/html parser.  A few sources of tests cases and information:</p>
<ul>
<li><a href="http://weblog.philringnalda.com/2005/12/18/who-knows-a-title-from-a-hole-in-the-ground">Who knows a title from a hole in the ground?</a></li>
<li><a href="http://decafbad.com/blog/2005/12/19/feedburner-feeds-give-heartburn-to-php-xml-parsers">FeedBurner feeds give heartburn to PHP XML parsers?</a></li>
<li><a href="http://www.is-thought.co.uk/book/home.htm">Web SGML and HTML 4.0 explained</a></li>
<li><a href="http://www.flightlab.com/~joe/sgml/cdata.html">CDATA confusion</a></li>
<li><a href="http://www.flightlab.com/~joe/sgml/comments.html">Comment syntax in SGML and HTML</a></li>
<li><a href="http://www.cs.tut.fi/~jkorpela/html/empty.html">Empty elements in SGML, HTML, XML, and XHTML</a></li>
<li><a href="http://www.w3.org/TR/NOTE-sgml-xml.html">Comparison of SGML and XML</a></li>
<li><a href="http://www.w3.org/XML/Test/">Extensible Markup Language (XML) Conformance Test Suites</a></li>
<li><a href="http://www.hixie.ch/tests/adhoc/html/parsing/">Ian Hixie&#8217;s HTML parsing test cases</a></li>
<li><a href="http://xmlconf.sourceforge.net/">Conformance Testing for XML and Related Technologies</a></li>
<li><a href="http://feedparser.org/">Universal Feed Parser</a> liberal feed parser with many test cases.</li>
<li><a href="http://schneegans.de/sv/test-cases/">XHTML test cases</a></li>
</ul>
<ul>
<li><a href="http://www.cl.cam.ac.uk/~mgk25/unicode.html">UTF-8 and Unicode FAQ for Unix/Linux</a></li>
<li><a href="http://www.w3.org/2001/06/utf-8-wrong/">bad UTF-8 test files</a></li>
<li><a href="http://validator.w3.org/dev/tests/">The W3C Markup Validation Service: Tests</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/12/19/delicious-outage-link-dump/feed/</wfw:commentRss>
		</item>
		<item>
		<title>The Usability of Input Filtering</title>
		<link>http://www.procata.com/blog/archives/2005/03/31/the-usability-of-input-filtering/</link>
		<comments>http://www.procata.com/blog/archives/2005/03/31/the-usability-of-input-filtering/#comments</comments>
		<pubDate>Fri, 01 Apr 2005 06:21:05 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[PHP]]></category>

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

		<category><![CDATA[Web Design]]></category>
<category>input filtering</category><category>security</category>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2005/03/31/the-usability-of-input-filtering/</guid>
		<description><![CDATA[There seems to be much interest lately in input filtering in PHP, especially in cross site scripting prevention.  I&#8217;ve always preferred input validation to input filtering, but I am giving filtering a new examination.  My problem with filtering is with usability.  The comments to this post are a good example.  There [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be much interest lately in input filtering in PHP, especially in cross site scripting prevention.  I&#8217;ve always preferred input validation to input filtering, but I am giving filtering a new examination.  My problem with filtering is with usability.  The comments to <a href="http://www.procata.com/blog/archives/2005/03/08/microbenchmarks-of-single-and-double-qouting/#comments">this post</a> are a good example.  There are obviously some usability issues going on here.</p>
<p>I think the fundamental problem with input filtering and especially XSS filtering is that it violates <a href="http://en.wikipedia.org/wiki/Principle_of_least_astonishment">the principle of least surprise</a>.   User input is silently modified without the user&#8217;s knowledge.  If the violation is innocent, then the software surprises the user.  This is bad.  At least with validation, the user gets a heads up on the problem.</p>
<p>Let me try to name and enumerate some scenarios:</p>
<p><strong>Direct Filter</strong><br />
This is what WordPress did in the example post.  It simply accepted the user input and silently changed it.  The filtered value is stored directly into the database.  The original input is lost.  There is no preview.  I think this has to be a usability worse case scenario.</p>
<p><strong>Filter with Preview</strong><br />
This scenario adds a preview capability to the last.  The filter is still applied.  A validation failure or explicit preview button causes the form values to be re-displayed and a preview panel to be shown.  However, the previous input value is silently modified and sent back to the user.  The user may or may not realize that his original input has been changed during the round trip.</p>
<p>This is also seems like a usability problem, but every once and a while it happens to me when entering legitimate input into professionally written programs.</p>
<p><strong>Filter with Buffered Preview</strong><br />
This scenario adds an additional buffer to the last.  The filter is applied, but the original input is sent back to the user in the form field.  However, the preview panel shows the modified value.</p>
<p>I don&#8217;t really see this very often outside of fields with a dedicated markup language (for example BBCode).</p>
<p><strong>Filter with Forced Preview</strong><br />
The input value is silently filtered.  However, the user is forced to preview the output at least once.  Its up to the user to notice the results of the filter.</p>
<p>I think slashdot does this.</p>
<p><strong>Filter with Confirmation</strong><br />
A stricter variation of Forced Preview where as the last stage, the user must confirm their input once without the ability to change it.  It is up to the user to notice the results of the filter.</p>
<p>I think this is popular as the last stage of a wizard style interface.</p>
<p><strong>Filter with Confirmation and Warning</strong><br />
The filter is applied and the user&#8217;s input is changed, however, the user is warned exactly which value was changed by the filter.</p>
<p>I don&#8217;t think I&#8217;ve ever seen this one.</p>
<p><strong>Validation</strong><br />
The program notifies the user that the input value is bad, but does not modify it.  The user must change the value to proceed.</p>
<p>I tend to use this one.  I escape all output, so I don&#8217;t worry too much about displaying XSS in the preview panel.</p>
<p>Obviously, you can mix and match scenarios for different input rules and fields. I&#8217;m sure there are other scenarios.  Please suggest some.</p>
<p>I guess I&#8217;ve been programming for about 23 years now.  The longer I do it, the more reluctant I am to be strict with user input.  Ultra sanitized, ultra structured data may seem attractive to the programmer, but its a pain for the user and its only a matter of time before a legitimate exception comes along.  A European phone number, the 51rst state, a canadian postal code, a new millennium, etc.  The exception is the rule.  Understandably, XSS must be prevented, but its easy to go too far.</p>
<p>Which of these scenarios do you think are best from the user&#8217;s perspective?  From the programmers perspective?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2005/03/31/the-usability-of-input-filtering/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Installing Web Applications</title>
		<link>http://www.procata.com/blog/archives/2004/11/24/installing-web-applications/</link>
		<comments>http://www.procata.com/blog/archives/2004/11/24/installing-web-applications/#comments</comments>
		<pubDate>Thu, 25 Nov 2004 00:19:08 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[PHP]]></category>

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

		<category><![CDATA[Mac]]></category>
<category>php deployment</category>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/11/24/installing-web-applications/</guid>
		<description><![CDATA[Mac OS X has made an art of the process of installing an application on the desktop.  For a properly packaged application, the process is:

Download.
Locate the application icon in your download directory and optionally move it to another location.
Double click on the application icon to run.

This is the essence of what apple calls Drag [...]]]></description>
			<content:encoded><![CDATA[<p>Mac OS X has made an art of the process of installing an application on the desktop.  For a <a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Concepts/sd_disk_images.html">properly packaged</a> application, the process is:</p>
<ol>
<li>Download.</li>
<li>Locate the application icon in your download directory and optionally move it to another location.</li>
<li>Double click on the application icon to run.</li>
</ol>
<p>This is the essence of what apple calls <a href="http://developer.apple.com/documentation/DeveloperTools/Conceptual/SoftwareDistribution/Concepts/sd_on_mac_os_x.html#//apple_ref/doc/uid/20001758/BABGBEDG">Drag and Drop installation</a>.</p>
<p>Unfortunately, installing web applications has not reached this level of ease of use refinement.  An end user oriented web application might require that you:</p>
<ol>
<li>Download to your local machine (Using browser)</li>
<li>Unpack (using 3rd party archive tool)</li>
<li>Locate and edit configuration files, potentially requiring a knowledge of file system paths on the server, database names, etc.</li>
<li>Upload (Using yet another tool, such as ftp)</li>
<li>Change file permissions to allow files to be written to some directories on the server</li>
<li>Install external components, such as pear modules</li>
<li>Compile PHP to include required modules</li>
<li>Edit .htaccess to setup include_path&#8217;s and mod_rewrite</li>
</ol>
<p>Hardly &#8220;Drag and Drop.&#8221;  It would be nice to have something like a drag and drop capability for end users.  In this case, the applications could just be moved to the desired location in DOCUMENT_ROOT and run by pointing the browser to it.</p>
<p>Apple has several supporting technologies that facilitate drag and drop install:</p>
<p><strong>Grouping</strong></p>
<p>&#8220;<a href="http://developer.apple.com/documentation/CoreFoundation/Conceptual/CFBundles/index.html#//apple_ref/doc/uid/10000123i">Bundles</a> provide an elegant solution to the problem of grouping related code and resources together.&#8221;  PHP has the tarball or the zip file, but this requires an unpacking stage.  If the user lacks shell access, then the unpacking stage must occur offline.  Where is the PHP equivelent of the .JAR or the .WAR?  How can the unpack stage be eliminated?</p>
<p><strong>Hiding</strong></p>
<p>One of the advantages of the bundle is the ability to hide internal resources from the end user.  Web applications have the need to hide internal resources.  Typically, this can be done with PHP by moving files outside of your DOCUMENT_ROOT (adding another installation stage), hiding resources with .htaccess, or giving them .php extensions when possible (typically for config files).  Hardly end user friendly techniques.</p>
<p><strong>Sharing</strong></p>
<p><a href="http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/index.html#//apple_ref/doc/uid/10000183i">Frameworks</a> are a special type of bundle designed for distributing shared code and resources.</p>
<p>Frameworks have a version capability that helps manage DLL Hell situations, where installing or upgrading one application breaks another via shared dependencies.  A Framework bundle may contain multiple versions of the same code, and the OS will link to the correct one.  Additionally, framework bundles can be embedded into Application Bundles, so that application will always have a usable version available.  Embedding helps facilitate drag and drop install because an additional step is not needed to install shared resources.</p>
<p>I think embedding shared resources (libraries like adodb and wact) is the best way to go for application deployment.</p>
<p>Unfortunately, I think PEAR takes a shared commons attitude and resists embedding because of its desire to be in the include_path.</p>
<p><strong>Preferences</strong></p>
<p>User configuration in OS X is stored in preference files, which are independent files named by application.  Well behaved OS X application operate even with their preferences files missing.  deleting an applications preference file causes the application to recreate it with the default preferences.  (Try deleting an application&#8217;s registry keys under windows and see how things go.)</p>
<p><strong>Drag and Drop Web Applications</strong><br />
I think a drag and drop PHP web application should meet the following criteria:</p>
<ul>
<li>Make no requirements for PHP_INI_SYSTEM or PHP_INI_PERDIR configuration.</li>
<li>Make no requirements for .htaccess configuration</li>
<li>Work with default application level configuration</li>
<li>Not require writable filesystem permissions</li>
<li>Not require installing external software</li>
<li>Not require unarchiving  (a wish, i know)</li>
<li>Not require obscure PHP modules</li>
</ul>
<p>A wish list, i am sure.</p>
<p>What are best practices for deploying PHP web applications?  What applications do this well?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2004/11/24/installing-web-applications/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Watchng my Grandmother use Software</title>
		<link>http://www.procata.com/blog/archives/2004/10/27/watchng-my-grandmother-use-software/</link>
		<comments>http://www.procata.com/blog/archives/2004/10/27/watchng-my-grandmother-use-software/#comments</comments>
		<pubDate>Thu, 28 Oct 2004 00:44:18 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[Usability]]></category>

		<category><![CDATA[Mac]]></category>
<category>usability</category>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/10/27/watchng-my-grandmother-use-software/</guid>
		<description><![CDATA[I just got back from helping my grandmother with her computer.  We got her an iMac and she uses Apple&#8217;s Mail program pretty effectively.  Watching her use Mail is a real education in software usability.  I&#8217;ve written before about some problems she had with mail.  Apple has pretty much fixed every [...]]]></description>
			<content:encoded><![CDATA[<p>I just got back from helping my <a href="http://www.procata.com/blog/archives/2004/07/14/my-grandma/">grandmother</a> with her computer.  We got her an iMac and she uses Apple&#8217;s Mail program pretty effectively.  Watching her use Mail is a real education in software usability.  I&#8217;ve written before about some <a href="http://episteme.arstechnica.com/eve/ubb.x?a=tpc&#038;s=50009562&#038;f=8300945231&#038;m=4060970355&#038;r=4060970355#4060970355">problems she had with mail</a>.  Apple has pretty much fixed every problem except one.</p>
<p>If you start composing an Email message and your dialup connection is disconnected while composing, even if you reconnect before hitting send, that email can not be sent.  Somehow Mail associates it with the wrong status, caches some sort of stale DNS or status information.  The email goes into your outbox and Mail refuses to deliver it, ever.  It does bring up a cryptic message when it tries, even though there is no reason Mail could not deliver the message.  The solution is to go into your outbox, double click on the email and manually hit send again.</p>
<p>Unfortunately, this is too much for my grandmother.  She can never quite remember how to fix this problem.  It happens frequently enough to be really annoying, but not frequently enough to learn the work around.</p>
<p>So I went over again today and unconstipated her outbox.  She said &#8220;Let me write down how to do that.&#8221;  However, sitting next to the computer were the instructions for doing it from the last time this happened and she wrote it down.  I really hope Apple fixes this usability issue in the next OS release.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2004/10/27/watchng-my-grandmother-use-software/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Friendster wrapup: does MySQL scale</title>
		<link>http://www.procata.com/blog/archives/2004/07/14/friendster-wrapup-does-mysql-scale/</link>
		<comments>http://www.procata.com/blog/archives/2004/07/14/friendster-wrapup-does-mysql-scale/#comments</comments>
		<pubDate>Wed, 14 Jul 2004 19:50:41 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Usability]]></category>
<category>php scalability</category>
		<guid isPermaLink="false">http://www.procata.com/blog/archives/2004/07/14/friendster-wrapup-does-mysql-scale/</guid>
		<description><![CDATA[Here is a wrap up of some links and information from the friendster PHP conversion of a couple weeks ago.
First, it appears performance really was a major problem for friendster.  Friendster Quickly Gathering Foes:
The key issues behind the Friendster abandonment trend, according to users, are the service&#8217;s inability to do anything about its habitual [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a wrap up of some links and information from the friendster PHP conversion of a couple weeks ago.</p>
<p>First, it appears performance really was a major problem for friendster.  <a href="http://www.wired.com/news/culture/0,1284,61150,00.html">Friendster Quickly Gathering Foes</a>:</p>
<blockquote><p>The key issues behind the Friendster abandonment trend, according to users, are the service&#8217;s inability to do anything about its habitual server lag problems, and its growing reputation for heavy-handed moral policies and unilateral decisions it makes on behalf of its members.
</p></blockquote>
<p>Performance problems show up in <a href="http://philip.greenspun.com/teaching/6171/2003-fall/friendster">this usuability study</a> of Friendster.  <a href="http://discuss.fogcreek.com/joelonsoftware/default.asp?cmd=show&#038;ixPost=108070">more discussion of friendster performance</a>.  This quote from <a href="http://www.wired.com/wired/archive/12.06/dating_pr.html">Cracking the code to Romance</a> seems to show they are aware of the issue.</p>
<blockquote><p>
Notified of the security holes Moore and Chisholm exploit, Friendster rep Lisa Kopp insists, &#8220;We have a policy that we are not being hacked.&#8221; When I explain that, policy or no, they are being hacked, she says, &#8220;Security isn&#8217;t a priority for us. We&#8217;re mostly focused on making the site go faster.&#8221;
</p></blockquote>
<p>While the consensus seems to be that you can write scalable applications in either Java or PHP, MySQL is another major part of Friendster&#8217;s architecture.  <a href="http://socialsoftware.weblogsinc.com/entry/3341461825857782/">Why Friendster is so slow</a> makes an educated guess on the cause of Friendsters performance problems, laying the blame on an inappropriate use of MySQL.  I wonder how much of this is educated and how much of this is guess.</p>
<p>Philip Greenspun suggests that Friendster &#8220;flush MySQL and replace with Oracle 10g.&#8221;</p>
<p>It would seem that the friendster folks have a mysql support contract and <a href="http://software.newsforge.com/software/04/04/15/0210236.shtml?tid=132&#038;tid=72&#038;tid=82">Attend MySQL conferences</a>:</p>
<blockquote><p>between sessions, three young men from Friendster are chatting with a neat-looking person in a MySQL shirt, who introduces them to another neat-looking person in a MySQL shirt and says, &#8220;he&#8217;ll be your primary support contact.&#8221;
</p></blockquote>
<p>If the natural architecture of PHP is to push scalability issues out of the language and into the database, the Friendster case seems to raise the question, does MySQL scale?</p>
<p>I would like to see more official information out of Friendster regarding this case.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.procata.com/blog/archives/2004/07/14/friendster-wrapup-does-mysql-scale/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
