Home » Blog

Easy French Reader 2

Posted by Roger Keays, 9 July 2008, 12:00 PM

  • avec (prep) - Elle parle français avec un accent américain.
  • comme (conj) - Comme ils sont amis, ils étudient ensemble.
  • même (adv) - ... même les enfants!

No comments yet, be the first to comment!

Easy French Reader 1

Posted by Roger Keays, 8 July 2008, 12:00 PM

  • tout le monde (pn) - En France, tout le monde parle français.
  • parce que (conj) - Il parle français très bien parce qu'il est français.
  • des (det) - Il y a des élèves américains.
  • très (adj) - L'école est très grande.
  • il y a (vp) - Il y a beaucoup de filles et de garçons français.
  • aussi (adv) - Elle est très intelligente et sympa aussi.

No comments yet, be the first to comment!

Trois Jours Avant Nöel

Posted by Roger Keays, 7 July 2008, 12:00 PM

  • battre son plein (id) - les préparatifs de Noël battaient leur plein.
  • presque (adv) - Ses cheveux jadis bruns étaient aujourd'hui presque complètement gris.

No comments yet, be the first to comment!

width: auto; on Floats in IE

Posted by Roger Keays, 5 July 2008, 9:01 PM

I think CSS 2.0 required that widths be explicitely set on floated elements, but CSS 2.1 removed this restriction. Either way, Microsoft Internet Explorer 6.0 equates width: auto; with width: 100%; for floats. Not very helpful for building CSS menus. I searched the web and didn't find any workarounds, but I came up with this simple one myself:

element { float: left; _width: 0px; }

The underscore hack targets IE 6 but not IE 7 (which behaves correctly). IE6 also automatically expands the width of the block to fit when the specified width is too small, which is why this hack works. When I say 'works' I mean it in the Microsoft sense of the word of course.

Hope it helps!

14 comments, post a comment!

Things I Will Never Get Bored Of

Posted by Roger Keays, 28 June 2008, 8:53 PM

  1. Software development
  2. Languages
  3. Art
  4. Music
  5. Skateboarding
  6. Blogging!

3 comments, post a comment!

Wikipedia Reading

Posted by Roger Keays, 23 June 2008, 9:54 AM

  • aesculapian (adj) - Hospital specialists rely first and foremost on aesculapian power.
  • automaton (n) - Because neural networks are computative machines, they obey the same principles as machine programs, digital computers and cellular automata.
  • platitude (n) - It has long been a platitude that human beings use only a fraction of their brains at any given time.

No comments yet, be the first to comment!

Neal Gafter on Java 7 Language Proposals

Posted by Roger Keays, 14 June 2008, 2:18 AM

Here's some priceless commentary from Neal Gafter on his blog entitled Reified Generics for Java:

Dozens of language "proposals" are now generated weekly by people incompetent to the task. Sometimes the author is quietly tolerated by the community until their attention to the issue wanes. Sometimes a more persistent author attempts to pursue their proposal, and eventually comes to realize that they are out of their depth. Occasionally an individual with a complete lack of talent never comes to appreciate the futility of their approach, and attempts to recruit support from a wider community of amateurs.

So, why doesn't anybody pay attention to my idea for EL in Java? What's wrong with you people? Can't you see it's a great idea? Man, Java sucks. Perl is the way of the future.

1 comment, post a comment!

Spampot test results

Posted by Roger Keays, 14 June 2008, 1:45 AM

You read a lot online about how spammers are 'harvesting the Internet' by collecting email addresses off the web. People have come up with all sorts of methods to obfuscate their email address. So I thought I would give them a bit of a test out. I created some dummy email accounts and posted them on this site each using a different method of obfuscation. The variations used plain old mailto links, tinyurl redirects, escaping with unicode, inserting invisible tags in the address with display:none and using images. The addresses have now been online for several months so I thought I'd release the results of this monumental experiment. Here they are:

  • Plain old mailto link: 2 spams

That's where I stopped. Spammers don't harvest email addresses off the web. Writing crawlers to do it is too hard and uses too many resources. How many pages is it worth parsing to find just one email address? My guess is that their most productive sources are mailing lists, newsgroups and databases traded amongst themselves.

Mythbusted. Totally.

1 comment, post a comment!

Escaping XML in XML in JSF

Posted by Roger Keays, 14 June 2008, 1:26 AM

Recently I discovered that my RSS feeds were broken because of the Latin characters in the content. JSF's h:outputText unhelpfully converts these to HTML entities which are invalid in XML files such as RSS feeds. Even with escape="false", the HTML markup still breaks the feed. Short of writing an XML renderer for h:outputText, I came up with the following putrid hack. It is an ugly stain on my otherwise beautiful code, a parasite to perfection, a car wreck on the corner of Coro Drive and Moggill Road, a pile of puppy poo on the pavement. But it works...

<title>
  <h:outputText value="&lt;![CDATA[" escape="false"/>
  <h:outputText value="${item.title}" escape="false"/>
  <h:outputText value="]]&gt;" escape="false"/>
</title>

Repeat for all output in your XML/RSS templates.

3 comments, post a comment!