<?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>Kenny Carlile &#187; Web Development</title>
	<atom:link href="http://www.kennycarlile.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.kennycarlile.com</link>
	<description>Use Only Genuine Interocitor Parts</description>
	<lastBuildDate>Sat, 24 Apr 2010 07:38:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Drupal &#8211; Getting Clean URLs To Work With GoDaddy Shared Hosting</title>
		<link>http://www.kennycarlile.com/2010/04/24/drupal-getting-clean-urls-to-work-with-godaddy-shared-hosting/</link>
		<comments>http://www.kennycarlile.com/2010/04/24/drupal-getting-clean-urls-to-work-with-godaddy-shared-hosting/#comments</comments>
		<pubDate>Sat, 24 Apr 2010 07:38:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=728</guid>
		<description><![CDATA[If you&#039;re using GoDaddy for your web hosting and you&#039;ve installed Drupal on your shared hosting (Economy, Deluxe, or Unlimited hosting plans), then you may have run into the issue where you can&#039;t enable Clean URLs for Drupal. Fortunately, there&#039;s an easy fix. Unfortunately, the fix is so easy, I&#039;m not sure why GoDaddy hasn&#039;t [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#039;re using GoDaddy for your web hosting and you&#039;ve installed Drupal on your shared hosting (Economy, Deluxe, or Unlimited hosting plans), then you may have run into the issue where you can&#039;t enable Clean URLs for Drupal. Fortunately, there&#039;s an easy fix. Unfortunately, the fix is so easy, I&#039;m not sure why GoDaddy hasn&#039;t fixed this.</p>
<p>In your FTP client or the file browser in GoDaddy&#039;s tools, navigate to the root where your Drupal instance has been installed and look for your <em>.htaccess</em> file. Look for this important line, noted in red:</p>
<pre>#
# Apache/PHP/Drupal settings:
#
...

# Various rewrite rules.
&lt;IfModule mod_rewrite.c&gt;
 ...

 # Modify the RewriteBase if you are using Drupal in a subdirectory or in a
 # VirtualDocumentRoot and the rewrite rules are not working properly.
 # For example if your site is at http://example.com/drupal uncomment and
 # modify the following line:
 # RewriteBase /drupal
 #
 # If your site is running in a VirtualDocumentRoot at http://example.com/,
 # uncomment the following line:
 <strong><span style="color: #ff0000;"># RewriteBase /</span></strong>

...
&lt;/IfModule&gt;

# $Id: .htaccess,v 1.90.2.5 2010/02/02 07:25:22 dries Exp $
</pre>
<p>All you have to do here is delete the # in front of that line, which will uncomment that directive and allow Drupal to be able to successfully manage your site with Clean URLs. You will, however, have to enable it in your site configuration.</p>
<p>Don&#039;t forget to save your file after editing and best practice is that you should probably backup the <em>.htaccess</em> file before editing it.</p>
<p>See how easy that was? I wonder why GoDaddy hasn&#039;t fixed that yet. *shrug*</p>
<p><strong>Sources:</strong> http://drupal.org/node/89089, http://drupal.org/node/364511</p>
<p><em>Note: I&#039;m aware that there are several places on the web that this is explained, but it&#039;s important for GoDaddy users to know if they are using Drupal, so I thought I would add one more instance of this information to help spread the knowledge.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2010/04/24/drupal-getting-clean-urls-to-work-with-godaddy-shared-hosting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoDaddy Shared Hosting Multiple-Domain And Subdomain Management</title>
		<link>http://www.kennycarlile.com/2010/03/23/godaddy-shared-hosting-multiple-domain-and-subdomain-management/</link>
		<comments>http://www.kennycarlile.com/2010/03/23/godaddy-shared-hosting-multiple-domain-and-subdomain-management/#comments</comments>
		<pubDate>Tue, 23 Mar 2010 21:37:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=674</guid>
		<description><![CDATA[If you use GoDaddy&#039;s shared hosting plans that support multiple domains (the Deluxe or Unlimited plans) and you&#039;ve tried to manage multiple domains and subdomains, then you probably are already familiar with the organizational frustrations that can occur. In a standard web server environment, each domain and subdomain has it&#039;s own directory, usually under a [...]]]></description>
			<content:encoded><![CDATA[<p>If you use GoDaddy&#039;s shared hosting plans that support multiple domains (the Deluxe or Unlimited plans) and you&#039;ve tried to manage multiple domains and subdomains, then you probably are already familiar with the organizational frustrations that can occur.</p>
<p>In a standard web server environment, each domain and subdomain has it&#039;s own directory, usually under a hosting directory, like this:</p>
<pre>~/
     myprimarydomain.com/
          www/
               index.html
               ...
          somesubdomain/
               index.html
               ...
     myotherdomain.net/
          www/
               index.html
               ...
          someothersubdomain/
               index.html
               ...</pre>
<p>Unfortunately, with the Godaddy shared hosting plans, <em>some</em> domain must be the primary domain and it must live in the root. That is, you&#039;ll end up with a directory structure like this.</p>
<pre>~/
     footer.php
     header.php
     index.php
     images/
          ...
     javascript/
          ...
     myotherdomain.net/
          index.php
          ...
     picturessubdomainforprimarydomain/
          index.php
          ...
     someotherdomain.org/
          index.php
          ...
     ...</pre>
<p>As you can see, this gets pretty muddy when you have the code for a website for your primary domain mixed in with your other domains and subdomains. Unfortunately, there&#039;s no way to completely fix this issue with the inexpensive hosting plans. However, you do have a few options to organize your hosting directory.</p>
<h2>Option 1 &#8211; The &#034;Primary Domain Gets Screwed&#034; Solution</h2>
<p>You can setup a domain that you don&#039;t care about for the primary hosted domain. Then, just don&#039;t put anything in the root and start organizing your domains in folders with subdomains in those folders. With that method, you have to buy an extra domain that you aren&#039;t going to use.</p>
<p>Another way you can do this is with a root-level redirect. You can put a single redirect in the root to point the primary domain to its properly nested directory. The problem with this is that you are going to get a long junky URL (after redirect, http://www.mydomain.com/managed_domains/mydomain.com/www/index.php) for the primary domain unless you can get mod_rewrite to work with GoDaddy. I haven&#039;t tried this, but I suspect you won&#039;t be able to rewrite the URLs in a pretty manner as you aren&#039;t allowed access to the Apache httpd.conf file.</p>
<h2>Option 2 &#8211; The &#034;Try To Keep The www Subdomain Content For Your Primary Domain Well-Organized/Minimal And Manage All Your Other Domains And Subdomains Correctly&#034; Solution</h2>
<p>Okay, maybe that solution needs a better name. <img src='http://www.kennycarlile.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>This is the solution I&#039;m currently using. My kennycarlile.com is my primary hosted domain, so I have to keep my www content in the root. I wanted to organize my other domains (and subdomains for kennycarlile.com), so I put my www.kennycarlile.com content in the root and then created a folder for other domains called &#034;000_other_domains&#034;. I chose this name, with leading 0&#039;s because that will force it to always (well, in theory) put that directory first in an alphabetical listing of the parent directory.</p>
<p>Within ~/000_other_domains/, I then create a folder for each domain, independent of the subdomain. That is, I have ~/000_other_domains/kennycarlile.com/ as a parent folder for all my other subdomains. For this case where this is for the primary domain, the www directory exists at the root (~/), but all other domains exist in this directory:</p>
<pre>~/
     000_other_domains/
          528digital.com/
               www/
          frofrolynx.com/
               www/
          kennycarlile.com/
               demo/
               wiki/
               [www/ does not exist here because this is the
                    primary domain and it must exist at ~/]
          kennycarlile.net/
               gallery/
               www/
          moonfar.com/
               www/
          nwdirtriders.com/
               forum/
               gallery/
               www/
          ...</pre>
<p>While you still end up with your primary domain&#039;s www directory mixed in the root with the 000_other_domains/ directory, you have the rest of your domain and subdomain structure organized logically.</p>
<h2>Option 3 &#8211; The &#034;You&#039;re Actually Making Money From Your Site So You Can Afford Some Real Hosting&#034; Solution</h2>
<p>If you&#039;re making money off your site and it&#039;s not just a hobby, you can probably splurge for the $35+/month virtual dedicated hosting that allows you to have a lot more control over your Apache configuration. This isn&#039;t a really a solution since the issue is trying to fix the shared hosting problem, but I just wanted to point out this option.</p>
<h2>Fixing A Poorly Planned Hosting Setup</h2>
<p>I hope that helps someone out there. I would have liked to have seen this kind of write up <em>prior</em> to starting to manage my hosting. As it was, I had all of my domains and subdomains in folders at the root (~/) of my hosting directory. To clean this up, I had to move many of my installs. I was worried about breaking/corrupting my applications that GoDaddy had installed for me (WordPress, PHPbb, Twiki, etc.), so on the advice of one of their very helpful and articulate tech support reps, I followed these steps:</p>
<ol>
<li>Using GoDaddy&#039;s File Manager in their hosting tools, create the 000_other_domains/ directory.</li>
<li>Now create a directory for each domain under 000_other_domains/, such as kennycarlile.com/, frofrolynx.com/, etc.</li>
<li>Using the File Manager tool, <strong>COPY</strong> the improperly placed folder where your subdomain (that includes the implicit ones like www, except for your primary domain, which has to stay at ~/) and rename the copied folder as appropriate. You should now have a directory structure like ~/000_other_domains/frofrolynx.com/www/ where a copy of your frofroynx.com content resides.</li>
<li>In domain management, modify the record for each domain and subdomain (do subdomains first so you can go back and mange the parent domain while you are waiting for the subdomains to take effect, which happens every 30 minutes), so that it points to the <strong>NEW</strong> location: ~/000_other_domains/frofrolynx.com/www/. Again, this will take ~30 minutes to take effect.</li>
<li>Rename your OLD directory to something like xxx_[foldername] so that you know 100% that you aren&#039;t accidentally seeing the old install because the domain change hadn&#039;t yet taken effect. This also helps you identify which folders you need to delete later.</li>
<li>Now test your install. For some applications or plugins for applications, you may have to edit config files to point to the new server path, such as changing /home/content/u/s/e/username/html/old_domain_directory/&#8230; to /home/content/u/s/e/username/html/000_other_domains/frofrolynx.com/www/&#8230;</li>
<li>Once you&#039;ve been able to correct all the absolute paths to point to the new one, test again.</li>
<li>After a day or two, if you feel confident that everything is working as is, you can delete your xxx_[foldername].</li>
</ol>
<p>Well, that about covers my experience with trying to fix a poorly-managed (by me) hosting account on GoDaddy&#039;s shared hosting. Hopefully that will safe someone else some pain and hassle by learning from my mistakes and experience. Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2010/03/23/godaddy-shared-hosting-multiple-domain-and-subdomain-management/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New KennyCarlile.com And Aggregation Of KennyCarlile.net</title>
		<link>http://www.kennycarlile.com/2010/03/22/new-kennycarlile-com-and-aggregation-of-kennycarlile-net/</link>
		<comments>http://www.kennycarlile.com/2010/03/22/new-kennycarlile-com-and-aggregation-of-kennycarlile-net/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 08:46:30 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=667</guid>
		<description><![CDATA[Well, I think I&#039;ve finally got things tweaked the way I want them enough to announce the re-launch of KennyCarlile.com and the aggregation of KennyCarlile.net into one site. Currently and for the immediate future, KennyCarlile.net will 301 redirect to KennyCarlile.com. This is a completely original design and implementation from scratch, new logo, and some new [...]]]></description>
			<content:encoded><![CDATA[<p>Well, I think I&#039;ve finally got things tweaked the way I want them enough to announce the re-launch of KennyCarlile.com and the aggregation of KennyCarlile.net into one site. Currently and for the immediate future, KennyCarlile.net will 301 redirect to KennyCarlile.com.</p>
<p>This is a completely original design and implementation from scratch, new logo, and some new content, although there are some sections of the site still thin on content. I hope to be able to fill those out soon. I&#039;ve also got a handful of blog posts that I&#039;ve been wanting to write but have put on the back burner because I wanted this new site to be a priority. Unfortunately, when you have a big project that takes a while and you put it ahead of the little stuff&#8230;you end up just procrastinating on doing anything.</p>
<p>I&#039;m relieved to have this redesign done as I think it&#039;s a lot cleaner and less cartoony than my previous sites. Additionally, I&#039;ve been wanting to have my professional and personal content all under one site for a while now.</p>
<p>Currently, I&#039;m planning on the redesign of the Western Skies site to be my next big project, then on to Moonfar on Google App Engine. Also, if you haven&#039;t been spammed by me about this yet, please check out <a href="http://www.528digital.com/">528Digital.com</a> to see my new venture in photography (as art, not for hire).</p>
<p>Thanks for stopping by and look for more upcoming blog posts including tips for domain and subdomain management in GoDaddy hosting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2010/03/22/new-kennycarlile-com-and-aggregation-of-kennycarlile-net/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Encoding Time Cues Into YouTube URLs</title>
		<link>http://www.kennycarlile.com/2009/04/16/encoding-time-cues-into-youtube-urls/</link>
		<comments>http://www.kennycarlile.com/2009/04/16/encoding-time-cues-into-youtube-urls/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 21:52:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=449</guid>
		<description><![CDATA[I recently wanted to send someone a clip from The &#039;Burbs on YouTube, but I wanted them to see a specific line from the movie. I knew that if you added a timecode in MM:SS format to a comment that YouTube would parse that as a link to that timecode in the video, but I [...]]]></description>
			<content:encoded><![CDATA[<p>I recently wanted to send someone a clip from The &#039;Burbs on YouTube, but I wanted them to see a specific line from the movie. I knew that if you added a timecode in MM:SS format to a comment that YouTube would parse that as a link to that timecode in the video, but I figured they had to have a way to do it in the URL as well.</p>
<p>After a little bit of Googling, I ran across <a href="http://gadgetwise.blogs.nytimes.com/2009/03/07/how-to-send-youtube-videos-with-your-own-cue/" target="_blank">this post from the New York Times</a>, that explained exactly how to do it. I hadn&#039;t run across this before, so I thought I&#039;d share to perpetuate the knowledge.</p>
<p>If your video link is http://www.youtube.com/watch?v=krsdKDkyQds and you want it to jump to 5:40 in the clip, simply add #t=5m40s to the URL: <a href="http://www.youtube.com/watch?v=krsdKDkyQds#t=5m40s">http://www.youtube.com/watch?v=krsdKDkyQds#t=5m40s</a></p>
<p>This doesn&#039;t seem to work for embedding, at least not with the WP plugins that I&#039;m using or by hacking it into the embed code from YouTube. If someone knows a work-around for this, please post it in the comments. In the mean time, if you want to enjoy the specific scene that I wanted to reference, you&#039;ll have to drag the playhead to 5:40 manually. The clip ends at about 6:50.</p>
<p><a href="http://www.kennycarlile.com/2009/04/16/encoding-time-cues-into-youtube-urls/"><em>Click here to view the embedded video.</em></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2009/04/16/encoding-time-cues-into-youtube-urls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Kobayashi Maru For Developers</title>
		<link>http://www.kennycarlile.com/2008/06/20/kobayashi-maru-for-developers/</link>
		<comments>http://www.kennycarlile.com/2008/06/20/kobayashi-maru-for-developers/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 20:45:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=84</guid>
		<description><![CDATA[Being the geek that I am, I remembered the reference to the Kobayashi Maru from Star Trek many years ago, but I was surprised when one of my professors in college brought it up in reference to a sorting algorithm. His linking these two references changed the way I thought about solving problems. But first, [...]]]></description>
			<content:encoded><![CDATA[<p>Being the geek that I am, I remembered the reference to the <a href="http://en.wikipedia.org/wiki/Kobayashi_Maru">Kobayashi Maru</a> from Star Trek many years ago, but I was surprised when one of my professors in college brought it up in reference to a sorting algorithm. His linking these two references changed the way I thought about solving problems.</p>
<p><em>But first, a brief history&#8230;</em></p>
<p>In Star Trek lore, there is a test that captains must go through. Notice I said &#034;go through&#034; rather than &#034;pass&#034;. The purpose was to test the character of the captain-to-be. The test setup a no-win situation in which the captain had to choose between letting one of two groups of people die. It was impossible to save both groups of people. However, as the story goes, Kirk was the only captain to find a way to &#034;pass&#034; the test. He did so by reprogramming the simulator such that there was a way to pass.</p>
<p><em>And now back to our story&#8230;</em></p>
<p>In my Data Structures II class in college, we were given the task to write the most efficient program to sort a list of 1000 random integers from the set 1 to 1000. (I think it was 1-1000, it might have been 1-10000 or more. It doesn&#039;t really matter for the purpose of this explanation.) That is, the list could contain the same number twice or more or there may not be any instances of a particular number. Every student would be given the same list of numbers, so the test was to see how fast you could sort the list.</p>
<p>Most students hit a wall when they Googled and found the fastest way to implement standard sorting algorithms that end up with O(<em>n</em> log <em>n</em>) time for best case performance. <a href="http://www.wou.edu/~andersc/">Dr. Charles Anderson</a>, one of my professors for another class (who is now my business partner at <a href="http://www.westernskiesweb.com/">Western Skies</a>), suggested that he had a way to perform the sort in O(<em>n</em>) time but that it was cheating and he wouldn&#039;t tell me how until after the contest was over. The only hint he gave me was &#034;Kobayashi Maru&#034;. I know what the Kobayashi Maru was, but I had no idea how it applied here, so he left me quite confused.</p>
<p>The next week, when the contest was over, he explained to me how he could sort the list of integers in O(<em>n</em>) time instead of O(<em>n</em> log <em>n</em>):</p>
<ol>
<li>Declare an array (we&#039;ll call it <code class="prettyprint">arr[]</code>) that is the size of the largest integer possible in the list, in this case 1000, and initialize all the values of the array places to 0.</li>
<li>Pass over the list with a loop. A every position in the list, increment the value at that <em>location</em> in <code class="prettyprint">arr[]</code> by 1. That is, if the first item in the list is 47, perform <code class="prettyprint">arr[47] += 1</code>.</li>
<li>Once that first loop has been created, pass over each place the array and print that <em>location</em> the number of times of the value stored in that location.</li>
</ol>
<p>In other words, in pseudocode:</p>
<pre class="prettyprint">arr[] = array(1000)
// load array
for x in unsortedIntegers while 0 &lt; i &lt;= 1000
  arr[x] += 1
  i++

// print sorted list
for x in a arr[] while 0 &lt; i &lt;= 1000
  while 0 &lt; j &lt;= arr[x]
    print i + ','

  i++</pre>
<p>The trick is that you aren&#039;t actually sorting the list. You are identifying how many times each number occurs and then using the array data structure to identify those occurrences in order. Rather than O(<em>n</em> log <em>n</em>), you&#039;ve only passed over <em>n</em> twice, which is then O(2<em>n</em>), or just O(<em>n</em>).</p>
<p>At the time, this blew my mind and, in a way, it still does. This isn&#039;t thinking outside the box. It&#039;s thinking of a different box to fix the problem in the first box! It opened up my mind to a new way of thinking and new possibilities.</p>
<p>I recently used this when I needed to search for the occurrence of a 2-letter country code in an array of country codes in JavaScript. Rather than loop through the array and search for the country codes, I converted the array to a string and then searched for the occurrence in that string, which was a O(<em>n</em>) operation. I will admit, however, that I&#039;m not familiar with the internal workings of JavaScript. This version may be as inefficient as looping over the array, which is probably what <code class="prettyprint">toString().search()</code> does anyway. Here&#039;s how I did it in JavaScript:</p>
<pre class="prettyprint">var countries = document.getElementById("CountryCode");
countries.onchange = function(){isEurope();};

function isEurope()
{
  var codes = ["AL","DZ","AD","AO","AI","AQ","AM","AT","AZ","BH",
              "BY","BE","BJ","BA","BW","BV","BG","BF","BI","CM","CV",
              "CF","TD","KM","CG","CD","CI","HR","CY","CZ","DK","DJ",
              "EG","GQ","ER","EE","ET","FO","FI","FR","FX","GA","GM",
              "GE","DE","GH","GI","GR","GL","GN","GW","IS","IR","IQ",
              "IE","IL","IT","JO","KZ","KE","KW","KG","LV","LB","LS",
              "LR","LY","LI","LT","LU","MK","MG","MW","ML","MT",
              "MR","MU","YT","MD","MC","ME","MA","MZ","NA","NL",
              "NE","NG","NO","OM","PS","PL","PT","QA","RE","RO",
              "RU","RW","SH","SM","ST","SA","SN","RS","SC","SL",
              "SK","SI","SO","ZA","ES","SD","SJ","SZ","SE","CH",
              "SY","TJ","TZ","TG","TN","TR","TM","UG","UA","AE",
              "GB","UZ","VA","EH","YE","YU","ZM","ZW"];

  var isEurope = false;
  for(i = 0; i &lt; countries.length; i++)
  {
    if(countries.options[i].selected)
    {
      if(codes.toString().search(countries.options[i].value) &gt; 0)
      {
        isEurope = true;
      } // end if test
    } // end if test
  } // end for loop

  if(isEurope)
  {
    // do some stuff
  } // end if test
} // end function isEurope</pre>
<p>And there you have it. My own little Kobayashi Maru. While this isn&#039;t the most spectacular example, the point of this demonstration is to show you that there are more interesting ways thinking about problems. Try putting the data in a different box to solve a problem.</p>
<p><strong>Edit:</strong></p>
<p>Dr. Anderson pointed out to me that another way to do this would be to put all the country codes into an associative array and then search by looking for a value at index country code. Also, the complexity is more like O(<em>mn</em>) than O(<em>n</em>) as the <code class="prettyprint">search()</code> function, even implemented in C within JavaScript, has to be a linear search. Although that&#039;s still faster than doing your own nested search in JavaScript. The hot ticket is to put all the country codes into an associative array so that search is based on key, which drops the complexity to O(1).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2008/06/20/kobayashi-maru-for-developers/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Yahoo vs. Eric Meyer CSS Reset</title>
		<link>http://www.kennycarlile.com/2008/06/19/yahoo-vs-eric-meyer-css-reset/</link>
		<comments>http://www.kennycarlile.com/2008/06/19/yahoo-vs-eric-meyer-css-reset/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 08:09:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=83</guid>
		<description><![CDATA[In my post titled WebVisions 2008 Conference Debriefing, I mentioned the concept of a CSS reset and provided links to two versions: the Eric Meyer CSS Reset and the Yahoo UI Library CSS Reset. Both address the issue of browser having their own internal stylesheets that don&#039;t necessarily match. For example: an h2 tag in [...]]]></description>
			<content:encoded><![CDATA[<p>In my post titled <a href="http://www.kennycarlile.com/2008/06/15/webvisions-2008-conference-debriefing/">WebVisions 2008 Conference Debriefing</a>, I mentioned the concept of a CSS reset and provided links to two versions: the <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">Eric Meyer CSS Reset</a> and the <a href="http://developer.yahoo.com/yui/reset/">Yahoo UI Library CSS Reset</a>. Both address the issue of browser having their own internal stylesheets that don&#039;t necessarily match.</p>
<p>For example: an <code class="prettyprint">h2</code> tag in one browser might have <code class="prettyprint">font-size: 16px;</code> and <code class="prettyprint">margin-bottom: 12px;</code> while another might have <code class="prettyprint">font-size: 18px;</code> and <code class="prettyprint">margin-bottom: 14px;</code>. That means that without any of your own CSS work, the same plain-Jane <code class="prettyprint">&lt;h2&gt;Some Subtitle&lt;/h2&gt;</code> code will look differently. These are the battles web developers have to face and why we hate IE for its non-standard renderings.</p>
<p>The purpose of the concept of a CSS reset is to put all browsers on an even playing field before you begin to style the content. That is, make sure that all elements render the same on all browsers (or rather, all major browsers) so that adding your own styling will have the same effect across the spectrum of renderings. That&#039;s not to say that you won&#039;t need to make special hacks to fix inconsistent renderings <em>*cough-IE-cough*</em>, but a CSS reset puts you a lot closer to the end goal than where you started.</p>
<p>I&#039;ve only tried implementing and developing CSS with the Eric Meyer CSS reset and the Yahoo reset once each, so my experience here is somewhat limited, but these are my initial impressions. While both are essentially the same technique and could be adapted to behave more like the other, I&#039;m going to address the out-of-the-box functionality.</p>
<p><strong>Eric Meyer&#039;s CSS Reset</strong> &#8211; <a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">Eric Meyer CSS Reset</a></p>
<p>This was my first attempt at using a CSS reset and you&#039;re looking at the results in this current blog theme (as of the date of this post). Meyer&#039;s method is to set all elements to be, essentially, unstyled. That is, all elements render as plain text. No bolding for <code class="prettyprint">&lt;strong&gt;</code>, no italics for <code class="prettyprint">&lt;em&gt;</code>, no margins for <code class="prettyprint">&lt;p&gt;</code>, etc. The nice thing about this is that you get to style everything from the ground up. The bad thing about this is that you <strong><em>have to</em></strong> style everything from the ground up. I was excited at first, but I became increasingly frustrated with having to write quite a bit of CSS just to get elements to behave even remotely like they normally do. I understand the purpose in doing this, but it is a ton of work just to get the most basic HTML to display with standard behaviors. I eventually realized that a work-around for this would be to develop a &#034;CSS starting point&#034; where there are definitions for elements that just define the basic behavior.</p>
<p>Another downside to Meyer&#039;s method is that he simply provides the code. This didn&#039;t seem like a downside at all to me until I used Yahoo&#039;s implementation, which I will explain shortly. In fact, it never even occurred to me that there could be a better way.</p>
<p>Don&#039;t get me wrong. I have a tremendous amount of respect for Eric Meyer and he has done a great job putting together the code for the CSS reset. I only see the ways to improve on it after having used Yahoo&#039;s CSS reset. *Segue*</p>
<p><strong>Yahoo&#039;s CSS Reset</strong> &#8211; <a href="http://developer.yahoo.com/yui/reset/">Yahoo UI Library CSS Reset</a></p>
<p>First, let me admit my bypasses. I didn&#039;t use, or even look at, the Yahoo CSS Reset before trying Eric Meyer&#039;s because&#8230;well&#8230;I&#039;m a Google-guy. If the link had been to the exact same content at Google, I would have not even looked at (okay, that&#039;s an exaggeration) Meyer&#039;s version. I drink the Google-flavored Kool-Aid with the left hand and the Apple-flavored Kool-Aid with the right. (There, Microsoft zealots. Are you happy? I&#039;m an admitted zealot too, just on the other side.)</p>
<p>I was very impressed initially with the organization and presentation of the Yahoo page. The code was very readable and the instructions were clear and concise. They also provide a cheat sheet (PDF download), an SDK download, and several other tools and examples that I found very helpful and interesting.</p>
<p>Yahoo also provides a hosted file for the CSS reset so you can simply call the include from their server in the head of your HTML. This was a nice feature. One less file to maintain and serve.</p>
<p>Additionally, and this was the biggest selling-point for me, Yahoo provided the &#034;CSS starting point&#034; code that I was looking for to get the elements to their minimal display characteristics and, like the CSS reset, they also provided a hosted file for me to include. After adding two lines of meta code in the head of my HTML file, I had reset the CSS to zero and then styled it to a standard display. Perfect! Just what I was looking for and here it was in an easy to consume, highly supported codebase.</p>
<p><em>Coming Soon&#8230;</em></p>
<p><strong>Google CSS Library</strong> &#8211; <a href="http://code.google.com/p/blueprintcss/">Google Blueprint CSS Framework</a></p>
<p>As I was writing about being a Google zealot and wishing that Google had a CSS reset, I decided to search for &#034;google css reset&#034; and, lo and behold, the very first link that Google returned (imagine that!) was for the Google Blueprint CSS Framework, which includes a CSS reset and starting point styling. I should have known that Google would swoop in and save the day. I&#039;ll try the Google CSS reset for my next site and report my findings.</p>
<p><strong>EDIT:</strong></p>
<p>I recently tried validating some CSS that I added to a site after using the Yahoo CSS reset. I was sad to find out that it doesn&#039;t validate. I think I read somewhere that the Eric Meyer CSS reset doesn&#039;t validate either. I decided to punt on this one and just make sure that my personal CSS code that I built on top of the reset code will validate, but then, technically, my whole page doesn&#039;t validate since I&#039;m using the CSS reset. I guess that&#039;s something I&#039;ll have to wrestle with until a better solution comes along.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2008/06/19/yahoo-vs-eric-meyer-css-reset/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Sending Email From PHP On GoDaddy (And Possibly Other Hosts)</title>
		<link>http://www.kennycarlile.com/2008/06/16/sending-email-from-php-on-godaddy-and-possibly-other-hosts/</link>
		<comments>http://www.kennycarlile.com/2008/06/16/sending-email-from-php-on-godaddy-and-possibly-other-hosts/#comments</comments>
		<pubDate>Tue, 17 Jun 2008 07:37:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=79</guid>
		<description><![CDATA[Recently, while working on the temporary site for Moonfar, I wanted to send the user an email as confirmation that they had signed up for email notifications. Essentially, you define the recipient, the subject line, the body, a few headers, and then call the mail() function while passing those parameters to it. PHP&#039;s mail() function [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, while working on the temporary site for <a href="http://www.moonfar.com/">Moonfar</a>, I wanted to send the user an email as confirmation that they had signed up for email notifications. Essentially, you define the recipient, the subject line, the body, a few headers, and then call the <code class="prettyprint">mail()</code> function while passing those parameters to it. PHP&#039;s <code class="prettyprint">mail()</code> function does the rest, provided that your host has PHP configured properly.</p>
<p>Let me preface this by saying that I&#039;ve only tested this on GoDaddy&#039;s Linux Deluxe Hosting plan. If you are trying to do this with another web host, you need to make sure that the install of PHP you are using supports the <code class="prettyprint">mail()</code> function.</p>
<pre class="prettyprint">&lt;?php
  $to = 'user@theirdomain.com';
  $subject = 'Your subject line';

  // the message here is HTML, but you could
  // use plain text in the same manner
  // this could also be pulled from a template file
  $message = '
    &lt;html&gt;
    &lt;head&gt;
      &lt;title&gt;Your Title Here&lt;/title&gt;
    &lt;/head&gt;
    &lt;body&gt;
      &lt;p&gt;Your content here...&lt;/p&gt;
    &lt;/body&gt;
    &lt;/html&gt;';

  // To send HTML mail, the Content-type header must be set
  $headers  = 'MIME-Version: 1.0' . "\r\n";
  $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
  // Additional headers
  // I'm not sure how the To: field in the header functions since it's part
  // of the function call, so I've commented it out here
  //$headers .= 'To: ' . $emailAddr . "\r\n";
  $headers .= 'From: YourName &lt;you@yourdomain.com&gt;' . "\r\n";
  $headers .= 'Cc: ' . "\r\n";
  // if you want to receive a copy
  $headers .= 'Bcc: you@yourdomain.com' . "\r\n";

  // Mail it
  mail($to, $subject, $message, $headers);
?&gt;</pre>
<p>It&#039;s as easy as that. That said, I read somewhere that there is a 1000 emails per day limit using this method on GoDaddy without paying for outbound emailing services, but I could be mistaken.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2008/06/16/sending-email-from-php-on-godaddy-and-possibly-other-hosts/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>WebVisions 2008 Conference Debriefing</title>
		<link>http://www.kennycarlile.com/2008/06/15/webvisions-2008-conference-debriefing/</link>
		<comments>http://www.kennycarlile.com/2008/06/15/webvisions-2008-conference-debriefing/#comments</comments>
		<pubDate>Mon, 16 Jun 2008 07:05:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/?p=75</guid>
		<description><![CDATA[I recently attended the WebVisions 2008 conference in Portland, OR. It was my first conference, so I can&#039;t speak to the quality with much experience. However, my general opinion was that there was some good, some bad, and some ugly, as one might expect. That said, the good was well worth the experience. Plus, I [...]]]></description>
			<content:encoded><![CDATA[<p>I recently attended the WebVisions 2008 conference in Portland, OR. It was my first conference, so I can&#039;t speak to the quality with much experience. However, my general opinion was that there was some good, some bad, and some ugly, as one might expect. That said, the good was well worth the experience. Plus, I won the grand prize raffle: Adobe CS3 Premier. Although, as of the date of this post, I have not yet received it.</p>
<p>You can find the podcasts of the presentations and the associated presentation slides with these links:</p>
<ul>
<li><a href="http://www.webvisionsevent.com/wp/?p=65">WebVisions 2008 Presentation Podcasts</a></li>
<li><a href="http://www.slideshare.net/event/webvisions-2008">WebVisions 2008 Presentation Slides</a></li>
</ul>
<p>Here is a quick debriefing of my impressions of the presentations and the most important things I learned</p>
<p><strong>Blogging For A Living</strong></p>
<p>Jim Turner</p>
<p><a href="http://www.genuineblog.com/">http://www.genuineblog.com/</a></p>
<ul>
<li>Bloggers are social media managers</li>
<li>Be an evangelist through your blog</li>
<li>Monitor the net for negative or inaccurate information about your organization and use your blog to rapidly respond and provide an official statement to correct misinformation</li>
<li>&#034;Control is an illusion. You can&#039;t control what is being said. It&#039;s already happening. You can&#039;t stop employees from spreading information, so push forward with positive blogging.&#034; (Paraphrased)</li>
</ul>
<p><strong>Hacking Social Media</strong></p>
<p>DL Byron</p>
<p><a href="http://texturadesign.com/">http://texturadesign.com/</a></p>
<p><a href="http://bikehugger.com/">http://bikehugger.com/</a></p>
<ul>
<li>DL was a very inspiring individual, but there wasn&#039;t much that I was able to draw from the presentation except for providing examples of how small organizations can combine (through mashups, etc.) services for cheap, rich aggregate tools.</li>
</ul>
<p><strong>Design Is In The Details</strong></p>
<p>Dan Rubin, Bryan Veloso</p>
<p><a href="http://design.isinthedetails.com/">http://design.isinthedetails.com/</a></p>
<p><a href="http://bryanveloso.com/">http://bryanveloso.com/</a></p>
<p><a href="http://superfluousbanter.org/">http://superfluousbanter.org/</a></p>
<ul>
<li>Great presentation. The best of the conference.</li>
<li>Let your layout breathe
<ul>
<li>Allow space between elements</li>
<li>You don&#039;t need borders on elements if you have 2 elements with a different colored space in between, such as two white boxes with a gap between them on a black background</li>
</ul>
</li>
<li>Multiples and factors of a common measurement
<ul>
<li>If your main text font is 12px, then 6, 12, 18, 24, etc. for margins and other sizes are a good way to keep common feel through your site</li>
</ul>
</li>
<li>Subtle effects
<ul>
<li>Use effects subtly, such as in drop shadows</li>
<li>Add noise for a subtle texture on a background to add a real-world feel</li>
</ul>
</li>
<li>To get varying shades of the same color, pick your base hue, then add layers of black or white using soft light blending mode and transparencies to achieve shades and tints</li>
</ul>
<p><strong>Drupal</strong></p>
<p>Sean Larkin</p>
<p><a href="http://www.opensourcery.com/">http://www.opensourcery.com/</a></p>
<ul>
<li>This presentation sucked was less of a &#034;howto&#034; and more of a &#034;this is how we make money&#034; presentation. I wanted to hear more about how to use Drupal.</li>
</ul>
<p><strong>Faster, Cheaper, Better</strong></p>
<p>David Verba</p>
<p><a href="http://www.adaptivepath.com/aboutus/david.php">http://www.adaptivepath.com/aboutus/david.php</a></p>
<ul>
<li>This was essentially a review of how it&#039;s cheaper and faster to make web apps now, which is obvious and doesn&#039;t require a conference session to make that point.</li>
<li>Saying &#034;&#8230;and finally&#8230;&#034; 6 times is 5 times too many.</li>
</ul>
<p><strong>CSS Transformation</strong></p>
<p>Christopher Schmidtt</p>
<p><a href="http://christopherschmitt.com/">http://christopherschmitt.com/</a></p>
<ul>
<li>Your experience limits your designs</li>
<li>Your browser limits your designs</li>
<li>Start with semantic markup</li>
<li>CSS RESET: the concept of offsetting the internal stylesheet that browsers have that auto-style your elements for you
<ul>
<li><a href="http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/">http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/</a></li>
<li><a href="http://developer.yahoo.com/yui/reset/">http://developer.yahoo.com/yui/reset/</a></li>
</ul>
</li>
</ul>
<p><strong>Ruby On Rails</strong></p>
<p>Jim Meyer</p>
<p><a href="http://www.cucinamedia.com/">http://www.cucinamedia.com/</a></p>
<p><a href="http://blog.geekdaily.org/">http://blog.geekdaily.org/</a></p>
<ul>
<li>Very pro-Agile Dev and pro-TDD (Test Driven Development)</li>
<li>For any development, to improve scalability and performance:
<ul>
<li>Stay out of the DB as much as possible</li>
<li>Stay out of the dynamic code as much as possible</li>
<li>Push info (code?) as close to the user as possible</li>
</ul>
</li>
</ul>
<p><strong>Web Site Optimization</strong></p>
<p>Kimberly Blessing</p>
<p><a href="http://www.kimberlyblessing.com/">http://www.kimberlyblessing.com/</a></p>
<ul>
<li>Analyze, test, and tune</li>
<li>Validate
<ul>
<li>declare a valid DOCTYPE to ensure that the browser will stay in STANDARDS MODE, otherwise it will go into QUIRKS MODE which will cause slower rendering</li>
<li>Validate (X)HTML/CSS</li>
</ul>
</li>
<li>Simplify
<ul>
<li>Imagemaps are good ideas (I personally disagree with this)</li>
<li>Use CSS sprites: very cool idea &#8211; <a href="http://www.alistapart.com/articles/sprites">http://www.alistapart.com/articles/sprites</a></li>
</ul>
</li>
<li>Concatenate
<ul>
<li>Use only 1 CSS file and 1 JS file; you can always merge at the build cycle if you prefer to keep them separate for development organization</li>
</ul>
</li>
<li>IE-Proof CSS
<ul>
<li>Code against the FOUC (Flash Of Unstyled Content)</li>
<li>Don&#039;t use @import, use link</li>
</ul>
</li>
<li>Call Javascript As Needed
<ul>
<li>Define JS near where it is needed</li>
</ul>
</li>
<li>Save Scripts For Last
<ul>
<li>If it isn&#039;t needed on load, define it at the end of the page to prevent parsing until the page has displayed</li>
</ul>
</li>
<li>If you can&#039;t GZip, then strip
<ul>
<li>Get rid of whitespace and comments, convert spaces to tabs (if you want to save spacing) in build phase</li>
</ul>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2008/06/15/webvisions-2008-conference-debriefing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Add A Digg Badge To WordPress Posts/Pages</title>
		<link>http://www.kennycarlile.com/2007/08/25/add-a-digg-badge-to-wordpress-postspages/</link>
		<comments>http://www.kennycarlile.com/2007/08/25/add-a-digg-badge-to-wordpress-postspages/#comments</comments>
		<pubDate>Sat, 25 Aug 2007 20:38:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.kennycarlile.com/2007/08/25/add-a-digg-badge-to-wordpress-postspages/</guid>
		<description><![CDATA[I know there are a lot of widgets and plugins for WordPress out there for adding a Digg badge to posts (I know, because I tried half a dozen or so of them) but I didn&#039;t find any that worked consistently and provided the functionality I wanted. After researching the Digg Tools API and a [...]]]></description>
			<content:encoded><![CDATA[<p>I know there are a lot of widgets and plugins for WordPress out there for adding a Digg badge to posts (I know, because I tried half a dozen or so of them) but I didn&#039;t find any that worked consistently and provided the functionality I wanted. After researching the <a href="http://www.digg.com/tools/integrate" target="_blank">Digg Tools API</a> and a few other examples online, I&#039;ve composed this block of code for generating Digg badges.</p>
<p>To add a Digg badge to your WordPress posts or pages, simply add the following code block immediately before or after the PHP block that contains <code class="prettyprint">the_content()</code>. For posts, you would want to modify the Main Index Template, Single Post, and Archives theme files. For pages, you simply need to modify the Page Template theme file. Here&#039;s the code:</p>
<pre class="prettyprint">&lt;div class="diggLink"&gt;
    &lt;script type="text/javascript"&gt;
        digg_url = '&lt;?php the_permalink() ?&gt;';
        digg_title = '&lt;?php the_title(); ?&gt;';
        //digg_topic = 'TOPIC'; // replace TOPIC
        /*
        Use the output buffer to capture the text
        output from the_ID() rather than having
        it rendered to the page.
        */
        digg_bodytext = '&lt;?php
            ob_start();
            the_ID();
            $postID = ob_get_contents();
            ob_end_clean();
            /*
            Get the body of the post, remove HTML,
            remove carriage returns and line feeds,
            escape 's, return only the first 350 char.
            */
            $postObj = get_post($postID, OBJECT);
            $body = strip_tags($postObj-&gt;post_content);
            $body = str_replace(chr(10), '', $body);
            $body = str_replace(chr(13), '', $body);
            $body = addslashes($body);
            echo substr($body, 0, 350);
        ?&gt;';
    &lt;/script&gt;
    &lt;script src="http://digg.com/tools/diggthis.js"
        type="text/javascript"&gt;&lt;/script&gt;
&lt;/div&gt;</pre>
<p>I&#039;ve also added a class to the wrapping DIV and added it to the stylesheet for my theme to style the positioning of the Digg badge. I place the above code right before the <code class="prettyprint">the_content()</code> block and this CSS class is what positions my Digg badge to the right of my posts.</p>
<pre class="prettyprint">.diggLink
{
    float: right;
    margin-bottom: 4px;
    margin-left: 4px;
}</pre>
<p>If you&#039;d like to set your posts to all submit to one particular topic, you can uncomment the line that refers to <code class="prettyprint">digg_topic</code> in the code block and then change <code class="prettyprint">TOPIC</code> to the topic you&#039;d like to use. You can find the list of topics on the <a href="http://www.digg.com/tools/integrate" target="_blank">Digg Tools API</a> page.</p>
<p>If you have any questions, feel free to comment and ask me. By the way, this same code block is currently in use at <a href="http://www.pactenreview.com/" target="_blank">Pac Ten Review</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2007/08/25/add-a-digg-badge-to-wordpress-postspages/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Eternally Up To Date Copyrights</title>
		<link>http://www.kennycarlile.com/2007/07/25/eternally-up-to-date-copyrights/</link>
		<comments>http://www.kennycarlile.com/2007/07/25/eternally-up-to-date-copyrights/#comments</comments>
		<pubDate>Thu, 26 Jul 2007 07:48:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://kennycarlile.com/2007/07/25/eternally-up-to-date-copyrights/</guid>
		<description><![CDATA[I can&#039;t tell you how many times, both personally and professionally, I&#039;ve come across web sites that have out of date copyright dates. A living, breathing, up to date site should have a current copyright date somewhere on the page, usually in the footer. Changing the year is easy enough if it&#039;s static, but it&#039;s [...]]]></description>
			<content:encoded><![CDATA[<p>I can&#039;t tell you how many times, both personally and professionally, I&#039;ve come across web sites that have out of date copyright dates. A living, breathing, up to date site should have a current copyright date somewhere on the page, usually in the footer. Changing the year is easy enough if it&#039;s static, but it&#039;s one of those things you have to remember to do (and you have to know how to do it). If your code isn&#039;t modularized (that is, if every page has the copyright date hard coded), then having to change these dates each year could be a very laborious process, even if you&#039;re savvy enough to use a global find and replace.</p>
<p>Why should you even have to make this update by hand? The web page should know that the copyright year is always the current year. There are a couple of ways to do this, depending on what you have available on your web server.</p>
<h3>Concept</h3>
<p>The concept behind this technique is very simple. You simple replace the year with a dynamically written number pulled from the supporting language&#039;s date functions. Here is the static code that we will start with:</p>
<pre class="prettyprint">&lt;p&gt;Copyright &amp;amp;#169;2007 Your Web Site&lt;/p&gt;</pre>
<p>By the way, &amp;amp;#169; is the © symbol.</p>
<h3>Client-side Code Method</h3>
<p>If you don&#039;t have any access to a dynamic server-side technology such as PHP, Java, Python, Perl, .NET, or some other programming language, then you will need to use Javascript. Here&#039;s an example of generating the year dynamically with client-side Javascript:</p>
<pre class="prettyprint">&lt;p&gt;Copyright &amp;amp;#169;
&lt;script type="text/javascript"&gt;
    var date = new Date();
    document.write(date.getFullYear());
&lt;/script&gt;
Your Web Site&lt;/p&gt;</pre>
<p>The downside to this method is that, since the date is rendered by the browser, it is dependent upon the client&#039;s environment. If the user has Javascript disabled or if there is just some other unpredictable variable in the client&#039;s browser then the copyright year will be completely missing rather than just a year or two out of date. The other problem that arises is this: if the client&#039;s computer has the year set to 1963, then the copyright date on the web page will appear as  1963.</p>
<h3>Server-side Code Method</h3>
<p>If you have the ability to utilize a server-side technology, such as PHP, then you should. This method is preferred because you control the behavior and the date is written to the client as plain text. That is, it is rendered on the server and then streamed to the client as plain text. Here&#039;s an example in PHP of server-side dynamic copyright year text:</p>
<pre class="prettyprint">&lt;p&gt;Copyright &amp;amp;#169;&lt;?php echo date('Y'); ?&gt; Your Web Site&lt;/p&gt;</pre>
<p>I could list out a dozen examples of how to dynamically generate the year, but I would probably end up leaving out the specific language that you are looking for. You can use this technique with any language. Yes, I know this isn&#039;t a ground-breaking technique, it&#039;s just printing the year, but I&#039;ve seen enough examples of people with out of date copyright years that I thought this was a worthwhile tip to share. Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.kennycarlile.com/2007/07/25/eternally-up-to-date-copyrights/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
