Top Ten Amusing Code Snippets from KDE CVS

tronical on KDE IRC gave me a link to an old file he had of the top ten
weirdest/funniest/stupidest pieces of code that were in KDE CVS at one time or
another.

Perhaps my favorite is this gem: emit newState(
i18n("%1").arg(name())

This, of course, reduces down to i18n(name()). But wait,
we’re
not done yet! The i18n() call returns a translated
string from the untranslated one passed as an argument. I know our KDE
translators are good, but how are they supposed to translate a string
generated programmatically??

I have been led to believe that there is a newer version floating around
somewhere. I think that’d be pretty nifty to see. :-)