File extension repetition considered harmful?

Don't Repeat Yourself is a well known software development mantra. Suppose your working on a C project and all the #include lines name header files whose name ends in dot-h. Aren't all those dot-h's repetition? They are. But you probably don't consider that as repetition because in this context it doesn't matter. However, sometimes file extensions become a bigger part of the context and then the repetition can start to hurt. For example, I have some PHP files whose names end in dot-php. The content of these PHP files contain some hardwired redirections to sibling dot-php files. These files live on my ISP's server and they run under PHP4. My ISP has upgraded to PHP5 - but only for files ending in dot-php5. Is it worth upgrading I ask myself.

Java initializer block trick

Here's a neat trick Kevlin Henney found in some code Michael Feathers posted at http://pastie.org/534364 Instead of doing this:
ArrayList<Integer> values = new ArrayList<Integer>();
values.add(1);
values.add(2);
values.add(3);
You can do this:
ArrayList<Integer> values = new ArrayList<Integer>() {{
    add(1);
    add(2);
    add(3);
}};

Abstraction

I came across this astonishing illusion the other day (via a Jerry Weinberg twitter). The blue spirals and the green spirals are the same colour. Really. Jerry said he'd looked at the pixels in Photoshop to confirm it. It's not that I don't trust Jerry but I looked too (in Gimp) because it's just so counter-intuitive. It is true. It's amazing isn't it.

The way we perceive the world is based partly on what information it's sending us but mainly on how we interpret that information. If we consciously saw everything we just couldn't cope with the information overload so our minds filter it for us. That's abstraction. We don't see what's there and we see what's not there.