<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" version="2.0">

<channel>
	<title>Missing Features</title>
	
	<link>http://missingfeatures.com</link>
	<description>Usability, software and user experience design.</description>
	<lastBuildDate>Thu, 09 Jul 2009 19:27:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/missingfeatures" type="application/rss+xml" /><item>
		<title>Conference presentation tips</title>
		<link>http://missingfeatures.com/2009/07/09/conference-presentation-tips/</link>
		<comments>http://missingfeatures.com/2009/07/09/conference-presentation-tips/#comments</comments>
		<pubDate>Thu, 09 Jul 2009 19:27:03 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Software Industry]]></category>

		<guid isPermaLink="false">http://missingfeatures.com/?p=225</guid>
		<description><![CDATA[The pitfalls of using PowerPoint slides for presentations are well known. However, conferences would be much improved if organizers gave presenters a few simple guidelines to follow.
Here are four quick tips:

Your first/title slide should include the presentation title, your name, your title, your company and some kind of contact (this all lends credibility);
When showing an [...]]]></description>
			<content:encoded><![CDATA[<p>The <a title="Seth Godin post" href="http://sethgodin.typepad.com/seths_blog/2007/01/really_bad_powe.html">pitfalls of using PowerPoint slides for presentations</a> are well known. However, conferences would be much improved if organizers gave presenters a few simple guidelines to follow.</p>
<p>Here are four quick tips:</p>
<ol>
<li>Your first/title slide should include the presentation title, your name, your title, your company and some kind of contact (this all lends credibility);</li>
<li>When showing an image on a slide make the image as large as the slide;</li>
<li>Limit to 2-3 words per slide; and,</li>
<li>Do not read slides, have a conversation (each slide should either remind you of key themes to touch on during the chatter for that slide or evoke a reaction &#8212; thought, laughter, emotion, etc &#8212; in the audience).</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://missingfeatures.com/2009/07/09/conference-presentation-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using an .htaccess file to standardize your URL</title>
		<link>http://missingfeatures.com/2009/05/25/using-an-htaccess-file-to-standardize-your-url/</link>
		<comments>http://missingfeatures.com/2009/05/25/using-an-htaccess-file-to-standardize-your-url/#comments</comments>
		<pubDate>Mon, 25 May 2009 23:48:35 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://missingfeatures.com/?p=214</guid>
		<description><![CDATA[When creating a new site it&#8217;s a good idea to standardize on your domain name (www or no www?) and to gracefully handle HTTPS/SSL requests (do you have an SSL site, or should you redirect users off of it?). It&#8217;s also a good idea to compress the text files your server returns (like HTML, CSS [...]]]></description>
			<content:encoded><![CDATA[<p>When creating a new site it&#8217;s a good idea to standardize on your domain name (www or no www?) and to gracefully handle HTTPS/SSL requests (do you have an SSL site, or should you redirect users off of it?). It&#8217;s also a good idea to compress the text files your server returns (like HTML, CSS and JavaScript pages).</p>
<p>You can do all this with an .htaccess file.</p>
<p>The great power of .htaccess files is that they can include rewrite rules via Apache&#8217;s <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html">mod_rewrite module</a>. There are <a href="http://httpd.apache.org/docs/2.0/misc/rewriteguide.html">loads of things rewrite rules</a> can do, so we decided to create a standard file that would handle a few things:</p>
<ol>
<li>Redirect all HTTPS/SSL traffic to the same URL but to HTTP;</li>
<li>Redirect all traffic without a &#8220;www&#8221; entered to the same URL but with a &#8220;www.&#8221; added; and,</li>
<li>Compress all HTML, CSS and JavaScript  files (to speed up website browsing).</li>
</ol>
<p>The goal is that requests to:</p>
<blockquote><p>https://example.com/some/page</p></blockquote>
<p>will be gracefully redirected to</p>
<blockquote><p>http://www.example.com/some/page</p></blockquote>
<p>A clean, standard URL with no risk of SSL confusion.</p>
<p><strong>The .htaccess file</strong></p>
<blockquote><p># Standard .htaccess file<br />
# &#8211; Compress text documents for speed<br />
# &#8211; Rewrite https to http and no www to www</p>
<p>&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine on<br />
# move off of https<br />
RewriteCond %{HTTPS} on<br />
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301]</p>
<p>#move to www if no www is entered<br />
RewriteCond %{HTTP_HOST} !^(www\.).*<br />
RewriteRule (.*) http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]<br />
&lt;/IfModule&gt;</p>
<p># compress stuff for faster delivery<br />
AddOutputFilterByType DEFLATE text/css text/javascript application/x-javascript text/html<br />
Header append Vary User-Agent</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://missingfeatures.com/2009/05/25/using-an-htaccess-file-to-standardize-your-url/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firewall Configuration Interfaces</title>
		<link>http://missingfeatures.com/2009/04/03/firewall-configuration-interfaces/</link>
		<comments>http://missingfeatures.com/2009/04/03/firewall-configuration-interfaces/#comments</comments>
		<pubDate>Fri, 03 Apr 2009 18:58:41 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Interface Design]]></category>
		<category><![CDATA[Usability]]></category>

		<guid isPermaLink="false">http://missingfeatures.com/?p=189</guid>
		<description><![CDATA[Your correspondent has worked with loads of different firewall configuration screens over the years, like Linux&#8217;s IPTables (command line), various Linksys and D-Link home and small business routers, the Apple OS X firewall, the Plesk IPTables interface and Windows tools like Windows Firewall (classic, Server 2008), BlackIce, Kerio Personal Firewall and on and on and [...]]]></description>
			<content:encoded><![CDATA[<p>Your correspondent has worked with loads of different firewall configuration screens over the years, like Linux&#8217;s IPTables (command line), various Linksys and D-Link home and small business routers, the Apple OS X firewall, the Plesk IPTables interface and Windows tools like Windows Firewall (classic, Server 2008), BlackIce, Kerio Personal Firewall and on and on and on.</p>
<p>Sadly, must of these firewall configuration screens are painful to use.</p>
<p><a href="http://missingfeatures.com/wp-content/uploads/2009/04/router-interface.png"><img class="alignright size-thumbnail wp-image-194" style="margin: 5px;" title="Linksys RV042 Firewall edit interface" src="http://missingfeatures.com/wp-content/uploads/2009/04/router-interface-150x150.png" alt="Linksys RV042 Firewall edit interface" width="150" height="150" align="right" /></a>Take the <a href="http://www.newegg.com/Product/Product.aspx?Item=N82E16833124160">Linksys RV042</a>, a reliable business-class router well suited for a small office. Managing the firewall can involve updates to three separate screens. Even the buttons on the edit rule screen (see right), are confusing: &#8220;Return&#8221;, &#8220;Save Settings&#8221; and &#8220;Cancel Changes&#8221;.</p>
<p>There are probably several reasons why this happens &#8212; limited budget, schedule, etc &#8212; but the likely explanation is that when the engineers schedule designing the new router they leave the admin interface as the last task, hate doing it and spend as little amount of time as possible on this &#8220;tail-end&#8221; work.</p>
<p>The ironic part of this logic is that it&#8217;s the admin interface where your customers spend 90% of their interaction time with the product. Sure, your customers <em>appreciate </em>(in the broadest sense) how quickly your little box moves tiny packets around, but they really don&#8217;t care so long as:</p>
<ol>
<li>It doesn&#8217;t crash; and,</li>
<li>The admin interface isn&#8217;t <em>too </em>painful.</li>
</ol>
<p>Given this, I&#8217;ve come up with a few really simple design guidelines for firewall interface designs.</p>
<p><strong>Firewall configuration user experience design screen rules</strong>:</p>
<ol>
<li><strong>No pagination</strong>. Pagination of firewall rules is as pointless as pagination on online news stories: there is rarely enough content to justify it.</li>
<li><strong>Poor </strong><strong>or non-existent labeling</strong>. As soon as you write your 11th firewall rule you start to forget for what the first 10 rules are used. Firewall configuration should support both tracking a rule name and labels on individual IP ranges.</li>
<li><strong>Allow multiple, user-entered IP ranges</strong>. Users should be able to enter in IPs in three formats: single IPs, human ranges (like 2.5.7.1-2.5.7.123) and in netmask form (for the nerds). And you must allow users to enter in a <strong>mix of all three</strong>.</li>
<li><strong>Clear interface</strong>. This should be a no-brainer, but loads of configuration screens have glaring UI gaffes. Keep it simple and standard.</li>
<li><strong>Combine stuff</strong>. Port forwarding, NAT, firewall, etc, can be combined into a single interface for most routers.</li>
</ol>
<p><strong>Mock-Up Screens</strong></p>
<p>To demonstrate some of these ideas, your correspondent has created a set of <a title="HTML mock-ups of firewall configuration" href="http://justinemond.com/firewall/">HTML mock-up screens</a>. Sure, this interface won&#8217;t work for a high-end Cisco router, but it should include the functionality you might expect from a home or small business router.</p>
<p>These are simple mock-ups; there are a few things missing like support for multiple ports and a way to move a rule several positions with one click. However, these screens hopefully demonstrate that firewall configuration screens can be made to be user friendly.</p>
]]></content:encoded>
			<wfw:commentRss>http://missingfeatures.com/2009/04/03/firewall-configuration-interfaces/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Blended SSL and non-SSL in CakePHP Applications</title>
		<link>http://missingfeatures.com/2008/12/15/using-blended-ssl-and-non-ssl-in-cakephp-applications/</link>
		<comments>http://missingfeatures.com/2008/12/15/using-blended-ssl-and-non-ssl-in-cakephp-applications/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 15:55:04 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[CakePHP tips]]></category>

		<guid isPermaLink="false">http://missingfeatures.com/?p=188</guid>
		<description><![CDATA[(This is the fourth post in a series of posts on CakePHP tips.)
Your correspondent ran into a problem with a CakePHP site where the login and sign-up pages used an SSL connection, but the rest of the site forced non-SSL connections.
Why blend SSL and non-SSL? The application itself didn&#8217;t contain any sensitive information, and SSL [...]]]></description>
			<content:encoded><![CDATA[<p>(This is the fourth post in a <a href="../category/cakephp-tips/">series of posts on CakePHP tips</a>.)</p>
<p>Your correspondent ran into a problem with a CakePHP site where the login and sign-up pages used an SSL connection, but the rest of the site forced non-SSL connections.</p>
<p>Why blend SSL and non-SSL? The application itself didn&#8217;t contain any sensitive information, and SSL is a massive CPU drain. So to save cycles, we forced non-SSL for all pages but login and sign up (passwords and credit cards).</p>
<p>The problem was that after the user was redirected from the SSL login process page to the logged-in homepage, the cookie that stored the session reference for the user didn&#8217;t exist in the non-SSL site and thus the session didn&#8217;t exist and the user was immediately logged out.</p>
<p>A <a href="http://stackoverflow.com/questions/308659/session-not-saving-when-moving-from-ssl-to-non-ssl">post over at stackoverflow</a> and some quick Googling strongly hinted that that PHP was configured on the server to create secure cookies, that is cookies that are only accessible over SSL. However, your correspondent tried disabled secure cookies with <em>ini_set()</em>, to no avail.</p>
<p>Further digging revealed the real issue: the cookies were being created as secure cookies on login &#8212; in spite of my override setting in the bootstrap file &#8212; because the core CakePHP routine for cookie creation sets the &#8220;create secure cookies&#8221; PHP setting on-the-fly just before creating the cookie, whenever a page is running under SSL.</p>
<p>The solution was a foreced modification to CakePHP core, something to be avoided at all costs but something that had to be done.</p>
<p>The solution is to comment out this snippet in /cake/lib/session.php, around line 420:</p>
<blockquote><p>if ($ini_set &amp;&amp; env(&#8217;HTTPS&#8217;)) {<br />
ini_set(&#8217;session.cookie_secure&#8217;, 1);<br />
}</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://missingfeatures.com/2008/12/15/using-blended-ssl-and-non-ssl-in-cakephp-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Proper CakePHP Redirects</title>
		<link>http://missingfeatures.com/2008/12/15/using-proper-cakephp-redirects/</link>
		<comments>http://missingfeatures.com/2008/12/15/using-proper-cakephp-redirects/#comments</comments>
		<pubDate>Mon, 15 Dec 2008 15:34:09 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[CakePHP tips]]></category>

		<guid isPermaLink="false">http://missingfeatures.com/?p=187</guid>
		<description><![CDATA[(This is the third post in a series of posts on CakePHP tips.)
CakePHP has a handy helper to redirect users to another page, used in controllers:
$this-&#62;redirect(&#8217;controller/action&#8217;)
Be careful: Apparently in CakePHP 1.1 and earlier this-&#62;redirect() doesn&#8217;t call exit() after the header redirect is set, so the PHP code after the redirect in your controller will get [...]]]></description>
			<content:encoded><![CDATA[<p>(This is the third post in a <a href="../category/cakephp-tips/">series of posts on CakePHP tips</a>.)</p>
<p>CakePHP has a handy helper to redirect users to another page, used in controllers:</p>
<blockquote><p>$this-&gt;redirect(&#8217;controller/action&#8217;)</p></blockquote>
<p>Be careful: <a href="http://cakebaker.42dh.com/2007/03/28/redirect-with-exit/">Apparently</a> in CakePHP 1.1 and earlier this-&gt;redirect() <strong>doesn&#8217;t call exit()</strong> after the header redirect is set, so the PHP code <em>after</em> the redirect in your controller will get executed. Yikes! That&#8217;s a major security hole.</p>
<p>Happily, this issue is fixed in CakePHP 1.2, which defaults to calling exit after the redirect. Even so, the proper syntax for writing a CakePHP redirect is:</p>
<blockquote><p>$this-&gt;redirect(&#8217;controller/action&#8217;,null,true);</p></blockquote>
<p>The second parameter lets you specify an <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP response code</a> to return with the redirect command. The last parameter (which defaults to true), specifies whether to call exit() after the redirect. Even though it defaults to true, you really should write your redirects this way.</p>
]]></content:encoded>
			<wfw:commentRss>http://missingfeatures.com/2008/12/15/using-proper-cakephp-redirects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Seven Requirements for Printing Code for Review</title>
		<link>http://missingfeatures.com/2008/10/25/seven-requirements-for-printing-code-for-review/</link>
		<comments>http://missingfeatures.com/2008/10/25/seven-requirements-for-printing-code-for-review/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 21:11:49 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://missingfeatures.com/?p=185</guid>
		<description><![CDATA[A programmer who uses the wrong print format when circulating code for review is like Jar Jar Binks in Star Wars: just plain annoying. The right format is pretty simple, yet your correspondent frequently encounters programmers who don&#8217;t prepare the code in the right way.
Here are the dead-simple requirements for preparing code for circulation:

Make it [...]]]></description>
			<content:encoded><![CDATA[<p>A programmer who uses the wrong print format when circulating code for review is like <a href="http://starwars.wikia.com/wiki/Jar_Jar_Binks">Jar Jar Binks</a> in <a href="http://starwars.wikia.com/wiki/Main_Page">Star Wars</a>: just plain annoying. The right format is pretty simple, yet your correspondent frequently encounters programmers who don&#8217;t prepare the code in the right way.</p>
<p>Here are the dead-simple requirements for preparing code for circulation:</p>
<ol>
<li>Make it a PDF</li>
<li>Make the page orientation landscape*</li>
<li><strong>Include line numbers!</strong></li>
<li>Color the code</li>
<li>Include the filename at the top of each page</li>
<li>Include page numbers at the bottom of each page</li>
<li>The file name of the PDF should be the filename of the code</li>
</ol>
<p>If you are a programmer and you don&#8217;t follow these guidelines then all you are doing is putting your reviewer in a foul mood. Not the best way to start a review.</p>
<p>* After all, code tends to be <em>wider </em>than it is longer</p>
]]></content:encoded>
			<wfw:commentRss>http://missingfeatures.com/2008/10/25/seven-requirements-for-printing-code-for-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Images in CakePHP links</title>
		<link>http://missingfeatures.com/2008/10/24/using-images-in-cakephp-links/</link>
		<comments>http://missingfeatures.com/2008/10/24/using-images-in-cakephp-links/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 15:49:17 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[CakePHP tips]]></category>

		<guid isPermaLink="false">http://missingfeatures.com/?p=186</guid>
		<description><![CDATA[(This is the second post in a series of posts on CakePHP tips.)
The CakePHP link helper is a handy tool to create links in your application. Here is the basic syntax:
&#60;?php echo $html-&#62;link(&#8217;help!&#8217;,'/help&#8217;); ?&#62;
And there&#8217;s a helper for creating images, too:
&#60;?php echo $html-&#62;image(&#8217;add.gif&#8217;); ?&#62;
But what if you want to use an image in the link? [...]]]></description>
			<content:encoded><![CDATA[<p>(This is the second post in a <a href="/category/cakephp-tips/">series of posts on CakePHP tips</a>.)</p>
<p>The CakePHP link helper is a handy tool to create links in your application. Here is the basic syntax:</p>
<blockquote><p>&lt;?php echo $html-&gt;link(&#8217;help!&#8217;,'/help&#8217;); ?&gt;</p></blockquote>
<p>And there&#8217;s a helper for creating images, too:</p>
<blockquote><p>&lt;?php echo $html-&gt;image(&#8217;add.gif&#8217;); ?&gt;</p></blockquote>
<p>But what if you want to use an image in the link? If you try this:</p>
<blockquote><p>&lt;?php echo $html-&gt;link($html-&gt;image(&#8217;add.gif&#8217;),&#8217;/customers/add&#8217;)?&gt;</p></blockquote>
<p>You won&#8217;t get the image, but the HTML code of the image as the link. Lame!</p>
<p>CakePHP has built-in protection against SQL injection and cross site scripting attacks, so it doesn&#8217;t like outputting HTML without making it safe. So you need to turn off the HTML escaping to make the image work:</p>
<blockquote><p>&lt;?php echo $html-&gt;link($html-&gt;image(&#8217;add.gif&#8217;),&#8217;/customers/add&#8217;,array(&#8217;escape&#8217;=&gt;false))?&gt;</p></blockquote>
<p>Just pass in and set the <em>e</em><em>scape</em> parameter to <em>false </em>and you are home free.</p>
]]></content:encoded>
			<wfw:commentRss>http://missingfeatures.com/2008/10/24/using-images-in-cakephp-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using UTF8 In Your CakePHP App</title>
		<link>http://missingfeatures.com/2008/10/23/using-utf8-in-your-cakephp-app/</link>
		<comments>http://missingfeatures.com/2008/10/23/using-utf8-in-your-cakephp-app/#comments</comments>
		<pubDate>Thu, 23 Oct 2008 16:31:04 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[CakePHP tips]]></category>

		<guid isPermaLink="false">http://missingfeatures.com/?p=183</guid>
		<description><![CDATA[Your correspondent has been heavily developing a side-project for the last month in CakePHP, a MVC, RoR-inspired framework for building web applications in the dreaded language PHP.
Overall, it&#8217;s a great framework. There are some sore points (documentation is solid but there are lots of gaping holes), but overall your correspondent is confident that any PHP programmer who uses [...]]]></description>
			<content:encoded><![CDATA[<p>Your correspondent has been heavily developing a side-project for the last month in <a href="http://cakephp.org">CakePHP</a>, a <a href="http://en.wikipedia.org/wiki/Model-view-controller">MVC</a>, <a href="http://www.rubyonrails.org/">RoR</a>-inspired framework for building web applications in the <span style="text-decoration: line-through;">dreaded</span> language PHP.</p>
<p>Overall, it&#8217;s a great framework. There are some sore points (documentation is solid but there are lots of gaping holes), but overall your correspondent is confident that any PHP programmer who uses CakePHP for the first time will quickly be in the <em>I&#8217;m-never-doing-PHP-again-unless-I-have-some-kind-of-framework</em> camp. <strong>Seriously, never again</strong>.</p>
<p>Still, there were some things your correspondent wished he knew when he started. This will be the first is a <a href="/category/cakephp-tips/">series of posts on CakePHP tips</a> for newbies.</p>
<p><strong>CakePHP Tip: Start in UTF, everywhere</strong></p>
<p>Character encoding sucks <a href="http://www.joelonsoftware.com/articles/Unicode.html">but you kinda have to know about it</a>. To save yourself pain, just start on day one in UTF8 and there won&#8217;t be any encoding pain down the line.</p>
<p>First, add this to your layouts to have your pages output an HTML header that screams to the browser <em>I&#8217;m fucking UTF, OK?</em>. Put this line at the top of your layout (before any other output):</p>
<blockquote><p>&lt;?php header(&#8217;Content-type: text/html; charset=UTF-8&#8242;) ;?&gt;</p></blockquote>
<p>Just in case the first message fell on deaf browser ears, add this inside your HEAD tags as a backup:</p>
<blockquote><p>&lt;?php echo $html-&gt;charset(&#8217;utf-8&#8242;); ?&gt;</p></blockquote>
<p>Then, make sure you set your MySQL collation to utf8_general_ci <strong>before you start building your database</strong>. If you started your database in some kind of <em>latin </em>collation, sucks to be you. You will have to update the collation manually in every table and every column that is text, varchar or char.</p>
<p>Lastly, there is <a href="http://nik.chankov.net/2007/10/01/cakephp-and-character-set-in-the-database/">one more little gem</a> you need to do. You need to set the encoding on your CakePHP MySQL settings to utf8 to ensure that when Cake talks to MySQL, it&#8217;s using UTF. In your config/database.php file add this line as the last property for each connection:</p>
<blockquote><p>&#8216;encoding&#8217; =&gt; &#8216;utf8&#8242;</p></blockquote>
<p>So each database connection looks something like this:</p>
<blockquote><p>var $default = array(<br />
&#8216;driver&#8217; =&gt; &#8216;mysql&#8217;,<br />
&#8216;persistent&#8217; =&gt; false,<br />
&#8216;host&#8217; =&gt; &#8216;localhost&#8217;,<br />
&#8216;login&#8217; =&gt; &#8216;username&#8217;,<br />
&#8216;password&#8217; =&gt; &#8216;password&#8217;,<br />
&#8216;database&#8217; =&gt; &#8216;dbname&#8217;,<br />
&#8216;prefix&#8217; =&gt; &#8221;,<br />
<strong>&#8216;encoding&#8217; =&gt; &#8216;utf8&#8242;</strong><br />
);</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://missingfeatures.com/2008/10/23/using-utf8-in-your-cakephp-app/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Your Software Is Only as Good as the Testing You Do</title>
		<link>http://missingfeatures.com/2008/04/03/your-software-is-only-as-good-as-the-testing-you-do/</link>
		<comments>http://missingfeatures.com/2008/04/03/your-software-is-only-as-good-as-the-testing-you-do/#comments</comments>
		<pubDate>Thu, 03 Apr 2008 21:59:12 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Project Management]]></category>

		<guid isPermaLink="false">http://missingfeatures.com/2008/04/03/your-software-is-only-as-good-as-the-testing-you-do/</guid>
		<description><![CDATA[In the process of designing and managing the development of several web-based applications, your correspondent has come to learn a critical lesson in software development (that many others in the software industry likely already know):
Your software is only as good as the testing you perform. 
Your correspondent worked on the team that recently released an [...]]]></description>
			<content:encoded><![CDATA[<p>In the process of designing and managing the development of several web-based applications, your correspondent has come to learn a critical lesson in software development (that many others in the software industry likely already know):</p>
<blockquote><p><em>Your software is only as good as the testing you perform. </em></p></blockquote>
<p>Your correspondent worked on the team that recently released an online chat tool called <a href="http://www.universitywebchat.com" title="UniversityWebChat.com">University WebChat</a>. Powered by <a href="http://jquery.com" title="$().jQuery.status(">jQuery</a>, University WebChat enables college and university admissions recruiters to <a href="http://www.universitywebchat.com/features/#easytosetup">easily</a> host web chats for talking with <a href="http://www.mitadmissions.org/Ben.shtml" title="Outstanding blog detailing the admissions selection process.">prospective students</a><a href="http://www.universitywebchat.com" title="UniversityWebChat.com"></a>.</p>
<p><strong>The Bug</strong></p>
<p>The application was working great during beta testing, except when more than 20 chatters joined a room. Once we hit north of 20 chatters, odd things started to happen: chatters got booted from the room, some couldn&#8217;t join the room at all, others just got an endless connection waiting when trying to load the room URL.</p>
<p>But none of these issues happened consistently, only <em>consistently intermittently</em>. We couldn&#8217;t regularly reproduce the issue, so it was impossible to fix. We focused on other bugs.</p>
<p>A few weeks went by and we still had no luck in finding the cause of the issue. Then we decided to really test out the application by hosting a <a href="http://www.planetizen.com/node/30186">high-profile chat</a> where we expected more than 75 chatters.</p>
<p>What a difference a little pressure makes. We were forced to take a different approach to debugging the issue. So we ran a more complex test on the bug, and dug a bit into how Apache works (it&#8217;s a LAMP application). Eventually we found the source of the bug, fixed the issue and felt confident that the application would support 80 chatters in one room.</p>
<p><strong>Test, Debug, Refine and Repeat</strong></p>
<p>If we hadn&#8217;t been forced to test the application harder then the true source of the bug would never have been identified, the software wouldn&#8217;t scale as well as we needed it too and (worst of all) <strong>customers would have <a href="/2008/01/15/one-easy-step-to-lose-your-customers/" title="So long money!">had problems</a> with our software</strong>.</p>
<p>Your software won&#8217;t get better on its own &#8211; you have to force it to become better with great developers, useful features and most of all hard testing. Over and over again. From different angles and vectors. From different computers, networks, browsers, operating systems, locations, monitors and processors.</p>
<p>This isn&#8217;t a new revelation, granted. But an important one.</p>
<p><strong>Missing features <a href="/category/axioms/">axiom</a> #7: Your software is only as good as the testing you perform.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://missingfeatures.com/2008/04/03/your-software-is-only-as-good-as-the-testing-you-do/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Are You An Efficient Programmer?</title>
		<link>http://missingfeatures.com/2008/02/24/are-you-an-efficient-programmer/</link>
		<comments>http://missingfeatures.com/2008/02/24/are-you-an-efficient-programmer/#comments</comments>
		<pubDate>Mon, 25 Feb 2008 01:31:17 +0000</pubDate>
		<dc:creator>Justin</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://missingfeatures.com/2008/02/24/are-you-an-efficient-programmer/</guid>
		<description><![CDATA[Most programmers are really bad at programming. Grab 10 random students from a computer science masters program and your correspondent will happily wager a case of Brooklyn Brewery Chocolate Stout that at least nine of those programmers will fail a basic programming task.
Guns Don&#8217;t Kill People, Bad Code Kills People
Why should anyone care if most [...]]]></description>
			<content:encoded><![CDATA[<p>Most programmers are <a href="http://www.codinghorror.com/blog/archives/000781.html">really bad at programming</a>. Grab 10 random students from a computer science masters program and your correspondent will happily wager a case of <a href="http://en.wikipedia.org/wiki/Brooklyn_Brewery">Brooklyn Brewery</a> Chocolate Stout that at least nine of those programmers will fail a <a href="http://tickletux.wordpress.com/2007/01/24/using-fizzbuzz-to-find-developers-who-grok-coding/">basic programming task</a>.</p>
<p><strong>Guns Don&#8217;t Kill People, Bad Code Kills People</strong></p>
<p>Why should anyone care if most programmers are bad? Well, what if the same were true of surgeons? Or commercial airline pilots? Sure, human life doesn&#8217;t depend directly on the daily work of a programmer. But the software they create sure does.</p>
<p>Think about all of the bad code in the <a href="/2007/06/28/the-danger-of-nuclear-power-plants/">control systems of nuclear power plants</a> or in the computers <a href="http://ask.slashdot.org/article.pl?sid=04/03/03/2149257">under the hood of your car</a> as you speed down the highway at 115 mph.</p>
<p><strong>Are You Experienced?</strong></p>
<p>Experience has little to do with <a href="http://www.joelonsoftware.com/articles/HighNotes.html">programmer productivity</a> or even in determining if you are a good programmer. But good programmers do have one trait in common: <strong>good programmers work very efficiently</strong>.</p>
<p>Why? Well, it mostly boils down to two things:</p>
<ol>
<li>They are really smart;</li>
<li>They are really good at figuring things out.</li>
</ol>
<p>When a smart person who is good at figuring things out asks him or herself <em>how can I do this faster? </em>productivity gains are realized.</p>
<p><strong>Zen and the Art of Being a Productive Programmer </strong></p>
<p>Whenever your correspondent teaches a web technology class &#8212; be it a course on project management or XML-based web services &#8212; there is always a class spent talking about how to work efficiently.</p>
<p>Beyond tips for <a href="/2007/12/03/eight-easy-ways-to-be-more-productive/">basic productivity gains</a>, here are some specific techniques for web programmers:</p>
<ol>
<li>Use ALT-TAB to move between your code and your browser;</li>
<li>Use keyboard shortcuts;</li>
<li>Use a good <a href="http://en.wikipedia.org/wiki/Integrated_development_environment">IDE</a>;</li>
<li>Isolate and toggle when debugging;</li>
<li>Use <strong>small successful iterations</strong>; and,</li>
<li>Use a good query editor.</li>
</ol>
<p>ALT-TAB is straight forward enough. Don&#8217;t waste time moving your hand from the mouse to the keyboard. Sure, it only saves a second. But you are making this motion hundreds &#8212; perhaps thousands &#8212; of times per day. It adds up.</p>
<p>The same goes for keyboard shortcuts. Learn how to outdent.  Learn how to highlight an entire line of code. Learn how to highlight all of the code from your cursor to the end of a file. Learn how to save the file. Again, it adds up.</p>
<p><strong>My IDE Can Beat Up Your IDE! </strong></p>
<p>It&#8217;s quite simple to know if you are using an IDE that will make you more efficient:</p>
<ol>
<li>You like to program in it;</li>
<li><a href="http://xkcd.com/378/" title="Go Emacs.">It&#8217;s not VI</a>;</li>
<li>It <a href="http://en.wikipedia.org/wiki/IntelliSense">tells you</a> the parameters (and data types!) for built-in methods;</li>
<li>It tells you the parameters (and data types!) for the custom methods in your application; and,</li>
<li>It <a href="http://www.colourlovers.com/">colors</a> your code.</li>
</ol>
<p><strong>Isolate and Toggle</strong></p>
<p>The concept of <em>isolate and toggle </em>is a helpful way to speed up bug fixing (don&#8217;t worry, you will still spend more time fixing bugs than actual programming).</p>
<p>When you have a bug in your code, it&#8217;s caused by one or more outliers. Your job as a debugger is to eliminate each outlier until you find the root cause. You can only do this by eliminating each possiblity one at time. If you don&#8217;t, you might miss something.</p>
<p>Identify all the possible causes of the bug, isolate each one individually, and test (read: toggle your code) to eliminate each possible cause. One at time: isolate, toggle and test. Eventually, you will find the cause of the bug and you will know how to fix the issue.</p>
<p>Sure, sometimes it takes a little longer to fix a bug this way. But most of the time it takes a lot longer if you don&#8217;t.</p>
<p><strong>One Step at a Time</strong></p>
<p>Understanding and using the technique of <strong>small successful iterations</strong> is probably the single easiest way to be a more productive programmer. The idea is simple: when you code, code a little bit at a time then save (use a keyboard shortcut!), switch to your browser (use a keyboard shortcut!) and refresh (use a keyboard shortcut!).</p>
<p>Not even <a href="http://en.wikipedia.org/wiki/John_D._Carmack">Carmack</a> writes perfect code every time. You will make stupid mistakes frequently. So if you code just a few lines and test out those lines right away, you will know immediately where you need to look for the bug.</p>
<p><strong>Query Editors</strong></p>
<p>Using a good query editor is also a big help to productivity. MySQL <a href="http://www.mysql.com/products/tools/">has nothing</a> compared the productivity gains from using Microsoft SQL Server&#8217;s outstanding <a href="http://www.microsoft.com/downloads/details.aspx?FamilyID=c243a5ae-4bd1-4e3d-94b8-5a0f62bf7796&amp;displaylang=en">SQL Management Studio</a>. <strong>It is simply the single best platform for SQL development on the market</strong>, and a big competitive advantage for the Microsoft SQL platform.</p>
<p>The reason having a great query editor to use during development is a big productivity boost is that the alternative &#8212; writing the SQL in your application code &#8212; introduces a layer of <strike>abstraction</strike> complication between the database and your query. And this layer of complication isn&#8217;t designed to make debugging your SQL query any easier.</p>
<p>You can&#8217;t comment chunks out, run two similar queries at the same time and compare the results or see the results in the same window as the actual query. Worse still, it typically takes three commands (save, toggle and refresh) to see the results of a change to a query in your application code while you can get the same result in one command (execute) in a query editor tool.</p>
<p><strong>Get Your Own Money Bin</strong></p>
<p>The secret to becoming more productive at anything is to remember the <a href="/2007/12/19/everything-i-learned-i-learned-from-scrooge-mcduck/">lesson we learn from Scrooge McDuck</a>: <strong>work smarter, not harder</strong>.</p>
]]></content:encoded>
			<wfw:commentRss>http://missingfeatures.com/2008/02/24/are-you-an-efficient-programmer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
