<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Mechanical Turducken</title>
	
	<link>http://www.mechanicalturducken.com</link>
	<description>How the Internet Works</description>
	<pubDate>Fri, 21 Nov 2008 02:23:00 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/MechanicalTurducken" type="application/rss+xml" /><feedburner:browserFriendly></feedburner:browserFriendly><item>
		<title>jQuery tutorial for absolute beginners</title>
		<link>http://www.mechanicalturducken.com/uncategorized/jquery-tutorial-for-absolute-beginners/</link>
		<comments>http://www.mechanicalturducken.com/uncategorized/jquery-tutorial-for-absolute-beginners/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 02:23:00 +0000</pubDate>
		<dc:creator>MT</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mechanicalturducken.com/?p=23</guid>
		<description><![CDATA[This seems like a great resource for the total beginner.
jQuery is a fantastic library, learning AJAX techniques with jQuery will definitely help you learn some solid fundementals.

]]></description>
			<content:encoded><![CDATA[<p>This seems like a great resource for the total beginner.</p>
<p>jQuery is a fantastic library, learning AJAX techniques with jQuery will definitely help you learn some solid fundementals.<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="510" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blip.tv/play/Adu7WY+xDA" /><embed type="application/x-shockwave-flash" width="640" height="510" src="http://blip.tv/play/Adu7WY+xDA"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mechanicalturducken.com/uncategorized/jquery-tutorial-for-absolute-beginners/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Adding your twitter status to a page using python and jQuery</title>
		<link>http://www.mechanicalturducken.com/web-development-tools-and-techniques/adding-your-twitter-status-to-a-page-using-python-and-jquery/</link>
		<comments>http://www.mechanicalturducken.com/web-development-tools-and-techniques/adding-your-twitter-status-to-a-page-using-python-and-jquery/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 07:31:16 +0000</pubDate>
		<dc:creator>MT</dc:creator>
		
		<category><![CDATA[Web Development Tools and Techniques]]></category>

		<guid isPermaLink="false">http://www.mechanicalturducken.com/?p=18</guid>
		<description><![CDATA[Twitter is the all the rage these days, if you&#8217;re on the web you&#8217;d better be broadcasting every thought throught worlds hippest &#8220;micro-blogging&#8221; format.  Even beter is that the twitter API gives us great access to the content that we and other produce on their network.  Today we&#8217;re going to take a look at how [...]]]></description>
			<content:encoded><![CDATA[<p>Twitter is the all the rage these days, if you&#8217;re on the web you&#8217;d better be broadcasting every thought throught worlds hippest &#8220;micro-blogging&#8221; format.  Even beter is that the twitter API gives us great access to the content that we and other produce on their network.  Today we&#8217;re going to take a look at how to pull our twitter status in to another page.  This is also a great overview of how to pull in information with web services and display it on your site.</p>
<h2>Part 1: The Architecture</h2>
<p>In order to get around restrictions on Cross Site Scripting we&#8217;ll have to setup a proxy for the twitter API that lives on our own domain.  Relax, it&#8217;s not that hard. This proxy will pull down information from the API and make it available to a bit of javascript that we&#8217;ll run on our site to display the status. Got it? Good.</p>
<h2>Part 2: The Proxy - use python to get twitter status</h2>
<p>The Twitter Api will send back results as XML or JSON.  Personally i greatly prefer working with JSON so that&#8217;s what i&#8217;m using for this example.  All the proxy really does is grab the data at the url we specify and make it available for us from within our own domain.  Let&#8217;s take a look at the code:</p>
<pre>#!/usr/bin/python
import urllib2

print "Content-type: text\n\n"

req = urllib2.Request("http://twitter.com/users/show/henryrose.json");

response = urllib2.urlopen(req)

the_page = response.read()

print the_page</pre>
<p>You don&#8217;t have to know Python to understand what&#8217;s going on here.  The first two lines simply set the path for Python and then import the urllib2 library.</p>
<p>Then we print  content type to tell the browser what we&#8217;re sending them.</p>
<p>The interesting stuff comes when we form an http request and assign it to the &#8216;req&#8217; variable.  We then get the response, read it and print the output. You&#8217;ll need to run this as a cgi on your server and make sure it&#8217;s executable.</p>
<h2>Part 3: The Client - use jQuery to display external json</h2>
<p>Our client will be a bit of javascript that calls our proxy and prints the output into an element on our page. Let&#8217;s jump right in to the code:</p>
<pre>var TwitterManager = {
                twitterProxyUrl: "path-to-proxy-cgi",
                getLastUpdate : function () {
                        $.getJSON(this.twitterProxyUrl, this.myCallback);
                },
                myCallback : function (data) {
                        $("#twitter-status").text(data.status.text);
                },
                currentStatus : ''
        };
    TwitterManager.getLastUpdate();
</pre>
<p>To run this you&#8217;ll obviously need to have jQuery included on the page.  The getLastUpdate function uses jQuery&#8217;s getJSON to grab the data from our proxy, and apply the call back which replaces the content of an element with the id &#8216;twitter-status&#8217; to the most recent twitter update for the user you defined in the proxy.</p>
<p>And voile! You&#8217;ve got your twitter status.</p>
<p>Enjoy.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mechanicalturducken.com/web-development-tools-and-techniques/adding-your-twitter-status-to-a-page-using-python-and-jquery/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Cool new feature in FF view source</title>
		<link>http://www.mechanicalturducken.com/browser-news/cool-new-feature-in-ff-view-source/</link>
		<comments>http://www.mechanicalturducken.com/browser-news/cool-new-feature-in-ff-view-source/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 06:31:17 +0000</pubDate>
		<dc:creator>MT</dc:creator>
		
		<category><![CDATA[Browser News]]></category>

		<guid isPermaLink="false">http://www.mechanicalturducken.com/?p=19</guid>
		<description><![CDATA[Check this out: http://blog.johnath.com/2008/11/11/new-in-firefox-31-linkified-view-source/
]]></description>
			<content:encoded><![CDATA[<p>Check this out: http://blog.johnath.com/2008/11/11/new-in-firefox-31-linkified-view-source/</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mechanicalturducken.com/browser-news/cool-new-feature-in-ff-view-source/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How Websites Work: Using Javascript to show and hide elements on a page</title>
		<link>http://www.mechanicalturducken.com/web-development-tools-and-techniques/how-websites-work-using-javascript-to-show-and-hide-elements-on-a-page/</link>
		<comments>http://www.mechanicalturducken.com/web-development-tools-and-techniques/how-websites-work-using-javascript-to-show-and-hide-elements-on-a-page/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 01:48:47 +0000</pubDate>
		<dc:creator>MT</dc:creator>
		
		<category><![CDATA[Web Development Tools and Techniques]]></category>

		<guid isPermaLink="false">http://www.mechanicalturducken.com/?p=17</guid>
		<description><![CDATA[Modern web interfaces can do all kinds of crazy stuff.  From Drag and Drop to DHTML animations it&#8217;s getting pretty intense to see what people have accomplished in browsers. But we&#8217;re taking baby steps here, so let&#8217;s take a look at how to show and hide an element on a page using Javascript.
First off I&#8217;m [...]]]></description>
			<content:encoded><![CDATA[<p>Modern web interfaces can do all kinds of crazy stuff.  From Drag and Drop to DHTML animations it&#8217;s getting pretty intense to see what people have accomplished in browsers. But we&#8217;re taking baby steps here, so let&#8217;s take a look at how to show and hide an element on a page using Javascript.</p>
<p>First off I&#8217;m going to ask you to make a change in your mental model of what we&#8217;re doing. Instead of thinking that we&#8217;re using Javascript to change the way an element appears take a step back and say &#8220;I want to change the way an element appears on the page, how do I do that?&#8221;.</p>
<p>If you answer was CSS then congrats!  CSS is always how you should style your html.  Javascript is used to add interactions.  To show and hide an element we will 1) make a css class that hides the element 2) use Javascript to add and remove that class from the element.</p>
<h2>Part 1: The CSS</h2>
<p>In more complicated web applications the need to hide an element will come up all the time, so let&#8217;s make a class that we can apply to any element that will make sure the user never sees it while that class is applied.</p>
<pre>/** Hide Class **/
.hide {
        display: none;
        position: absolute;
        left: -9999px;
}
</pre>
<p>Now you may think that simply applying display:none; would have done the trick and in most cases you&#8217;d be right.  But adding the absolute positioning that moves the element offscreen ensures that we&#8217;ll never see that guy.</p>
<h2>Part 2: The Javascript</h2>
<p>Now that we can show and hide things with CSS we need to write some javascript that will apply or remove the &#8220;.hide&#8221; class when we ask it to. To do this we&#8217;ll be accessing the &#8220;className&#8221; attribute on the element that we want to show or hide, and setting it either to &#8220;.hide&#8221; or to blank.  For clarity sake we&#8217;ll do this in two functions that look like this:</p>
<pre>function showElement(elId) {
	var el = document.getElementById(elId);
	el.className = '';
}

function hideElement(elId) {
	var el = document.getElementById(elId);
	el.className = 'hide';
}
</pre>
<p>Each of these functions takes a string as an argument. This string is the id of the element that you&#8217;re looking to show (or hide). Inside each function we grab the element that has that id using <a href="https://developer.mozilla.org/en/DOM/document.getElementByID" target="_blank">document.getElementById(</a>) and set the className accordingly.</p>
<p><a href="http://mechanicalturducken.com/wp-content/uploads/worksamples/js-show-hide.html" target="_blank">Click here to see an example</a>. (View source to see the html)</p>
<p>As you can see I also created a function that allows you to toggle an element.  That is, if the element is currently shown hide it, and if it&#8217;s currently hidden show it.  The code for that looks like so:</p>
<pre>function toggleElement(elId) {
	var el = document.getElementById(elId); 

	if (el.className == 'hide') {
		showElement(elId);
	} else {
		hideElement(elId);
	}
}
</pre>
<h2><span id="more-17"></span></h2>
<h2>Part 3: Going a little further</h2>
<p>If you&#8217;re doing very much complicated javascript you&#8217;ll probably want to look in to using one of the many very good javascript libraries.  I personally recommend the <a href="http://developer.yahoo.com/yui/" target="_blank">Yahoo User Interface</a> library and the <a href="http://jquery.com/" target="_blank">jQuery</a> library.  A good library will give you lots of tools for interacting with the DOM. We could make the above functions a lot more usefull if we had access to things like hasClass(), addClass() and removeClass().  If we had those things the code might look like:</p>
<pre>function showElement(elId) {
	var el = $(elId);
	el.removeClass('hide');
}

function hideElement(elId) {
	var el = $d(elId);
	el.addClass('hide');
}

function toggleElement(elId) {
	var el = $(elId); 

	if (el.hasClass('hide') {
		showElement(elId);
	} else {
		hideElement(elId);
	}
}
</pre>
<p>Keep in mind that the above code will not work in your browser if you copy it in.  You&#8217;ll need to get a library that has the necessary functions and alter the code above to call the functions in the correct way.</p>
<p>You&#8217;ll also note that i used $() instead of &#8216;document.getElementById()&#8217;.  It is common shorthand to alias document.getElementById() as $().</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mechanicalturducken.com/web-development-tools-and-techniques/how-websites-work-using-javascript-to-show-and-hide-elements-on-a-page/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Image Sprites for improved performance and user experience</title>
		<link>http://www.mechanicalturducken.com/web-development-tools-and-techniques/css-image-sprites-for-improved-performance-and-user-experience/</link>
		<comments>http://www.mechanicalturducken.com/web-development-tools-and-techniques/css-image-sprites-for-improved-performance-and-user-experience/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 23:48:14 +0000</pubDate>
		<dc:creator>MT</dc:creator>
		
		<category><![CDATA[Web Development Tools and Techniques]]></category>

		<guid isPermaLink="false">http://www.mechanicalturducken.com/?p=15</guid>
		<description><![CDATA[If you&#8217;ve been developing for the web for a while you may have heard the term &#8220;CSS Sprite&#8221; or &#8220;Image sprite&#8221;.  If you don&#8217;t know what a sprite is, it&#8217;s high time you learned.  I love sprites because they are a technique that typifies the beauty of web development to me: a balance between technology [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;ve been developing for the web for a while you may have heard the term &#8220;CSS Sprite&#8221; or &#8220;Image sprite&#8221;.  If you don&#8217;t know what a sprite is, it&#8217;s high time you learned.  I love sprites because they are a technique that typifies the beauty of web development to me: a balance between technology and human factors.</p>
<p>The benefits of spriting include a faster and more responsive user experience, reduced network traffic and server strain and improved code maintainability. What&#8217;s not to like about all that?</p>
<p>Read on after the cut to learn all about css image sprites.</p>
<p><span id="more-15"></span>The core concept of using sprites is to combine small images into one larger image.  Then, using the background attribute on HTML objects, displaying only the portion of the image that you need.</p>
<p>Imagine a cartoon strip from the newspaper if you will.  Let&#8217;s say it has five frames, each 2&#8243; by 2&#8243;, printed from left to right. Now imagine a large piece of cardboard with a 2&#8243;x2&#8243; square cut out of the middle.  If you were to tape the comic strip down to the table and place the cardboard on top; you would only see one frame at a time.</p>
<p>We can achieve a very similar effect on the web by creating one image with all the icons we might need on a given page.  I like to align those icons vertically with the top of each icon offset by some easy to remember number of pixels, say 100.</p>
<p>After we&#8217;ve created that image (the comic strip) we need to create our &#8220;cardboard&#8221;.  In this case it will be an html elment with a height and width defined in css. Something like this</p>
<p>html:</p>
<pre>&lt;span class="icon open" /&gt;

&lt;span class="icon close" /&gt;</pre>
<p>css:</p>
<pre>.icon{
    display:block;
    height:16px;
    width:16px;
    background: url(samplesprite.gif) no-repeat;
}

.open{
    background-position: 0 0; //shows us the top image in the sprite
}

.close{
    background-position: 0 -50px; //shows us the second image in the sprite
}
</pre>
<p>See this <a rel="no-follow" href="http://mechanicalturducken.com/wp-content/uploads/worksamples/spritesample.html">sample css sprite here</a></p>
<h2>The benefits of sprites</h2>
<p>With traditional images the browser must make a separate request for every image that displays on a page. At scale this causes a lot of unnecessary overhead on the server side and lots of extra data going across the wire. Additionally, browsers don&#8217;t make these requests until the image is needed.  For example, if you&#8217;re using the &#8216;:hover&#8217; css psudo-class to give an element a rollover effect, the browser will wait to download the rollover image until the element is moused over.  This delay makes the rollover &#8220;flicker&#8221; the first time a user activates it.</p>
<p>Beyond making the site load faster and react more quickly to user inputs, the use of CSS sprites makes maintaining a website a much simpler affair.  For example, if one wanted to change the icon set that they were using on a page using sprites, all they&#8217;d need to do is create another sprited image using the same offsets and change the reference in the css to point to the new image. It also makes the markup much more readable by using human friendly class names instead of inserting lots of image paths in &lt;img&gt; tags.</p>
<p>So go forth and sprite!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mechanicalturducken.com/web-development-tools-and-techniques/css-image-sprites-for-improved-performance-and-user-experience/feed/</wfw:commentRss>
		</item>
		<item>
		<title>What is Freedom?</title>
		<link>http://www.mechanicalturducken.com/uncategorized/what-is-freedom/</link>
		<comments>http://www.mechanicalturducken.com/uncategorized/what-is-freedom/#comments</comments>
		<pubDate>Wed, 17 Sep 2008 06:17:11 +0000</pubDate>
		<dc:creator>MT</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.mechanicalturducken.com/?p=16</guid>
		<description><![CDATA[I slapped together a quick web app today that asks a simple question: What is Freedom?
Tell me what you think.
]]></description>
			<content:encoded><![CDATA[<p>I slapped together a quick web app today that asks a simple question: <a href="http://americansdreaming.org/">What is Freedom?</a></p>
<p>Tell me what you think.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mechanicalturducken.com/uncategorized/what-is-freedom/feed/</wfw:commentRss>
		</item>
		<item>
		<title>SEO:  Google is all in your flash</title>
		<link>http://www.mechanicalturducken.com/search-engine-optimization/learnseo-google-is-all-in-your-flash/</link>
		<comments>http://www.mechanicalturducken.com/search-engine-optimization/learnseo-google-is-all-in-your-flash/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 17:20:13 +0000</pubDate>
		<dc:creator>MT</dc:creator>
		
		<category><![CDATA[Search Engine Optimization]]></category>

		<category><![CDATA[Flash]]></category>

		<category><![CDATA[Google]]></category>

		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.mechanicalturducken.com/?p=13</guid>
		<description><![CDATA[Long ago there was concern that Google wouldn&#8217;t index any dynamic content.  More recently web developers have been grappling with the issues surrounding content that&#8217;s written in Javascript.   But it&#8217;s always been accepted that your flash content would never be indexed by the search engines.
That all changes with last night&#8217;s announcment  now Google crawls flash.
Personally [...]]]></description>
			<content:encoded><![CDATA[<p>Long ago there was concern that Google wouldn&#8217;t index any dynamic content.  More recently web developers have been grappling with the issues surrounding content that&#8217;s written in Javascript.   But it&#8217;s always been accepted that your flash content would never be indexed by the search engines.</p>
<p>That all changes with last night&#8217;s announcment  now <a href="http://googleblog.blogspot.com/2008/06/google-learns-to-crawl-flash.html">Google crawls flash</a>.</p>
<p>Personally I&#8217;m not a big fan of flash for much of anything other than delivering rich multimedia content. But getting a little love from the search engines definately makes flash a more compelling technology for the web.</p>
<p>Good work googlers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mechanicalturducken.com/search-engine-optimization/learnseo-google-is-all-in-your-flash/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How Websites Work: CSS Specificity</title>
		<link>http://www.mechanicalturducken.com/how-websites-work/how-web-sites-work-css-specificity/</link>
		<comments>http://www.mechanicalturducken.com/how-websites-work/how-web-sites-work-css-specificity/#comments</comments>
		<pubDate>Thu, 26 Jun 2008 00:51:01 +0000</pubDate>
		<dc:creator>MT</dc:creator>
		
		<category><![CDATA[How Websites Work]]></category>

		<guid isPermaLink="false">http://www.mechanicalturducken.com/?p=12</guid>
		<description><![CDATA[While I&#8217;ve only briefly touched on the role of CSS in a website, I thought I&#8217;d quickly cover CSS Specificity.
CSS selectors are used to target a set of of objects in the DOM of a website (that set may only contain one object). For example if one wanted to select all of the links within [...]]]></description>
			<content:encoded><![CDATA[<p>While I&#8217;ve only briefly touched on the <a href="http://www.mechanicalturducken.com/how-websites-work/how-web-sites-work-anatomy-of-a-web-page/">role of CSS in a website</a>, I thought I&#8217;d quickly cover CSS Specificity.</p>
<p>CSS selectors are used to target a set of of objects in the DOM of a website (that set may only contain one object). For example if one wanted to select all of the links within paragraphs they might use the following selector:<br />
<code><br />
p a{ ... }<br />
</code></p>
<p>Or if they wanted to target all links with a class of &#8220;internal-link&#8221; that were within an element with an id of &#8220;sidebar&#8221; they might use this:<br />
<code><br />
#sidebar a.internal-link{ ... }</code></p>
<p>CSS selectors become particularly powerful when you begin mixing in id&#8217;s and classes as in the second example.  In a more complex website that may have several thousands lines of CSS, the specificity of a CSS rule can be very important.</p>
<p><span id="more-12"></span></p>
<p>Here is how parts of a selector are assigned weight</p>
<ul>
<li>HTML Elements (div, p, a, ul, etc) = <strong>1</strong></li>
<li>Class Definitions (&#8217;.internal-link&#8217;) = <strong>10</strong></li>
<li>id (&#8217;#sidebar&#8217;) = <strong>100</strong></li>
</ul>
<p>Take a look at the first selector we used about (p a{ &#8230; }). This selector uses two html elements and since we know HTML elements have a specificity of 1 we can add those together and we see the specificity of this selector is <strong>2</strong>.</p>
<p>For the second selector we have an id (&#8217;#sidebar&#8217;), an HTML Element (&#8217;a') and a class definition (&#8217;.internal-link&#8217;). When we add these up they have a specificity of <strong>111</strong>.  Note that an HTML Element with a class definition counts for 11, similarly an Element with an id would count for 101 (&#8217;div#body&#8217; for example).</p>
<p>Higher specificity gets priority and this is well supported in all browsers.</p>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mechanicalturducken.com/how-websites-work/how-web-sites-work-css-specificity/feed/</wfw:commentRss>
		</item>
		<item>
		<title>My Development Environment</title>
		<link>http://www.mechanicalturducken.com/web-development-tools-and-techniques/my-development-environment/</link>
		<comments>http://www.mechanicalturducken.com/web-development-tools-and-techniques/my-development-environment/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 04:26:26 +0000</pubDate>
		<dc:creator>MT</dc:creator>
		
		<category><![CDATA[Web Development Tools and Techniques]]></category>

		<guid isPermaLink="false">http://www.mechanicalturducken.com/?p=11</guid>
		<description><![CDATA[Like most development tasks, programming for the web is much more fun and productive when you&#8217;ve got yourself set up with the right tools. All you really need is a text editor and a web browser, but I use a couple of free tools that really make things easier.
The Editor
To write code you need a [...]]]></description>
			<content:encoded><![CDATA[<p>Like most development tasks, programming for the web is much more fun and productive when you&#8217;ve got yourself set up with the right tools. All you really need is a text editor and a web browser, but I use a couple of free tools that really make things easier.<span id="more-11"></span></p>
<h3>The Editor</h3>
<p>To write code you need a text editor. You might be used to using Microsoft Word to write up documents, but you&#8217;ll want to put that away when it comes time to build a website. As we saw in our previous post on <a href="http://www.mechanicalturducken.com/how-websites-work/how-the-web-sites-work-making-the-http-request/">HTTP</a>, the <a href="http://www.mechanicalturducken.com/how-websites-work/how-web-sites-work-anatomy-of-a-web-page/">elements of a website</a> come down the wire as plain text. The beauty of Word is how it takes the plain text that you input and tranforms it in to complex and visually appealing documents. We are doing something similar here, but we want the web browser to do that transformation. As such we want the text we save in our HTML, CSS and Javascript files to be clean and as we wrote it when it gets sent to the browser. Word and other advanced text editors add lots of crazy stuff on top of your text to make the document display they way you want it, this is not what we want.</p>
<p>To keep our text clean we&#8217;ll take a step back and opt for a simpler text editor that is more focused on programming than creating reports.  On the Mac I use a free editor called <a href="http://www.barebones.com/products/textwrangler/">TextWrangler</a>, under Windows I recommend another free editor called <a href="http://notepad-plus.sourceforge.net/uk/site.htm" target="_blank">Notepad++</a>.  I like both of these editors because they are simple but offer some nice features like Syntax Highlighting.</p>
<h3>The Browser</h3>
<p>In most cases our goal is to make our web sites look and act the same in all web browsers, or at least in a certain set.  But the one I use more than any other when i&#8217;m building a site is <a href="http://www.mozilla.com/en-US/firefox/">Mozilla Firefox</a>.  While i believe Firefox is superior to other browsers in a number of areas, I&#8217;ll focus today on why it&#8217;s the best development platform which really boils down to one thing: extensions.</p>
<p>Firefox extensions allow independent developers to extend the functionality of the browser. There are thousands of extensions that do many different things and i&#8217;ll mention a couple that are very useful for web developers.</p>
<h3><a href="https://addons.mozilla.org/en-US/firefox/addon/60" target="_blank">Firefox Developer Toolbar</a></h3>
<p>The developer toolbar gives you access to more information about the site you are currently viewing than you ever knew existed. Tools in the toolbar will let you measure DOM objects, manipulate images, enable and disable CSS and Javascript, and many other things. Install it and then play around with it, it will teach you a great deal about how websites work.</p>
<h3><a href="https://addons.mozilla.org/en-US/firefox/addon/1843" target="_blank">Firebug</a></h3>
<p>This one is truly the holy grail. I simply do not remember how web devs functioned in the days before firebug. Firebug provides a multitude of tools to inspect and manipulate the DOM.  Additionally it allows you to log Javscript outputs and interact with the browsers javascript engine directly from a command line.  This is a very, very powerful tool.</p>
<p>There you have it, those are the barebones tools that I absolutely could not live without. Do you have any that aren&#8217;t on this list?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mechanicalturducken.com/web-development-tools-and-techniques/my-development-environment/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Learning SEO: What is SEO?</title>
		<link>http://www.mechanicalturducken.com/search-engine-optimization/learning-seo-the-basics/</link>
		<comments>http://www.mechanicalturducken.com/search-engine-optimization/learning-seo-the-basics/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 03:05:41 +0000</pubDate>
		<dc:creator>MT</dc:creator>
		
		<category><![CDATA[Search Engine Optimization]]></category>

		<guid isPermaLink="false">http://www.mechanicalturducken.com/?p=10</guid>
		<description><![CDATA[So you&#8217;ve built this great page using all the hot skills you&#8217;ve learned about how websites work.  That&#8217;s awesome, we couldn&#8217;t be more proud of you.  Now you need to start getting people to come look at it, read what&#8217;s there and maybe even pay you for it. Sure you can tell all your [...]]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve built this great page using all the hot skills you&#8217;ve learned about <a href="http://www.mechanicalturducken.com/category/how-websites-work/">how websites work</a>.  That&#8217;s awesome, we couldn&#8217;t be more proud of you.  Now you need to start getting people to come look at it, read what&#8217;s there and maybe even pay you for it. Sure you can tell all your friends about the site, maybe post some links on a message board or even pay for advertising.  But wouldn&#8217;t it be great if you could get people that were interested in the material you have on your site to come look at it for free?<br />
<span id="more-10"></span><br />
If you wanted to find a case for your sweet new iphone what would you do?  I&#8217;m willing to bet that you&#8217;d step over to your favorite search engine and type in something like &#8220;iphone cases&#8221;.  When i do that in Google, the first result is a page called iphone-cases.org. Now there are thousands of sites that carry cases for the iphone and probably hundreds that specialize in that niche, how did google end up putting that page at the top of the list? Well I don&#8217;t know for sure, but i&#8217;d bet they&#8217;ve put some time into Search Engine Optimization.</p>
<p>SEO is all about links. Links are how people move from page to page across the internet, not coincidentally they are also how search engines move across the internet.  I have a personal website over at <a href="http://henryrose.info">henryrose.info</a> where i have a blurb about myself and a blog that&#8217;s poorly designed and rarely updated. However, I recently started concentrating on getting that page to rank higher on Google for the term &#8220;Henry Rose&#8221;.</p>
<p>It&#8217;s important to have a very basic understanding of a concept called &#8220;Page Rank&#8221;.  Page Rank is google&#8217;s algorithm that determines how useful a given page is for a given query.  This algorithm essentially analyzes the pages that link to a given page and assign that page a &#8220;rank&#8221; based upon how many and which pages link to it.  In addition to the number of pages linking to your target page the Page Rank of the linking pages is also taken in to account.  Feel free to read more on the <a href="http://en.wikipedia.org/wiki/PageRank">Wikipedia article on PageRank</a>.</p>
<p>There are many factors that go into how much &#8220;SEO juice&#8221; a page has, but PageRank is perhaps the most important.</p>
<p>In order to boost the ranking of henryrose.info for the term &#8220;Henry Rose&#8221; I asked a couple of my friends to link to me from their blogs. They did that and I rose to number 2 on the google list. &#8220;Fantastic&#8221;, I thought, &#8220;What more could someone want than to be #2 to the Wikipedia article about Henry Rose, former mayor of Los Angeles?&#8221;.</p>
<p>Well, just the other day I made a comment on the <a href="http://www.zillowblog.com/">ZillowBlog </a>(the official blog of my employer: Zillow.com).  I signed that comment &#8220;Henry&#8221; and had that linked back to my website.  Low and behold, this morning when I checked my rank I was #1.  What appears to have happened is that the powerful PageRank of the Zilllow Blog was enough to carry me up to the top from just one little link.</p>
<p>There is a lot to SEO and I am certainly still learning about it myself, but it&#8217;s a fascinating topic and one that will only grow more relevant as more and more companies rely on the free marketing that search engines provide.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mechanicalturducken.com/search-engine-optimization/learning-seo-the-basics/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
