<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

 <title>Warpspire</title>
 <link href="http://warpspire.com/feed" rel="self"/>
 <link href="http://warpspire.com/"/>
 <updated>2010-08-26T15:16:42-07:00</updated>
 <id>http://warpspire.com/</id>
 <author>
   <name>Kyle Neath</name>
   <email>kneath+warpspire@gmail.com</email>
 </author>

 
 <entry>
   <title>My TextMate Snippets & Triggers</title>
   <link href="http://warpspire.com/posts/link-snippets"/>
   <updated>2010-08-26T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/link-snippets</id>
   <content type="html">&lt;p&gt;A while ago I put up a collection of some of my handcrafted TextMate snippets. mostly focused on front-end stuff: HTML shortcuts, CSS gradients, jQuery plugin bases, commenting helpers, etc.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>The Geek Talk Interview</title>
   <link href="http://warpspire.com/posts/link-geektalk"/>
   <updated>2010-08-23T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/link-geektalk</id>
   <content type="html">&lt;p&gt;A quick interview I did over at The Geek Talk. Mostly covering my daily routine and whatnot.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>RSS Feeds for Warpspire</title>
   <link href="http://warpspire.com/posts/link-feeds"/>
   <updated>2010-08-23T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/link-feeds</id>
   <content type="html">&lt;p&gt;I was going to try and fix some bugs in &lt;a href=&quot;http://pages.github.com&quot;&gt;GitHub Pages&lt;/a&gt; (that&amp;rsquo;s how this site is hosted) — but I think I&amp;rsquo;m going to give up that fight. If you&amp;rsquo;d like to subscribe to Warpspire, you can find the feeds at &lt;a href=&quot;http://feeds.feedburner.com/warpspire&quot;&gt;http://feeds.feedburner.com/warpspire&lt;/a&gt;&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Rethinking Warpspire</title>
   <link href="http://warpspire.com/posts/rethinking"/>
   <updated>2010-08-01T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/rethinking</id>
   <content type="html">&lt;p&gt;I think it&amp;rsquo;s always a good idea to take a step back and ask yourself why you&amp;rsquo;re doing something.  So right now I&amp;rsquo;m taking a step back to rethink Warpspire.&lt;/p&gt;

&lt;h2&gt;Getting rid of cruft&lt;/h2&gt;

&lt;p&gt;The other day I followed a link to a blog post on Mint. I was presented with this screen:&lt;/p&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/rethinking/mint_screen.jpg&quot; alt=&quot;Screenshot of Mint blog post&quot; /&gt;&lt;/div&gt;


&lt;p&gt;I hate what most designers have done to the web. You&amp;rsquo;d think people would be taking cues from things like &lt;a href=&quot;http://lab.arc90.com/experiments/readability/&quot;&gt;Readability&lt;/a&gt; and Safari Reader, but they&amp;rsquo;re not. People are throwing more and more crap onto each page and making things harder and harder to read.&lt;/p&gt;

&lt;p&gt;Anyways, it got me to thinking about sites that I continue to enjoy reading in the browser. One site that immediately came to mind is &lt;a href=&quot;http://daringfireball.net&quot;&gt;Daring Fireball&lt;/a&gt;. The format and presentation has lasted for years without feeling tired or hard to read. So it should come as no suprise that this new layout mirrors DF in a great number of ways. (Alas, my logo features the same unicode character as DF — something which has now turned from a funny coincidence to a long boring story. I hate logos.)&lt;/p&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/rethinking/warpspire_screen.jpg&quot; alt=&quot;Screenshot of Warpspire&quot; /&gt;&lt;/div&gt;


&lt;p&gt;This new layout is the simplest layout I&amp;rsquo;ve ever had on one of my sites. The goal was to create a focused place for my ideas.&lt;/p&gt;

&lt;h2&gt;Abandoning old baggage&lt;/h2&gt;

&lt;p&gt;There was a lot of crap on Warpspire. WordPress tells me the first post was published August 15, 2004. &lt;strong&gt;That&amp;rsquo;s six years ago.&lt;/strong&gt;  To say that the web is a different place now is an understatement. I remember debugging that initial site on IE5 &lt;em&gt;for Mac&lt;/em&gt;.  Six years ago, I was in my 2nd year of studying Civil Engineering at Cal Poly. I had no concept of the value of the web or how important it would be come.  I was also twenty years old, angsty and wrong about many things.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;So I deleted most of my posts.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;What&amp;rsquo;s left? The most popular posts (traffic wise) along with a couple of ones that I particularly enjoyed and still felt relevant.  I&amp;rsquo;ve also edited them all, and rewritten some.&lt;/p&gt;

&lt;p&gt;Almost certainly a bad idea for my traffic, but probably a good idea for my readership. And I&amp;rsquo;ll value readers over pageviews any day.&lt;/p&gt;

&lt;h2&gt;On the subject of comments&lt;/h2&gt;

&lt;p&gt;The thing about comments is that commentors tend to be a bunch of crazies wandering the internet like it&amp;rsquo;s a zombie apocolypse. It&amp;rsquo;s a striking contrast to the rational human beings whom I have sensible arguments with here in the meatspace.&lt;/p&gt;

&lt;p&gt;The thing is, I&amp;rsquo;ve met some of the smartest people on the planet through my site and I don&amp;rsquo;t want to lose that. So here&amp;rsquo;s the deal: you send me email, and I send you one back.  If I think others might be interested in what you have to say, I&amp;rsquo;ll post it here on Warpspire.&lt;/p&gt;

&lt;p&gt;A comment should mean something to you and it should mean something to me. Typical blog comments just stopped meaning anything to me a long time ago and that sucks. So I&amp;rsquo;m hoping this is a move toward fixing that.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>What's your focus?</title>
   <link href="http://warpspire.com/posts/focus"/>
   <updated>2010-03-29T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/focus</id>
   <content type="html">&lt;p&gt;Every great website has a focus.  If you can&amp;rsquo;t summarize the purpose of your website into one sentence, ten words or less &amp;mdash; your idea will almost certainly fail.  Talking to founders, I&amp;rsquo;d say this idea is pretty well established.  Now let me reveal a secret that is not so well established: your website&amp;rsquo;s design should follow this same focus.&lt;/p&gt;

&lt;h2&gt;Learn by example: source hosting sites&lt;/h2&gt;

&lt;p&gt;Let&amp;rsquo;s start off with a field I&amp;rsquo;m pretty familiar with: source hosting sites. I&amp;rsquo;m talking about &lt;a href=&quot;http://github.com&quot;&gt;GitHub&lt;/a&gt;, &lt;a href=&quot;http://bitbucket.org&quot;&gt;BitBucket&lt;/a&gt;, &lt;a href=&quot;http://sourceforge.net&quot;&gt;SourceForge&lt;/a&gt;, &lt;a href=&quot;http://code.google.com&quot;&gt;Google Code&lt;/a&gt;, &lt;a href=&quot;http://launchpad.net&quot;&gt;Launchpad&lt;/a&gt; and the likes.  These sites all have a common focus: &lt;strong&gt;sharing code.&lt;/strong&gt;  I&amp;rsquo;m going to show you why GitHub is the only site who&amp;rsquo;s design follows it&amp;rsquo;s focus.&lt;/p&gt;

&lt;p&gt;If your site&amp;rsquo;s focus is sharing code, the design should focus on sharing code. If you ever talk to any of us GitHubbers, we&amp;rsquo;ll always say that the site is &lt;em&gt;all about the code&lt;/em&gt;.  Let&amp;rsquo;s look at project landing pages in each of the above sites.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://github.com/facebook/three20&quot;&gt;GitHub&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/focus/github.gif&quot; alt=&quot;GitHub&quot; /&gt;&lt;/div&gt;


&lt;p&gt;When you visit a GitHub project page, the first thing you see is the source code. Right below is the README pulled straight from the code.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://bitbucket.org/jespern/django-piston/overview/&quot;&gt;BitBucket&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/focus/bitbucket.gif&quot; alt=&quot;BitBucket&quot; /&gt;&lt;/div&gt;


&lt;p&gt;BitBucket chose to highlight the shortlog (recent commits) on the project page.  If you want to see the code, you need to go to the 3rd tab.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://sourceforge.net/projects/junit/&quot;&gt;SourceForge&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/focus/sourceforge.gif&quot; alt=&quot;SourceForge&quot; /&gt;&lt;/div&gt;


&lt;p&gt;Sourceforge chose to highlight downloads (in this case, a compiled jar file &amp;mdash; not the code) on the project page.  If you want to see the code, you need to click Develop, and then fish around in the sidebar for the correct VCS and click browse.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://code.google.com/p/flot/&quot;&gt;Google Code&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/focus/googlecode.gif&quot; alt=&quot;Google Code&quot; /&gt;&lt;/div&gt;


&lt;p&gt;Google Code chose to highlight the wiki on the project page.  Getting to the code in Google Code is probably the most interesting of the bunch because many projects don&amp;rsquo;t even host their code there (example: &lt;a href=&quot;http://code.google.com/p/redis/wiki/UnstableSource?tm=4&quot;&gt;redis&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;When you click the Source tab you actually get a wiki page which many projects use to point to another repository.  &lt;em&gt;If&lt;/em&gt; the project hosts it&amp;rsquo;s code there, there is a sub link under Source that is labeled Browse that you can finally see the code.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;https://launchpad.net/drizzle&quot;&gt;Launchpad&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/focus/launchpad.gif&quot; alt=&quot;Launchpad&quot; /&gt;&lt;/div&gt;


&lt;p&gt;Launchpad decided to highlight everything but the source code on the project page.  If you want to see the code, there is a tiny link in the middle of the page that says &amp;rsquo;View the branch content.&amp;rsquo;&lt;/p&gt;

&lt;h2&gt;Great examples from other fields&lt;/h2&gt;

&lt;p&gt;Source code hosting is just something that I&amp;rsquo;m extremely involved with. That doesn&amp;rsquo;t mean that focus is limited to code.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://www.flickr.com/photos/wcouch/4338090218/&quot;&gt;Flickr&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/focus/flickr.gif&quot; alt=&quot;Flickr&quot; /&gt;&lt;/div&gt;


&lt;p&gt;Flickr is all about sharing photos.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://facebook.com&quot;&gt;Facebook&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/focus/facebook.gif&quot; alt=&quot;Facebook&quot; /&gt;&lt;/div&gt;


&lt;p&gt;Facebook is all about connecting with your friends.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://daringfireball.net&quot;&gt;Daring Fireball&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/focus/fireball.gif&quot; alt=&quot;Daring Fireball&quot; /&gt;&lt;/div&gt;


&lt;p&gt;Daring Fireball is all about John Gruber&amp;rsquo;s writing.&lt;/p&gt;

&lt;h2&gt;Sites that have lost their focus&lt;/h2&gt;

&lt;p&gt;There is a huge genre of sites that seem to have completely forgotten their focus.  I&amp;rsquo;ll see if you can guess the genre.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://msnbc.com&quot;&gt;MSNBC&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/focus/msnbc.gif&quot; alt=&quot;MSNBC&quot; /&gt;&lt;/div&gt;


&lt;h3&gt;&lt;a href=&quot;http://nytimes.com&quot;&gt;NYTimes&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/focus/nytimes.gif&quot; alt=&quot;NYTimes&quot; /&gt;&lt;/div&gt;


&lt;h3&gt;&lt;a href=&quot;http://www.rollingstone.com/politics/story/32255149/wall_streets_bailout_hustle/p&quot;&gt;Rolling Stone&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/rollingstone.gif&quot; alt=&quot;Rolling Stone&quot; /&gt;&lt;/div&gt;


&lt;p&gt;It&amp;rsquo;s no wonder news sites can&amp;rsquo;t get people to pay for their content. You need to focus on your content to get people to pay for it.&lt;/p&gt;

&lt;h2&gt;Charging for your focus&lt;/h2&gt;

&lt;p&gt;Many sites don&amp;rsquo;t want to give away their focus for free. That&amp;rsquo;s perfectly fine. But it doesn&amp;rsquo;t change a thing. Replace what people are going to pay for with an opportunity to pay you.&lt;/p&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/focus/peepcode.gif&quot; alt=&quot;PeepCode&quot; /&gt;&lt;/div&gt;


&lt;p&gt;PeepCode&amp;rsquo;s focus is great tutorials. But the tutorial is not the focus of the product page &amp;mdash; instead a teaser and a purchase button are.&lt;/p&gt;

&lt;p&gt;Lots of people think that replacing their paid focus content with advertising is the solution &amp;mdash; but that just redirects the focus on advertising &amp;mdash; not getting paid.&lt;/p&gt;

&lt;p&gt;Premium content is not about &lt;em&gt;removing access&lt;/em&gt;, it&amp;rsquo;s about &lt;em&gt;charging for access&lt;/em&gt;.  Don&amp;rsquo;t focus on removing content, focus on charging for it.&lt;/p&gt;

&lt;h2&gt;Find your focus and focus on it&lt;/h2&gt;

&lt;p&gt;If you work on a website for a living, you should be thinking about your focus every single day.  It doesn&amp;rsquo;t matter if you&amp;rsquo;re a copywriter, project manager, designer or sysadmin.  What&amp;rsquo;s the focus of your site? Does your design reflect this? Run that through your head for every decision.&lt;/p&gt;

&lt;p&gt;The beautiful thing about focus is that it&amp;rsquo;s not about the details. It doesn&amp;rsquo;t  matter if you add some advertising to a sidebar, links to your header, change the background color or add administrative debris &amp;mdash; these are all minor subjects.  Focus is more about aiming in the right direction. Worry about the details later &amp;mdash; but never aim in a different direction.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Optimizing asset bundling and serving with Rails</title>
   <link href="http://warpspire.com/posts/link-asset-bundling"/>
   <updated>2009-11-19T00:00:00-08:00</updated>
   <id>http://warpspire.com/posts/link-asset-bundling</id>
   <content type="html">&lt;p&gt;I wrote up a pretty lengthy post over at the GitHub blog explaining how we do asset bundling and serving. Well worth the read for anyone who&amp;rsquo;s interested in front end performance and works on ruby apps.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>It's not about how many hours you work</title>
   <link href="http://warpspire.com/posts/work-life-balance"/>
   <updated>2009-10-11T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/work-life-balance</id>
   <content type="html">&lt;p&gt;My favorite discussion amongst web professionals is when people start talking about work/life balance and how many hours they&amp;rsquo;re working.  There&amp;rsquo;s been no end of interesting ideas to pop out from this &amp;mdash; everything from 4 hour work weeks to 100 hour work weeks.  And everyone thinks that they&amp;rsquo;ve got the answer. But I think everyone&amp;rsquo;s just arguing about an irrelevant metric: the hour.&lt;/p&gt;

&lt;h2&gt;Let&amp;rsquo;s talk about that work/life balance thing&lt;/h2&gt;

&lt;p&gt;Most of this discussion always seem to revolve around the idea of a work/life balance.  The basic idea is to keep yourself sane.  Don&amp;rsquo;t abandon your real life for your work.  That makes sense, until people start attaching hours to it.  I&amp;rsquo;ve had discussions with people where they try and argue to me that 40 hour work weeks keep them balanced.  But I have to wonder, where does that magical number 40 come from?&lt;/p&gt;

&lt;p&gt;The fallacy here is that people are thinking in black and white terms of &amp;ldquo;work&amp;rdquo; and &amp;ldquo;life.&amp;rdquo;  I never really understood that, and I think I&amp;rsquo;ve gotten to a point in my life where I can see why: it&amp;rsquo;s a bunch of bullshit that employers made up to promote 40 hour work weeks.  If you really think that there is a certain number of hours you can work a week to balance your life, you&amp;rsquo;re doing it wrong. So let&amp;rsquo;s ditch this idea of a work/life balance, because it just doesn&amp;rsquo;t make sense.&lt;/p&gt;

&lt;h2&gt;It&amp;rsquo;s about creating a creative environment in your life&lt;/h2&gt;

&lt;p&gt;It&amp;rsquo;s just that simple.  If you&amp;rsquo;re in the creative field, you need to make sure your life promotes a creative environment.  There isn&amp;rsquo;t one catch-all formula to do this.  There isn&amp;rsquo;t a number of hours you need to work.  You just need to experiment and find out what works for you.  What I will do is try and offer some advice.&lt;/p&gt;

&lt;h3&gt;Find your passion in life and try to make money from it&lt;/h3&gt;

&lt;p&gt;If you hate your job, it&amp;rsquo;s unlikely that you&amp;rsquo;ll be successful in fostering a creative environment.  Try your best to fix this.  Find out what you&amp;rsquo;re good at, and try to make money from it.  You&amp;rsquo;ll be producing better (more valuable) work and enjoying life more.&lt;/p&gt;

&lt;h3&gt;Explore projects that are explicitly not for profit&lt;/h3&gt;

&lt;p&gt;Money taints things, there is no denying this.  So I suggest to find an outlet that you purposefully can&amp;rsquo;t/don&amp;rsquo;t make money from to help exercise your brain.  That might mean creating websites, making music, or hacking on an epic perl script that no one but yourself will use.  It doesn&amp;rsquo;t have to be something different from your work &amp;mdash; it just has to be separated from your work.  Something you can change or destroy without worrying about what others think.&lt;/p&gt;

&lt;h3&gt;Stop working if you&amp;rsquo;re producing crap&lt;/h3&gt;

&lt;p&gt;The only thing worse than being unproductive at work is forcing false productivity.  If you find yourself at your desk and you can&amp;rsquo;t come up with anything useful, just stop trying.  Leave your desk and go do something else.  Maybe for a few hours, maybe for a week, maybe &lt;a href=&quot;http://www.fastcompany.com/blog/cliff-kuang/design-innovation/design-geniuss-secret-time-and-lots-it&quot;&gt;for a year&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Accept that there is no way you can be productive for 40 hours a week&lt;/h3&gt;

&lt;p&gt;The 40 hour work week is completely unsustainable.  Human beings are not meant to sit down and &lt;em&gt;really&lt;/em&gt; focus for 40 hours a week, 50 weeks a year.  Our brains can&amp;rsquo;t handle it.  I&amp;rsquo;m sure startup founders will come in here exclaiming how they&amp;rsquo;ve been working 100 hour work weeks for 6 months now and every hour was well spent.  They&amp;rsquo;re lying.&lt;/p&gt;

&lt;p&gt;Your brain &lt;em&gt;needs&lt;/em&gt; to purposefully not think in order to come up with creative ideas.  That might mean relaxing to your favorite book or movie while your subconscious attacks your latest project.  You&amp;rsquo;re not working in the strict sense&amp;mdash;but you&amp;rsquo;re getting work done.&lt;/p&gt;

&lt;p&gt;That&amp;rsquo;s not to say you can&amp;rsquo;t have weeks where you get hundreds of hours of work done.  But in my experience, after a week like that, I need another week or two to decompress.&lt;/p&gt;

&lt;h2&gt;Focus on what matters&lt;/h2&gt;

&lt;p&gt;My goal with this post is to hopefully get people to stop thinking in hours.  Start focusing on making great things.  It&amp;rsquo;s about the things you produce, not the hours required to make them.&lt;/p&gt;

&lt;p&gt;Once you realize you&amp;rsquo;ve been focused on the wrong metric I think you&amp;rsquo;ll realize  arguing about a work/life balance is just ridiculous.  Spend time on your life. Spend time on your work. But always strive to do better. That&amp;rsquo;s all you need.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Joining GitHub</title>
   <link href="http://warpspire.com/posts/joining-github"/>
   <updated>2009-10-01T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/joining-github</id>
   <content type="html">&lt;p&gt;I still feel like it was last week I decided to &lt;a href=&quot;/features/ch-ch-ch-changes/&quot;&gt;give up my &amp;ldquo;safe&amp;rdquo; job at &lt;strike&gt;Web Associates&lt;/strike&gt; Level Studios&lt;/a&gt; to play around with the &lt;a href=&quot;http://entp.com&quot;&gt;ENTP&lt;/a&gt; crew.  Well, it&amp;rsquo;s time for another move.  Last week I was given an offer I just couldn&amp;rsquo;t refuse&amp;mdash;to join the amazing &lt;a href=&quot;http://github.com&quot;&gt;GitHub&lt;/a&gt; team (&lt;a href=&quot;http://github.com/kneath&quot;&gt;my GitHub profile&lt;/a&gt;.  For those of you who don&amp;rsquo;t know who GitHub is: shame on you.  GitHub has taken something as boring as source control and made it something that &lt;em&gt;brings people together&lt;/em&gt;.  Social coding, indeed.&lt;/p&gt;

&lt;h2&gt;A brief look at the past couple years&lt;/h2&gt;

&lt;p&gt;The past couple of years have been a crazy blur of projects for me.  Most of what I did for ENTP was for [redacted], so you won&amp;rsquo;t be seeing most of what I did, but I thought I&amp;rsquo;d spend a few minutes to archive (for my own good) some of the public-facing projects I completed.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://tenderapp.com&quot;&gt;Tender&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;a href=&quot;http://tenderapp.com&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/github/tender_marketing.jpg&quot; alt=&quot;Tender's Marketing Site&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;p&gt;By in large, the biggest project I worked on ENTP was &lt;a href=&quot;http://tenderapp.com&quot;&gt;Tender&lt;/a&gt; &amp;mdash; and I&amp;rsquo;ll be honest, it&amp;rsquo;s going to hurt to let this go.  Tender was my baby, and I did all of the IA, design and front-end work for the site as well as some marketing and analytical work.  The shining side of that tunnel is that of course GitHub &lt;a href=&quot;http://support.github.com&quot;&gt;uses Tender&lt;/a&gt; for their support, so I&amp;rsquo;ll at least get to use it and see how ENTP shapes the product.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://iphone.lighthouseapp.com&quot;&gt;Lighthouse iPhone&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;a href=&quot;http://iphone.lighthouseapp.com&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/github/lighthouse_iphone.jpg&quot; alt=&quot;Lighthouse iPhone Screenshots&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;p&gt;Designing an iPhone optimized interface was one of my first projects at ENTP.  It doesn&amp;rsquo;t benefit from any of the OS 2.0+ features (HTML5, CSS Animations, Etc) since the code was created before these came along, but it gets the job done.  It was a great exploration in turning a complicated interface and trimming it down to the bare essentials.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://entp.com&quot;&gt;ENTP.com&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;a href=&quot;http://entp.com&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/github/entp.jpg&quot; alt=&quot;ENTP.com Screenshot&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;p&gt;I designed this in collaboration with Justin Palmer when ENTP decided they needed a new site.  It&amp;rsquo;s got a few interesting features (like pulling in our current GitHub projects on demand in the footer), but it&amp;rsquo;s mostly just a brochure site for the agency.&lt;/p&gt;

&lt;h3&gt;&lt;a href=&quot;http://hoth.entp.com&quot;&gt;Hoth&lt;/a&gt;&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;a href=&quot;http://hoth.entp.com&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/github/entp_hoth.jpg&quot; alt=&quot;Hoth Screenshot&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;p&gt;Hoth is ENTP&amp;rsquo;s blog.  This design accompanied the new ENTP.com design and added in a bit of tumble-like functionality to the templates.&lt;/p&gt;

&lt;h2&gt;On to the next chapter&lt;/h2&gt;

&lt;p&gt;So now I enter the third dream job I&amp;rsquo;ve had in the 4 years since I graduated college (none of which have been slightly related to my degree). I&amp;rsquo;ll be diving into a design/front-end role for the team and help clean up and take the product to the next level.&lt;/p&gt;

&lt;div class=&quot;figure&quot;&gt;&lt;a href=&quot;http://github.com&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/github/octocat.png&quot; alt=&quot;OctoCat&quot; /&gt;&lt;/a&gt;&lt;/div&gt;


&lt;p&gt;I&amp;rsquo;ll see ya&amp;rsquo;ll at the next GitHub drinkup.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Installable apps</title>
   <link href="http://warpspire.com/posts/installable-apps"/>
   <updated>2009-05-03T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/installable-apps</id>
   <content type="html">&lt;p&gt;I&amp;rsquo;m getting kind of tired of all these &lt;em&gt;web&lt;/em&gt; developers complaining about the time it takes to get updates to their apps up on the iTunes App Store.  The truth is this complaining has some merit.  But you have to realize that these people are not making &lt;em&gt;web&lt;/em&gt; applications, they&amp;rsquo;re making &lt;em&gt;installable&lt;/em&gt; applications.  The problem is not Apple. The problem is lack of QA testing.&lt;/p&gt;

&lt;h2&gt;Your application will have many bugs&lt;/h2&gt;

&lt;p&gt;The first rule of development: your code is going to have a lot of bugs. I don&amp;rsquo;t care if you&amp;rsquo;ve got 3 days experience or 30 years experience in the industry. &lt;strong&gt;Your code will have bugs.&lt;/strong&gt; This isn&amp;rsquo;t a pride issue, it&amp;rsquo;s a fact of life. Good developers know this and rely on testing (code, user-acceptance, performance) to expose bugs so they can fix them.&lt;/p&gt;

&lt;h2&gt;Bugs will appear after your code is deployed&lt;/h2&gt;

&lt;p&gt;Whether it&amp;rsquo;s the Y2k bug, deprecation of a technology, or your application getting blacklisted from a web service &amp;mdash; some bugs are going to show up after your code is deployed.  This is something you should expect.  Again, this is not negotiable. It is going to happen.&lt;/p&gt;

&lt;h2&gt;The web makes us lazy&lt;/h2&gt;

&lt;p&gt;The truth is, developing web applications makes us lazy.  I can fix a bug, deploy, and it&amp;rsquo;s fixed in about 15 seconds.  This is why I &lt;em&gt;love&lt;/em&gt; working on hosted web applications.  You&amp;rsquo;ve got such immense power over the deployment process.  Some things that rock about web apps:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You can be &lt;em&gt;really lazy&lt;/em&gt; with UAT (User Acceptance Testing).  Users will do your UAT for your and you can fix it on the fly.&lt;/li&gt;
&lt;li&gt;You can be &lt;em&gt;really lazy&lt;/em&gt; with bugs that will appear after deploy.  If a web service changes, you fix it and redeploy. Done.&lt;/li&gt;
&lt;li&gt;You only need &lt;em&gt;one computer&lt;/em&gt; to test your application.  No need to purchase multiple hardware platforms, video cards, or install multiple operating systems!&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;You can&amp;rsquo;t be lazy with installable applications&lt;/h2&gt;

&lt;p&gt;I once worked on a desktop application that was being sent out on millions of machines.  This application was going to be the first thing that started up when the user booted the machine.  It also meant we didn&amp;rsquo;t have the option to issue updates for the application after deployment.  We spent &lt;em&gt;tons&lt;/em&gt; of time doing user testing on dozens of machines.  And then the client did user testing.  And then the client&amp;rsquo;s QA department did even more testing.  And then the client&amp;rsquo;s QA department did more testing throughout the whole time they were writing hard drives.&lt;/p&gt;

&lt;p&gt;Remember the days when you updated applications with &lt;em&gt;CDs&lt;/em&gt; or &lt;em&gt;floppy disks&lt;/em&gt;?  My god, for a while there it just &lt;em&gt;wasn&amp;rsquo;t feasible&lt;/em&gt; to update installable applications over the internet.  The end result? Software development firms spent a lot of time and money on QA.  Same goes for game development companies.&lt;/p&gt;

&lt;p&gt;My point is: if you know that one of your restraints is updating can be slow or impossible, you &lt;em&gt;spend more time testing the application.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;The App Store is slow&lt;/h2&gt;

&lt;p&gt;It&amp;rsquo;s true the App Store is slow when it comes to delivering updates.  To me, this is just a known variable.  Wouldn&amp;rsquo;t it be awesome if they had 24 hour turnaround? Sure would be.  But it&amp;rsquo;s one of those tradeoffs you get with a closed system.  If you want to trade it for an open system &amp;mdash; build a web application.  It&amp;rsquo;s not that hard.&lt;/p&gt;

&lt;p&gt;I know it sucks testing your application.  I know as a lone developer you don&amp;rsquo;t have the money to hire testers.&lt;/p&gt;

&lt;p&gt;But think of the rewards.  The App Store is something of a gold rush right now.  A small group of people have made obnoxious profits off very little effort.  There&amp;rsquo;s almost no overhead ($100 application fee? psh) &amp;mdash; and anyone can submit apps.  It&amp;rsquo;s a shitty closed ecosystem controlled by Apple. But it&amp;rsquo;s a shitty closed ecosystem of chocolate-filled pools lined with gold and supermodels dressed in nothing but $100 bills if you strike it rich.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Xcode window management sucks</title>
   <link href="http://warpspire.com/posts/xcode-window-management"/>
   <updated>2009-02-23T00:00:00-08:00</updated>
   <id>http://warpspire.com/posts/xcode-window-management</id>
   <content type="html">&lt;div class=&quot;infobox&quot;&gt;
&lt;p&gt;&lt;strong&gt;Hi, did you come here to tell me that Xcode offers &quot;all-in-one&quot; editing?&lt;/strong&gt; Please, don't send me an email. This is addressed in this article if you take time to read it.&lt;/p&gt;
&lt;/div&gt;


&lt;p&gt;I posted some thoughts to twitter last night about how much the Xcode window management drives me insane.  What I got back was a huge reaction of &amp;ldquo;it&amp;rsquo;s perfect&amp;rdquo; and &amp;ldquo;this is how OSX works&amp;rdquo;  Suddenly I was wondering, am I just insane for thinking the window management is absolutely horrible?&lt;/p&gt;

&lt;p&gt;No, no. I&amp;rsquo;m not. It&amp;rsquo;s horrible.  Just because Apple built it, does not make it perfect.&lt;/p&gt;

&lt;h2&gt;Tabs are the future (actually it&amp;rsquo;s been the standard for years)&lt;/h2&gt;

&lt;p&gt;Tabs have clearly proven themselves to be a superior method for editing multiple code files.  Why? Because the most recognizable thing about code file is it&amp;rsquo;s &lt;em&gt;filename&lt;/em&gt;.  Not the look of the text.  Let&amp;rsquo;s look at this through some examples.&lt;/p&gt;

&lt;h3&gt;Case #1: Window-based management FTW, Photoshop&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;
  &lt;a href=&quot;http://assets.warpspire.com/images/xcode-windows/photoshop_full.jpg&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/xcode-windows/photoshop.jpg&quot; /&gt;&lt;/a&gt;
  &lt;small&gt;Example of window management in Photoshop&lt;/small&gt;
&lt;/div&gt;


&lt;p&gt;Window management in OSX defaults to a new window for each document. This works wonderfully for most applications when you can see the differences visually.  Photoshop is a great example.  Using Exposé, I can see which document I mean to be working on at a glance  The &lt;em&gt;visual representation&lt;/em&gt; of the document is the unique identifier.&lt;/p&gt;

&lt;p&gt;Some more points on why this works so well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Image documents are the &lt;em&gt;only windows&lt;/em&gt; you will ever see in Photoshop. Everything else is a panel. This functionality is the same for all five-star document-based apps. iWork, iLife, etc.  There is a really good reason Apple chose to hide panels when activating Exposé.&lt;/li&gt;
&lt;li&gt;Photoshop is a document immersive program. It&amp;rsquo;s unlikely you&amp;rsquo;ll be working on more than one PSD at a time.  The document is all that matters. Conversely with code, the project is all that matters (not one code file).&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;Case #2: Tab-based management FTW, Texmtate&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;
  &lt;a href=&quot;http://assets.warpspire.com/images/xcode-windows/textmate_full.jpg&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/xcode-windows/textmate.jpg&quot; /&gt;&lt;/a&gt;
  &lt;small&gt;Example of window management in Texmate&lt;/small&gt;
&lt;/div&gt;


&lt;p&gt;Window management for Textmate is handled via tabs and a persistent sidebar.  At a glance, you can see all files you&amp;rsquo;re currently working on.  In the case of Cocoa, you are often switching between interface &amp;amp; implementation files, but this is easily handled via cmd-opt-up, so long as you have the name of the class right, you&amp;rsquo;ve got the right file.&lt;/p&gt;

&lt;p&gt;Some points on why this works so well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Windows provide a way to group files in a meaningful manner. Each window is a unique project. Remember, the project is the important thing &amp;mdash; when coding in Cocoa, you&amp;rsquo;ll need to edit multiple files at once to make them work with one another.&lt;/li&gt;
&lt;li&gt;I can quickly move between individual files via the keyboard. Considering coding is almost purely typing, keeping my hands on the keyboard is &lt;em&gt;killer&lt;/em&gt;.&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;Case #3: WTF-based management FTL, Xcode&lt;/h3&gt;

&lt;div class=&quot;figure&quot;&gt;
  &lt;a href=&quot;http://assets.warpspire.com/images/xcode-windows/xcode_full.jpg&quot;&gt;&lt;img src=&quot;http://assets.warpspire.com/images/xcode-windows/xcode.jpg&quot; /&gt;&lt;/a&gt;
  &lt;small&gt;Example of window management in Xcode&lt;/small&gt;
&lt;/div&gt;


&lt;p&gt;Window management for Xcode is handled via a combination of this thing called a Project window, which morphs depending on it&amp;rsquo;s toolbar state, windows for each document, and windows for ancillary programs (like the model editor).  Please note I have the same number of windows open in this screenshot as I did in Textmate (7).  It&amp;rsquo;s actually a pretty small program,  but completely overwhelming.&lt;/p&gt;

&lt;p&gt;Some points on why this doesn&amp;rsquo;t work so well:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Windows mean different things.  Some mean code documents, some mean visual aid, some mean a kind of &amp;ldquo;project&amp;rdquo; that groups all things.&lt;/li&gt;
&lt;li&gt;The project window continually morphs it&amp;rsquo;s state as you enter and exit debugging. It&amp;rsquo;s appearance is different, not upon your application&amp;rsquo;s state, but rather the toolbar button in the upper left, that automatically changes (one-way).&lt;/li&gt;
&lt;li&gt;All the code looks the same. There is no unique identifier in Exposé mode. I must selectively hover over each file and read it&amp;rsquo;s filename. Or, I can exposé to try and find the project window (which can look much like a code window too), and then open a new document.&lt;/li&gt;
&lt;li&gt;If I accidentally Cmd-W the Project window, I have to start from scratch, opening the whole project and each document again. This often happens as you accidentally open windows and want to immediately close them.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Some may counter, telling me that Xcode offers editing inside the project window. Sure, this works, but offers just as many frustrations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You &lt;em&gt;must&lt;/em&gt; single click on files to open them. Double-clicking them still opens them in a new document.&lt;/li&gt;
&lt;li&gt;Because of the above, and the last bullet on the previous list, I constantly find myself accidentally closing the project because I was trying to close an accidentally opened window.&lt;/li&gt;
&lt;li&gt;Unless I choose not to run my program, I constantly have to switch out of debug mode and back into editing mode via the toolbar.&lt;/li&gt;
&lt;li&gt;Every single time I open Xcode I have to force it into editor mode.&lt;/li&gt;
&lt;li&gt;There is a delay in single clicking a document.  You click the file on the sidebar, the sidebar highlights, but the new document doesn&amp;rsquo;t open in the editing window for a second or two. When trying to scan documents for some code, this results in endless confusion.&lt;/li&gt;
&lt;li&gt;There&amp;rsquo;s no idea of &amp;ldquo;open files&amp;rdquo; in this mode. No context for which I&amp;rsquo;m working. I can&amp;rsquo;t say, work on the View Controllers by opening each of them. Each time I must select the unique view controller in the sidebar, ordered alphabetically.&lt;/li&gt;
&lt;/ul&gt;


&lt;h2&gt;It&amp;rsquo;s a shame&lt;/h2&gt;

&lt;p&gt;It&amp;rsquo;s a shame, because other than the window management, Xcode is really an awesome IDE. The actual text editing is great as is debugging, scriptability, and file management. It really helps solve all the problems that Cocoa apps force upon mere text editors (long method names, class names, files being in one directory, different types of files in the same directory, etc).&lt;/p&gt;

&lt;p&gt;It&amp;rsquo;s the program&amp;rsquo;s fatal flaw in my mind.  It isn&amp;rsquo;t that it&amp;rsquo;s sub-par, or not good enough &amp;mdash; it&amp;rsquo;s downright infuriating to use. I want to do mean things to cute kittens whenever I use it.  So I don&amp;rsquo;t. I use TextMate. Which actually is very good at Cocoa &amp;amp; Objective-C. But it means much more typing (especially with the shift key) since TextMate favors tab-triggers rather than tab-completion.&lt;/p&gt;

&lt;p&gt;At the end of the day, this is the kind of stuff I hope Mac developers care about.  It&amp;rsquo;s about making the user experience the #1 priority in software development.  And it&amp;rsquo;s something that I&amp;rsquo;m confident Apple knows about and intends to fix in future versions of Xcode. Because they care about the user experience.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Top reasons your CSS columns are messed up</title>
   <link href="http://warpspire.com/posts/css-column-tricks"/>
   <updated>2008-05-12T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/css-column-tricks</id>
   <content type="html">&lt;p&gt;I believe the recent surge in popularity of CSS frameworks comes from a lack of basic understanding of the CSS box model and how it&amp;rsquo;s implemented across browsers.  I wanted to share with you some quick tips on how to avoid easy pitfalls so you can create your own CSS framework in no time flat, without all the cruft of having ten thousand column combinations available.  Keeping these quick tips in mind at all times will allow you to do something I like to call &lt;em&gt;defensive coding&lt;/em&gt; &amp;mdash; and really that&amp;rsquo;s all CSS frameworks are: defensively coded snippets of CSS.&lt;/p&gt;

&lt;h2&gt;Your margins are doubled in IE6&lt;/h2&gt;

&lt;div class=&quot;figure&quot;&gt;
&lt;img src=&quot;http://assets.warpspire.com/images/css-column-tricks/ie6doublefloat.gif&quot; /&gt;
&lt;/div&gt;


&lt;p&gt;Here&amp;rsquo;s a super common pitfall: IE6 will double margins facing the direction of the float.  Example problematic code:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.sidebar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;margin-left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;20px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;This sidebar will have a 40px left margin in IE6 &amp;mdash; almost certainly throwing the sidebar down below the content, and not next to the content as it should be.  Easy fix: add &lt;code&gt;display:inline;&lt;/code&gt;  No side effects in any browser, and IE6 obeys margins perfectly.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.sidebar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;margin-left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;20px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;inline&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Why it works:&lt;/strong&gt; By declaring &lt;code&gt;float&lt;/code&gt; on an element, you implicitly demand that it must be rendered as a block element &amp;mdash; thus rendering the &lt;code&gt;display:inline&lt;/code&gt; inert.  However, due to IE6&amp;rsquo;s awesome CSS engine, it fixes a bizarre bug that is the #2 reason I see CSS columns fail in IE6.&lt;/p&gt;

&lt;h2&gt;Your content is wider than your column&lt;/h2&gt;

&lt;div class=&quot;figure&quot;&gt;
&lt;img src=&quot;http://assets.warpspire.com/images/css-column-tricks/extendingcolumns.gif&quot; /&gt;
&lt;/div&gt;


&lt;p&gt;Let&amp;rsquo;s pretend you&amp;rsquo;ve got this simplistic setup of code:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;500px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;400px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.sidebar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;100px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;HTML:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
...
&lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;columns&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;main&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;img&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;src=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;/images/awesome.gif&amp;quot;&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;/&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- /.main --&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;sidebar&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    &lt;span class=&quot;nt&quot;&gt;&amp;lt;p&amp;gt;&lt;/span&gt;Sidebar rules!&lt;span class=&quot;nt&quot;&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- /.sidbear --&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- /.columns --&amp;gt;&lt;/span&gt;
...
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Harmless right? You might view this in Firefox and everything will be fine. But then you look at it in IE6 and your sidebar has mysteriously dissapeared below &lt;code&gt;.main&lt;/code&gt;.  WTF? You look at the HTML, the CSS, and everything&amp;rsquo;s fine.  &lt;strong&gt;What could possibly be wrong?&lt;/strong&gt;  A common problem here is if &lt;code&gt;awesome.gif&lt;/code&gt; is 510px wide.  What this does is push out &lt;code&gt;.main&lt;/code&gt; to 510px, and suddenly there&amp;rsquo;s not enough room for &lt;code&gt;.sidebar&lt;/code&gt; inside &lt;code&gt;.columns&lt;/code&gt; any longer.  Ack!&lt;/p&gt;

&lt;p&gt;Easy fix: add &lt;code&gt;overflow:hidden&lt;/code&gt; to your columns.  This forces the width restriction to crop any extruding content.  New magical CSS:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;500px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.main&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;400px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;hidden&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.sidebar&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;right&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;100px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;hidden&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Your margins extend past your container&lt;/h2&gt;

&lt;div class=&quot;figure&quot;&gt;
&lt;img src=&quot;http://assets.warpspire.com/images/css-column-tricks/negativemargin.gif&quot; /&gt;
&lt;/div&gt;


&lt;p&gt;So you&amp;rsquo;re building out a simple product listing template out, and you throw it in an unordered list:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;&lt;span class=&quot;nt&quot;&gt;ul&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;.listing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;400px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;ul&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;.listing&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;li&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;list-style-type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;20px&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;85px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;HTML:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
...
&lt;span class=&quot;nt&quot;&gt;&amp;lt;ul&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;listing&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Product #1&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Product #2&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Product #3&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;li&amp;gt;&lt;/span&gt;Product #4&lt;span class=&quot;nt&quot;&gt;&amp;lt;/li&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/ul&amp;gt;&lt;/span&gt;
...
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;This CSS will work just fine in something like Firefox, but for mysterious reasons you&amp;rsquo;ll see that Product #4 appears on it&amp;rsquo;s own line in IE6.  What&amp;rsquo;s happening here? I mean 4 columns x 85px + 3 gaps x 20px = 400px, right? Except that your 4th gap is hanging over the right edge &amp;mdash; pushing the true width of the blocks to 420px.  Firefox is smart and lets that margin just hang out there &amp;mdash; but IE6 will apply that margin within the parent wrapper &amp;mdash; throwing the 4th item down since it takes up 20px more than it should have.&lt;/p&gt;

&lt;p&gt;The fix? Apply a left margin to each item, with a negative margin to the wrapper.  This means that every item has a visible margin, but the whole block of elements are yanked back by the negative margin:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;&lt;span class=&quot;nt&quot;&gt;ul&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;.listing&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;-20px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;420px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;ul&lt;/span&gt;&lt;span class=&quot;nc&quot;&gt;.listing&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;li&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;list-style-type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;20px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;85px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;This gets around the nasty solution of adding a class to the first or last item in every row &amp;mdash; something I&amp;rsquo;ve seen with abundance around the web.&lt;/p&gt;

&lt;h2&gt;Building a CSS framework in no time&lt;/h2&gt;

&lt;p&gt;Wev'e got to start out with some basic HTML.  Here&amp;rsquo;s what I&amp;rsquo;ve been using lately:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;html&quot;&gt;&lt;span class=&quot;nt&quot;&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
...
&lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;columns col2&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;column first&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    ...
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- /.first --&amp;gt;&lt;/span&gt;
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;div&lt;/span&gt; &lt;span class=&quot;na&quot;&gt;class=&lt;/span&gt;&lt;span class=&quot;s&quot;&gt;&amp;quot;column last&amp;quot;&lt;/span&gt;&lt;span class=&quot;nt&quot;&gt;&amp;gt;&lt;/span&gt;
    ...
  &lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- /.last --&amp;gt;&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;span class=&quot;c&quot;&gt;&amp;lt;!-- /.columns --&amp;gt;&lt;/span&gt;
...
&lt;span class=&quot;nt&quot;&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;For different column widths, I&amp;rsquo;ve been changing out the &lt;code&gt;col2&lt;/code&gt; declaration to things like &lt;code&gt;col2A, col2B, col2C&lt;/code&gt; and so on. You could easily give them more semantic names like &lt;code&gt;products-columns&lt;/code&gt; too.&lt;/p&gt;

&lt;h3&gt;Self clearing is the future&lt;/h3&gt;

&lt;p&gt;The first step for any column framework is self-clearing. It&amp;rsquo;s easy, practical, and reduces all those damn clearing divs.&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt;&lt;span class=&quot;nd&quot;&gt;:after&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;content&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;.&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;block&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;clear&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;both&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;visibility&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;hidden&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;html&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;1%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;inline&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;-&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;block&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;block&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;h3&gt;Float those columns&lt;/h3&gt;

&lt;p&gt;Next step is to actually float those columns. So let&amp;rsquo;s add a couple more declarations:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;&lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.column&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;overflow&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;hidden&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
  &lt;span class=&quot;k&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;inline&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.columns&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.last&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.col2&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.first&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;500px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.col2&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.last&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;100px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.col2A&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.first&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;400px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.col2B&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.last&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;200px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.col3&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.first&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;100px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.col3&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.second&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;280px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;margin-left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;20px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.col3&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.last&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;width&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;200px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;h3&gt;Done&amp;hellip; uh, what?&lt;/h3&gt;

&lt;p&gt;Oh, yeah. That&amp;rsquo;s it. That&amp;rsquo;s all it takes to create reliable columns in CSS. Really.&lt;/p&gt;

&lt;p&gt;Here&amp;rsquo;s an &lt;a href=&quot;http://assets.warpspire.com/images/css-column-tricks/example.html&quot;&gt;example page&lt;/a&gt; to prove it!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Why I don't use CSS Frameworks</title>
   <link href="http://warpspire.com/posts/css-frameworks"/>
   <updated>2007-08-17T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/css-frameworks</id>
   <content type="html">&lt;p&gt;CSS Frameworks seem like an awesome advancement at first glance: speed up your development, normalize your code base, and eliminate those nasty browser bugs!  Hot damn, where do I sign up?  Unfortunately there&amp;rsquo;s some pretty strong caveats that go with those statements.&lt;/p&gt;

&lt;h2&gt;The frameworks themselves are very good&lt;/h2&gt;

&lt;p&gt;I&amp;rsquo;d like to start this off by saying there&amp;rsquo;s nothing inheritly wrong with any of the CSS, HTML, or ideas put into these frameworks.  I also think it&amp;rsquo;s an absolutely fabulous idea that people are writing them &amp;mdash; it gives newcomers an easy way out to create professional looking designs using semantic XHTML and CSS.&lt;/p&gt;

&lt;h2&gt;Advantages of Frameworks&lt;/h2&gt;

&lt;p&gt;Most CSS frameworks offer three primary selling points:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Speed up your develoment (don&amp;rsquo;t have to write all that HTML/CSS)&lt;/li&gt;
&lt;li&gt;Don&amp;rsquo;t worry about those nasty IE bugs!&lt;/li&gt;
&lt;li&gt;Normalize your code/class base&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;Speeding up your development&lt;/h3&gt;

&lt;p&gt;For those who have intimate knowledge of the framework, I do believe the frameworks will speed up development.  But for the average user, I think that the time required to understand the architecture of the framework far outweighs the menial task of coding it from scratch.&lt;/p&gt;

&lt;p&gt;Over the past three years, I&amp;rsquo;ve built unknown dozens of layouts, with most of them being extremely visually complex.  On average, it takes me about 8 hours to build out a Master design into a functioning bug-free template.  Of that time, I would have to say that doing the basic layout &amp;amp; typography (framework material) takes less than 20 minutes.  That&amp;rsquo;s &lt;strong&gt;less than 5% of development time.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You may save time, but the question quickly becomes how much time, and at what cost?  We&amp;rsquo;ll cover that later.  My point being that frameworks do not solve the hard problems in CSS &amp;mdash; the ones that pop up when you&amp;rsquo;re knee-deep in HTML and suddenly the goddamn box doesn&amp;rsquo;t show up in IE6.  These are the problems that take the majority of time when developing a website.&lt;/p&gt;

&lt;h3&gt;Don&amp;rsquo;t worry about  IE bugs&lt;/h3&gt;

&lt;p&gt;Well, gee that sure would be a wonderful thing if that were the case, wouldn&amp;rsquo;t it?  The truth is the frameworks do eliminate some bugs &amp;mdash; but they&amp;rsquo;re the easy ones to pick off.  The ones solved by a quick &lt;code&gt;display:inline&lt;/code&gt; or &lt;code&gt;height:1%&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The frameworks don&amp;rsquo;t solve bugs where none of the public hacks work.  Or where IE inexplicably adds a 30px top margin to your element, but then dissolves in when you hover over your main navigation.  It doesn&amp;rsquo;t solve the problems when IE displays the same HTML and CSS differently on two different computers.&lt;/p&gt;

&lt;p&gt;It doesn&amp;rsquo;t solve the hard problems.&lt;/p&gt;

&lt;h3&gt;Normalize your code base&lt;/h3&gt;

&lt;p&gt;This is one area I think frameworks are great at: getting a large team of people all using the same code structure.  But then again, I think this can be solved by an internal styleguide just the same.&lt;/p&gt;

&lt;h2&gt;Disadvantages of frameworks&lt;/h2&gt;

&lt;p&gt;There are a few pretty severe disadvantages of frameworks in my eyes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Familiarity with your code&amp;rsquo;s architecture&lt;/li&gt;
&lt;li&gt;Inheriting someone else&amp;rsquo;s bugs&lt;/li&gt;
&lt;li&gt;Not learning&lt;/li&gt;
&lt;/ul&gt;


&lt;h3&gt;Familiarity with your code&amp;rsquo;s architecture&lt;/h3&gt;

&lt;p&gt;This is the largest reason I&amp;rsquo;ve never built or used a CSS framework.  By building a site from the ground up, you gain a knowledge of your site&amp;rsquo;s architecture that can&amp;rsquo;t be learned through any study or documentation.  When a programmer asks you a question about restructuring the HTML, you can answer right away.  You know where the CSS styles are (hopefully) and you know &lt;em&gt;how&lt;/em&gt; the layout works.&lt;/p&gt;

&lt;p&gt;This is increasingly relevant in today&amp;rsquo;s Javascript-out-the-ass world.  Once you start manipulating the XHTML/CSS of your site through dynamic scripting: you better know how it&amp;rsquo;s laid out.  Javascript-based effects are tied very closely to the CSS structure of the site.  You&amp;rsquo;ll have to know when you can use &lt;code&gt;float&lt;/code&gt; and when you can use &lt;code&gt;position&lt;/code&gt; to lay out elements.  Should you use &lt;code&gt;line-height&lt;/code&gt;, &lt;code&gt;margin&lt;/code&gt;, &lt;code&gt;padding&lt;/code&gt;, or &lt;code&gt;height&lt;/code&gt; to get that container to extend?  It&amp;rsquo;s a very important decision: and laying out the architecture helps you achieve this.&lt;/p&gt;

&lt;h3&gt;Inheriting someone else&amp;rsquo;s bugs&lt;/h3&gt;

&lt;p&gt;At the end of the day, no framework is perfect. No design is perfect.  But instead of fixing your bugs, you&amp;rsquo;re fixing someone else&amp;rsquo;s bugs.  Do you know how much it sucks fixing your own bugs?  It sucks 10,000x worse fixing someone else&amp;rsquo;s bugs.&lt;/p&gt;

&lt;h3&gt;Not learning&lt;/h3&gt;

&lt;p&gt;Again, on my mantra of why I wouldn&amp;rsquo;t recommend frameworks comes the lack of knowledge gained by fixing those problems frameworks solve.  I&amp;rsquo;ve &lt;a href=&quot;/tipsresources/web-production/most-amazing-css-tip-youll-ever-read-in-your-life/&quot;&gt;advocated before&lt;/a&gt; how important it is to build websites.  I can guarantee you that if you keep building sites from the ground-up, you&amp;rsquo;ll learn new things each time.  You&amp;rsquo;ll learn not only how to fix and avoid browser bugs, but how to make your markup more elegant.  You&amp;rsquo;ll transform the act of building websites from a job into an art.&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Hopefully this clears up a bit of why I don&amp;rsquo;t like CSS frameworks.  It&amp;rsquo;s not that they&amp;rsquo;re bad &amp;mdash; it&amp;rsquo;s just that I don&amp;rsquo;t think they offer enough value for the drawbacks.  It all comes down to intelligently analyzing your situation before you jump head-first into someone else&amp;rsquo;s code.&lt;/p&gt;

&lt;h3&gt;The one &amp;ldquo;framework&amp;rdquo; I do use&lt;/h3&gt;

&lt;p&gt;On that note, there is one framework I do use.  It&amp;rsquo;s the CSS reset &amp;mdash; not that I&amp;rsquo;d even call it a framework.  Here it is in all its glory:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;css&quot;&gt;&lt;span class=&quot;c&quot;&gt;/*------------------------------------------------------------------------------------&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;  Global Styles&lt;/span&gt;
&lt;span class=&quot;c&quot;&gt;------------------------------------------------------------------------------------*/&lt;/span&gt;
&lt;span class=&quot;o&quot;&gt;*&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;k&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;h1&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;h2&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;h3&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;h4&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;h5&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;h6&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;p&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;pre&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;blockquote&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;label&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;ul&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;ol&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;dl&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;fieldset&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;address&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;margin&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1em&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;0&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;li&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;dd&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;margin-left&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;5%&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;fieldset&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;.5em&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;select&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;option&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;padding&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;0&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;5px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;

&lt;span class=&quot;nc&quot;&gt;.hide&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.print-logo&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nc&quot;&gt;.close-button&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;display&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;left&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.right&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;float&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;right&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nc&quot;&gt;.clear&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;clear&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;both&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;font-size&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;line-height&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;m&quot;&gt;1px&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;nt&quot;&gt;a&lt;/span&gt; &lt;span class=&quot;nt&quot;&gt;img&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;{&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;border&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;none&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;What&amp;rsquo;s your take on frameworks? Do you use them? If so, what other benefits have you gained from using them?&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>MooTools Javascript Classes</title>
   <link href="http://warpspire.com/posts/mootools-javascript-classes"/>
   <updated>2007-07-16T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/mootools-javascript-classes</id>
   <content type="html">&lt;p&gt;One of Javascript&amp;rsquo;s major blunders when it comes to Object-Oriented design is the lack of true classes.  Lucky for us, we&amp;rsquo;ve had every library author out there have their whack at creating a class structure.&lt;/p&gt;

&lt;h2&gt;What is a class?&lt;/h2&gt;

&lt;p&gt;A class is kind of a template.  One of the big concepts of OO is treating your code as real world objects.  Let&amp;rsquo;s say you want to have three variables for different dogs: ollie, rowdy, and killer.  Each of these variables should be an &lt;em&gt;instance&lt;/em&gt; of a &lt;em&gt;class&lt;/em&gt;.  That class&amp;rsquo;s name would be Dog. Each particular dog is an instance of the generic Dog class.  I won&amp;rsquo;t go into much more detail here: there&amp;rsquo;s plenty of reading to do on what classes really are, and how to use them best.&lt;/p&gt;

&lt;h2&gt;MooTools = &amp;lt;3&lt;/h2&gt;

&lt;p&gt;Out of all the class systems I&amp;rsquo;ve used, I&amp;rsquo;d have to say MooTool&amp;rsquo;s class system (spanwed from Dean Edward&amp;rsquo;s Base) is the cleanest, most extensible system yet.  Creating and extending classes is ridiculously easy.&lt;/p&gt;

&lt;h3&gt;Create a class&lt;/h3&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Animal&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Class&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;initialize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Animal Runs!&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;text&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pet&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Animal&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;pet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// ==&amp;gt; &amp;quot;Animal Runs!&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;(It&amp;rsquo;s also fair to note that MooTools supports Prototype&amp;rsquo;s &lt;code&gt;Class.create&lt;/code&gt; method as well)&lt;/p&gt;

&lt;h3&gt;Extend a class&lt;/h3&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Dog&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Animal&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;extend&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;initialize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;parent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;bark&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;run&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;Woof! Woof!&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;pet&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Dog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;pet&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bark&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// ==&amp;gt; &amp;quot;Animal Runs!&amp;quot;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// ==&amp;gt; &amp;quot;Woof! Woof!&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;You&amp;rsquo;ll notice you still get access to parent methods (through &lt;code&gt;this.parent()&lt;/code&gt;), as you can see where this.text gets initialized when a new instance of Dog is created.&lt;/p&gt;

&lt;p&gt;The syntax is short, sweet, and to the point.  Furthermore it allows me all the flexibility I need&amp;hellip; well, almost.  MooTools team gets bonus points for the next section.&lt;/p&gt;

&lt;h2&gt;Javascript mixins&amp;hellip; kinda&lt;/h2&gt;

&lt;p&gt;There are two common actions that many Javascript actions have: options, and callbacks.  MooTools have created a sort of ruby-style mixin for classes to handle these functions.  MooTools calls these mixins Utility Classes.  To enable these, add this line to the code above:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;nx&quot;&gt;Dog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;implement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Events&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Options&lt;/h2&gt;

&lt;p&gt;What does this do?  First off, it allows for quick, easy, extendible options.  All you do is set your default options in an options property, and then call the &lt;code&gt;setOptions&lt;/code&gt; method inside your class.  Here&amp;rsquo;s an example:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Dog&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Class&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;({&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;5&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot;Jack Russel Terrier&amp;quot;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;initialize&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
        &lt;span class=&quot;c1&quot;&gt;// Here&amp;#39;s the magic!&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;setOptions&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;

        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;;&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;},&lt;/span&gt;

    &lt;span class=&quot;nx&quot;&gt;bark&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(){&lt;/span&gt;
        &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;My name is &amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot; and I am &amp;quot;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;age&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&amp;quot; years old&amp;quot;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
        &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;fireEvent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;afterBark&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;this&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
    &lt;span class=&quot;p&quot;&gt;}&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;Dog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;implement&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Options&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Events&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;ollie&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Dog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;Ollie&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;ollie&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bark&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// ==&amp;gt; &amp;quot;My name is Ollie and I am 5 years old&amp;quot;&lt;/span&gt;

&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;rowdy&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Dog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;Rowdy&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;p&quot;&gt;{&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;age&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;:&lt;/span&gt;&lt;span class=&quot;mi&quot;&gt;15&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;rowdy&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bark&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// ==&amp;gt; &amp;quot;My name is Rowdy and I am 15 years old&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;By mixing in the Options methods, you now have access to setOptions, which either uses user-defined options or class-based defaults (with one line of code).&lt;/p&gt;

&lt;h3&gt;Events&lt;/h3&gt;

&lt;p&gt;You can also define custom events (usually called callbacks).  Notice the &lt;code&gt;this.fireEvent('afterBark')&lt;/code&gt; bit in the Dog class above?  Check it out:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;javascript&quot;&gt;&lt;span class=&quot;kd&quot;&gt;var&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;killer&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;k&quot;&gt;new&lt;/span&gt; &lt;span class=&quot;nx&quot;&gt;Dog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;Killer&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;killer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;addEvent&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;s1&quot;&gt;&amp;#39;afterBark&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;kd&quot;&gt;function&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;){&lt;/span&gt;
    &lt;span class=&quot;nx&quot;&gt;alert&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;dog&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;name&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;+&lt;/span&gt; &lt;span class=&quot;s1&quot;&gt;&amp;#39; just barked!&amp;#39;&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;);&lt;/span&gt;
&lt;span class=&quot;p&quot;&gt;});&lt;/span&gt;
&lt;span class=&quot;nx&quot;&gt;killer&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;nx&quot;&gt;bark&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;();&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// ==&amp;gt; &amp;quot;My name is Killer and I am 5 years old&amp;quot;&lt;/span&gt;
&lt;span class=&quot;c1&quot;&gt;// ==&amp;gt; &amp;quot;Killer just barked!&amp;quot;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;It allows you to tie into the &lt;em&gt;same&lt;/em&gt; event functionality used for the DOM, but with your own methods you create in your classes. I&amp;rsquo;m in love with this easy functionality &amp;mdash; sure there&amp;rsquo;s been other ways to do this, but none so elegant as what the Moo team has come up with.&lt;/p&gt;

&lt;h3&gt;Chain&lt;/h3&gt;

&lt;p&gt;The last utility class is the Chain class.  This allows for some nice chaining of classes: I&amp;rsquo;ll leave it up to you to explore this one since I haven&amp;rsquo;t used it in great detail yet.  In a nutshell: it allows for time-dependent chains (so that events fire after another one is complete).&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;Every good Javascript developer knows that there&amp;rsquo;s 50 ways to skin a cat when it comes to classes and Javascript.  But for me, one of the largest reasons MooTools is my framework of choice is the underlying class system.  No extending &lt;code&gt;Object&lt;/code&gt;, and no overriding of parent methods.  The syntax is clean and easy to remember, giving it huge bonus points in my book.&lt;/p&gt;

&lt;p&gt;Personally, I would like to thank the smarter developers who have taken the hard hits with Javascript to implement these nice OO techniques.  Without them, my Javascript would still be procedural-based with tons of global variables thrown about.  Yay for frameworks!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>Using TextMate's TODO bundle</title>
   <link href="http://warpspire.com/posts/textmate-todos"/>
   <updated>2007-06-25T00:00:00-07:00</updated>
   <id>http://warpspire.com/posts/textmate-todos</id>
   <content type="html">&lt;p&gt;If you use TextMate, you should really think about using the TODO bundle more often.  It&amp;rsquo;s a simple, low-maintenance bundle that adds tremendous value to your code.&lt;/p&gt;

&lt;h2&gt;Setting TODO, FIXME, and CHANGELOG&lt;/h2&gt;

&lt;p&gt;Using the bundle is pretty easy.  In any language, just type in a quick comment with the prefix TODO, FIXME or CHANGED like so:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;view&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# TODO: different display for different types of clips: active, processing, etc&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@clip&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Clip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# TODO: Make a real related clips dealieo&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@related_clips&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Clip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:all&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:limit&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;mi&quot;&gt;6&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;,&lt;/span&gt; &lt;span class=&quot;ss&quot;&gt;:conditions&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&amp;gt;&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;s2&quot;&gt;&amp;quot;clips.status = &amp;#39;processed&amp;#39;&amp;quot;&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Using this syntax lets you keep pushing ahead at full steam and leave the hard stuff for later.  For example, in the above example I wanted to get a quick functional prototype out the door.  It wasn&amp;rsquo;t mandatory that the Related Clips &lt;em&gt;actually&lt;/em&gt; be related: it was only mandatory that there was content present.&lt;/p&gt;

&lt;p&gt;You can also use the keywords FIXME or CHANGED throughout your code, like so:&lt;/p&gt;

&lt;div class=&quot;highlight&quot;&gt;&lt;pre&gt;&lt;code class=&quot;ruby&quot;&gt;&lt;span class=&quot;k&quot;&gt;def&lt;/span&gt; &lt;span class=&quot;nf&quot;&gt;view&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# FIXME: This totally breaks if an invalid ID is given&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@clip&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Clip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;find&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
  &lt;span class=&quot;c1&quot;&gt;# CHANGED: @related_clips now uses a model method related_clips&lt;/span&gt;
  &lt;span class=&quot;vi&quot;&gt;@related_clips&lt;/span&gt; &lt;span class=&quot;o&quot;&gt;=&lt;/span&gt; &lt;span class=&quot;no&quot;&gt;Clip&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;.&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;related_clips&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;(&lt;/span&gt;&lt;span class=&quot;n&quot;&gt;params&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;[&lt;/span&gt;&lt;span class=&quot;ss&quot;&gt;:id&lt;/span&gt;&lt;span class=&quot;o&quot;&gt;]&lt;/span&gt;&lt;span class=&quot;p&quot;&gt;)&lt;/span&gt;
&lt;span class=&quot;k&quot;&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;This lets others working on the code let you know that you &lt;em&gt;know&lt;/em&gt; something is broken and/or changed, but you just don&amp;rsquo;t have time to get to it.&lt;/p&gt;

&lt;h2&gt;Getting the information back&lt;/h2&gt;

&lt;p&gt;Well, that&amp;rsquo;s all fine and well.. but how do you know what needs to be fixed/changed/done ?  Just hit Ctr+Shift+T  and TextMate will pop up with a pretty little list, hyperlinked and all&lt;/p&gt;

&lt;div class=&quot;figure&quot;&gt;
  &lt;img src=&quot;http://assets.warpspire.com/images/textmate-todo-bundle/list.gif&quot; alt=&quot;Screenshot of the TODO list&quot; /&gt;
  &lt;small&gt;&lt;em&gt;Ctrl + Shift + T&lt;/em&gt; brings up a list of all your todo's&lt;/small&gt;
&lt;/div&gt;


&lt;p&gt;I use this bundle practically every time I open up Textmate.  It allows me to keep on a focused track of development, while still keeping a lot of &amp;ldquo;ooh, I need to do that sometime&amp;rdquo; kind of tasks on the radar.&lt;/p&gt;
</content>
 </entry>
 

</feed>