<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:admin="http://webns.net/mvcb/"
	xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
	xmlns:content="http://purl.org/rss/1.0/modules/content/">

	<channel>

	<title>Kevin Thompson | Blog</title>
	<link>http://kevinthompson.info/blog/</link>
	<description>Blog posts by Kevin Thompson, a web developer and user experience designer from San Diego, Ca.</description>
	<dc:language>en</dc:language>
	<dc:creator>kevin@kevinthompson.info</dc:creator>
	<dc:rights>Copyright Kevin Thompson 2011</dc:rights>
	<dc:date>2011-07-25T02:31:39+00:00</dc:date>
	<admin:generatorAgent rdf:resource="http://expressionengine.com/" />
    
	
	<item>
		<title>iPhone &amp; iPad Browser Testing Using the iOS Simulator</title>
		<link>http://kevinthompson.info/blog/iphone-and-ipad-browser-testing-using-the-ios-simulator/</link>
		<guid>http://kevinthompson.info/blog/iphone-and-ipad-browser-testing-using-the-ios-simulator/</guid>
		<description><![CDATA[
		<p>On more than one occasion I&#8217;ve had clients, as well as fellow designers and developers, ask me to assist them in building a mobile (or iPhone specific) version of their website, following their request immediately with something like, &#8220;You do have an iPhone, right?&#8221;</p>

<p>I do happen to have an iPhone (although no iPad), but I rarely need to pick it up when developing and testing websites for iOS devices. Instead, I use the iOS Simulator.</p>

<div class="img"><img src="/images/blog/ios-browser-testing.jpg" /></div>

<h2>Why Should You Use iOS Simulator?</h2>

<p>Beyond simply being able to test websites on Mobile Safari without having a physical device, iOS Simulator has a few other advantages.</p>

<ul>
<li><strong>Local Development Sites</strong> – Using the iOS simulator, you can easily access development sites on your local machine that might otherwise be difficult to do so.</li>
<li><strong>Physical Keyboard</strong> – Instead of pecking away at on onscreen keyboard, you can save yourself a bit of time using the real thing.</li>
<li><strong>Multiple Environments</strong> – Easily test iPhones and iPads of varying screen resolutions in both possible orientations.</li>
</ul>

<h2>Getting Started</h2>

<p>Getting up and running with the iOS Simulator is extremely simple and really takes just two quick steps:</p>

<ol>
<li><a href="http://itunes.apple.com/us/app/xcode/id448457090?mt=12&amp;partnerId=30&amp;siteID=p8StJ7oxYpg-OcLxYt38ZD0gQu4327dDCg">Install Xcode</a> from the Mac App Store (Free)</li>
<li>Launch iOS Simulator</li>
</ol>

<p>Once Xcode is in stalled, The iOS Simulator can be found at <code>/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app</code></p>

<p>The iOS Simulator can also be found and launched through Spotlight,  <code>⌘ + space</code>, but it may take time for Spotlight to index the new files. If you&#8217;re using an application launcher such <a href="http://alfredapp.com">Alfred</a>, you might need to add <code>/Developer</code> to the <a href="http://help.alfredapp.com/indexing/">applications scope</a>.</p>

<p>After opening the iOS Simulator, simply launch Mobile Safari and direct the browser to your website of choice.</p>

<h2>Tips</h2>

<ul>
<li>Using the <code>⌘ + ←</code> and <code>⌘ + →</code> hotkeys you can quickly change the orientation of the iOS device.</li>
<li>You can assign hotkeys to various iOS devices using the Keyboard  Shortcuts panel of the Keyboard Preferences pane in System Preferences (see <a href="http://support.apple.com/kb/ht2490#l4">http://support.apple.com/kb/ht2490#l4</a>)</li>
<li>Script debugging can be enabled for Mobile Safari through the iOS Settings app under the Safari tab.</li>
</ul>

		]]></description> 
		<dc:subject>Design, User Experience</dc:subject>
		<dc:date>2011-07-25T02:31:39+00:00</dc:date>
	</item>
	
	<item>
		<title>Hiding JavaScript-Dependent Content</title>
		<link>http://kevinthompson.info/blog/hiding-javascript-dependent-content/</link>
		<guid>http://kevinthompson.info/blog/hiding-javascript-dependent-content/</guid>
		<description><![CDATA[
		<p>When implementing various JavaScript-dependent solutions such as image sliders and accordions, its easy to start throwing around <code>display:none;</code> attributes in your CSS to avoid seeing a flash of content before it&#8217;s removed by your JavaScript, but there&#8217;s another way to achieve the same result without alienating users that may have JavaScript disabled.</p>

<p>In order to ensure that your content remains visible when users happen to encounter it with JavaScript disabled, avoid hiding elements with CSS alone. Instead, apply a simple class to your <code>&lt;html&gt;</code> tag early during page rendering, then prefix JavaScript-dependent CSS with that class.</p>

<h2>Example</h2>

<h3>HTML</h3>

<p><script src="https://gist.github.com/1085836.js?file=index.html"></script>
<a href="https://gist.github.com/1085836">Available on Github &raquo;</a></p>

<h3>CSS</h3>

<p><script src="https://gist.github.com/1085836.js?file=style.css"></script>
<a href="https://gist.github.com/1085836">Available on Github &raquo;</a></p>

<p>By using this method, you&#8217;ve first verified that JavaScript is enabled before hiding content that your user may otherwise be deprived of.</p>

		]]></description> 
		<dc:subject>Code, User Experience</dc:subject>
		<dc:date>2011-07-16T00:22:11+00:00</dc:date>
	</item>
	
	<item>
		<title>Placeholder Image Services</title>
		<link>http://kevinthompson.info/blog/using-placeholder-images-for-lightning-fast-wireframes-and-mockups/</link>
		<guid>http://kevinthompson.info/blog/using-placeholder-images-for-lightning-fast-wireframes-and-mockups/</guid>
		<description><![CDATA[
		<p>From time to time, I find myself needing to create a quick HTML document to exemplify a concept, or to explore and alternative layouts in an existing project. When these quick and dirty prototypes need to include some form of imagery, I turn to one of my favorite placeholder image services.<!--more--></p>

<p>Depending on the type of page I&#8217;m creating (wireframe, mockup, whimsical tomfoolery), I typically choose from one of three services.</p>

<h2>Placehold.it</h2>

<p><a href="http://placehold.it">Placehold.it</a> is a simple, yet versatile, solution that I often use when creating wireframes. When wireframing, I typically do not want to portray any particular visual aesthetic, so the bare, monochromatic images from Placehold.it are ideal.</p>

<p>These images can be passed as little as the image width, or as much as the width, height, format, color, and text:</p>

<pre><code>&lt;img src="http://placehold.it/300" /&gt;
&lt;img src="http://placehold.it/400x200.png" /&gt;
&lt;img src="http://placehold.it/200/09f/&amp;text=Ad Unit" /&gt;
&lt;img src="http://placehold.it/600x100/09f/fff.png&amp;text=Big Blue Image!" /&gt;
</code></pre>

<div class="img"><img src="http://placehold.it/600x100/09f/fff.png&text=Big Blue Image!" alt="Placehold.it Example" /></div>

<h2>FlickHoldr.com</h2>

<p>When I need images with a bit more substance, such as when I&#8217;m mocking up a new layout for an existing site, I&#8217;ll often use <a href="http://flickholdr.com">FlickHoldr.com</a>, which can pull images based on a set of tags from <a href="http://flickr.com">Flickr</a>, to find images that suit the project.</p>

<p>FlickHoldr.com requires you send at least the width an height parameters of your image, but unlike Placehold.it, you can also specify tags, whether or not an image is black and white, and also an offset, which allows you to pull different images for the same size and tags:</p>

<pre><code>&lt;img src="http://flickholdr.com/300/300/" /&gt;
&lt;img src="http://flickholdr.com/300/300/2/" /&gt;
&lt;img src="http://flickholdr.com/200/300/sea,sun/1/" /&gt;
&lt;img src="http://flickholdr.com/400/200/kenny meyers,fetish/2/" /&gt;
</code></pre>

<div class="img"><img src="http://flickholdr.com/400/200/abstract,object/2/" /></div>

<h2>Placekitten.com</h2>

<p>Of the three, <a href="http://placekitten.com">Placekitten.com</a> tends to get the least use, but there&#8217;s still that rare occasion where you just need pictures of kittens. Placekitten.com doesn&#8217;t accept many parameters, in fact all they accept is width, height, and an option for black and white images:</p>

<pre><code>&lt;img src="http://placekitten.com/300/" /&gt;
&lt;img src="http://placekitten.com/300/100" /&gt;
&lt;img src="http://placekitten.com/g/600/100" /&gt;
</code></pre>

<div class="img"><img src="http://placekitten.com/g/600/100" /></div>

<hr />

<p>All three of these are great services that can help expedite your workflow, and while I&#8217;ve given you a few examples here, I&#8217;d recommend clicking through to each of them and reviewing their options. Figure out what works for you and have fun. If you know of any other placeholder image services, let me know in comments below!</p>

		]]></description> 
		<dc:subject>Design, Code</dc:subject>
		<dc:date>2011-03-10T20:07:49+00:00</dc:date>
	</item>
	
	<item>
		<title>Securing Your Staging Environment</title>
		<link>http://kevinthompson.info/blog/securing-your-staging-environment/</link>
		<guid>http://kevinthompson.info/blog/securing-your-staging-environment/</guid>
		<description><![CDATA[
		<p>While working as a part of a team or with a remote client, it&#8217;s often beneficial to have a staging environment accessible outside of your local office or VPN for quality assurance, editorial review, or client approval. However, when configuring your staging environment, there are several precautions you should take in order to guarantee the security and privacy of your work.<!--more--></p>

<h2>Restrict Search Engine Access</h2>

<p>In order to stop users from finding your staging environment in search engines, and also to avoid any <a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=66359">duplicate content issues</a> that could negatively impact the rankings of your production site, you&#8217;ll want add a restriction to the <code>robots.txt</code> file at the public root of our sites:</p>

<pre><code>User-agent: *
Disallow: /
</code></pre>

<p>These two lines alone, when added to our <code>robots.txt</code> file, will tell search engines to ignore all content on the site beginning at the root URL.</p>

<p><em><strong>Note:</strong> Be sure to remove these rules from the robots.txt file on your production site, otherwise it will not be indexed by search engines.</em></p>

<h2>Require User Login</h2>

<p>While adding a rule to your <code>robots.txt</code> file will stop search engines from indexing your staging environment, it will still be possible for users to access it unless you implement some form of user authentication. If you&#8217;re using an editorial platform or content management system such as Wordpress or ExpressionEngine, there is typically an option available in the site&#8217;s configuration, or a plugin that can be installed that will disable access to all unauthorized users.</p>

<p>For example, in ExpressionEngine, this option can be found in Admin > General Configuration > Is system on?. Once this option is changed to &#8220;no&#8221;, only member groups who&#8217;ve been allowed to view the site in offline mode will be able to access it.</p>

<h2>HTTP Authentication</h2>

<p>If you&#8217;re not using a platform that&#8217;s already capable of restricting user access, or you&#8217;ve yet to build user authentication into your site and you&#8217;re hosting the project on Apache, you can use basic HTTP authentication to limit access.</p>

<p>To create your HTTP authentication files, first create a file named <code>.htpasswd</code> and place it in your site root (take note of the full server path to this file as you&#8217;ll need it in the next step). Next, use the <a href="http://www.htaccesstools.com/htpasswd-generator/">htaccesstools.com htpassword generator</a> to create username and password pairs that will be added to your <code>.htpasswd</code> file. After adding each username and password pair to your <code>.htpasswd</code> file, use the <a href="http://www.htaccesstools.com/htaccess-authentication/">htaccess authentication generator</a> to create the authentication rules that will be added to your website&#8217;s <code>.htaccess</code> file.</p>

<p>Once these steps have been completed, when accessing a secure area of your site, you should be prompted to enter your username and password.</p>

<p>What steps do you take to secure your staging or beta environments? Share your tips in the comments below!</p>

		]]></description> 
		<dc:subject>Code</dc:subject>
		<dc:date>2011-03-09T21:02:59+00:00</dc:date>
	</item>
	
	<item>
		<title>Discovering Version Control &amp; Deployment Systems</title>
		<link>http://kevinthompson.info/blog/discovering-version-control-and-deployment-systems/</link>
		<guid>http://kevinthompson.info/blog/discovering-version-control-and-deployment-systems/</guid>
		<description><![CDATA[
		<p>For the last few years, I&#8217;ve managed and deployed my code using archaic, time consuming methods. Version control meant duplicating and renaming folders, and deployment was simply dragging and dropping files into an ftp client.<!--more--></p>

<p>While I had worked with version control systems in the past, I had yet to reach a point where I felt particularly comfortable working with them and, at the time, they seemed to be more of an inconvenience than anything. I did however recognize the potential benefits of using a VCS, so I continued to follow the growth of systems such SVN and Git.</p>

<h2>Enter Github</h2>

<p>Although <a href="http://github.com">Github</a> has been around for several years, it was only recently that I found myself using the site on an almost daily basis, following links from various open source projects or for addons and applications being developed by my friends and colleagues. Once I realized how much I had come to enjoy following and exploring repositories on Github, I knew I needed to make a greater effort in adopting some sort of version control system myself.</p>

<p>I began researching <a href="http://subversion.tigris.org/">SVN</a>, <a href="http://git-scm.com/">Git</a>, and <a href="http://mercurial.selenic.com/">Mercurial</a> in greater detail, but ultimately articles such as <a href="http://thenerdary.net/articles/entry/how_i_use_git">&#8220;How I use Git&#8221;</a> and <a href="http://nvie.com/posts/a-successful-git-branching-model/">&#8220;A successful Git branching model&#8221;</a>, along with my new found affinity for Github, lead me to use Git over the alternatives. I breezed through a <a href="http://learn.github.com/p/intro.html">few quick tutorials</a> on Git and before long I had created <a href="http://github.com/kevinthompson">a number of repositories on Github</a> and was thoroughly enjoying every <code>branch</code>, <code>commit</code>, and <code>merge</code>. For whatever reason, where previous version control systems had been difficult to adopt, Git just clicked.</p>

<p>While this new found workflow made development a breeze, I was still fumbling my way through deployment. Since it was easy enough to clone a repository with Git, I decided to clone a repository on the production server, then shell into the server and issue a <code>git pull</code> when I needed to deploy. While this was simpler than manually transferring files via FTP, it still required a few too many steps to make deploying my code the casual process I wanted it to be. To further simplify things, I wrote a shell script and setup a dedicated user for deployment on each server so that I could easily issue a command on my local machine and off the code would go. This, again, was another degree simpler, but the maintenance and management of these scripts and users still stole time away from development.</p>

<h2>Enter Beanstalk</h2>

<p>While researching Git, <a href="http://bnst.lk/e3HdOt">Beanstalk</a> was also mentioned fairly frequently in more recent articles. Beanstalk is a service that, for a small fee, will quickly deploy code from a Git or SVN repository over FTP with little to no effort. I decided to give Beanstalk a shot and signed up for their trial account. If you&#8217;re already familiar with Git or SVN, Beanstalk makes deployment a breeze. Once you&#8217;ve started your account, you&#8217;ll need to define your servers and configure deployment for each.</p>

<p>In my case, I typically have a staging environment and a production environment (with development being done on my local machine). I configure Beanstalk to automatically deploy my <code>staging</code> branch to my staging server on each push, and my <code>master</code> branch to my production server manually from the Beanstalk interface, or when I append <code>[deploy:production]</code> to a commit message in my master branch (or on a commit message merged into the master branch). With this configuration, it&#8217;s become trivial to deploy my code to either environment.</p>

<p>The addition of <a href="http://git-scm.com/">Git</a> and <a href="http://bnst.lk/e3HdOt">Beanstalk</a> to my workflow has not only simplified the management and deployment of code, but it&#8217;s also allowed me to spend more time doing what I truly enjoy, developing web applications.</p>

		]]></description> 
		<dc:subject>Code</dc:subject>
		<dc:date>2011-03-06T16:44:08+00:00</dc:date>
	</item>
	
	<item>
		<title>Completely remove index.php from ExpressionEngine URLs</title>
		<link>http://kevinthompson.info/blog/completely-remove-index-php-from-expressionengine-urls/</link>
		<guid>http://kevinthompson.info/blog/completely-remove-index-php-from-expressionengine-urls/</guid>
		<description><![CDATA[
		<p>While there are a <a href="http://expressionengine.com/wiki/Remove_index.php_From_URLs/">number of known solutions</a> for removing <code>index.php</code> from ExpressionEngine URLs, few developers realize that although URLs now resolve without <code>index.php</code>, the previous URLs including <code>index.php</code> also still exist.<!--more--></p>

<h2>The Example</h2>

<p>At the time of this writing, if you were to visit <a href="http://expressionengine.com/index.php/overview/">http://expressionengine.com/index.php/overview/</a> or <a href="http://expressionengine.com/overview/">http://expressionengine.com/overview/</a>, you&#8217;d be presented with the exact same page. Having the same content resolve at two distinct URLs can potentially harm <a href="http://www.google.com/support/webmasters/bin/answer.py?hl=en&amp;answer=66359">your search engine rankings</a> and disrupt your analytics.</p>

<h2>The Rules</h2>

<script src="https://gist.github.com/798018.js?file=.htaccess"></script>

<p class="gist-link"><a href="https://gist.github.com/798018">Available on Github &raquo;</a></p>

<h2>The Story</h2>

<p>A few weeks ago, while optimizing an ExpressionEngine installation, I was working to ensure that all invalid URLs either redirected to the appropriate URL, or returned a 404 error as necessary. During this process, I realized that URLs beginning with <code>index.php</code> still resolved, even though I thought I had removed <code>index.php</code> completely from URLs. I struggled for a few hours with various mod_rewrite rules in my <code>.htaccess</code> file but they all lead me into redirect loops. I ultimately settled on adding a <code>&lt;link rel="canonical" href="..." /&gt;</code> tag to all pages and added a rule to my <code>robots.txt</code> file that would stop spiders from crawling the additional URLs.</p>

<p>Although duplicate content was no longer a concern, as search engines should no longer see the <code>index.php</code> URLs, the fact that they existed, and that a user could potentially find the duplicate URL, still bothered me. I could have redirected users using PHP, but in this instance it seemed like a bit of a hack, and I couldn&#8217;t shake the feeling that there had to be a way to solve this with a mod_rewrite rule. I happened to be working through this issue on a thursday evening, so I decided to pop into the weekly <a href="https://eescreencasts.campfirenow.com/room/177927">ExpressionEngine Help Chat</a> to see if anyone else had come across it.</p>

<p>I asked my question and received a number of responses confirming the issue, but not offering much in the way of a solution. I left the chat open and continued tinkering with my <code>.htaccess</code> file. After a while I decided to check back in on the EE Help Chat, and to my surprise, <a href="http://twitter.com/erikreagan">Erick Reagan</a> and <a href="http://twitter.com/nevinlyne">Nevin Lyne</a> had worked out a potential solution:</p>

<pre><code>RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]
RewriteRule ^index\.php(.+) $1 [R=301,L]
</code></pre>

<p>I quickly modified my .htaccess file and sure enough, this new rule was able to catch URL requests beginning with index.php and issue a 301 redirect to the correct URL. The trick to circumventing the redirect loops I was encountering was using <code>%{THE_REQUEST}</code> to match the request string as opposed to the actual URL.</p>

<p>Thanks to Erik and Nevin my OCD has been suppressed, for now.</p>

<h2>The Update</h2>

<p>In the comments, <a href="http://kevinthompson.info/blog/completely-remove-index-php-from-expressionengine-urls/#comment-15">Manuel</a> pointed out the fact that the rules suggested by Erik and Nevin would break any <code>POST</code> request sent to an <code>index.php</code> URL. To resolve this, he suggested adding the following condition to the rewrite (which has already been included in the example above) that would restrict it to only <code>GET</code> requests:</p>

<pre><code>RewriteCond %{THE_REQUEST} ^GET
</code></pre>

		]]></description> 
		<dc:subject>Code</dc:subject>
		<dc:date>2011-03-04T13:30:42+00:00</dc:date>
	</item>
	
	<item>
		<title>Init();</title>
		<link>http://kevinthompson.info/blog/init/</link>
		<guid>http://kevinthompson.info/blog/init/</guid>
		<description><![CDATA[
		<p>I&#8217;ve oft longed to begin writing in some capacity; likely documenting or dissecting code and disseminating the odd amounts of web development knowledge I&#8217;ve accumulated over the years. Unfortunately, past attempts have failed as I find myself fumbling around in PhotoShop, manipulating pixels to no end in hopes of finding the &#8220;perfect&#8221; design for my phantom content.</p>

<!--more-->

<h2>Time for a change</h2>

<p>Over the last few weeks, I&#8217;ve pieced together a relatively simple design and configured the barest of <a href="http://expressionengine.com">ExpressionEngine</a> installations. The site now allows me to post simple blog posts and project entries, and for you, the reader, to navigate them in some capacity. I&#8217;ve set a goal for myself to produce at least one post per week, and at least one substantial post per month.</p>

<p>I hope to avoid posting trivial links, photos, or comments to this blog (but you&#8217;re welcome to <a href="http://twitter.com/kevinthompson">follow me on twitter</a> if you&#8217;re into that sort of thing), and I hope that over time it will serve as a valuable resource my peers and for fledgling designers and developers</p>

<p>I&#8217;m excited to finally begin producing content for a community that has fostered my growth as a developer for the past five years, and I hope that you&#8217;ll enjoy what I have to offer.</p>

		]]></description> 
		<dc:subject>Life</dc:subject>
		<dc:date>2011-03-01T16:51:19+00:00</dc:date>
	</item>
	

	</channel>
</rss>