CSS Repeats Itself

Monday, September 25th, 2006

CSS has a noble goal: separating content from presentation. The sad truth, though, is that the implementation of that goal is unbelievably hideous. We’ve spent so much time over the last decade first evangelizing the goal and then excoriating browser vendors for not correctly implementing the specs, that we’ve neglected to notice some fairly fundamental flaws in the language itself. The first of those is a violation of the DRY principle: Don’t Repeat Yourself.
(more…)

The Importance of Being Wrong (and in the Right Way)

Friday, September 22nd, 2006

When I was an undergraduate, one of my math professors, Theodore Faticoni, explained to us the difference between a useful wrong proof and a useless wrong proof. When attacking an unsolved problem such as the Riemann conjecture, a useful wrong proof was wrong; but for reasons nobody expected. Finding the flaw in the proof taught you things about the problem you didn’t previously know. By contrast, a useless wrong proof was wrong for obvious reasons. It didn’t teach you anything new about the problem.

In fact a useful wrong proof could be far more valuable than a prosaic right proof. For instance, Yves Hellegouarch’s discovery in the 1980s that Fermat’s last theorem was closely related to elliptic curves was far more interesting and practical than the eventual use of that knowledge by Wiles and Taylor to finish the theorem. Similarly and much earlier, Euler’s “proof” of the theorem for the special case with exponent 3 was wrong, but nonetheless suggested many avenues of attack on the problem for the next couple of centuries. Writing software can be the same.
(more…)

Negative Experimental Programming

Thursday, September 21st, 2006

I’ve previously written about the benefits of experimental programming: fixing code until all tests pass without necessarily understanding at a theoretical level why they pass. This scares the bejeezus out of a lot of developers, but I’m convinced it’s going to be increasingly necessary as software grows more and more complex. The whole field of genetic algorithms is just an extreme example of this. Simulated annealing is another. However those techniques are primarily used by scientists who are accustomed to learning by experiment before they have a full and complete understanding of the underlying principles. Computer scientists are temperamentally closer to mathematicians, who almost never do experiments; and who certainly don’t trust the results of an experiment unless they can prove it theoretically.

However, perhaps it’s possible to introduce experimental programming in a slightly less controversial form. While many programmers may be unwilling to accept it as positive evidence of program correctness, it can offer undeniable evidence of program failure. This was recently brought to mind by a bug I was trying to fix in Jaxen.
(more…)

Fielded Input Considered Harmful

Sunday, September 10th, 2006

I am so tired of programmers placing their convenience ahead of mine. They work for me, not the other way around! One common problem is input fields. For example, here’s a chunk of a web form I was asked to fill out when purchasing an upgrade to a product:

212 | 5553456
(more…)