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

<channel>
	<title>Traveling Forever Blog &#187; Programming</title>
	<atom:link href="http://travelingforever.com/blogs/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://travelingforever.com/blogs</link>
	<description>Change the world, one journey at a time.</description>
	<lastBuildDate>Sun, 18 Jul 2010 01:06:06 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ultimate Guide to Mailing Lists, Part 2</title>
		<link>http://travelingforever.com/blogs/2009/09/ultimate-guide-to-mailing-lists-part-2/</link>
		<comments>http://travelingforever.com/blogs/2009/09/ultimate-guide-to-mailing-lists-part-2/#comments</comments>
		<pubDate>Wed, 02 Sep 2009 21:19:09 +0000</pubDate>
		<dc:creator>Kirk</dc:creator>
				<category><![CDATA[(Online) Business]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[free mailing list templates]]></category>
		<category><![CDATA[mailing list]]></category>
		<category><![CDATA[templates]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://travelingforever.com/blogs/?p=232</guid>
		<description><![CDATA[Welcome to Part 2 of a 4 part series on Mailing Lists for Web Developers.
In Part 1 we went over Mailing List Providers, and in Part 2 we&#8217;ll be discussing mailing list templates. In Part 3 we&#8217;ll integrate a custom mailing list into Wordpress. Finally we&#8217;ll do some tracking and statistics with our mailing list [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><strong>Welcome to Part 2 of a 4 part series on Mailing Lists for Web Developers.</strong></p>
<p>In <a href="http://travelingforever.com/blogs/2009/09/ultimate-guide-to-mailing-lists-for-web-developers-part-1/">Part 1</a> we went over Mailing List Providers, and in Part 2 we&#8217;ll be discussing mailing list templates. In Part 3 we&#8217;ll integrate a custom mailing list into Wordpress. Finally we&#8217;ll do some tracking and statistics with our mailing list in Part 4.</p>
<p><strong>Download the example template used in this tutorial <a href="http://travelingforever.com/blogs/wp-content/uploads/2009/09/html_email_template.html">here</a>.</strong> (You may need to right-click Save Target As)</p>
<p><img class="alignleft size-large wp-image-240" title="examplenewsletter" src="http://travelingforever.com/blogs/wp-content/uploads/2009/09/examplenewsletter-500x496.jpg" alt="examplenewsletter" width="500" height="496" /></p>
<h3>Keys to Building HTML Template</h3>
<ul>
<li><strong>HTML/Minimal CSS Only</strong></li>
<li><strong>CSS must be within HTML (No linking elsewhere)</strong></li>
<li><strong>Tables Must be Used for Layout (No layout with CSS)</strong></li>
<li><strong>Not every reader allows images</strong></li>
<li><strong>Tracking can be done with embedded images ONLY</strong></li>
<li><strong>Variables Must be Set According to Mailer</strong></li>
</ul>
<p>As you can tell, our email templates are very limited. But even just with CSS, HTML, and Images, we can create a clean, pleasant template.</p>
<h3>How an Email Template is Built</h3>
<p>Email readers are funny things. While browsers have Javascript and Flash and interactivity, email is stuck in 2001. We have no Javascript functionality, very little CSS support, and no Flash interactivity whatsoever. We must be very careful about our design too, if we are to have it look consistent.</p>
<p>This is not the time to get insane with design. Simplicity is key with newsletter emails.</p>
<p>That being said, let&#8217;s look at the CSS code for our <a href="http://travelingforever.com/blogs/wp-content/uploads/2009/09/html_email_template.html">standard email newsletter template</a>:</p>
<h3>CSS Code</h3>
<pre class="brush: xml;">
&lt;body&gt;
&lt;STYLE&gt;
 .headerTop { background-color:#FFCC66; border-top:0px solid #000000; border-bottom:1px solid #FFFFFF; text-align:center; }
 .adminText { font-size:10px; color:#996600; line-height:200%; font-family:verdana; text-decoration:none; }
 .headerBar { background-color:#FFFFFF; border-top:0px solid #333333; border-bottom:10px solid #FFFFFF; }
 .title { font-size:20px; font-weight:bold; color:#CC6600; font-family:arial; line-height:110%; }
 .subTitle { font-size:11px; font-weight:normal; color:#666666; font-style:italic; font-family:arial; }
 td { font-size:12px; color:#000000; font-size: 80%; line-height:120%; font-family:arial; }
 .sideColumn { background-color:#005F79; border-left:1px dashed #CCCCCC; text-align:left; }
 .sideColumnText { font-size:11px; font-weight:normal; color:#000000; font-family:arial; line-height:150%; }
 .sideColumnTitle { font-size:15px; font-weight:bold; color:#333333; font-family:arial; line-height:150%; }
 .footerRow { background-color:#8C0042; border-top:10px solid #FFFFFF; }
 .footerText { font-size:10px; color:#996600; line-height:100%; font-family:verdana; }
 a { color:#960; }
&lt;/STYLE&gt;
&lt;!-- First Table would go here --!&gt;
</pre>
<p>You&#8217;ll notice the CSS is put within the BODY tag, with an old fashioned STYLE tag. That&#8217;s as fancy as we can get with our CSS. So deal with it, and change the things you need to individually. As in within the TABLE. </p>
<h3>Sylin&#8217; Tables</h3>
<p>Yes, you heard that right. Everything needs to be individually styled within the TABLES you create. So it&#8217;s a lot of rewriting code, and most things end up looking like this:</p>
<pre class="brush: xml;">
&lt;table width=&quot;100%&quot; cellpadding=&quot;10&quot; cellspacing=&quot;0&quot; bgcolor=&quot;#FFFFFF&quot; &gt;
&lt;tr&gt;
&lt;td valign=&quot;top&quot; align=&quot;center&quot;&gt;
&lt;table width=&quot;600&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot;&gt;
&lt;tr&gt;
&lt;td style=&quot;background-color:#FFCC66;border-top:0px solid #000000;border-bottom:1px solid #FFFFFF;text-align:center;&quot; align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size:10px;color:#996600;line-height:200%;font-family:verdana;text-decoration:none;&quot;&gt;Email not displaying correctly?
&lt;a href=&quot;*|ARCHIVE|*&quot; style=&quot;font-size:10px;color:#996600;line-height:200%;font-family:verdana;text-decoration:none;&quot;&gt;View it in your browser.&lt;/a&gt;
&lt;/span&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td height=&quot;108&quot; align=&quot;left&quot; valign=&quot;middle&quot; style=&quot;background-color:#FFFFFF;border-top:0px solid #333333;border-bottom:0px solid #fff&quot;&gt;
&lt;center&gt;
&lt;a href=&quot;&quot;&gt;
&lt;img src=&quot;http://travelingforever.com/blogs/wp-content/uploads/2009/09/example.jpg&quot;&gt;&lt;/a&gt;
&lt;/center&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/table&gt;
</pre>
<p>This process can be greatly sped up by using something like Dreamweaver. Yes, this is one time where as a web developer you&#8217;ll appreciate all the work that&#8217;s gone into FRAMES in Dreamweaver. So take it while you can.</p>
<h3>Images</h3>
<p>As you might have noticed above, you need to upload your images to your webserver before you can use them within your template. I find it easiest to do this from within Wordpress. Just click the upload/insert image, and then select the files you would like to insert into your newsletter. Once it finishes uploading, copy the url to your IMG tag.</p>
<p><a href="http://travelingforever.com/blogs/wp-content/uploads/2009/09/inserting.jpg"><img src="http://travelingforever.com/blogs/wp-content/uploads/2009/09/inserting-500x381.jpg" alt="inserting" title="inserting" width="500" height="381" class="alignleft size-large wp-image-256" /></a></p>
<p>Of course, you&#8217;ll need to resize your files way down, to under whatever your design calls for. My design calls for main images at 306px x 170px, and side images at 188 x 300. Just make sure it fits.</p>
<pre class="brush: xml;">
&lt;img src=&quot;http://travelingforever.com/blogs/wp-content/uploads/2009/09/example.jpg&quot; /&gt;
</pre>
<h3>Variables</h3>
<p>If you look through the template, you&#8217;ll see there are place holders for template variables. Such as the mailing list name, the subscriber&#8217;s name, etc. Depending on the mailing list provider you use, you may need to change these codes. In Part 3 we&#8217;ll run through these, and pick out just how to set variables.</p>
<p>In case you missed it, you can download the example template <a href="http://travelingforever.com/blogs/wp-content/uploads/2009/09/html_email_template.html">here</a>.</p>
<div style="text-align:center;">
<a href="http://aweber.com/?354052" title="Email Marketing"><br />
<img src="http://www.aweber.com/banners/email_marketing_easy/726x90.gif" alt="AWeber - Email Marketing Made Easy" style="border:none;" /></a>
</div>
<img src="http://travelingforever.com/blogs/?ak_action=api_record_view&id=232&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://travelingforever.com/blogs/2009/09/ultimate-guide-to-mailing-lists-part-2/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Ultimate Guide to Mailing Lists, Part 1</title>
		<link>http://travelingforever.com/blogs/2009/09/ultimate-guide-to-mailing-lists-for-web-developers-part-1/</link>
		<comments>http://travelingforever.com/blogs/2009/09/ultimate-guide-to-mailing-lists-for-web-developers-part-1/#comments</comments>
		<pubDate>Tue, 01 Sep 2009 20:32:37 +0000</pubDate>
		<dc:creator>Kirk</dc:creator>
				<category><![CDATA[(Online) Business]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[mailing list]]></category>
		<category><![CDATA[providers]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://travelingforever.com/blogs/?p=208</guid>
		<description><![CDATA[Welcome to Part 1 of a 4 part series on Mailing Lists for Web Developers.
In Part 1 we&#8217;ll go over Mailing List Providers, in Part 2 we&#8217;ll discuss mailing list templates, and in Part 3 we&#8217;ll integrate a custom mailing list into Wordpress. Finally we&#8217;ll do some tracking and statistics with our mailing list in [...]]]></description>
			<content:encoded><![CDATA[<p></p><p><strong>Welcome to Part 1 of a 4 part series on Mailing Lists for Web Developers.</strong></p>
<p>In Part 1 we&#8217;ll go over Mailing List Providers, in <a href="http://travelingforever.com/blogs/2009/09/ultimate-guide-to-mailing-lists-part-2/">Part 2</a> we&#8217;ll discuss mailing list templates, and in Part 3 we&#8217;ll integrate a custom mailing list into Wordpress. Finally we&#8217;ll do some tracking and statistics with our mailing list in Part 4.</p>
<p>Today, we&#8217;ll run down the Open Source options for people trying to get a mailing list up and running on any platform. I use Wordpress for most of my work, and all of the following have great integration with Wordpress.</p>
<p><strong>We have three options:</strong></p>
<p><strong>Free hosted provider</strong> &#8211; Such as <a href="http://www.feedburner.com">feedburner</a>. Robust tracking, but mailing list isn&#8217;t very customizable.<br />
<strong>Commercial Hosted Provider</strong> &#8211; Such as <a href="http://www.anrdoezrs.net/click-1899703-1668329">Constant Contact</a>. Robust tracking and mailing list, but paid monthly, hosted elsewhere.<br />
<strong>Free Local Provider</strong> &#8211; Such as <a href="http://www.phplist.com/">PHPList</a>. Hosted on our webservers, robust tracking and mailing list, but a pain to set up and maintain.</p>
<h3>Free Hosted Provider: <a href="http://www.feedburner.com">FeedBurner</a></h3>
<p><strong> </strong><a href="http://www.feedburner.com"><img class="alignleft size-large wp-image-210" title="feedburner" src="http://travelingforever.com/blogs/wp-content/uploads/2009/09/feedburner-500x324.jpg" alt="feedburner" width="500" height="324" /></a></p>
<p>FeedBurner makes managing RSS feeds and gathering statistics very easy. Since being acquired by Google in 2007, they have also made email newsletter subscriptions available for free. They offer very robust statistics, so you can tell everything about your subscriber&#8217;s habits. However, you can only fill your newsletter with an RSS feed.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Easy Setup</li>
<li>Robust Statistics</li>
<li>Integrate with Wordpress Immediately</li>
<li>Copy and Paste Level Difficulty</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Feed controlled by Google</li>
<li>User statistics owned by Google</li>
<li>Stuck with RSS feeds turned into mailing list contents</li>
<li>Not very robust for customization</li>
</ul>
<p><strong>Verdict: Best For Newbs</strong></p>
<p>If you&#8217;re just starting out blogging, you need to have some way to keep in touch with your readers. Google&#8217;s feedburner makes it easy as possible. What you give up in control of your list you make up for with ease of use and robust tracking statistics. Get up and get running quickly with feedburner.</p>
<h3>Commercial Hosted Provider: <a href="http://www.anrdoezrs.net/click-1899703-1668329">Constant Contact</a></h3>
<p><img src="http://www.tqlkg.com/image-1899703-1668329" border="0" alt="" width="1" height="1" /><a href="http://www.anrdoezrs.net/click-1899703-1668329"><img class="alignleft size-large wp-image-209" title="Constant Contact" src="http://travelingforever.com/blogs/wp-content/uploads/2009/09/constantcontact-500x301.jpg" alt="Constant Contact" width="500" height="301" /></a><br />
Constant Contact is a good example of a commercial mailing list provider. Almost everything is taken care of for you, from template management to subscriber tracking, to Wordpress integration. It&#8217;s all there, and you get a level of quality only available for paid software.</p>
<p><strong>Pros:</strong></p>
<ul>
<li>Immediate functionality</li>
<li>Robust Tracking</li>
<li>Strong Customization Features</li>
<li>Prebuilt Templates</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Not Free</li>
<li>Data Still hosted Elsewhere (Although you can back up locally all information)</li>
</ul>
<p><strong>Verdict: Best For Paid Clients</strong></p>
<p>This is a great solution for paid clients. They just want functionality, robustness, and ease of use. If something goes wrong, your clients can call customer service <em>instead of you</em>. Giving clients a commercial product gets me out of the way and lets them take care of things for themselves.</p>
<h3>Free Local Provider: <a href="http://www.phplist.com/">PHPList</a> w/ Custom Integration</h3>
<p><a href="http://www.phplist.com"><img class="alignleft size-large wp-image-212" title="phplist" src="http://travelingforever.com/blogs/wp-content/uploads/2009/09/phplist-500x329.jpg" alt="phplist" width="500" height="329" /></a></p>
<p><strong>Pros:</strong></p>
<ul>
<li>Open Source, Free</li>
<li>Robust; Powerful</li>
<li>Own all Information</li>
<li>Complete Control</li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>Difficult to use</li>
<li>(Possibly) Difficult to integrate</li>
<li>Steep learning curve</li>
</ul>
<p><strong>Verdict: Developers Only </strong></p>
<p>Even though PHPList is easy to install, configuring it and setting it up for your own personal use can be a headache. There is documentation, but there are a thousand little steps that take time. It is, however, worth your time to learn the process, especially if you are a web developer. There are some things you can only do with PHPList as your base. This is my preferred mailer, but it is only because I have put so much time into learning the process of building a list within it.</p>
<h3>Summing Up</h3>
<p>We have 3 main options for a mailing list provider:<br />
<strong><a href="http://www.feedburner.com/">Feedburner</a></strong> &#8211; Free service from Google, not very customizable. Best for beginners.<br />
<strong><a href="http://www.anrdoezrs.net/click-1899703-1668329">Paid Option</a></strong> &#8211; Best for clients, sign them up, then let them do the work. Best for Businesses.<br />
<strong>Open Source (<a href="http://www.phplist.com">PHPList</a>)</strong> &#8211; Best for developers. Learn the process of building a mailing list at every step.</p>
<h3>What&#8217;s next</h3>
<p>In <a href="http://travelingforever.com/blogs/2009/09/ultimate-guide-to-mailing-lists-part-2/">Part 2</a> we&#8217;ll discuss building our mailing list templates. These are built using basic CSS and HTML. Depending on our provider, we&#8217;ll have a few variables we can use, such as a subscriber&#8217;s name, custom tracking software, etc. It&#8217;s easy enough, but it&#8217;s not well documented. We&#8217;ll also discuss how to make our Mailing Lists readable from within web based mailers, something nobody seems to get right.</p>
<div style="text-align:center;">
<a href="http://aweber.com/?354052" title="Email Marketing"><br />
<img src="http://www.aweber.com/banners/email_marketing_easy/726x90.gif" alt="AWeber - Email Marketing Made Easy" style="border:none;" /></a>
</div>
<img src="http://travelingforever.com/blogs/?ak_action=api_record_view&id=208&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://travelingforever.com/blogs/2009/09/ultimate-guide-to-mailing-lists-for-web-developers-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>From PSD to Wordpress, Part 2</title>
		<link>http://travelingforever.com/blogs/2009/07/from-psd-to-wordpress-part-2/</link>
		<comments>http://travelingforever.com/blogs/2009/07/from-psd-to-wordpress-part-2/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 22:15:48 +0000</pubDate>
		<dc:creator>Kirk</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://travelingforever.com/blogs/?p=152</guid>
		<description><![CDATA[When we last left off in part one, we had built a complete homepage from a PSD mockup. It loaded the latest content and looked very minimal. Next, we’ll build out the rest of the pages, ending up with a complete theme we can load  from within Wordpress itself.
First, we&#8217;ll create our blog post [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>When we last left off in <a href="http://travelingforever.com/blogs/2009/02/converting-psd-to-wordpress-theme/">part one</a>, we had built a complete homepage from a PSD mockup. It loaded the latest content and looked very minimal. Next, we’ll build out the rest of the pages, ending up with a complete theme we can load  from within Wordpress itself.</p>
<p>First, we&#8217;ll create our blog post layout in Photoshop. I decided to keep a minimalist approach, consistent with the homepage. We have a quote on the left sidebar, and on the right we&#8217;ll have a list of related links.</p>
<p><a href="http://travelingforever.com/blogs/wp-content/uploads/2009/07/mockuppost.jpg"><img class="alignnone size-large wp-image-156" title="Mocked Up Post" src="http://travelingforever.com/blogs/wp-content/uploads/2009/07/mockuppost-500x520.jpg" alt="Mocked Up Post" width="500" height="520" /></a><br />
<span id="more-152"></span></p>
<h1>Step 1: Separating header and footer</h1>
<p>This layout is easily mocked up in html. But you&#8217;ll notice, we&#8217;re reusing the header and footer parts from the homepage. As such, we should create a <strong>header.php</strong> file, and a <strong>footer.php</strong> file. This will make it easier to make changes to the header and footer in the future. If we decide to change the date, for instance, we only need to edit one file, as opposed to editing each individual template file. This is easily done, just cut and paste the code out like so:</p>
<p><strong>header.php</strong></p>
<pre class="brush: xml;">
&lt;?php
/**
 * @package WordPress
 * @subpackage zothcorp_theme
 */
?&gt;
&lt;!DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
&lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &lt;?php language_attributes(); ?&gt;&gt;

&lt;head profile=&quot;http://gmpg.org/xfn/11&quot;&gt;
&lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;&lt;?php bloginfo('html_type'); ?&gt;; charset=&lt;?php bloginfo('charset'); ?&gt;&quot; /&gt;

&lt;title&gt;&lt;?php wp_title('&amp;laquo;', true, 'right'); ?&gt; &lt;?php bloginfo('name'); ?&gt;&lt;/title&gt;

&lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
@import url( &lt;?php bloginfo('stylesheet_url'); ?&gt; );
&lt;/style&gt;

&lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;RSS 2.0&quot; href=&quot;&lt;?php bloginfo('rss2_url'); ?&gt;&quot; /&gt;
&lt;link rel=&quot;alternate&quot; type=&quot;text/xml&quot; title=&quot;RSS .92&quot; href=&quot;&lt;?php bloginfo('rss_url'); ?&gt;&quot; /&gt;
&lt;link rel=&quot;alternate&quot; type=&quot;application/atom+xml&quot; title=&quot;Atom 1.0&quot; href=&quot;&lt;?php bloginfo('atom_url'); ?&gt;&quot; /&gt;

&lt;link rel=&quot;pingback&quot; href=&quot;&lt;?php bloginfo('pingback_url'); ?&gt;&quot; /&gt;
&lt;?php wp_get_archives('type=monthly&amp;format=link'); ?&gt;
&lt;?php //comments_popup_script(); // off by default ?&gt;
&lt;?php wp_head(); ?&gt;
&lt;/head&gt;

&lt;body&gt;
&lt;div id=&quot;wrapper&quot;&gt;
  &lt;div id=&quot;header&quot;&gt;
  &lt;div id=&quot;logo&quot;&gt;&lt;img src=&quot;/images/logo.png&quot; /&gt;&lt;/div&gt;
    &lt;div id=&quot;sitename&quot;&gt;&lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;/&quot;&gt;(&lt;?php bloginfo('name'); ?&gt;)&lt;/a&gt;&lt;!-- Wordpress Site Name Code Here --&gt;&lt;/div&gt;
    &lt;br clear=&quot;all&quot; /&gt;    &lt;hr /&gt;
  &lt;div id=&quot;mainimage&quot;&gt;&lt;img src=&quot;/images/mainimage.jpg&quot; /&gt;&lt;!-- Wordpress Main Image Code Here --&gt;&lt;/div&gt;

    &lt;div id=&quot;sitenav&quot;&gt;
&lt;ul&gt;
      &lt;li&gt;&lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;/&quot;&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;!-- Wordpress Home Page --&gt;
&lt;?php wp_list_pages('title_li='); ?&gt; &lt;!-- Wordpress Pages Here --&gt;
      &lt;/ul&gt;
    &lt;/div&gt;
  &lt;/div&gt;

&lt;div id=&quot;content&quot;&gt;
&lt;!-- end header --&gt;
</pre>
<p>And the <strong>footer.php</strong> file, it&#8217;s the exact same:</p>
<pre class="brush: xml;">
&lt;?php
/**
 * @package WordPress
 * @subpackage zothcorp_theme
 */
?&gt;

&lt;!-- Begin Wordpress Footer --&gt;
&lt;br clear=&quot;all&quot; /&gt;
&lt;div id=&quot;footer&quot;&gt;
&lt;?php bloginfo('name'); ?&gt; is powered by &lt;a href=&quot;http://www.zothcorp.com/&quot;&gt;zotheme&lt;/a&gt; by Kirk Kaiser&lt;br /&gt;&lt;?php wp_footer(); ?&gt;
&lt;/div&gt;
&lt;!-- End Wordpress Footer --&gt;
&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>We make sure and include the @package and @subpackage so we can keep track of which files are which. The bloginfo(&#8216;name&#8217;); call retrieves the blog name, and the wp_footer(); is included so plugins are made aware of the footer&#8217;s location.</p>
<p>As we&#8217;ve taken out the top and bottom of the <strong>index.php</strong>&#8217;s file, we&#8217;ll need to make sure it loads the header and footer. Easily enough, we just need to add get_header(); to the top, and get_footer(); to the bottom of our homepage. Easy enough.</p>
<h1>Step 2: Laying Down the Content</h1>
<p>With the header and the footer taken care of, we only need to work on the content now. The layout of content should look something like the following:</p>
<pre class="brush: xml;">
&lt;?php get_header(); ?&gt; &lt;!-- Load the Header --&gt;
&lt;div class=&quot;widecol&quot;&gt;
    &lt;h1&gt;Truth and Lies&lt;/h1&gt;
   &lt;div id=&quot;dacontent&quot;&gt;
   &lt;div class=&quot;inlineexcerpt&quot;&gt;
   &lt;p&gt;The dream and the dreamer&lt;/p&gt;
   &lt;/div&gt;
   &lt;p&gt;&lt;strong&gt;This is some lengthy intro text.&lt;/strong&gt; And this is some filler&lt;/p&gt;
   &lt;/div&gt; &lt;!-- dacontent --&gt;
   &lt;div id=&quot;sidebar&quot;&gt;
  &lt;ul&gt;
  &lt;h2&gt;Latest Posts&lt;/h2&gt;
  &lt;li&gt;&lt;a href=&quot;#&quot;&gt;The Dream&lt;/a&gt;&lt;span&gt;&lt;p&gt;This is some filler.&lt;/p&gt;
&lt;/span&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href=&quot;#&quot;&gt;The Myth&lt;/a&gt;&lt;span&gt;&lt;p&gt;This is some filler.&lt;/p&gt;
&lt;/span&gt;&lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt; &lt;!-- #sidebar --&gt;
&lt;/div&gt; &lt;!-- #widecol --&gt;
&lt;?php get_footer(); ?&gt; &lt;!-- Get the Footer --&gt;
</pre>
<p>Save this template file, and load it in a web browser, you&#8217;ll get something like this, which is perfect:</p>
<p><a href="http://travelingforever.com/blogs/wp-content/uploads/2009/07/mockuphtml.jpg"><img class="alignnone size-large wp-image-160" title="mockuphtml" src="http://travelingforever.com/blogs/wp-content/uploads/2009/07/mockuphtml-500x326.jpg" alt="mockuphtml" width="500" height="326" /></a></p>
<h1>Step 3: Doing the CSS hustle</h1>
<p>Now it&#8217;s time to begin turning this html mockup into a great looking CSS masterpiece. First, create the code to define each and every div class and get the basic layout, then follow through with the nitty gritty fonts.</p>
<pre class="brush: css;">
.widecol {
width: 946px;
margin: 0;
padding: 0;
}

h1 a {
text-align: left;
font-size: 90px;
margin: 3em 0 0.1em 180px;
letter-spacing: -0.06em;
color: #222;
}

h1 a:hover {
color: #E86AD3;
}

.widecol h1 {
color: #222;
font-size: 7em;
letter-spacing: -0.05em;
margin: 0.5em 0 0.5em 180px;
text-align: left;
}

#content h2 {
color: #222;
font-size: 3em;
letter-spacing: -0.05em;
margin: 1em 0 0.5em 180px;
text-align: left;
}

#content hr {
margin-top: 10px;
        margin-bottom: 1em;
}

#dacontent {
position: relative;
width: 476px;
float: left;
clear: left;
margin: 0;
padding: 0 270px 0 180px;
font-size: 16px;
font-family: Palatino,Georgia,'Times New Roman',serif;
text-align: left;
line-height: 1.5em;
text-indent: 1em;
}

#dacontent strong {
font-size: 1.125em;
line-height: 1.125em;
font-family: &quot;Helvetica Neue&quot;,Helvetica,Arial,sans-serif;
font-weight: bold;
color: #353E34;
}

.inlineexcerpt {
margin: 1em 1em 1em -180px;
float: left;
position: relative;
width: 148px;
font-weight: bold;
line-height: 1.25em;
font-family: &quot;Helvetica Nue&quot;, Helvetica, Arial, sans-serif;
font-size: 1.4em;
}
.introtext {
background-color: #e9e8e8;
color: #000000;
border: 1px solid #d6d5ce;
font-size: 4em;
height: 175px;
text-align: left;
font-family: Arial, Helvetica, sans-serif;
padding: 30px 10px 30px 10px;
}

.introtext p {
margin: 0;
padding: 0;
}

#sidebar {
margin: 1.5em 0em 1em -184px;
float: right;
position: relative;
width: 164px;
    overflow: visible;
line-height: 1.25em;
font-family: &quot;Helvetica Nue&quot;, Helvetica, Arial, sans-serif;
text-align: left;
}

#sidebar h2 {
font-size: 1.9em;
font-weight: bold;
        margin: 1em 0;
}
#sidebar li {
line-height: 1.25em;
list-style-type: none;
margin-bottom: 0.5em;
width: 164px;
font-size: 1.25em;
}

#sidebar a {
font-size: 1.4em;
font-weight: bold;
color: #0080C0;
text-decoration: none;
}
</pre>
<p>All of this gets inserted into your <strong>style.css</strong> file. If you&#8217;re following along, building the site out with me, you can load the non-dynamic <strong>post.php</strong>, and see how things look so far. If you&#8217;re lucky, they&#8217;ll look just like the mock up. If not, the best utility for debugging CSS errors is <a href="http://getfirebug.com/">Firebug</a>. Install it, then right-click, and go to inspect element. You can tweak your design live, editing CSS in place and seeing how Firefox displays. If only IE was this easy to develop in.</p>
<h1>Step 4: Getting Jiggy with Interaction</h1>
<p>Getting interactive is almost too easy. We start a loop, then we fetch the title, content, excerpt, and sidebar. Three easy calls, the page is completely dynamic.<br />
<strong>single.php</strong></p>
<pre class="brush: xml;">
&lt;?php
/**
 * @package WordPress
 * @subpackage zothcorp_theme
 */
?&gt;

&lt;?php get_header(); ?&gt;

&lt;div class=&quot;widecol&quot;&gt;
 &lt;?php while (have_posts()) : the_post(); ?&gt;

   &lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;
   &lt;div id=&quot;dacontent&quot;&gt;
   &lt;div class=&quot;inlineexcerpt&quot;&gt;
   &lt;?php the_excerpt(); ?&gt;
   &lt;/div&gt;
   &lt;?php the_content(); ?&gt;
   &lt;/div&gt;

  &lt;?php endwhile; ?&gt;
&lt;?php get_sidebar(); ?&gt;
&lt;/div&gt;

&lt;br clear=&quot;all&quot; /&gt;
&lt;?php get_footer(); ?&gt;
</pre>
<h1>Step 5: Lather, Rinse, &#8230;Reuse?</h1>
<p>Now that we&#8217;ve built out our main post, we can continue building a <strong>category.php</strong> file to display categories, and a <strong>page.php</strong> file to display pages. Easy enough, because we&#8217;ve done the hard part already.</p>
<p><strong>category.php</strong></p>
<pre class="brush: xml;">
&lt;?php
/**
 * @package WordPress
 * @subpackage zothcorp_theme
 */
?&gt;

&lt;?php get_header(); ?&gt;

 &lt;h1&gt;&lt;?php  the_category(' /'); ?&gt;&lt;/h1&gt;
 &lt;hr /&gt;

&lt;div class=&quot;widecol&quot;&gt;
 &lt;?php while (have_posts()) : the_post(); ?&gt;
   &lt;h2&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;Permanent Link to &lt;?php the_title_attribute(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
   &lt;div id=&quot;dacontent&quot;&gt;
   &lt;div class=&quot;inlinecatimage&quot;&gt;
   &lt;a href=&quot;&lt;?php echo get_permalink(); ?&gt;&quot;&gt;&lt;?php dp_attachment_image($post-&gt;ID, 'thumbnail', 'alt=&quot;' . $post-&gt;title . '&quot;'); ?&gt;&lt;/a&gt;
   &lt;/div&gt;

   &lt;div class=&quot;inlineexcerpt&quot;&gt;
   &lt;?php the_excerpt(); ?&gt;
   &lt;/div&gt;
   &lt;?php the_content(); ?&gt;
   &lt;/div&gt;

   &lt;br clear=&quot;all&quot; /&gt;
   &lt;hr /&gt;
  &lt;?php endwhile; ?&gt;

&lt;br clear=&quot;all&quot; /&gt;
&lt;?php get_footer(); ?&gt;
</pre>
<p>And finally, our <strong>page.php</strong>:</p>
<pre class="brush: xml;">
&lt;?php
/**
 * @package WordPress
 * @subpackage zothcorp_theme
 */
?&gt;

&lt;?php get_header(); ?&gt;

&lt;div class=&quot;widecol&quot;&gt;
 &lt;?php while (have_posts()) : the_post(); ?&gt;

   &lt;h1&gt;&lt;?php the_title(); ?&gt;&lt;/h1&gt;
   &lt;div id=&quot;dacontent&quot;&gt;
   &lt;div class=&quot;inlineexcerpt&quot;&gt;
   &lt;?php the_excerpt(); ?&gt;
   &lt;/div&gt;
   &lt;?php the_content(); ?&gt;
   &lt;?php wp_link_pages(array('before' =&gt; '&lt;p&gt;&lt;strong&gt;Pages:&lt;/strong&gt; ', 'after' =&gt; '&lt;/p&gt;', 'next_or_number' =&gt; 'number')); ?&gt;
   &lt;/div&gt;
  &lt;?php endwhile; ?&gt;
&lt;/div&gt;
&lt;br clear=&quot;all&quot; /&gt;
&lt;?php get_footer(); ?&gt;
</pre>
<p>If you were really paying attention, you may have noticed an earlier get_sidebar(); call. We haven&#8217;t made a <strong>sidebar.php</strong> yet. Let&#8217;s do that:</p>
<pre class="brush: xml;">
&lt;div id=&quot;sidebar&quot;&gt;
&lt;ul&gt;
&lt;h2&gt;Latest Posts&lt;/h2&gt;
&lt;?php
$myposts = get_posts('numberposts=10&amp;offset=1');
foreach($myposts as $post) :
?&gt;
&lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink(); ?&gt;&quot;&gt;&lt;?php the_title();
?&gt;&lt;/a&gt;&lt;span&gt;&lt;?php the_excerpt(); ?&gt;&lt;/span&gt;&lt;/li&gt;
&lt;?php endforeach; ?&gt;
&lt;/ul&gt;
&lt;/div&gt;
</pre>
<p>This code gets the latest ten posts, with a title and an excerpt from each one. It then displays it in a list.</p>
<h1>Step 6: Packaging it all together</h1>
<p>Rounding out our theme, we&#8217;ll end by creating a <strong>404.php</strong> file, which is displayed when people try to go to a page that doesn&#8217;t exist. Here&#8217;s what I came up with:</p>
<p><strong>404.php</strong></p>
<pre class="brush: xml;">
&lt;?php
/**
 * @package WordPress
 * @subpackage zothcorp_theme
 */
?&gt;

&lt;?php get_header(); ?&gt;

&lt;div class=&quot;widecol&quot;&gt;
&lt;h1&gt;Oh, Snap!&lt;/h1&gt;
   &lt;div id=&quot;dacontent&quot;&gt;
    The page you were looking for isn't here. Woops!
   &lt;/div&gt;
&lt;/div&gt;
&lt;br clear=&quot;all&quot; /&gt;
&lt;?php get_footer(); ?&gt;
</pre>
<p>Zip the files up, and upload to your server. Activate it, and hopefully, you&#8217;ll have a brand new working theme. All in a hundred million easy steps. If only everything was this (not really) easy!</p>
<p>Tomorrow I&#8217;ll upload a complete theme file, including all the PSD source files. You can have it and play with it as much as you like, it&#8217;ll be a completely free release. Until next time&#8230;</p>
<img src="http://travelingforever.com/blogs/?ak_action=api_record_view&id=152&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://travelingforever.com/blogs/2009/07/from-psd-to-wordpress-part-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Converting PSD to Wordpress Theme</title>
		<link>http://travelingforever.com/blogs/2009/02/converting-psd-to-wordpress-theme/</link>
		<comments>http://travelingforever.com/blogs/2009/02/converting-psd-to-wordpress-theme/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 22:52:29 +0000</pubDate>
		<dc:creator>Kirk</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://travelingforever.com/blogs/?p=104</guid>
		<description><![CDATA[Today we&#8217;ll be building a minimalist Wordpress theme from a Photoshop mock up. We&#8217;ll start from scratch, so we can really understand how themes work within Wordpress, and what a real life workflow looks like. There will even be some custom PHP function code. Yikes! The theme&#8217;s files are located here. Once we finish, we&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Today we&#8217;ll be building a minimalist Wordpress theme from a Photoshop mock up. We&#8217;ll start from scratch, so we can really understand how themes work within Wordpress, and what a real life workflow looks like. There will even be some custom PHP function code. Yikes! The theme&#8217;s files are located <a href="http://travelingforever.com/blogs/wp-content/uploads/2009/02/zotheme.zip">here</a>. Once we finish, we&#8217;ll move on to <a href="http://travelingforever.com/blogs/2009/07/from-psd-to-wordpress-part-2/">part 2</a>, where we build out the rest of the site&#8217;s pages, and end up with a complete Wordpress theme.</p>
<h3>Step 1 &#8211; Analyzing your PSD</h3>
<p>First, we&#8217;ll take a look at the mockup we&#8217;ll be using.You&#8217;ll notice it doesn&#8217;t look very complicated.</p>
<div class="tutorial_image"><a href="http://travelingforever.com/blogs/wp-content/uploads/2009/02/tutorialayout.jpg"><img class="alignnone size-large wp-image-140" title="PSD Mockup" src="http://travelingforever.com/blogs/wp-content/uploads/2009/02/tutorialayout-500x520.jpg" alt="PSD Mockup" width="500" height="520" /></a></div>
<p>That&#8217;s a Good Thing, because building a Wordpress theme from scratch involves a lot of steps. For our first theme, it&#8217;s much better to keep things simple, so we can focus on the individual steps. First, we&#8217;ll split our mock up into HTML, then we&#8217;ll add our CSS and images. Next, we&#8217;ll replace the static html code with dynamic Wordpress template code. Finally, we&#8217;ll break our code off into individual files, so our header, footer, and functions can be reused by every template we create.</p>
<p>I also like to get an idea for what portions of my mockup will be dynamic here. Greed, Power, and Avarice will be categories, and the rest is outlined below.</p>
<div class="tutorial_image"><a href="http://travelingforever.com/blogs/wp-content/uploads/2009/02/layoutforwordpress1.jpg"><img class="alignnone size-large wp-image-143" title="layoutforwordpress1" src="http://travelingforever.com/blogs/wp-content/uploads/2009/02/layoutforwordpress1-500x520.jpg" alt="layoutforwordpress1" width="500" height="520" /></a></div>
<p><span id="more-104"></span></p>
<h3>Step 2 &#8211; Breaking the PSD Down into HTML</h3>
<p>We&#8217;ll start with the top portion of the PSD. I like to make the html mockup as easy as possible by breaking everything down into div&#8217;s.</p>
<div class="tutorial_image"><a href="http://travelingforever.com/blogs/wp-content/uploads/2009/02/header1.jpg"><img class="alignnone size-large wp-image-142" title="header1" src="http://travelingforever.com/blogs/wp-content/uploads/2009/02/header1-500x268.jpg" alt="header1" width="500" height="268" /></a></div>
<p>So, we&#8217;ll create a wrapper div, because this layout wants to be centered. Then a header div, just to make things easier to edit later on. Finally, I&#8217;ll break the logo, site name, and main image into their own divs, and add an unordered list for the navigation. Also, we&#8217;ll create comments where we want dynamic Wordpress code to go later.</p>
<pre class="brush: xml;">
&lt;html&gt;
&lt;header&gt;
&lt;title&gt;zothcorp theme&lt;/title&gt;
&lt;/header&gt;
&lt;body&gt;
&lt;div id=&quot;wrapper&quot;&gt;
&lt;div id=&quot;header&quot;&gt;
&lt;div id=&quot;logo&quot;&gt;&lt;img src=&quot;logo.png&quot; alt=&quot;&quot; /&gt;&lt;/div&gt;
&lt;div id=&quot;sitename&quot;&gt;zothcorp&lt;!-- Wordpress Site Name Code Here --&gt;&lt;/div&gt;
&lt;!-- We use this because we're floating the logo and sitenames --&gt;
&lt;hr /&gt; &lt;!-- the line separating the words --&gt;
&lt;div id=&quot;mainimage&quot;&gt;&lt;img src=&quot;images/mainimage.jpg&quot; alt=&quot;&quot; /&gt;&lt;!-- Wordpress Main Image Code Here --&gt;&lt;/div&gt;
&lt;div id=&quot;sitenav&quot;&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Home&lt;/a&gt; &lt;!-- Wordpress Navigation links here --&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;About&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Family&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Team&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href=&quot;#&quot;&gt;Propaganda&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;/li&gt;
&lt;!-- This gives us the last background line --&gt;&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;!-- End Header --&gt;
&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;
</pre>
<p>Next, we&#8217;ll break down the body. It&#8217;s looks pretty straightforward, we&#8217;ll break down the two different post sizes with two different div classes.</p>
<p><a href="http://travelingforever.com/blogs/wp-content/uploads/2009/02/bodylayout2.jpg"><img class="alignnone size-large wp-image-144" title="bodylayout2" src="http://travelingforever.com/blogs/wp-content/uploads/2009/02/bodylayout2-500x290.jpg" alt="bodylayout2" width="500" height="290" /></a></p>
<p>When we create the code this time, we&#8217;ll be sure to include the same content we had in our mockup. We&#8217;re left with the following code.</p>
<pre class="brush: xml;">
&lt;!-- Begin Wordpress Content --&gt;
&lt;div id=&quot;content&quot;&gt;

&lt;div class=&quot;firstcol&quot;&gt;
  &lt;span&gt;Greed&lt;/span&gt;    &lt;!-- Category Name --&gt;
&lt;div class=&quot;wideimage&quot;&gt;
  &lt;img src=&quot;images/1.jpg&quot; alt=&quot;&quot; /&gt;    &lt;!-- Post Picture --&gt;
  &lt;span&gt;  Being A Winner&lt;/span&gt;    &lt;!-- Post Name --&gt;
&lt;/div&gt;
&lt;div class=&quot;introtext&quot;&gt;
  &quot;There is a dog who knows more than me. His name is...&quot; &lt;!-- Post Excerpt --&gt;
&lt;/div&gt;
&lt;/div&gt; &lt;!-- End 1st FirstCol --&gt;

&lt;div class=&quot;firstcol&quot;&gt;
  &lt;span&gt;Power&lt;/span&gt;     &lt;!-- Category Name --&gt;
&lt;div class=&quot;wideimage&quot;&gt;
  &lt;img src=&quot;images/2.jpg&quot; alt=&quot;&quot; /&gt;   &lt;!-- Post Picture --&gt;
  &lt;span&gt;  Finding Hidden Meanings&lt;/span&gt;   &lt;!-- Post Name --&gt;
&lt;/div&gt;
&lt;div class=&quot;introtext&quot;&gt;
  “People always said there was something funny about him, I ...”&lt;!-- Post Excerpt --&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt; &lt;!-- End 2nd FirstCol --&gt;

&lt;div class=&quot;secondcol&quot;&gt;
  &lt;span&gt;Avarice&lt;/span&gt; &lt;!-- Category Name --&gt;
&lt;div class=&quot;boximage&quot;&gt;
  &lt;img src=&quot;images/3.jpg&quot; alt=&quot;&quot; /&gt;
  &lt;span&gt;  Tiny White Dies&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;introtext&quot;&gt;
  “Nouns, kid. They folow you until rats...”&lt;!-- Smaller Post Excerpt --&gt;&lt;/div&gt;
&lt;/div&gt;
 &lt;!-- End SecondCol --&gt;
&lt;!-- End Wordpress Content --&gt;
</pre>
<p>Finally, we&#8217;ll end with our footer. Our footer in the mockup is easy enough. We don&#8217;t even need to create a layout. All we need is a #footer wrapper and some filler text from our mockup. Then the final html to close the document up.</p>
<pre class="brush: xml;">
&lt;!-- Begin Wordpress Footer --&gt;
&lt;div id=&quot;footer&quot;&gt;
zothcorp is copyright with mega death enforcement by kirk “the gentle lion” kaiser
&lt;/div&gt;
&lt;!-- End Wordpress Footer --&gt;
</pre>
<p>All our HTML is now cleanly laid out into one nice big HTML file. Next, we&#8217;ll export our images and measure distances, so we can get ready to transform our HTML into CSS&#8217;ified goodness. Because as is, the theme&#8217;s kinda ugly:</p>
<div class="tutorial_image"><a href="http://travelingforever.com/blogs/wp-content/uploads/2009/02/emptyhtml1.jpg"><img class="alignnone size-large wp-image-145" title="emptyhtml1" src="http://travelingforever.com/blogs/wp-content/uploads/2009/02/emptyhtml1-500x395.jpg" alt="emptyhtml1" width="500" height="395" /></a></div>
<h3>Step 3 &#8211; Slicing Images and Taking Measurements</h3>
<p>Start by looking at the header. We&#8217;ll want to keep the logo as a separate file, and I prefer png files. Crop it down, keeping the whitespace around it to a minimum. This will be our first image exported. If you&#8217;re working in Photoshop, I like to Crop, followed by a File -&gt; Save for Web and Devices. Then save your logo with the same filename you gave it in your mockup. In my case, it was &#8216;logo.png&#8217;.</p>
<p>Continue on, the next image we&#8217;ll export is the main image. In analyzing the layout, I decided this image wouldn&#8217;t be managed by Wordpress. Instead, I&#8217;ll change it myself manually on the web server. So I crop out the image using the same process as the logo, but write down the width of my image. It sets down the width for everything else below it, at 946px.</p>
<p>Next, we&#8217;ll slice the smaller images that make up our latest posts. We&#8217;ll cut them out, and take note of both their width and height. In this case, it&#8217;s 350px X 175px for the bigger &#8220;.firstcol&#8221; images, and 220px X 175px for the even smaller &#8220;.secondcol&#8221; images.</p>
<p>Finally, we measure the distances between our individual body elements. I like to use the Measure Tool in Photoshop to make this go really quickly. Doing so, I find out the distance from the HR tag and the Main Image is 5px. Repeat this for the rest of the main body elements. Because next, we&#8217;re going to make that layout have some CSS pizazz!</p>
<div class="tutorial_image"><a href="http://travelingforever.com/blogs/wp-content/uploads/2009/02/htmlmockup1.jpg"><img class="alignnone size-large wp-image-146" title="htmlmockup1" src="http://travelingforever.com/blogs/wp-content/uploads/2009/02/htmlmockup1-500x462.jpg" alt="htmlmockup1" width="500" height="462" /></a></div>
<p><!--more--></p>
<h3>Step 4 &#8211; Adding CSS Magic to Our HTML Framework</h3>
<p>Using our previous HTML mockup and our basic measurements, we can begin to fill out the CSS behind our HTML layout. Begin by creating a new CSS file and linking to it from within our previously created HTML layout. Or, make things really easy and just create a new CSS style right after the Title Tag like so:</p>
<pre class="brush: xml;">
&lt;title&gt;zothcorp theme&lt;/title&gt;
&lt;!-- Begin Inserted Code --&gt;
&lt;style type=&quot;text/css&quot;&gt;

#wrapper {
  width: 946px;
}

#mainimage {
  margin-top: 5px;
}

.firstcol {
  width: 350px;
  height: 175px;
}
.secondcol {
  width: 220px;
  height: 175px;
}
&lt;/style&gt;
&lt;!-- End Inserted Code --&gt;
</pre>
<p>You&#8217;ll see I already added the measurements we took in Step 3. These help structure our document and give us a rough look at how things are shaping up. Next, we can go back into Photoshop and begin changing our colors and fonts in our CSS to match our Photoshop mock ups. Use the Eyedropper Tool to pick up the exactly right color from your mockup.</p>
<p>While I&#8217;m creating CSS from a PSD, I like to keep things simple by testing only in Firefox. I find things flow better when focused on getting things working in one browser, and ignore errors in others until finished. A handy Firefox&#8217;s addon, Firebug, makes it easy to quickly change CSS and tweak little things while developing.</p>
<p>Converting this design to CSS is pretty straightforward, and the only thing that might give you a bit of trouble is the unordered list. It gave me a bit of trouble, so here&#8217;s the code for that, specifically, with some comments:</p>
<pre class="brush: css;">
#sitenav {
  width: 100%;
  background-color:#333;
  margin-top: 11px;
  height: 30px;
  }

#sitenav ul {
  margin: 0;  /* Necessary to keep our li's aligned */
  padding: 0;
  list-style-type: none;
  text-align: left;
  padding-bottom: 0px;
  padding-top: 4px;
  padding-left: 4px;
  }

#sitenav li {
  display: inline;
  margin-left: -2px; /* Keeps the first line from showing up on the list */
  }

#sitenav a, #sitenav a:visited {
  padding: 5px 36px 4px 8px;  /* Make a box around links for the mouseover to change the background */
  color: white;
  text-decoration: none;
  font-size: 1.8em;
  border-right: 1px solid #fff;
  }

#sitenav a:hover {
  background-color: #222;
  }
</pre>
<p>After a bit of work, your CSS should give you a layout that looks a lot like your mockup. So much so, in fact that you might not be able to tell a difference between the mockup and the final site:</p>
<div class="tutorial_image"><a href="http://travelingforever.com/blogs/wp-content/uploads/2009/02/layoutwithcss1.jpg"><img class="alignnone size-large wp-image-147" title="layoutwithcss1" src="http://travelingforever.com/blogs/wp-content/uploads/2009/02/layoutwithcss1-500x399.jpg" alt="layoutwithcss1" width="500" height="399" /></a></div>
<h3>Step 5 &#8211; From Static to Dynamic &#8211; Baby Steps</h3>
<p>Finally, it&#8217;s time to start converting all our work to Wordpress. Begin by creating a new folder. Within it, we&#8217;ll create two new files. One named &#8220;index.php&#8221;, and one name &#8220;style.css&#8221;. This is the beginning of our new theme. Copy and paste your CSS file created earlier into &#8220;style.css&#8221;. Do the same with your HTML file, into the &#8220;index.php&#8221; file.</p>
<p>Every Wordpress Theme must identify itself, and ours is no different. Open your newly created &#8220;style.css&#8221; file, and add the following at the beginning:</p>
<pre class="brush: css;">
/*
Theme Name: zothcorp unloaded
Theme URI: http://zothcorp.com
Description: zothcorp minimalist theme
Version: 1.0
Author: Kirk Kaiser
Author URI: http://www.zothcorp.com/
*/
</pre>
<p>This code shows up when we browse to it within Wordpress. If you&#8217;re working on a local copy of Wordpress, go ahead and copy this folder to the themes/ directory. Browse to your themes within the Wordpress Admin, and you should see your new theme. Set it as your default.</p>
<p>Hoorah, you should see your theme looking perfect now. Only problem is, it doesn&#8217;t do anything. Yet.</p>
<h3>Step 6 &#8211; From Static to Dynamic &#8211; Basic PHP Hooks</h3>
<p>Next, we&#8217;ll begin to add the dynamic features we decided on earlier. We&#8217;ll begin with the head of index.php, where the CSS file is loaded. If you finished the previous step and didn&#8217;t see a perfect site, your CSS file might not have loaded correctly. Let&#8217;s fix that, and add our basic header hooks. Open up your index.php file, and replace your head with the following:</p>
<pre class="brush: php;">
&lt; ?php
  /**
  * @package WordPress
  * @subpackage zothcorp_theme
  */?&gt;
  &lt; !DOCTYPE html PUBLIC &quot;-//W3C//DTD XHTML 1.0 Transitional//EN&quot; &quot;http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd&quot;&gt;
  &lt;html xmlns=&quot;http://www.w3.org/1999/xhtml&quot; &lt;?php language_attributes(); ?&gt;&gt;
  &lt;head profile=&quot;http://gmpg.org/xfn/11&quot;&gt;

  &lt;meta http-equiv=&quot;Content-Type&quot; content=&quot;&lt;?php bloginfo('html_type'); ?&gt;; charset=&lt; ?php bloginfo('charset'); ?&gt;&quot; /&gt;
  &lt;title&gt;&lt; ?php wp_title('&amp;laquo;', true, 'right'); ?&gt; &lt; ?php bloginfo('name'); ?&gt;&lt;/title&gt;
  &lt;style type=&quot;text/css&quot; media=&quot;screen&quot;&gt;
  @import url( &lt; ?php bloginfo('stylesheet_url'); ?&gt; );
  &lt;/style&gt;

 &lt;link rel=&quot;alternate&quot; type=&quot;application/rss+xml&quot; title=&quot;RSS 2.0&quot; href=&quot;&lt;?php bloginfo('rss2_url'); ?&gt;&quot; /&gt;
 &lt;/link&gt;&lt;link rel=&quot;alternate&quot; type=&quot;text/xml&quot; title=&quot;RSS .92&quot; href=&quot;&lt;?php bloginfo('rss_url'); ?&gt;&quot; /&gt;
 &lt;/link&gt;&lt;link rel=&quot;alternate&quot; type=&quot;application/atom+xml&quot; title=&quot;Atom 1.0&quot; href=&quot;&lt;?php bloginfo('atom_url'); ?&gt;&quot; /&gt;
 &lt;/link&gt;&lt;link rel=&quot;pingback&quot; href=&quot;&lt;?php bloginfo('pingback_url'); ?&gt;&quot; /&gt;

 &lt; ?php wp_get_archives('type=monthly&amp;format=link'); ?&gt;
 &lt; ?php //comments_popup_script(); // off by default ?&gt;
 &lt; ?php wp_head(); ?&gt;
 &lt;/link&gt;&lt;/meta&gt;&lt;/head&gt;&lt;/html&gt;
</pre>
<p>The beginning of this code is mostly default Wordpress stuff you just put in. You&#8217;ll notice the only things that really matter to us in the Head are the Title tag, that fetches the Wordpress Blog post name, and the Stylesheet tag, that fetches the stylesheet url.</p>
<p>Every Wordpress head is supposed to include the wp_head(); functon, so plugins can hook within it.</p>
<p>Alright, now to the meat and potatoes, the code that matters. Replace the following code within index.php:</p>
<pre class="brush: php;">
&lt;body&gt;
  &lt;div id=&quot;wrapper&quot;&gt;
  &lt;div id=&quot;header&quot;&gt;
&lt;div id=&quot;logo&quot;&gt;&lt;img src=&quot;/images/logo.png&quot; /&gt;&lt;/div&gt;
&lt;div id=&quot;sitename&quot;&gt;&lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;/&quot;&gt;&lt; ?php bloginfo('name'); ?&gt;&lt;/a&gt;&lt;!-- Wordpress Site Name Code Here --&gt;&lt;/div&gt;
&lt;br clear=&quot;all&quot; /&gt;
&lt;hr /&gt;
&lt;div id=&quot;mainimage&quot;&gt;&lt;img src=&quot;/images/mainimage.jpg&quot; /&gt;&lt;!-- Wordpress Main Image Code Here --&gt;&lt;/div&gt;

&lt;div id=&quot;sitenav&quot;&gt;
  &lt;ul&gt;
    &lt;li&gt;&lt;a href=&quot;&lt;?php bloginfo('url'); ?&gt;/&quot;&gt;Home&lt;/a&gt;&lt;/li&gt; &lt;!-- Wordpress Home Page --&gt;
    &lt; ?php wp_list_pages('title_li='); ?&gt; &lt;!-- Wordpress Pages Here --&gt;
  &lt;/ul&gt;
  &lt;/div&gt;
  &lt;/div&gt;
&lt;div id=&quot;content&quot;&gt;
&lt;!-- end header --&gt;&lt;/div&gt;&lt;/div&gt;&lt;/body&gt;
</pre>
<p>You&#8217;ll see we don&#8217;t change much. The logo stays the same, the site name becomes dynamic. It&#8217;s wrapped in a link, and we get the blog link from the &lt;?php bloginfo(&#8216;url&#8217;); ?&gt; tag. Then we get our blog name from the &lt;?php bloginfo(&#8216;name&#8217;); ?&gt; tag. Easy enough!</p>
<p>The main image stays the same, and we add a homepage link to the unordered list. Then we call &lt;?php wp_list_pages(&#8216;title_li=&#8217;); ?&gt;, and it gives us a list of all the pages currently on the site. The &#8216;title_li=&#8217; part is important, because otherwise Wordpress gives us a list with a title. Try stripping it out to see what I mean.</p>
<p>Save your changes, and our Wordpress site has become just a little bit more dynamic. All we need to add now is the content and the footer. So much closer than at the beginning!<br />
<!--more--></p>
<h3>Step 7 &#8211; From Static to Dynamic &#8211; Entering The Loop</h3>
<p>Next, we&#8217;re going to fetch Wordpress categories in our main body. The code for this is simple and straightforward. In our index.php file, scroll to the content. Change the following code:</p>
<pre class="brush: php;">
 &lt;!-- Begin Wordpress Content --&gt;
  &lt;div id=&quot;content&quot;&gt;

  &lt; ?php $my_query = new WP_Query('category_name=greed&amp;showposts=1'); /* Get the Greed Category's Most Recent Post */
  while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post();
  $do_not_duplicate = $post-&gt;ID; ?&gt;

  &lt;div class=&quot;firstcol&quot;&gt;
  &lt;span&gt;&lt; ?php  the_category(' '); ?&gt;&lt;/span&gt;&lt;!-- Category Name --&gt;
  &lt;div class=&quot;wideimage&quot;&gt;
  &lt; ?php dp_attachment_image($post-&gt;ID, 'thumbnail', 'alt=&quot;' . $post-&gt;title . '&quot;'); ?&gt; &lt;!-- Post Picture --&gt;
  &lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;&lt;?php echo get_permalink(); ?&gt;&quot;&gt;&lt; ?php the_title(); ?&gt;&lt;/a&gt;&lt;/span&gt; &lt;!-- Post Name --&gt;
  &lt;/div&gt;
  &lt;div class=&quot;introtext&quot;&gt;
  &lt;a href=&quot;&lt;?php echo get_permalink(); ?&gt;&quot;&gt;&lt; ?php the_excerpt(); ?&gt;&lt;/a&gt;&lt;!-- Post Excerpt --&gt;
  &lt;/div&gt;
  &lt;/div&gt;

  &lt; ?php endwhile; ?&gt;

 &lt; ?php $my_query = new WP_Query('category_name=power&amp;showposts=1'); /* Get the Power Category's Most Recent Post */
  while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post();
  $do_not_duplicate = $post-&gt;ID; ?&gt;

  &lt;div class=&quot;firstcol&quot;&gt;
  &lt;span&gt;&lt; ?php  the_category(' '); ?&gt;&lt;/span&gt;&lt;!-- Category Name --&gt;
  &lt;div class=&quot;wideimage&quot;&gt;
  &lt; ?php dp_attachment_image($post-&gt;ID, 'thumbnail', 'alt=&quot;' . $post-&gt;title . '&quot;'); ?&gt; &lt;!-- Post Picture --&gt;
  &lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;&lt;?php echo get_permalink(); ?&gt;&quot;&gt;&lt; ?php the_title(); ?&gt;&lt;/a&gt;&lt;/span&gt; &lt;!-- Post Name --&gt;
  &lt;/div&gt;
  &lt;div class=&quot;introtext&quot;&gt;
  &lt;a href=&quot;&lt;?php echo get_permalink(); ?&gt;&quot;&gt;&lt; ?php the_excerpt(); ?&gt;&lt;/a&gt;&lt;!-- Post Excerpt --&gt;
  &lt;/div&gt;
  &lt;/div&gt;

  &lt; ?php endwhile; ?&gt;

  &lt; ?php $my_query = new WP_Query('category_name=avarice&amp;showposts=1'); /* Get the Avarice Category's Most Recent Post */
  while ($my_query-&gt;have_posts()) : $my_query-&gt;the_post();
  $do_not_duplicate = $post-&gt;ID; ?&gt;

  &lt;div class=&quot;secondcol&quot;&gt;

  &lt;span&gt;&lt; ?php  the_category(' '); ?&gt;&lt;/span&gt; &lt;!-- Category Name --&gt;
  &lt;div class=&quot;boximage&quot;&gt;
  &lt; ?php dp_attachment_image($post-&gt;ID, 'thumbnail', 'alt=&quot;' . $post-&gt;title . '&quot;'); ?&gt; &lt;!-- Post Picture --&gt;
  &lt;span&gt;&amp;nbsp;&amp;nbsp;&lt;a href=&quot;&lt;?php echo get_permalink(); ?&gt;&quot;&gt;&lt; ?php the_title(); ?&gt;&lt;/a&gt;&lt;/span&gt; &lt;!-- Post Name --&gt;
  &lt;/div&gt;
  &lt;div class=&quot;introtext&quot;&gt;
  &lt;a href=&quot;&lt;?php echo get_permalink(); ?&gt;&quot;&gt;&lt; ?php the_excerpt(); ?&gt;&lt;/a&gt;&lt;!-- Smaller Post Excerpt --&gt;
  &lt;/div&gt;
  &lt;/div&gt;

  &lt; ?php endwhile; ?&gt;

  &lt;!-- End Wordpress Content --&gt;&lt;/div&gt;
</pre>
<p>You&#8217;ll notice we have a bunch more PHP code in the Content section. That&#8217;s because we&#8217;ve got three loops, each getting one post from their perspective category.</p>
<p>The loop is how Wordpress shows posts. It takes an argument, and spits out posts, until all the posts are finished from the Query.</p>
<p>Reading the comments within the code, we can see how the WP_Query function gets the latest post from a specific category each time. We  can then call the functions get_permalink(), the_title(), get_permalink(), and the_excerpt(); within each indidual loop.</p>
<p>One custom tag you may have noticed is the dp_attachment_image(); tag. That&#8217;s a custom function we&#8217;re going to write ourselves, after we finish the footer. Yes!</p>
<h3>Step 8 &#8211; From Static to Dynamic &#8211; Finish Him!</h3>
<p>Now we&#8217;re at the bottom of our page, the footer. The code here is very basic. There&#8217;s really not even a step involved. Just replace:</p>
<pre class="brush: php;">
&lt;!-- Begin Wordpress Footer --&gt;
&lt;br clear=&quot;all&quot; /&gt;
&lt;div id=&quot;footer&quot;&gt;
&lt; ?php bloginfo('name'); ?&gt; is copyright with mega death enforcement by kirk &quot;the gentle lion&quot; kaiser&lt;br /&gt;
&lt; ?php wp_footer(); ?&gt; &lt;!-- Add footer hook for footer plugins --&gt;
&lt;/div&gt;&lt;!-- End Wordpress Footer --&gt;
 &lt;!-- End #wrapper --&gt;
</pre>
<p>Take a look at what you&#8217;ve done. The site is all ready, and hopefully by now you&#8217;re ready to populate your site. Create your custom pages, posts, and categories within Wordpress. Remember, the site template uses the wp_excerpt(); function, so you&#8217;ll need to be sure and leave an excerpt for every post that makes it on the front page.</p>
<h3>Step 9 &#8211; From Static to Dynamic &#8211; Custom Image Code</h3>
<p>Create a new file within your template, named &#8220;functions.php&#8221;. This will hold our custom code, and be accessible from any template file we&#8217;ve got. Copy and paste the following code into it:</p>
<pre class="brush: php;">
&lt; ?php
  /**
  * @package WordPress
  * @subpackage zothcorp_theme
  */

  # Displays image attachment
  function dp_attachment_image($postid=0, $size='thumbnail', $attributes='') {
    if ($postid&amp;lt;1) $postid = get_the_ID();
    if ($images = get_children(array(
      'post_parent' =&gt; $postid,
      'post_type' =&gt; 'attachment',
      'numberposts' =&gt; 1,
      'post_mime_type' =&gt; 'image',)))
      foreach($images as $image) {
        $attachment=wp_get_attachment_image_src($image-&gt;ID, $size);
      ?&gt;&lt;img src=&quot;&lt;?php echo $attachment[0]; ?/&gt;&quot; &lt; ?php echo $attributes; ?&gt; /&gt;&lt; ?php
  }
}
?&gt;
</pre>
<p>Our function checks our post for any attached images. It then spits out nicely formatted images according to the Wordpress settings we have for all thumbnail images. All we need to do now is change our Wordpress thumbnail settings to 375px X 175px. Then we can call this function, and have nice thumbnails for our front page automagically generated. Woohoo!</p>
<h3>Step 10 &#8211; Tweak your code, and Keep Building</h3>
<p>We&#8217;ve come a long way with our code. We&#8217;ve gone through a bunch of steps and come out alive. My live Wordpress site now looks like this:</p>
<div class="tutorial_image"><a href="http://travelingforever.com/blogs/wp-content/uploads/2009/02/finallayout1.jpg"><img class="alignnone size-large wp-image-148" title="finallayout1" src="http://travelingforever.com/blogs/wp-content/uploads/2009/02/finallayout1-500x399.jpg" alt="finallayout1" width="500" height="399" /></a></div>
<p>Not bad, but there are flaws. The unordered list doesn&#8217;t quite look right in Safari or in Internet Explorer. A developer&#8217;s job is never over, but it&#8217;s a good time to take a step back. In <a href="http://travelingforever.com/blogs/2009/07/from-psd-to-wordpress-part-2/">Part 2</a>, we&#8217;ll tackle CSS debugging, and putting our files into individual files, so we can show more than one page.</p>
<p>In the mean time, take a walk, get outside. It&#8217;s too easy to spend all your time in front of the computer, coding. The theme&#8217;s files are located <a href="http://travelingforever.com/blogs/wp-content/uploads/2009/02/zotheme.zip">here</a>.</p>
<p><a href="http://www.jdoqocy.com/ep122vpyvpxCELMMKDGCEDGKJKDK" target="_top"><br />
<img src="http://www.ftjcfx.com/mm79p59y31NPWXXVORNPORVUVOV" alt="Bluehost.com Web Hosting $6.95" border="0"/></a></p>
<img src="http://travelingforever.com/blogs/?ak_action=api_record_view&id=104&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://travelingforever.com/blogs/2009/02/converting-psd-to-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>41</slash:comments>
		</item>
		<item>
		<title>How I Built SoRelated.com In One Month</title>
		<link>http://travelingforever.com/blogs/2009/01/how-i-built-sorelatedcom-in-one-month/</link>
		<comments>http://travelingforever.com/blogs/2009/01/how-i-built-sorelatedcom-in-one-month/#comments</comments>
		<pubDate>Fri, 02 Jan 2009 17:51:24 +0000</pubDate>
		<dc:creator>Kirk</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[SoRelated]]></category>
		<category><![CDATA[The Big Picture]]></category>

		<guid isPermaLink="false">http://travelingforever.com/blogs/?p=99</guid>
		<description><![CDATA[Building software has always been difficult. You&#8217;ve got to build something without being able to see, touch, or taste it. Thanks to Open Source Software, however, it is getting a whole lot less painful.
Consider my latest project, SoRelated.com. It is a web application designed to help families keep in touch. A user joins the site, [...]]]></description>
			<content:encoded><![CDATA[<p></p><p>Building software has always been difficult. You&#8217;ve got to build something without being able to see, touch, or taste it. Thanks to Open Source Software, however, it is getting a whole lot less painful.</p>
<p>Consider my latest project, <a title="SoRelated.com" href="http://www.sorelated.com" target="_blank">SoRelated.com</a>. It is a web application designed to help families keep in touch. A user joins the site, creates a Family, and then adds their relatives. They then have private conversations and post images to one another in their family. It is a private family blog basically, and it was written completely from scratch in under 1 month. To put the server live, it only cost 20 bucks for a <a title="Slicehost Slice" href="https://manage.slicehost.com/customers/new?referrer=47d63604dfe329917a6a045b1c8139e4" target="_blank">Slicehost Slice</a>.</p>
<p>Because I was able to leverage so many Open Source projects like <a title="Django" href="http://www.djangoproject.com">Django</a>, <a title="NginX" href="http://wiki.codemongers.com/Main">Nginx</a>, <a title="PostgreSQL" href="http://www.postgresql.org/">PostgreSQL</a>, <a title="Ubuntu" href="http://releases.ubuntu.com/8.04/">Ubuntu</a> and <a title="Pinax" href="http://pinaxproject.com/">Pinax</a>, the development of this project has gone by in a blur. The majority of work has been spent in developing the feel of the site, and not in finding invisible little bugs.</p>
<p>As a matter of fact, with <a title="Instant Django" href="http://www.instantdjango.com/">Instant Django</a>, I was able to get a working site up and running in a couple of hours. That&#8217;s incredible, considering I didn&#8217;t know Python or Django beforehand. The documentation on Django has been awesome, and there&#8217;s even a <a title="free book online" href="http://www.djangobook.com/">free book online</a>.</p>
<p>After a few weeks of toying around with Instant Django, I decided it was time to start thinking about putting my toy project somewhere. Looking around at webhosts, I realized deploying Django would be a bit more complicated than, say, a Wordpress blog. You&#8217;ve really got to have shell access to set up a fast site.</p>
<p>So I decided on a completely custom server.</p>
<p>It looked very difficult to build a server, but the execution has not been hard at all. The Open Source Community really provides great documentation, and<a title="Slicehost" href="https://manage.slicehost.com/customers/new?referrer=47d63604dfe329917a6a045b1c8139e4"> Slicehost</a> provides great articles on setting up your web server, mail server, SQL server, SVN server, and every other server you never knew you needed until you build a web app from the ground up.</p>
<p>Granted, I haven&#8217;t created Facebook or even Reddit or anything remotely complicated, but I have learned infinitely more than I knew at the beginning.</p>
<p>The three biggest lessons I&#8217;ve learned from developing <a title="SoRelated" href="http://www.sorelated.com">SoRelated</a>:</p>
<blockquote><p><strong>CODING BEATS READING</strong></p>
<p>It is always better to code and experiment than it is to read and theorize. Coding solves problems, or at the very least creates new ones to fix. A broken application is better than a great application in your head. All the things that seem like they&#8217;ll be difficult in your head end up being easy, and all the things you didn&#8217;t think about are hard.</p>
<p><strong>START ITERATING IMMEDIATELY<br />
</strong></p>
<p>Take the extra time at the beginning to make everything modular and separate. Then create one piece, followed by the next. With Django, this process is especially easy. You create your models first, then define your views, then define your templates. A streamlined way to force yourself to stay neat.</p>
<p><strong>STAY SIMPLE</strong></p>
<p>There are a million little things that would be cool to include in any program. <strong>Don&#8217;t include them</strong>. They&#8217;ll only make your life miserable, and add to your code complexity. Code complexity is the worse thing in the world. Keep your code clean and simple, and stay the hell away from &#8220;smart&#8221; code. &#8220;Smart&#8221; code breaks when something nontrivial changes.</p></blockquote>
<p>Finally, I&#8217;d like to close with a little soap boxing. With all the economic doom and gloom it&#8217;s easy to get apathetic and decide things are only going to get worse. A lot of big companies and big government have proved inefficient at solving real problems. But, they are leaving open a huge opportunity for small scale development and problem solving. I encourage you to personally evaluate what you can do to improve your world without requiring their help&#8230;</p>
<p>Because they might not be there when you need them most.</p>
<p>Thanks!</p>
<p>- Kirk</p>
<img src="http://travelingforever.com/blogs/?ak_action=api_record_view&id=99&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://travelingforever.com/blogs/2009/01/how-i-built-sorelatedcom-in-one-month/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.452 seconds -->
