<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><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:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Brian Egan</title>
	
	<link>http://brianegan.com</link>
	<description>Climb on to your seahorse</description>
	<lastBuildDate>Fri, 03 Sep 2010 19:00:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/BrianEgan" /><feedburner:info uri="brianegan" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Fight Recap: NodeKO</title>
		<link>http://feedproxy.google.com/~r/BrianEgan/~3/tUWJ7Yv2Ij4/</link>
		<comments>http://brianegan.com/fight-recap-nodeko/#comments</comments>
		<pubDate>Fri, 03 Sep 2010 07:28:21 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[NodeJS]]></category>

		<guid isPermaLink="false">http://brianegan.com/?p=106</guid>
		<description><![CDATA[This past weekend I had the honor of participating in the fearsome Rocky-IV-style hackathon that was Node Knockout. For those who may actually have a life: Node Knockout was a 48 hour competition featuring teams of hackers each pecking away at a web &#8230; <a href="http://brianegan.com/fight-recap-nodeko/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This past weekend I had the honor of participating in the fearsome Rocky-IV-style hackathon that was <a href="http://nodeknockout.com/">Node Knockout</a>. For those who may actually have a life: Node Knockout was a 48 hour competition featuring teams of hackers each pecking away at a web application that should be somewhat complete-ish after at the end of the two days. In our case, we tried to build a fairly full-feature music player in 2 days (<a href="http://vegasjs.no.de/">yeah lets see how that turned out</a>)&#8230;</p>
<p><span id="more-106"></span></p>
<p>Ok, so if you followed the previous link and checked out our app, you&#8217;ll see that it&#8217;s somewhat pretty (for a ripoff), and barely functional! Man we rock&#8230; but really, the competition wasn&#8217;t just about winning for our team as much as it was about fiddling around with some new JavaScript hawtsawce. So here&#8217;s what I learned:</p>
<h2>Pick your 48 hour project Wisely</h2>
<p>Yeah, so our <em>idea </em>was to actually build a NodeJS backend which could scan the directories input by the user, read the id3 tag info from the files within those directories (as a start, we could support ogg and flac and other format metadata schemes later), and then put the metadata into a CouchDB.</p>
<p>Then the client could connect to your server, grab the catalog from NodeJS, and play songs that NodeJS would convert on the fly into the proper format for your browser depending on capability (probably through a child process exec to some other encoder &#8212; haven&#8217;t figured that part out yet).</p>
<p>Unfortunately, we hit a snag on step 1 of this process: reading the data from an id3 tag, which is binary data stored at the beginning on an mp3 file. Node can read streams of data, like so:</p>
<pre>  var s = fs.createReadStream(file, {start: 1, end: 2});

  s.on('data', function(data){
    console.log(data.toString());
  });</pre>
<p>This is actually the code I was using to check whether a particular file begins with &#8220;ID3,&#8221; which would thus signify ID3 version 2 data. All the fun technical details behind ID3 can be read about here: <a href="http://www.id3.org/Developer_Information">http://www.id3.org/Developer_Information</a></p>
<p>But this is about when things started to break down. After this, and I&#8217;m literally talking about the first 10 bytes here, became totally beyond my grasp for a 48 hour competition. WTF does this mean, for example:</p>
<blockquote><p>
The ID3v2 tag size is stored as a 32 bit synchsafe integer (section<br />
   6.2), making a total of 28 effective bits (representing up to 256MB).
</p></blockquote>
<p>I mean, I somewhat get what that&#8217;s saying. If you just read section 6.2, you can clear as day see&#8230;</p>
<p>All this led me to one conclusion after a few hours: <strong>Choose your project wisely</strong>. Dylan Bathurst, who I&#8217;m officially dubbing my &#8220;Node Wingman,&#8221; is a Front end guy. I&#8217;m a front end guy. We probably should not have picked a project that not only required us to pick up server-side programming, but also get all Computer Science major trying to decipher binary data (I have a degree in Sociology &#8212; super helpful for that kind of thing). It seems like a simple game using WebSockets might have been a better call&#8230; but oh well, just pick a project that helps you learn Node and plays to your strengths!</p>
<h2>Plan a bit in advance&#8230;</h2>
<p>We did a bit of preliminary planning, but we really didn&#8217;t get into the nitty gritty of our roles and responsibilities until the competition began. Not that this isn&#8217;t a totally fun way to approach a 48 hour competition, and if you think Animal from the Muppets is the coolest guy ever, then just jumping headfirst into the competition might be the best thing for you.</p>
<p>But, it seemed like some of the <a href="http://www.startupmonkeys.com/2010/09/building-a-scrabble-mmo-in-48-hours/">best ideas</a> had been well thought out a in advance, including splitting up roles for each team member so they could focus on their tasks. With only 2 days of actual design and programming time, getting the prep out of the way so you can focus on code is clutch.</p>
<h2>The community rocks</h2>
<p>Yeah, I&#8217;m talking to you. I hadn&#8217;t spent much time in IRC before that weekend, but I was able to ask questions and get prompt, helpful responses. Plugin creators took their time to explain basic stuff to me, and it was even easy to hit up the creator of NodeJS. Plus, the vibe was just electric. Man, it was just fun being in there with everyone.</p>
<p>I also gotta say that I was really impressed with the <a href="http://joyent.com">Joyent</a> setup overall. Thanks for providing such an awesome platform on which to host the competition!</p>
<h2>Even if you don&#8217;t know anything about NodeJS, you should still totally participate</h2>
<p>I wasn&#8217;t completely ignorant of Node, but I&#8217;m by no means an expert, and I haven&#8217;t built any serious/real apps on it. Heck, I hadn&#8217;t even built much of a toy app with it. This was my first real attempt at anything of substance. And even though we didn&#8217;t get a fully-functional app going, I learned more in two days than I have in a long time.</p>
<p>I would encourage anyone who has even the smallest inclination to give Node a shot to join this competition next time it comes around. If you haven&#8217;t learned Node because you don&#8217;t really know what to do with it, this competition ends that excuse! Just dive in. The water is warm &#8212; I promise!</p>
<h2>The future is lookin pretty good&#8230;</h2>
<p>And you know what was so cool about this competition? Knowledge wasn&#8217;t the best thing I gained. I walked away with a sense of optimism I haven&#8217;t felt in a while. When you get into the daily grind, a lot of the knowledge we accumulate seems to be incremental rather than revolutionary. NodeJS is a revolution.</p>
<p>Now, of course, there are a couple of secrets I&#8217;ve gotta save for myself until next year to give myself a bit of a competitive edge (heyo!), but I gotta end this post thanking everyone who put the competition together, Joyent again for hosting, the awesome people who were hangin out in IRC, and my buddy Dylan for putting the app together with me! It was a blast, and you&#8217;d better believe we&#8217;re gonna win it next year, so be ready to bring it!</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://brianegan.com/fight-recap-nodeko/&amp;title=Fight+Recap%3A+NodeKO" title="Add 'Fight Recap: NodeKO' to Del.icio.us"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Fight Recap: NodeKO' to Del.icio.us" alt="Add 'Fight Recap: NodeKO' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://brianegan.com/fight-recap-nodeko/&amp;title=Fight+Recap%3A+NodeKO" title="Add 'Fight Recap: NodeKO' to digg"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Fight Recap: NodeKO' to digg" alt="Add 'Fight Recap: NodeKO' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://brianegan.com/fight-recap-nodeko/&amp;title=Fight+Recap%3A+NodeKO" title="Add 'Fight Recap: NodeKO' to reddit"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/reddit.png" title="Add 'Fight Recap: NodeKO' to reddit" alt="Add 'Fight Recap: NodeKO' to reddit" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://brianegan.com/fight-recap-nodeko/&amp;title=Fight+Recap%3A+NodeKO" title="Add 'Fight Recap: NodeKO' to Stumble Upon"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Fight Recap: NodeKO' to Stumble Upon" alt="Add 'Fight Recap: NodeKO' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://brianegan.com/fight-recap-nodeko/&amp;title=Fight+Recap%3A+NodeKO" title="Add 'Fight Recap: NodeKO' to Google Bookmarks"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'Fight Recap: NodeKO' to Google Bookmarks" alt="Add 'Fight Recap: NodeKO' to Google Bookmarks" /></a><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://brianegan.com/fight-recap-nodeko/&amp;t=Fight+Recap%3A+NodeKO" title="Add 'Fight Recap: NodeKO' to FaceBook"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Fight Recap: NodeKO' to FaceBook" alt="Add 'Fight Recap: NodeKO' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Fight+Recap%3A+NodeKO&amp;c=http://brianegan.com/fight-recap-nodeko/" title="Add 'Fight Recap: NodeKO' to MySpace"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Fight Recap: NodeKO' to MySpace" alt="Add 'Fight Recap: NodeKO' to MySpace" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://brianegan.com/fight-recap-nodeko/" title="Add 'Fight Recap: NodeKO' to Twitter"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Fight Recap: NodeKO' to Twitter" alt="Add 'Fight Recap: NodeKO' to Twitter" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/addurl/?bm_url=http://brianegan.com/fight-recap-nodeko/&amp;bm_description=Fight+Recap%3A+NodeKO" title="Add 'Fight Recap: NodeKO' to Mister-Wong"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/misterwong.png" title="Add 'Fight Recap: NodeKO' to Mister-Wong" alt="Add 'Fight Recap: NodeKO' to Mister-Wong" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://friendfeed.com/share/bookmarklet/frame#title=Fight+Recap%3A+NodeKO&amp;url=http://brianegan.com/fight-recap-nodeko/" title="Add 'Fight Recap: NodeKO' to FriendFeed"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/friendfeed.png" title="Add 'Fight Recap: NodeKO' to FriendFeed" alt="Add 'Fight Recap: NodeKO' to FriendFeed" /></a></div>
<!-- Social Bookmarking Reloaded END --><img src="http://feeds.feedburner.com/~r/BrianEgan/~4/tUWJ7Yv2Ij4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brianegan.com/fight-recap-nodeko/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://brianegan.com/fight-recap-nodeko/</feedburner:origLink></item>
		<item>
		<title>Drupal Theming: Zen vs Tao</title>
		<link>http://feedproxy.google.com/~r/BrianEgan/~3/tC0BK90JNtI/</link>
		<comments>http://brianegan.com/drupal-theming-zen-vs-tao/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 15:01:16 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Drupal]]></category>
		<category><![CDATA[Theming]]></category>

		<guid isPermaLink="false">http://brianegan.com/?p=53</guid>
		<description><![CDATA[If you, like me, are working on your first Drupal theme, a big question can be: Do I really need a base theme or should I start from scratch? This is an easy question to answer: start with a base &#8230; <a href="http://brianegan.com/drupal-theming-zen-vs-tao/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you, like me, are working on your first Drupal theme, a big question can be: Do I really need a base theme or should I start from scratch? This is an easy question to answer: start with a base theme. Why? Because even if you start from scratch, you really aren&#8217;t starting from scratch. Drupal loads in a bunch of CSS files for you. And the styles they apply make far too many assumptions. And as my 9th grade Geometry teacher loved to say: assumptions make an &#8220;ass&#8221; out of &#8220;u&#8221; and &#8220;me.&#8221;</p>
<p>So if you&#8217;re going to go with a base theme, which to chose? There are a ton out there, but the two I was most intrigued by were Zen and Tao, and I&#8217;m going to tell you why Tao totally beat the heck outa Zen in a very Buddhist way.<br />
<span id="more-53"></span></p>
<h2>Zen &#8211; the path to (record scratch)</h2>
<p>I started with Zen. It was very nice at first. It made me feel welcome in a foreign land. It has nice documentation. It walked me step-by-step through creating a sub-theme. I felt good. I felt confident.</p>
<p>After my sub-theme was established, I checked it into our SVN repository, and began coding. This was going well! I saw a lot of things I liked about Zen &#8212; A focus on accessibility, an attempt to break down CSS into logical files so you don&#8217;t have one monster CSS file, logical content regions, and did I mention the documentation!?</p>
<h3>Heart of Darkness</h3>
<p>But after a few days of working with Zen, theming became maddening. What had been sensible defaults now turned into a Heart of Darkness journey to find and override styles. I was spending far more time in Firebug tracking down exactly what styles were doing so they could be overridden instead of coding my site. And I couldn&#8217;t use <a href="http://drupal.org/project/scaffold">CSScaffold</a>, which is my CSS framework of choice, due to the way the comments were formatted throughout (this really isn&#8217;t Zen&#8217;s fault).</p>
<p>And while the CSS files were broken down, they are broken down in a very illogical way which requires redefining selectors in multiple files, and also mixing your screen and print styles. For example, zen has &#8220;layout.css&#8221; where you&#8217;re supposed to put all layout-related styles, such as display, margin, padding, floating, etc. But then it encourages you to put background and font styles in other stylesheets &#8212; yuck! That decision alone makes it very hard to quickly visualize what an element will look like in your &#8220;Minds Compiler&#8221;, and requires you to shift between files just to make edits to a single element. Overall, bad news.</p>
<h3>Not so sure about ems</h3>
<p>Furthermore, within Zen, fonts and many margins are sized in ems. I decided to go with the flow and keep using ems, which is nice if you want to support text resizing in IE6, but is a complete mess if you&#8217;re trying to establish a baseline grid. Ems turn into nasty fractions you have to constantly calculate (and recalculate if you want to do something simple like make the page text slightly larger), and the rounding errors that occur cross browser are simply unavoidable. So scratch that. IE6 only accounts for 1.5% of our users, and my brain accounts for 100% of my sanity.</p>
<h3>No reset &#8212; the deal breaker</h3>
<p>And then, in my opinion, the dagger in the heart: There&#8217;s just no reset. This was an intentional design decision by the creators, but in my opinion, a HUGE mistake. I simply could not get my Zen sub-theme to render consistently in all browsers, which is a direct result of no reset.</p>
<p>So I added a reset. But you know what? It was still inconsistent! Ack, why? Because of Drupal&#8217;s core CSS files. It was like a <a href="http://www.poemhunter.com/poem/a-dream-within-a-dream/">dream within a dream</a>&#8230; I just couldn&#8217;t escape Firebug purgatory, and almost lost my cool with Drupal. Once again, I had found myself in assumption land, and I didn&#8217;t like it.</p>
<h2>Tao rescues me. Or did I rescue myself?</h2>
<p>So I went back to the drawing board. I went through a lot of the starter themes again, and still saw a bunch of stuff I was concerned about. This time around, I wanted a theme which did one thing well &#8212; reset pretty much everything so that my Drupal page looks just like an XHTML document with a reset CSS applied to it. No weird spacing, no more Drupal CSS files effing with me, and I didn&#8217;t want ANY STYLING. I literally didn&#8217;t even want default columns, tabs, yellow backgrounds for blocks on the edit-block page, NOTHING. I just wanted some very clean HTML with a reset style that made everything consistent between all our favorite browsers.</p>
<p>And that&#8217;s when I remembered reading about Rubik theme from Development Seed. If you don&#8217;t know, Development Seed makes the best looking Drupal sites. The Best. No question in my mind about it.</p>
<p><a href="http://code.developmentseed.org/rubik/">Rubik </a>is a fantastic administration theme. It dramatically improves the drupal administrative interface by reducing visual clutter, and it looks just wonderful. It&#8217;s worth it to download and install just for it&#8217;s own functionality. And best of all: it relies on a fantastic base theme maintained by Development Seed: <a href="http://code.developmentseed.org/tao/">Tao</a>.</p>
<p>As Tao says: &#8220;Tao is a base theme for Drupal that is all about going with the flow. It is not meant for general-purpose use, but instead takes care of several tasks so that sub-themes can get on with their job.&#8221; And this is exactly what it does.</p>
<p>It has an &#8220;aggressive reset,&#8221; provides preprocessing functions for &#8220;core annoyances,&#8221; properly splits up its files between screen and print, and unifies theme files within a &#8220;templates&#8221; directory (thank you for this alone &#8212; makes the directory structure much cleaner!).</p>
<p>Basically, it resets the ugly in Drupal, and kindly opens the door to beautiful design for you.</p>
<p>Now, I can use CSScaffold. This gives my page a beautiful grid without needing to further pollute my HTML with even more extraneous classes, as you have to do to employ 960gs or Blueprint.</p>
<p>I can split CSS files up into an order I think is much more logical (CSS files for the header, footer, content, blocks, etc). This means no more switching between files to edit one selector, and also prevents me from slipping into Firebug Purgatory.</p>
<p>And best of all &#8212; my site renders almost perfectly across browsers now.</p>
<h2>Conclusion</h2>
<p>If you&#8217;re just starting off, Install Zen and play with it. If you&#8217;re a casual designer and don&#8217;t care too much about whether the line-height of your fonts is off, and don&#8217;t particularly care about rigid control of you grid system (which is too bad, cus your page probably looks ugly), go ahead and use Zen.</p>
<p>But if you want to avoid Firebug Purgatory, clean up your code, organize it in a way that&#8217;s logical to you, and make sites that are truly spectacularrrrr, the choice is clear: use Tao.</p>
<p>And if you don&#8217;t believe me, take a look at <a href="http://www.lullabot.com/">Lullabot</a> (creators of Zen), and then compare it to <a href="http://developmentseed.org">Development Seed</a>. Lullabot&#8217;s site isn&#8217;t bad &#8212; I&#8217;m not saying that, but it clearly isn&#8217;t the same caliber as Development Seed. And if that&#8217;s the case, which one do you trust to make the best base theme? I know where I&#8217;m putting my money.</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://brianegan.com/drupal-theming-zen-vs-tao/&amp;title=Drupal+Theming%3A+Zen+vs+Tao" title="Add 'Drupal Theming: Zen vs Tao' to Del.icio.us"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Drupal Theming: Zen vs Tao' to Del.icio.us" alt="Add 'Drupal Theming: Zen vs Tao' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://brianegan.com/drupal-theming-zen-vs-tao/&amp;title=Drupal+Theming%3A+Zen+vs+Tao" title="Add 'Drupal Theming: Zen vs Tao' to digg"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Drupal Theming: Zen vs Tao' to digg" alt="Add 'Drupal Theming: Zen vs Tao' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://brianegan.com/drupal-theming-zen-vs-tao/&amp;title=Drupal+Theming%3A+Zen+vs+Tao" title="Add 'Drupal Theming: Zen vs Tao' to reddit"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/reddit.png" title="Add 'Drupal Theming: Zen vs Tao' to reddit" alt="Add 'Drupal Theming: Zen vs Tao' to reddit" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://brianegan.com/drupal-theming-zen-vs-tao/&amp;title=Drupal+Theming%3A+Zen+vs+Tao" title="Add 'Drupal Theming: Zen vs Tao' to Stumble Upon"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Drupal Theming: Zen vs Tao' to Stumble Upon" alt="Add 'Drupal Theming: Zen vs Tao' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://brianegan.com/drupal-theming-zen-vs-tao/&amp;title=Drupal+Theming%3A+Zen+vs+Tao" title="Add 'Drupal Theming: Zen vs Tao' to Google Bookmarks"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'Drupal Theming: Zen vs Tao' to Google Bookmarks" alt="Add 'Drupal Theming: Zen vs Tao' to Google Bookmarks" /></a><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://brianegan.com/drupal-theming-zen-vs-tao/&amp;t=Drupal+Theming%3A+Zen+vs+Tao" title="Add 'Drupal Theming: Zen vs Tao' to FaceBook"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Drupal Theming: Zen vs Tao' to FaceBook" alt="Add 'Drupal Theming: Zen vs Tao' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Drupal+Theming%3A+Zen+vs+Tao&amp;c=http://brianegan.com/drupal-theming-zen-vs-tao/" title="Add 'Drupal Theming: Zen vs Tao' to MySpace"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Drupal Theming: Zen vs Tao' to MySpace" alt="Add 'Drupal Theming: Zen vs Tao' to MySpace" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://brianegan.com/drupal-theming-zen-vs-tao/" title="Add 'Drupal Theming: Zen vs Tao' to Twitter"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Drupal Theming: Zen vs Tao' to Twitter" alt="Add 'Drupal Theming: Zen vs Tao' to Twitter" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/addurl/?bm_url=http://brianegan.com/drupal-theming-zen-vs-tao/&amp;bm_description=Drupal+Theming%3A+Zen+vs+Tao" title="Add 'Drupal Theming: Zen vs Tao' to Mister-Wong"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/misterwong.png" title="Add 'Drupal Theming: Zen vs Tao' to Mister-Wong" alt="Add 'Drupal Theming: Zen vs Tao' to Mister-Wong" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://friendfeed.com/share/bookmarklet/frame#title=Drupal+Theming%3A+Zen+vs+Tao&amp;url=http://brianegan.com/drupal-theming-zen-vs-tao/" title="Add 'Drupal Theming: Zen vs Tao' to FriendFeed"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/friendfeed.png" title="Add 'Drupal Theming: Zen vs Tao' to FriendFeed" alt="Add 'Drupal Theming: Zen vs Tao' to FriendFeed" /></a></div>
<!-- Social Bookmarking Reloaded END --><img src="http://feeds.feedburner.com/~r/BrianEgan/~4/tC0BK90JNtI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brianegan.com/drupal-theming-zen-vs-tao/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		<feedburner:origLink>http://brianegan.com/drupal-theming-zen-vs-tao/</feedburner:origLink></item>
		<item>
		<title>Book Review: Advanced JavaScript by TJ Holowaychuck</title>
		<link>http://feedproxy.google.com/~r/BrianEgan/~3/rpOP0NEpA-c/</link>
		<comments>http://brianegan.com/book-review-advanced-javascript-by-vision-media/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 02:41:57 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://brianegan.com/?p=44</guid>
		<description><![CDATA[I&#8217;m not sure if it&#8217;s been done before, but I may very well be the first GitHub stalker (hold your applause, please). Who is my target you ask? Vision Media, aka TJ Holowaychuk on GitHub, author of ExpressJS, a Sinatra-inspired &#8230; <a href="http://brianegan.com/book-review-advanced-javascript-by-vision-media/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure if it&#8217;s been done before, but I may very well be the first GitHub stalker (hold your applause, please). Who is my target you ask? <a href="http://github.com/visionmedia">Vision Media</a>, aka TJ Holowaychuk on GitHub, author of <a href="http://expressjs.com/">ExpressJS</a>, a Sinatra-inspired Web Framework written for NodeJS.</p>
<p>After cloning and examining a lot of his repos (Use the Source!), I found out in an endnote that TJ had published a book entitled <a href="http://www.dev-mag.com/2010/02/18/advanced-javascript/">Advanced JavaScript</a> from <a href="http://www.dev-mag.com/">DevMag</a>. It&#8217;s a short book, but one that opened my eyes in a surprising number of ways.<br />
<span id="more-44"></span></p>
<h2>Overview</h2>
<p>The books Table of Contents are as follows:</p>
<ul>
<li>Ch 1: Closures, Scope and Context</li>
<li>Ch 2: Prototypal Inheritance</li>
<li>Ch 3: Advanced Meta-programming techniques</li>
<li>Ch 4: Behavior Driven Development</li>
<li>Ch 5: Creating a jQuery Clone</li>
<li>Ch 6: Tools of the trade</li>
</ul>
<p>The meat of this review will focus on Chapters 3-5, which made me rethink the way I develop JavaScript. No offense to the author(s), but the contents in Chapters 1 and 2 have been better explained in other texts, notably <a href="http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1269827039&amp;sr=8-1">JavaScript: The Good Parts</a> by Douglas Crockford, and Chapter 6 should have probably just been an Appendix.</p>
<p>But back to the good stuff: Chapter 3 goes through the creation of a JavaScript clone of some of the most basic functionality found in Sinatra, namely creating routes and executing them when matched. While the concept of DRY is often promoted as The Thing To Do, this chapter clearly explained some of the ways to make your programs smarter so that you can in fact avoid repetition! Very nice.</p>
<h2>The revolution will not be televised, it will be tracked on GitHub</h2>
<p>The revolution started for me in Chapter 4. I&#8217;d read about some agile programming techniques, but I&#8217;d never heard of BDD, or Behavior Driven Development. Chapter 4 talks about how to implement BDD with JavaScript using JSpec, an awesome unit testing framework, and one that totally changed how I think about my projects.</p>
<h3>An aside on BDD</h3>
<p>Essentially, BDD is an &#8220;outside-in&#8221; methodology, meaning that you start by identifying outcomes with your clients (internal or external), and then map out the features that will achieve such outcomes. This often happens in a story format.</p>
<p>Overall, it&#8217;s fantastic because it allows your clients to stay on the same page as you, the developer. You define concrete outcomes with your clients, and which steps needed to be taken for each feature to work. This means that both you and your clients have a solid understand of what needs to be done, and what &#8220;done&#8221; truly means. To read more about BDD specifically, check out <a href="http://blog.dannorth.net/whats-in-a-story/">a great explanation of BDD</a> from the inventor, Dan North.</p>
<h3>Using JSpec to implement BDD</h3>
<p>With regard to chapter 4, JSpec helps us implement BDD from the developers perspective. Once the outcomes and features have been hashed out into specific steps, or &#8220;units,&#8221; then the developer can begin doing his/her job! Now, BDD is an extension of test driven development, and therefore implies that we should begin not by writing our implementation, but by writing Unit Tests to ensure that the functionality defined within our story is properly executed! By working this way, developers get the myriad of benefits that come from proper unit testing, such as avoiding regressions (breaking your code).</p>
<p>However, it had never really clicked in my mind how to really do convenient / good unit testing with JavaScript, and that&#8217;s what Chapters 4 and 5 go into in detail. There are a ton of libraries out there, but none of them encourage Unit Testing as part of the workflow the way JSpec does, because most of them are just simple unit testing frameworks written in JavaScript. But JSpec is so much more!</p>
<p>Jspec doesn&#8217;t just include a unit testing JavaScript file, you download a whole Ruby gem and get amazing command-line utilities for creating new projects with testing and documentation all set up, and then very convenient methods for running the unit tests in all your browsers! For example, if you execute the following command:</p>
<p><code>jspec init mySpecTest</code></p>
<p>You&#8217;ll get a new folder called mySpecTest with a directory full of goodies, such as a convenient folder structure for creating consistent projects, and all you need to run the JSpec unit tests. With the specs from your client in hand, you could then quickly begin writing your unit tests to achieve the desired functionality! Then all you have to do is write your JavaScript to pass all of your tests, and you have a very discrete piece of functionality &#8220;done!&#8221;</p>
<h2>Wrap Up</h2>
<p>The book does a great job of going through how to use JSpec in a number of ways, and how to build a cool, limited jQuery clone using the principles of BDD. Overall, as I said, this has literally changed the way I think about writing JavaScript in the future. This will certainly be the approach I take (I had never really written rigorous tests for my JS before), but one that I can immediately see will provide a ton of benefits to the quality of my code.</p>
<p>If you&#8217;re like me, and you thought &#8220;Unit testing is pretty cool, but I really have no idea how to properly implement it,&#8221; you will walk away from this book knowing exactly how to use unit tests, and you&#8217;ll also probably be bursting with ideas about how you can improve your code and your development methodologies.</p>
<p>&#8220;Advanced JavaScript&#8221; rules, and for $4 it is well worth the price. <a href="http://www.dev-mag.com/2010/02/18/advanced-javascript/">Go buy it</a>.</p>
<h2>Addendum/Nitpicks</h2>
<p>Now, while the book totally kicks ass, I did have some minor problems with it. I really think the book needs a good editor. There are some frankly just kind of sloppy grammatical and spelling errors throughout the book, and the writing in general could use a good solid critique to make it a bit better. Also, there&#8217;s a lot of source code presented in the book, but the book didn&#8217;t come with all of the source in separate files. It had a few files, but it was missing some of the JSpec files that I would have found most interesting.</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://brianegan.com/book-review-advanced-javascript-by-vision-media/&amp;title=Book+Review%3A+Advanced+JavaScript+by+TJ+Holowaychuck" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Del.icio.us"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Del.icio.us" alt="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://brianegan.com/book-review-advanced-javascript-by-vision-media/&amp;title=Book+Review%3A+Advanced+JavaScript+by+TJ+Holowaychuck" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to digg"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to digg" alt="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://brianegan.com/book-review-advanced-javascript-by-vision-media/&amp;title=Book+Review%3A+Advanced+JavaScript+by+TJ+Holowaychuck" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to reddit"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/reddit.png" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to reddit" alt="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to reddit" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://brianegan.com/book-review-advanced-javascript-by-vision-media/&amp;title=Book+Review%3A+Advanced+JavaScript+by+TJ+Holowaychuck" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Stumble Upon"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Stumble Upon" alt="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://brianegan.com/book-review-advanced-javascript-by-vision-media/&amp;title=Book+Review%3A+Advanced+JavaScript+by+TJ+Holowaychuck" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Google Bookmarks"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Google Bookmarks" alt="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Google Bookmarks" /></a><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://brianegan.com/book-review-advanced-javascript-by-vision-media/&amp;t=Book+Review%3A+Advanced+JavaScript+by+TJ+Holowaychuck" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to FaceBook"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to FaceBook" alt="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=Book+Review%3A+Advanced+JavaScript+by+TJ+Holowaychuck&amp;c=http://brianegan.com/book-review-advanced-javascript-by-vision-media/" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to MySpace"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to MySpace" alt="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to MySpace" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://brianegan.com/book-review-advanced-javascript-by-vision-media/" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Twitter"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Twitter" alt="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Twitter" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/addurl/?bm_url=http://brianegan.com/book-review-advanced-javascript-by-vision-media/&amp;bm_description=Book+Review%3A+Advanced+JavaScript+by+TJ+Holowaychuck" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Mister-Wong"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/misterwong.png" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Mister-Wong" alt="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to Mister-Wong" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://friendfeed.com/share/bookmarklet/frame#title=Book+Review%3A+Advanced+JavaScript+by+TJ+Holowaychuck&amp;url=http://brianegan.com/book-review-advanced-javascript-by-vision-media/" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to FriendFeed"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/friendfeed.png" title="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to FriendFeed" alt="Add 'Book Review: Advanced JavaScript by TJ Holowaychuck' to FriendFeed" /></a></div>
<!-- Social Bookmarking Reloaded END --><img src="http://feeds.feedburner.com/~r/BrianEgan/~4/rpOP0NEpA-c" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brianegan.com/book-review-advanced-javascript-by-vision-media/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://brianegan.com/book-review-advanced-javascript-by-vision-media/</feedburner:origLink></item>
		<item>
		<title>I heart Node.js</title>
		<link>http://feedproxy.google.com/~r/BrianEgan/~3/VVskzBoAAXQ/</link>
		<comments>http://brianegan.com/i-heart-node-js/#comments</comments>
		<pubDate>Wed, 10 Mar 2010 06:20:04 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://brianegan.com/?p=35</guid>
		<description><![CDATA[Node.js is one of the most intriguing projects I&#8217;ve seen in a while. For some reason, I&#8217;ve never truly enjoyed programming until I started programming in JavaScript. I did the usual BASIC programming as a freshman in high school, and &#8230; <a href="http://brianegan.com/i-heart-node-js/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://nodejs.org">Node.js</a> is one of the most intriguing projects I&#8217;ve seen in a while. For some reason, I&#8217;ve never truly enjoyed programming until I started programming in JavaScript. I did the usual BASIC programming as a freshman in high school, and actually tried learning C a bit earlier when I was 12 (let&#8217;s just say it didn&#8217;t go over well, except that I did win a C &#8220;competition&#8221; in high school based on that knowledge). </p>
<p>But when I could start hooking up my designs to really cool functionality, such as <a href="http://code.google.com/p/dmmonocle">dmMonocle</a>, my jQuery plugin for viewing images, I loved the combination that was possible. I could not only make beautiful designs, I could make beautiful web applications. My code could react to the actions of users &#8212; or in JavaScript lingo, the events of users.<br />
<span id="more-35"></span></p>
<h2>Server side JS?</h2>
<p>I&#8217;ve since learned to branch out, and have an affection for Python as well at this point! But I&#8217;m still in that weird designer/front end dev gray area, so I don&#8217;t get as much Python time as I&#8217;d like. However, with the advent of Node.js, I can now do some pretty awesome server side stuff in my favorite language. That&#8217;s right, you heard me: JavaScript is going server side &#8212; and even further in the future! Here&#8217;s the code I wrote to implement a <em>very</em> simple web server with Node.JS:</p>
<pre>
var fs = require('fs'),
    sys = require('sys'),
    http = require('http');

// Simple Server Function
// Pulls the url of the request and responds with the appropriate HMTL file
// If no HTML file found in the request url, returns a 404 error. Boosh!

http.createServer(function (req, res) {

    var HTML;

    if(req.url.search(/\.html$/) > -1) { // Searches to see if the URL entered by the user ends in .html
        fs.readFile('../' + req.url, encoding='utf8', function(err, data) { // If it does, it tries to read the file
            if (err) { // Oh noes! The file doesn't exist! 404-butter time!
                _404(err);
            } else {
                HTML = data;
                res.writeHead(200, {'Content-Type': 'text/html'});
                res.write(HTML);
                res.close();
            }
        });
    } else { // Hey, they didn't enter a valid URL! You know what that means -- 404 BUTTER TIME!
       _404();
    }

    function _404(err) {
        if (err) sys.log(err);
        fs.readFile('../404.html', encoding='utf8', function(err, data) {
           HTML = data;
           res.writeHead(200, {'Content-Type': 'text/html'});
           res.write(HTML);
           res.close();
        });
    }

}).listen(8080); // Listen on port 8080
sys.puts("Brian's HTML Server running at http://127.0.0.1:8080/"); // Output a string to STDOUT (the command line in most cases)
</pre>
<h2>Lame, but WTF is require()?</h2>
<p>Now, this server isn&#8217;t very durable. For example, the html files have to be one directory down from the node server &#8212; not awesome, and it serves no CSS. But it was just a simple test script I wrote in 5 minutes to see what could be done with Node, and was a heck of a lot of fun. It also introduced me to the <a href="http://commonjs.org/">CommonJS</a> project, and their implementation of modules. First of all, the CommonJS project aims to produce a common spec for server-side and application-building JavaScript  &#8212; i.e. JavaScript&#8217;s not just for browsers anymore!</p>
<p>Now on to modules: at the top of the code, you&#8217;ll see I&#8217;m declaring 3 variables, all of which call a <code>require()</code> function. That require function is an example of the CommonJS module implementation, a way for JavaScript to pull in the contents from another file in a similar fashion to Python&#8217;s <code>import</code> or Ruby&#8217;s <code>require</code>.</p>
<h2>The way of the future?</h2>
<p>Pretty cool stuff for a few minutes of compilation time, reading through the <a href="http://nodejs.org/api.html">Node.JS API</a> (which only takes about 45 minutes even if you&#8217;re slow like me), and then getting a little dirty &#8212; and by that, I mean not dirty at all.</p>
<p>There&#8217;s some real potential here, and I&#8217;m going to take some time to play around with <a href="http://github.com/visionmedia/express">Express</a>. It&#8217;s a Node.JS web framework inspired by a Sinatra, a Ruby web framework. Sinatra is another intriguing piece of software, and combined with HAML and SASS, two great technologies for rapidly developing HTML and CSS, it&#8217;s a very nice package indeed. Express seems to have adopted those parts of Sinatra, and should be just a grand old time to tinker with.</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://brianegan.com/i-heart-node-js/&amp;title=I+heart+Node.js" title="Add 'I heart Node.js' to Del.icio.us"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'I heart Node.js' to Del.icio.us" alt="Add 'I heart Node.js' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://brianegan.com/i-heart-node-js/&amp;title=I+heart+Node.js" title="Add 'I heart Node.js' to digg"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'I heart Node.js' to digg" alt="Add 'I heart Node.js' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://brianegan.com/i-heart-node-js/&amp;title=I+heart+Node.js" title="Add 'I heart Node.js' to reddit"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/reddit.png" title="Add 'I heart Node.js' to reddit" alt="Add 'I heart Node.js' to reddit" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://brianegan.com/i-heart-node-js/&amp;title=I+heart+Node.js" title="Add 'I heart Node.js' to Stumble Upon"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'I heart Node.js' to Stumble Upon" alt="Add 'I heart Node.js' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://brianegan.com/i-heart-node-js/&amp;title=I+heart+Node.js" title="Add 'I heart Node.js' to Google Bookmarks"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'I heart Node.js' to Google Bookmarks" alt="Add 'I heart Node.js' to Google Bookmarks" /></a><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://brianegan.com/i-heart-node-js/&amp;t=I+heart+Node.js" title="Add 'I heart Node.js' to FaceBook"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'I heart Node.js' to FaceBook" alt="Add 'I heart Node.js' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=I+heart+Node.js&amp;c=http://brianegan.com/i-heart-node-js/" title="Add 'I heart Node.js' to MySpace"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'I heart Node.js' to MySpace" alt="Add 'I heart Node.js' to MySpace" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://brianegan.com/i-heart-node-js/" title="Add 'I heart Node.js' to Twitter"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'I heart Node.js' to Twitter" alt="Add 'I heart Node.js' to Twitter" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/addurl/?bm_url=http://brianegan.com/i-heart-node-js/&amp;bm_description=I+heart+Node.js" title="Add 'I heart Node.js' to Mister-Wong"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/misterwong.png" title="Add 'I heart Node.js' to Mister-Wong" alt="Add 'I heart Node.js' to Mister-Wong" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://friendfeed.com/share/bookmarklet/frame#title=I+heart+Node.js&amp;url=http://brianegan.com/i-heart-node-js/" title="Add 'I heart Node.js' to FriendFeed"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/friendfeed.png" title="Add 'I heart Node.js' to FriendFeed" alt="Add 'I heart Node.js' to FriendFeed" /></a></div>
<!-- Social Bookmarking Reloaded END --><img src="http://feeds.feedburner.com/~r/BrianEgan/~4/VVskzBoAAXQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brianegan.com/i-heart-node-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://brianegan.com/i-heart-node-js/</feedburner:origLink></item>
		<item>
		<title>jQuery DOM Manipulation und Performance</title>
		<link>http://feedproxy.google.com/~r/BrianEgan/~3/0Fx6iyRjUdU/</link>
		<comments>http://brianegan.com/jquery-dom-manipulation-und-performance/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 08:00:18 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Performance]]></category>

		<guid isPermaLink="false">http://brianegan.com/?p=19</guid>
		<description><![CDATA[I&#8217;m not promising this blog is gonna be hot and spicy all the time, but It&#8217;s been a while since I posted, and I thought I would make it something geeky &#8212; performance tests! I swear I&#8217;m working on a &#8230; <a href="http://brianegan.com/jquery-dom-manipulation-und-performance/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not promising this blog is gonna be hot and spicy all the time, but It&#8217;s been a while since I posted, and I thought I would make it something geeky &mdash; performance tests! I swear I&#8217;m working on a new template for this site, and naturally it&#8217;s going to revolutionize web design. Unfortunately, skiing and learning to play the Ukulele keeps eating up all my time! But I digress&#8230;</p>
<p><span id="more-19"></span></p>
<h2>Flame war! (Intro)</h2>
<p>I was actually a sociology major in college, so I kind of enjoy the rigor of trying to test things well. This is not a rigorous test &mdash; but I did learn some fun stuff!</p>
<p>Over at NETTUTS there was <a href="http://net.tutsplus.com/tutorials/javascript-ajax/24-best-practices-for-ajax-implementations/">a discussion about the best way to update the DOM using jQuery</a>. The author suggested this method, and was promptly called an idiot:</p>
<p><code><br />
var updatedText = "<span id="\&quot;elem1\&quot;">Value1</span><br />
<span id="\&quot;elem2\&quot;">Value2</span>";<br />
$("#container").html(updatedText);<br />
</code></p>
<p>I actually used a variation on this method when writing <a href="http://code.google.com/p/dmmonocle">dmMonocle</a>, my jQuery plugin which makes viewing images within library digital collections, such as the <a href="http://digital.library.unlv.edu/http://digital.library.unlv.edu/boomtown/dm.php/snv/1173">Southern Nevada Boomtowns Collection</a>, a bit easier. What dmMonocle does is generate a series of tiles (<code>divs</code>) and then injects them all together at once, just as the author suggested above. Others claimed that the built-in jQuery methods (<code>.html()</code> &amp; <code>.append()</code>) were more readable, and should therefore be used.</p>
<h2>Test me once, shame on you (Methods)</h2>
<p>In these cases, I like to let the numbers speak for themselves, and so I created a series of tests using JSFiddle that test the performance of three methods. I posted a couple of <a href="http://jsfiddle.net/cMHzS/1/">simple tests</a> to NETTUTS this morning, but I thought it would be fun to get more in-depth and play around with loops of console profiles and timers to test performance (you know, how every sane person likes to spend their time)!</p>
<p>I wanted to time and profile three different functions:</p>
<ul>
<li>Build a string of spans and inject it once into a container using the <code>.html()</code> method</li>
<li>Update each one of the spans individually with <code>$(#span).html("new html")</code></li>
<li>Building the spans within the contain using the <code>.appendTo()</code> method.</li>
</ul>
<p>As the bad joke of a subheading should tell you, we don&#8217;t simply want to run these timers and profiles once, we want to run them 100 times (more would probably be better). To run them once would be a grave mistake. Don&#8217;t you remember doing 10 trial runs in science class to eliminate error? Did you think the cheeky lab report workflow of this post was a mistake?</p>
<p>I&#8217;m also running these tests on a Summer 2009 Macbook Pro, and would love to hear about results from other machines.</p>
<h2>Show me the code! (Data)</h2>
<ul>
<li><a href="http://jsfiddle.net/cMHzS/9/">Timer Tests</a></li>
<li><a href="http://jsfiddle.net/cMHzS/10/">Profile Tests</a></li>
</ul>
<p>As I said, these tests run each method 100 times. Scratch that, Firefox ate it when I tried that =P I&#8217;ll just run em a bunch manually and record numbers the good ol&#8217; fashioned way. I&#8217;ll work on best practices for averaging results in a future post</p>
<h3>Chrome</h3>
<p>My new browser of choice:</p>
<ol>
<li>First Test Average: 2-3ms</li>
<li>Second Test Average: 6-8ms</li>
<li>Third Test Average: 8-10ms</li>
</ol>
<h3>Firefox 3.6</h3>
<p>Tried and true (but slooooooow):</p>
<ol>
<li>First Test Average: 11-12ms</li>
<li>Second Test Average: 21-23ms</li>
<li>Third Test Average: 37-39ms</li>
</ol>
<p>I mean look at that. 3-5x slower than Chrome 4 on simple operations.</p>
<h3>Safari</h3>
<p>Safari was&#8230; creepy with how consistent it was. I think I may be doing something wrong</p>
<ol>
<li>First Test Average: 3ms</li>
<li>Second Test Average: 6ms</li>
<li>Third Test Average: 16ms</li>
</ol>
<h3>Internet Explorer</h3>
<p>I can only run IE on a virtual machine at the moment, and I&#8217;m not sure how reliable that is. Give me some data!</p>
<h2>Blah Blah Blah, what&#8217;s the bottom line (Results und Discussion)</h2>
<p>Bottom line is that, according to my tests, using native JavaScript strings to build the html and injecting it once is roughly twice as fast as the updating method, and 3-5x times faster than append method (which is the most similar to the original string function). These results are due to the fact that the string method skips over calling not only the jQuery constructor <code>$()</code> on each iteration, but also the jQuery methods <code>.html()</code> and <code>.append()</code>, which themselves call multiple functions (as demonstrated by the profiling tests).</p>
<p>Based on those facts, when I need to inject any significant amount of code, I&#8217;m going to try to do as much building as I can in regular old JavaScript, avoiding the DOM and unnecessary jQuery methods as much as possible. Look, jQuery is great and really fast; I mean, I&#8217;m literally talking about 2-5x slower than 2 <em>mili</em>seconds). But, I&#8217;ll basically take any speed advantage I can get, and in this instance there is a clear winner. I personally don&#8217;t think the JavaScript is too much uglier or less maintainable than the jQuery fashion, but that is really a matter of taste. When it comes to the data, there&#8217;s no debate.</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://brianegan.com/jquery-dom-manipulation-und-performance/&amp;title=jQuery+DOM+Manipulation+und+Performance" title="Add 'jQuery DOM Manipulation und Performance' to Del.icio.us"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'jQuery DOM Manipulation und Performance' to Del.icio.us" alt="Add 'jQuery DOM Manipulation und Performance' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://brianegan.com/jquery-dom-manipulation-und-performance/&amp;title=jQuery+DOM+Manipulation+und+Performance" title="Add 'jQuery DOM Manipulation und Performance' to digg"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'jQuery DOM Manipulation und Performance' to digg" alt="Add 'jQuery DOM Manipulation und Performance' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://brianegan.com/jquery-dom-manipulation-und-performance/&amp;title=jQuery+DOM+Manipulation+und+Performance" title="Add 'jQuery DOM Manipulation und Performance' to reddit"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/reddit.png" title="Add 'jQuery DOM Manipulation und Performance' to reddit" alt="Add 'jQuery DOM Manipulation und Performance' to reddit" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://brianegan.com/jquery-dom-manipulation-und-performance/&amp;title=jQuery+DOM+Manipulation+und+Performance" title="Add 'jQuery DOM Manipulation und Performance' to Stumble Upon"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'jQuery DOM Manipulation und Performance' to Stumble Upon" alt="Add 'jQuery DOM Manipulation und Performance' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://brianegan.com/jquery-dom-manipulation-und-performance/&amp;title=jQuery+DOM+Manipulation+und+Performance" title="Add 'jQuery DOM Manipulation und Performance' to Google Bookmarks"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'jQuery DOM Manipulation und Performance' to Google Bookmarks" alt="Add 'jQuery DOM Manipulation und Performance' to Google Bookmarks" /></a><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://brianegan.com/jquery-dom-manipulation-und-performance/&amp;t=jQuery+DOM+Manipulation+und+Performance" title="Add 'jQuery DOM Manipulation und Performance' to FaceBook"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'jQuery DOM Manipulation und Performance' to FaceBook" alt="Add 'jQuery DOM Manipulation und Performance' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=jQuery+DOM+Manipulation+und+Performance&amp;c=http://brianegan.com/jquery-dom-manipulation-und-performance/" title="Add 'jQuery DOM Manipulation und Performance' to MySpace"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'jQuery DOM Manipulation und Performance' to MySpace" alt="Add 'jQuery DOM Manipulation und Performance' to MySpace" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://brianegan.com/jquery-dom-manipulation-und-performance/" title="Add 'jQuery DOM Manipulation und Performance' to Twitter"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'jQuery DOM Manipulation und Performance' to Twitter" alt="Add 'jQuery DOM Manipulation und Performance' to Twitter" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/addurl/?bm_url=http://brianegan.com/jquery-dom-manipulation-und-performance/&amp;bm_description=jQuery+DOM+Manipulation+und+Performance" title="Add 'jQuery DOM Manipulation und Performance' to Mister-Wong"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/misterwong.png" title="Add 'jQuery DOM Manipulation und Performance' to Mister-Wong" alt="Add 'jQuery DOM Manipulation und Performance' to Mister-Wong" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://friendfeed.com/share/bookmarklet/frame#title=jQuery+DOM+Manipulation+und+Performance&amp;url=http://brianegan.com/jquery-dom-manipulation-und-performance/" title="Add 'jQuery DOM Manipulation und Performance' to FriendFeed"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/friendfeed.png" title="Add 'jQuery DOM Manipulation und Performance' to FriendFeed" alt="Add 'jQuery DOM Manipulation und Performance' to FriendFeed" /></a></div>
<!-- Social Bookmarking Reloaded END --><img src="http://feeds.feedburner.com/~r/BrianEgan/~4/0Fx6iyRjUdU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brianegan.com/jquery-dom-manipulation-und-performance/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://brianegan.com/jquery-dom-manipulation-und-performance/</feedburner:origLink></item>
		<item>
		<title>WordPress Polar Bear Club – Part 1</title>
		<link>http://feedproxy.google.com/~r/BrianEgan/~3/zDSUgZ5WqxY/</link>
		<comments>http://brianegan.com/wordpress-polar-bear-club-part-1/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 18:59:17 +0000</pubDate>
		<dc:creator>Brian</dc:creator>
				<category><![CDATA[Theming]]></category>
		<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://brianegan.com/?p=14</guid>
		<description><![CDATA[I&#8217;d like to welcome you all to my first series of blog posts, where I&#8217;ll detail the steps I&#8217;m taking to customize my WordPress theme and plugins, turning this bland old default theme into a well designed site. I&#8217;ve never &#8230; <a href="http://brianegan.com/wordpress-polar-bear-club-part-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;d like to welcome you all to my first series of blog posts, where I&#8217;ll detail the steps I&#8217;m taking to customize my WordPress theme and plugins, turning this bland old default theme into a well designed site. I&#8217;ve never worked with WordPress, had a dusty old portfolio, and decided it was time to jump right in to the icy cold water. In this first part I&#8217;d like to talk about what I&#8217;m doing as I get ready to theme this site!<br />
<span id="more-14"></span></p>
<h2>Starting with SEO</h2>
<p>I usually don&#8217;t start with SEO, but I have a few friends who run a blog called <a href="http://scrappymarketing.com">Scrappy Marketing</a>, and they put up a great post entitled <a href="http://scrappymarketing.com/2009/01/seo-101-for-your-wordpress-site-in-7-easy-steps/">SEO 101 for your WordPress site – In 7 easy steps</a>. Because I had never even installed a plugin before, going through this tutorial was a great introduction to some of the UI features, such as easy plugin installation,  configuring said plugins through the &#8220;Settings&#8221; menu, getting setup with Akismet, etc. Essentially, they have you:</p>
<ol>
<li>Activate Akismet, the spam blocker for WordPress. Done and done.</li>
<li>Download and configure &#8220;All in one SEO&#8221; for better meta information and title tags</li>
<li>Get Feedburner rockin for better stats about my readership</li>
<li>Download Evermore, which adds the &#8220;more&#8221; tags automatically. (I actually skipped this step)</li>
<li>Download and Install Social Bookmarking Reloaded. I did, but I&#8217;ll probably look at other options or figure out how to customize this one a little more to my liking.</li>
<li>Install XML-Sitemap, making it easier for teh robotz to evaluate your worth</li>
<li>Setup a permalink structure. Clutch.</li>
</ol>
<p>What a great way to begin. I got to work with WordPress a bit, and also configured some important things up front, such as my meta data, permalink structure, and Feeburner. Not a bad way to spend 30 minutes!</p>
<h2>Local Dev Environment</h2>
<h2><span style="font-weight: normal; font-size: 13px;">After instlalling those plugins on the server, I realized that I was probably going to need a local dev environment to do my theming. No worries there: I just grabbed the free version of <a href="http://www.mamp.info/en/index.html">MAMP</a> (Windows users can grab <a href="http://www.apachefriends.org/en/xampp.html">xampp</a>, Linux users &#8212; you know what to do =P). I also use a program called <a href="http://www.navicat.com/download/download.html">Navicat Light</a>, which is basically a desktop version of phpMyAdmin, to create databases and users.</span></h2>
<p><span style="font-weight: normal; font-size: 13px;">After firing up MAMP, using Navicat Light to get my database ready, and installing WordPress locally, I was ready to move onto playing with some themes!</span></p>
<h2>So&#8230; how does this work?</h2>
<p>I&#8217;ve worked with PHP and Django themes enough to know the basics of how to pull the content I need, but I thought it would make sense to start by looking at other porfolio themes to see how the structured their theme folder, categorize content, and pull it through with specialized templates. While I thought about buying a professional theme, I found some good free ones from the following links:</p>
<ul>
<li><a href="http://www.wpzoom.com/design/wordpress-as-a-portfolio-examples-themes-15/">Using WordPress as a Portfolio: Examples &amp; Themes</a></li>
<li><a href="http://www.smashingmagazine.com/2008/01/08/100-excellent-free-high-quality-wordpress-themes/">100 Excellend Free WordPress Themes</a></li>
<li><a href="http://www.smashingmagazine.com/2007/02/09/83-beautiful-wordpress-themes-you-probably-havent-seen/">83 Beautiful WordPress Themes</a></li>
</ul>
<p>After installing 10 or so from those sites, I feel like I have a pretty good idea of how I&#8217;ll proceed from here. In my next post, I&#8217;ll discuss what I&#8217;m doing in the background, from my initial brain dump, to sketching compositions, to my first photoshop mockups. Stay tuned!</p>
<!-- Social Bookmarking Reloaded BEGIN --><div class="social_bookmark"><em>Bookmark</em><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http://brianegan.com/wordpress-polar-bear-club-part-1/&amp;title=WordPress+Polar+Bear+Club+%26%238211%3B+Part+1" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to Del.icio.us"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/delicious.png" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to Del.icio.us" alt="Add 'WordPress Polar Bear Club &#8211; Part 1' to Del.icio.us" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http://brianegan.com/wordpress-polar-bear-club-part-1/&amp;title=WordPress+Polar+Bear+Club+%26%238211%3B+Part+1" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to digg"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/digg.png" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to digg" alt="Add 'WordPress Polar Bear Club &#8211; Part 1' to digg" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http://brianegan.com/wordpress-polar-bear-club-part-1/&amp;title=WordPress+Polar+Bear+Club+%26%238211%3B+Part+1" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to reddit"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/reddit.png" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to reddit" alt="Add 'WordPress Polar Bear Club &#8211; Part 1' to reddit" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http://brianegan.com/wordpress-polar-bear-club-part-1/&amp;title=WordPress+Polar+Bear+Club+%26%238211%3B+Part+1" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to Stumble Upon"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/stumbleupon.png" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to Stumble Upon" alt="Add 'WordPress Polar Bear Club &#8211; Part 1' to Stumble Upon" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http://brianegan.com/wordpress-polar-bear-club-part-1/&amp;title=WordPress+Polar+Bear+Club+%26%238211%3B+Part+1" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to Google Bookmarks"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/google.png" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to Google Bookmarks" alt="Add 'WordPress Polar Bear Club &#8211; Part 1' to Google Bookmarks" /></a><br /><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/share.php?u=http://brianegan.com/wordpress-polar-bear-club-part-1/&amp;t=WordPress+Polar+Bear+Club+%26%238211%3B+Part+1" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to FaceBook"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/facebook.png" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to FaceBook" alt="Add 'WordPress Polar Bear Club &#8211; Part 1' to FaceBook" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.myspace.com/Modules/PostTo/Pages/?t=WordPress+Polar+Bear+Club+%26%238211%3B+Part+1&amp;c=http://brianegan.com/wordpress-polar-bear-club-part-1/" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to MySpace"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/myspace.png" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to MySpace" alt="Add 'WordPress Polar Bear Club &#8211; Part 1' to MySpace" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home?status=http://brianegan.com/wordpress-polar-bear-club-part-1/" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to Twitter"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/twitter.png" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to Twitter" alt="Add 'WordPress Polar Bear Club &#8211; Part 1' to Twitter" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/addurl/?bm_url=http://brianegan.com/wordpress-polar-bear-club-part-1/&amp;bm_description=WordPress+Polar+Bear+Club+%26%238211%3B+Part+1" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to Mister-Wong"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/misterwong.png" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to Mister-Wong" alt="Add 'WordPress Polar Bear Club &#8211; Part 1' to Mister-Wong" /></a><a class="social_img" onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,border=0,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://friendfeed.com/share/bookmarklet/frame#title=WordPress+Polar+Bear+Club+%26%238211%3B+Part+1&amp;url=http://brianegan.com/wordpress-polar-bear-club-part-1/" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to FriendFeed"><img src="http://brianegan.com/wp-content/plugins/social-bookmarking-reloaded/friendfeed.png" title="Add 'WordPress Polar Bear Club &#8211; Part 1' to FriendFeed" alt="Add 'WordPress Polar Bear Club &#8211; Part 1' to FriendFeed" /></a></div>
<!-- Social Bookmarking Reloaded END --><img src="http://feeds.feedburner.com/~r/BrianEgan/~4/zDSUgZ5WqxY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://brianegan.com/wordpress-polar-bear-club-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://brianegan.com/wordpress-polar-bear-club-part-1/</feedburner:origLink></item>
	</channel>
</rss>
