Category Archives: Code Beauty

Going Fast, Frankenstein, and Refactoring

Very soon now, the project that has consumed my days for the last 6 months will go into public beta. It’s too early to pop the champagne, and that’s not what this post is about. However, the newness of this project is worth pointing out for the following reason: We’re already planning a fairly major refactoring effort to take care of a lot of code rot that has crept into the designs.

That’s right. We haven’t released anything, and there’s already enough bloat to justify spending at least 2 weeks cleaning it up. …Read More

Cross Browser Support for inline-block Styling

Inline-block layout solves a lot of problems. It lets you do some cool stuff previously thought impossible with CSS. It makes vertical alignment work properly. And sadly, it’s supported pretty badly. I learned a new approach from one of the best insane inventor webdevs I know. The pieces have been out there for some time, it seems, but I hadn’t ever seen this spelled out as simply and elegantly as he did it. …Read More

Required reading for web developers: The Fountainhead by Ayn Rand

Some 50 years before the Internet was even a spark in TBL’s eye, Ayn Rand managed to capture the timeless essence of a web developer in the character of Howard Roark. Every web developer needs to read this book. …Read More

Squish it good - Code compression for the masses

Labor Day came and I completely forgot that it would mean no Monday morning for writing a post. Hope you all had great beer and burgers, or whatever you were doing.

In the meantime, I’d like to mention something cool. Julien LeComte has released his YUI Compressor that includes a CSS minification script that …Read More

Blueprint CSS Framework vs YUI Grids

I compare YUI’s Grids CSS with Blueprint. Blueprint is interesting, but has some pretty major problems as a CSS framework, and I certainly wouldn’t recommend using it on a production site. YUI Grids, on the other hand, is indispensable. …Read More

Javascript Style Tip: Use “in” and “delete”

Javascript provides two very handy operators, in and delete.

Consider this code fragment:

var obj = {

 foo : ‘quux’,

 bar : ‘baz’,

 doSomething : function () {

  // do something…

 }

};

So, we’ve created an object, and then some other things happen. Later in the code, we want to remove the “foo” property, so we do this:

obj.foo = undefined;

Still later, we …Read More