<?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>Polytechnic &#187; articles</title>
	<atom:link href="http://polytechnic.co.uk/blog/tag/articles/feed" rel="self" type="application/rss+xml" />
	<link>http://polytechnic.co.uk</link>
	<description>The personal brain dump of Garrett Coakley</description>
	<lastBuildDate>Thu, 03 May 2012 14:46:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Stop Publishing, Start Communicating</title>
		<link>http://polytechnic.co.uk/blog/2004/06/stop-publishing-start-communicating</link>
		<comments>http://polytechnic.co.uk/blog/2004/06/stop-publishing-start-communicating#comments</comments>
		<pubDate>Wed, 02 Jun 2004 08:56:22 +0000</pubDate>
		<dc:creator>garrettc</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[articles]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[blogging]]></category>
		<category><![CDATA[business]]></category>
		<category><![CDATA[gencon]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<p>[<strong>Note:</strong> This piece was originally written for the <a href="http://www.gencon.co.uk/basicPage.php?page=journal/newsletter.html&#38;letterId=61#140">June 2004 gencon Newsletter</a>. It's very <a href="http://www.cluetrain.com">cluetrain</a>-ish, but given the non-technical nature of the target audience (upper/middle level management, small business owners), and their probable lack of exposure to that book, I thought it a worthwhile exercise.]</p>

<p><a href="http://news.bbc.co.uk/1/hi/technology/3734981.stm">Bill Gates's recent speech at the Microsoft CEO Summit</a> extolling the virtue of '<a href="http://www.google.co.uk/search?q=define%3Ablog">blogs</a>' got me thinking about a question I'm often asked when people find out what I do for a living. &#34;So what is the web good for?&#34;.</p>

<p>At its most basic the web is a method of publication. You write some content, stick it up on the web, and with any luck people read it.</p> 

<p>But when we look a little deeper, and at blogging in particular, we start to see something more than just a publishing system.</p>

<p>The majority of blogs allow visitors to leave comments on the piece they've just read, turning the entry from one person's lone voice in the wilderness to a living, breathing congress where anyone can join in and add their point of view.</p>

<p>We also start to see a more conversational tone, far removed from the clean sanitised corporate copy-writing on most sites. We see communication between people, we see conversations and communities.</p>

<p>My answer to people who ask me what the web is good for is simple. It's all about the conversations. It's all about people.</p>

<p>I'm not suggesting that you run off and set up a blog on your company website, but I would urge you to get out there in the blogosphere (oh yes, us geeks have a name for everything!), look at the conversations, listen at the tones used and then take a moment to think about the content on your site.</p> 

<p>(a good place to get started reading blogs is <a href="http://www.technorati.com/">technorati</a>, a blog aggregation site. Try a search on a topic that interests you, see where it takes you. Join in!)</p>

<p>Ask yourself what your company 'voice' is, could it be friendlier, softer, or even funnier? Are you just publishing for the sake of it or are you actually communicating?</p>
]]></description>
			<content:encoded><![CDATA[<p>[<strong>Note:</strong> This piece was originally written for the <a href="http://www.gencon.co.uk/basicPage.php?page=journal/newsletter.html&amp;letterId=61#140">June 2004 gencon Newsletter</a>. It’s very <a href="http://www.cluetrain.com">cluetrain</a>–ish, but given the non-technical nature of the target audience (upper/middle level management, small business owners), and their probable lack of exposure to that book, I thought it a worthwhile exercise.]</p>
<p><a href="http://news.bbc.co.uk/1/hi/technology/3734981.stm">Bill Gates’s recent speech at the Microsoft CEO Summit</a> extolling the virtue of ‘<a href="http://www.google.co.uk/search?q=define%3Ablog">blogs</a>’ got me thinking about a question I’m often asked when people find out what I do for a living. “So what is the web good for?”.</p>
<p>At its most basic the web is a method of publication. You write some content, stick it up on the web, and with any luck people read it.</p>
<p>But when we look a little deeper, and at blogging in particular, we start to see something more than just a publishing system.</p>
<p>The majority of blogs allow visitors to leave comments on the piece they’ve just read, turning the entry from one person’s lone voice in the wilderness to a living, breathing congress where anyone can join in and add their point of view.</p>
<p>We also start to see a more conversational tone, far removed from the clean sanitised corporate copy-writing on most sites. We see communication between people, we see conversations and communities.</p>
<p>My answer to people who ask me what the web is good for is simple. It’s all about the conversations. It’s all about people.</p>
<p>I’m not suggesting that you run off and set up a blog on your company website, but I would urge you to get out there in the blogosphere (oh yes, us geeks have a name for everything!), look at the conversations, listen at the tones used and then take a moment to think about the content on your site.</p>
<p>(a good place to get started reading blogs is <a href="http://www.technorati.com/">technorati</a>, a blog aggregation site. Try a search on a topic that interests you, see where it takes you. Join in!)</p>
<p>Ask yourself what your company ‘voice’ is, could it be friendlier, softer, or even funnier? Are you just publishing for the sake of it or are you actually communicating?</p>
]]></content:encoded>
			<wfw:commentRss>http://polytechnic.co.uk/blog/2004/06/stop-publishing-start-communicating/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>#evolt IRC Primer</title>
		<link>http://polytechnic.co.uk/blog/2003/10/#evolt-irc-primer</link>
		<comments>http://polytechnic.co.uk/blog/2003/10/#evolt-irc-primer#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>garrettc</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[articles]]></category>
		<category><![CDATA[evolt.org]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[    <p>IRC (Internet Relay Chat) has been around since about 1988. It's a real time talk system where people can gather together in various channels (think of them as virtual rooms) and talk about whatever interests them. Each channel has a name which usually outlines its main topic of conversation.</p>

]]></description>
			<content:encoded><![CDATA[<p>IRC (Internet Relay Chat) has been around since about 1988. It’s a real time talk system where people can gather together in various channels (think of them as virtual rooms) and talk about whatever interests them. Each channel has a name which usually outlines its main topic of conversation.</p>
<p><!--break--></p>
<p>To participate in IRC you need a client program at your end (for example mIRC on Windows) and the details of the server you wish to connect to.</p>
<h2>Channel Info</h2>
<p>#evolt, the evolt.org IRC channel is hosted on the <a href="http://www.freenode.net">Freenode network</a>. To connect all you need to do is point your IRC client at either <strong>irc.freenode.net</strong> or <strong>irc.evolt.org</strong>. If you’re using a GUI IRC client then have a look at your clients documentation to find out how you connect to a server. If you’re using a command line IRC client then type:</p>
<p>
<code><br />
/server irc.evolt.org<br />
</code>
</p>
<p>Barring any major problems you will find yourself connected to one of the pool of freenode.net servers.</p>
<p>(Don’t worry about what <code>/server</code> means right now. I’ll explain IRC commands a little later).</p>
<h2>Now What Do I Do???</h2>
<p>Once you’ve connected to the server, you then need to tell it which channel you would like to join. To do that you type in:</p>
<p>
<code><br />
/join #evolt<br />
</code>
</p>
<p>and you should find yourself in the evolt.org channel.</p>
<p>To join in the conversation, just start typing. Everytime you hit enter, the line you’ve typed is echoed to the channel. Yep, it’s that simple.</p>
<h2>Interacting With The Server</h2>
<p>As well as talking directly with the other people on the channel, you can also send the server special commands. These commands have a number of functions, but the one thing they have in common is that they all start with a ‘/’.</p>
<p>A full list of possible commands is beyond the scope of this intro, but here are some of the most common.</p>
<dl>
<dt><code>/me [action]</code></dt>
<dd>
        Will result in your persona in the channel performing an action. For example,<br />
<code><br />
/me scratches his nose<br />
</code><br />
        would result in everyone in the channel seeing<br />
<code><br />
garrett scratches his nose<br />
</code>
      </dd>
<dt><code>/msg &lt;user&gt; [message]</code></dt>
<dd>
        Will send a private message to &lt;user&gt;. Example:<br />
<code><br />
/msg djc hey! where's my beer gone?<br />
</code><br />
        would result in djc getting a private message from me saying<br />
<code><br />
hey! where's my beer gone?<br />
</code><br />
        If djc wanted to reply in private he would address a /msg back at me.
      </dd>
<dt><code>/part [channel] [reason]</code></dt>
<dd>The /part command will cause you to leave the channel specified. If you tag on a reason then that reason will be echo’d to the channel as you leave. <strong>Very important note:</strong> if you want to supply a reason for leaving, you <strong>have</strong> to supply the channel. Otherwise the server gets confused.</dd>
<dt><code>/quit [reason]</code></dt>
<dd>Similar to the /part command, but it will disconnect you from the server as well.</dd>
</dl>
<h2>Netiquette</h2>
<p>As with all the other digital media that you’ve been using (web, email, forums etc) IRC has its own list of rules that aid the communication process. A full list of them is beyond this introduction (see the list of <a href="#links">further links</a>) but suffice to say they’re pretty similiar to the rules for <a href="http://lists.evolt.org/index.cfm/a/listinfo" title="thelist rules">thelist</a> that we all know and love.</p>
<p>Just remember, there’s a person on the other end of that nickname, so keep it friendly.</p>
<h2>thebot</h2>
<p>Now, when I said that there is a person on the other end of a nickname, that’s not always strictly true. Allow me to introduce you to thebot.</p>
<p>thebot is #evolt’s very own, ummm, bot. Bots are programs that sit in IRC channels and do helpful stuff (most of the time). thebot is based on the <a href="http://www.infobot.org" title="infobot website" target="_blank">infobot code</a> and so you should see that site for more complete instructions on what it can do. But here’s a quick taster.</p>
<dl>
<dt><code>thebot, seen garrettc</code></dt>
<dd>thebot will return the last time I was on the channel and the last thing I said.</dd>
<dt><code>thebot, exchange 10USD to GBP</code></dt>
<dd>Convert 10 U.S. Dollars to U.K. Pounds (will work with any ISO currency codes).</dd>
<dt><code>thebot, evolt</code></dt>
<dd>Will return a list of the current evolt.org front page headlines</dd>
</dl>
<h2><a id="links" name="links">Further Reading &amp; Links</a></h2>
<h3>About IRC</h3>
<ul>
<li><a href="http://www.irchelp.org" title="IRC Help" target="_blank">http://www.irchelp.org</a></li>
<li><a href="http://www.irchelp.org/irchelp/faq.html" title="IRC Help FAQ's" target="_blank">IRC FAQs from irchelp.org</a></li>
<li><a href="http://www.newircusers.com" title="New IRC Users" target="_blank">http://www.newircusers.com</a></li>
</ul>
<h3>Software</h3>
<ul>
<li><a href="http://www.mirc.com" title="mIRC" target="_blank">mIRC — Windows</a></li>
<li><a href="http://www.xchat.org" title="X-Chat" target="_blank">X-Chat — Linux, *nix, Windows, BSD, MacOSX</a></li>
<li><a href="http://www.macirc.com" title="MacIRC" target="_blank">MacIRC — MacOS &lt; X (no longer being developed)</a></li>
</ul>
<h2>Conclusion</h2>
<p>IRC is an incredibly useful tool, and hell, it’s fun too. I hope this primer has helped introduce you to IRC and that you’ll pop into the channel and have a chat sometime. It’s a great place to get a quick answer to that niggling HTML question, or even to just kill 30 mins over lunch.</p>
]]></content:encoded>
			<wfw:commentRss>http://polytechnic.co.uk/blog/2003/10/#evolt-irc-primer/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Book Review: mod_perl Developers Cookbook</title>
		<link>http://polytechnic.co.uk/blog/2003/10/book-review-mod_perl-developers-cookbook</link>
		<comments>http://polytechnic.co.uk/blog/2003/10/book-review-mod_perl-developers-cookbook#comments</comments>
		<pubDate>Thu, 02 Oct 2003 16:59:00 +0000</pubDate>
		<dc:creator>garrettc</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[articles]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[system administration]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[<p>Perl and Apache are two of Open Sources flagship technologies. Together, they're one of the most potent web platforms out there. Sams have just published the mod_perl Developers Cookbook to help you out with ideas when developing commercial grade applications.</p>

]]></description>
			<content:encoded><![CDATA[<p>Perl and Apache are two of Open Sources flagship technologies. Together, they’re one of the most potent web platforms out there. Sams have just published the mod_perl Developers Cookbook to help you out with ideas when developing commercial grade applications.</p>
<p><!--break--></p>
<p>As with all of these cookbooks, it is not meant to be read cover to cover (although you could), but more to be used as a reference book, something you dip in and out of when you need a specific answer. This often makes it difficult to do a proper review, so instead I shall run through some of the sections I’ve found the most useful over the past few weeks.</p>
<h3>Getting Started</h3>
<p>Before you can do anything you need to have a running instance of mod_perl. The first two chapters deal with installing and configuring it.</p>
<p>Instructions for all the major Linux distributions and packaging systems (.rpm, .deb and source) plus Windows and Mac OS X are included. For those of you that feel like living dangerously, there are also instructions on how to sync up with the bleeding edge CVS version.</p>
<p>Chapter 2 contains recipes on the configuration of mod_perl, including an overview of what the different modules in mod_perl actually do. There are some helpful hints for running legacy CGI scripts, improving performance and even, configuring Apache on the fly with &lt;Perl&gt; sections in the httpd.conf. A <strong>very</strong> powerful tool.</p>
<h3>Manipulating the URI</h3>
<p>Almost all web based applications, whether written in Perl, PHP, or ASP will need to manipulate the URI at some point or another. Chapter 5 contains recipes<br />
for doing just this. Splitting a URI into its constituent parts, altering a request URI, and some more estoric uses.</p>
<p>For example, using recipe 5.2, you can use mod_perl to find out which <code>&lt;Location&gt;</code> container was responsible for processing a request. How about using the URI to force a MIME type? That would be recipe 5.6 then.</p>
<h3>Getting Into The Guts of Apache</h3>
<p>One of the more powerful techniques put forward is being able to use Perl to interact with all parts of the Apache life-cycle. This gives you the ability, as the book says, “to program <em>within</em> Apache’s framework instead of <em>around</em> it.”</p>
<p>Chapters 7 &amp; 8 show you how to create handlers and then interact with them. Chapter 9 supply recipes for tuning Apache and mod_perl. This includes limiting process growth, increasing shared memory and much much more. Practically every part of Apache can be tinkered with, in fact, if you’re a performance nut like our djc, then you’ll be in hog heaven.</p>
<h3>The Apache Lifcycle</h3>
<p>Once you have started to get your head round how Apache and mod_perl interact, Chapters 11 to 17 will show you some recipes and techniques that will really demonstrate why these two technologies work so well together.</p>
<p>Starting with a diagrammatic explanation of the Apache life-cycle (which incidentally, is one of the best explanations I’ve ever seen), and then moving onto recipes which tap into each part of this cycle, it’s easy to get overwhelmed.But if you are developing large scale Apache applications it’s worth sticking with.</p>
<h3>Conclusion</h3>
<p>The best way to measure how good one of these cookbooks is uses the amount of Post-it notes sticking out of the top and the amount of creases on the spine. By this benchmark, this is a pretty useful book.</p>
<p>It’s aimed squarely at the intermediate to advanced developer. You are going to need to understand a bit of Perl, and knowing your way around Apache and the httpd.conf will help as well. Some of the later recipes could leave even the most experienced developer scratching their head, but when you are dealing with technology this powerful that’s to be expected.</p>
<p>Things are not entirely perfect. Some of the recipes seem to jump from an easy concept to something which leaves you baffled without an explanatory middle step (although this could just be me, and more likely is) and there are a few errors lurking in the code examples. But these are taken care of via the books website at  <a href="http://www.modperlcookbook.org" title="mod_perl Developers Cookbook Website" target="_blank">http://www.modperlcookbook.org</a>. The website also contains an extensive list of related resources.</p>
<p>Minor quibbles aside, this is a valuable addition to any Perl Mongers bookshelf, and will make a handy addition to the <a href="http://www.oreilly.com/catalog/pperl3/" title="Programming Perl"  target="_blank">Camel book.</a></p>
<h3>Details</h3>
<dl>
<dt>Title:</dt>
<dd><a href="http://www.modperlcookbook.org" title="mod_perl Developers Cookbook Website" target="_blank">mod_perl Developers Cookbook</a></dd>
<dt>Authors:</dt>
<dd>Geoffrey Young, Paul Lindner and Randy Kobes</dd>
<dt>Publisher:</dt>
<dd><a href="http://www.samspublishing.com" title="Sams Publishing Website" target="_blank">Sams</a></dd>
<dt>ISBN:</dt>
<dd>0–672-32240–4</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://polytechnic.co.uk/blog/2003/10/book-review-mod_perl-developers-cookbook/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Search Engine Friendly URLs with PHP and Apache</title>
		<link>http://polytechnic.co.uk/blog/2003/10/search-engine-friendly-urls-with-php-and-apache</link>
		<comments>http://polytechnic.co.uk/blog/2003/10/search-engine-friendly-urls-with-php-and-apache#comments</comments>
		<pubDate>Thu, 01 Jan 1970 00:00:00 +0000</pubDate>
		<dc:creator>garrettc</dc:creator>
				<category><![CDATA[articles]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[world wide web]]></category>

		<guid isPermaLink="false"></guid>
		<description><![CDATA[    <p>Anyone who has built template based sites that use query strings to select content will have at some point hit the problem of indexing (or lack of it) by search engines. Search engine spiders won't index dynamic sites, as they are worried about getting stuck in a maze of twisty URLs, all alike.</p>

]]></description>
			<content:encoded><![CDATA[<p>Anyone who has built template based sites that use query strings to select content will have at some point hit the problem of indexing (or lack of it) by search engines. Search engine spiders won’t index dynamic sites, as they are worried about getting stuck in a maze of twisty URLs, all alike.</p>
<p><!--break--></p>
<p>One way round this is to mask the fact that we’re using a query string.  Evolt itself uses this system (which you can see if you look at the current URL in your browsers location bar), albeit written in Cold Fusion. I’m going to show you a quick ‘n’ dirty way to do this in PHP. It’s not the most feature complete way by any means, but it should at least provide you with a base to expand on.</p>
<h2>Question Marks Are So 20th Century</h2>
<p>We want to turn this</p>
<p><code>http://www.somesite.co.uk/site.php?section=books&amp;subsection=architecture</code></p>
<p>into this</p>
<p><code>http://www.somesite.co.uk/site/books/architecture</code></p>
<p>which involves masking the file extension for the processing file and then giving the query string a shave and a haircut.</p>
<h2>The Science Bit</h2>
<p>Like all good things in life (Star Wars, cocktails), this little system is based on three ingredients:</p>
<ol>
<li>Setting up Apache to process a file without an extension as a PHP file.</li>
<li>A function to process our URL and produce some variables.</li>
<li>Something that uses those variables to provide content.</li>
</ol>
<p>First, setting up Apache. In your .htaccess file (if you don’t have one, go ahead and create it) you want these lines:</p>
<pre>
&lt;Files site&gt;
	ForceType application/x-httpd-php
&lt;/Files&gt;
</pre>
<p>This tells Apache that if someone requests the file ‘site’ then it should be treated as a PHP file. Of course, you don’t have to call it ‘site’. If you were running a small online shop you might want to call it ‘catalog’.</p>
<p>Next up, we need something that will take our new url and extract the information out of it. We do that with this function called </em>processURI()</em></p>
<pre>
// processURI():
// Takes the query string and extracts the vars by splitting on the '/'
// Returns an array $url_array containing keys argN for each variable.
function processURI() {
 global $REQUEST_URI;   // Define our global variables
 $array = explode(&quot;/&quot;,$REQUEST_URI);	// Explode the URI using '/'.
 $num = count($array);	// How many items in the array?
 $url_array = array();	// Init our new array	

 for ($i = 1 ; $i &lt; $num ; $i++) {
	$url_array[&quot;arg&quot;.$i] = $array[$i];
 }
// Insert each element from the
// request URI into $url_array
// with a key of argN. We start $i
// at 1 because exploding the URI
// gives us an empty ref in $array[0]
// It's a hacky way of getting round it
// *:)

return $url_array;  // return our new shiny array
}
</pre>
<p>This is a pretty simple function. First up it takes the $REQUEST_URI (everything after the server address basically) and then splits it into an array. After that it builds a new array ($url_array) containing arg1 to argN as keys, with their respective values.</p>
<p>The final piece in the puzzle is creating the file ‘site’ and doing something with all these variables that you’ve lovingly created. I’ve done just this up on <a href="http://members.evolt.org/garrett/site/books/factual" target="_new">http://members.evolt.org/garrett/site/books/factual</a></p>
<p>This is just a quick example of pulling in content based on the variables extracted from the query string. It’s a list of books and CD’s in my room. Not very interesting, but it was either that or a list of fruit and vegetables.</p>
<p>All the files can be downloaded <a href="/evolt/search_urls_php.tar.gz">here</a>. This contains a .htaccess file, ‘site’ which has the processURI() function plus a roughly cobbled together function displayContent() to show it in action. There is also a directory ‘content’ which holds the files for inclusion.</p>
<h2>That’s A Wrap!</h2>
<p> It’s a very handy trick, and you only have to use evolts <a href="http://lists.evolt.org" title="thelist archives - Opens new window" target="_new">archive search</a> to see how effective it can be (evolt uses Googles database to search its archives). As I said, this is a very quick approach and it could be improved in a number of ways but hopefully it’s given you some ideas for your own site.</p>
<p><em>G.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://polytechnic.co.uk/blog/2003/10/search-engine-friendly-urls-with-php-and-apache/feed</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Served from: polytechnic.co.uk @ 2012-05-21 18:27:19 by W3 Total Cache -->
