17. July 2013

CSS abstractions done right

Don’t start coding at the abstract level. Arriving at the right abstractions is a process that requires multiple passes - also known as refactorings. What you should do, is start solving the problems at hand - we call these “implementations” - and then gradually identify redundancies. Redundancies have the potential to become reusable abstractions. We call these “patterns”.


17. September 2012


Test driven CSS development

I’m a huge fan of test-driven development! Almost every day, I make use of unit tests when writing Javascript. TDD helps me focus my development on singular tasks, and it enables me to easily verify that all my stuff works after refactorings or other kinds of changes.

One day I thought: “Why don’t we have this for CSS?”.

CSS - especially for large projects with many developers - is a major pain! There are no clear-cut rules for modularity, the inheritance mechanisms are obscure, and the runtime environments (the browsers) are still no way near consistent in their interpretations of style rules.

It occurred to me that TDD methodology would be a great way to tackle these problems.


23. May 2012

Specs and creativity

Today I became aware of the existence of the Joel Test - a list of questions for assessing the quality of a software development team.

One item on the list puzzled me a little.


26. April 2012

Growing software

Next time you refer to software development as “building” something, there’s a good chance that you’re doing damage to your project.


24. February 2012

Benchmarking the jQuery DOM ready binding

After a discussion with a colleague about the pros and cons of using a lot of $(document).ready(function(){ … }) statements across a project, I decided to measure the raw performance of the event binding itself.

Both of us agreed that extensive use of this statement represents a sort of code-smell - that it’s probably a sign that your Javascript needs better structure - and that this, in turn, will probably lead to bad performance in one way or another.

But that set aside, how about the statement itself? Does it incur a performance hit?


22. November 2011

How to use Knockout.js with XSLT

As you may know, Knockout.js uses inline Javascript for it’s elegant, declarative bindings:

<li data-bind="css: {'active': visible()}"></li>

But if you use XSLT to render your HTML, it may fail because the curly-braces may not be supported in attributes.


25. October 2010

My Photoshop wishlist

Photoshop is a great tool, but it lacks some workflow features that I’d like to have.


08. October 2010

How to make CSS3PIE work

Countless hours have been lost creating rounded corners, dropshadows and gradient backgrounds for the web.

With Internet Explorer still lacking support for CSS3, until recently it seemed like we would have to keep doing tiny graphic sprites (or implementing dirty javascripts) in order to accomodate the demand for such UI niceness.