| Updated: 10/5/2002; 9:47:38 AM. |
| A QA Guy's Radio Weblog Thoughts from Dave Liebreich About George Orwell
In Orwell's own mind there was an inextricable connection between language and truth, a conviction that by using plain and unambiguous terminology one could forbid oneself the comfort of certain falsehoods and delusions. Every time you hear a piece of psychobabble or propaganda -- "People's princess," say, or "collateral damage," or "peace initiative" -- it is good to have a well-thumbed collection of his essays nearby. His main enemy in discourse was euphemism, just as his main enemy in practice was the abuse of power, and (more important) the slavish willingness of people to submit to it. [LA Weekly, via Arts and Letters Daily] 11:10:20 PM TMTOWTDI
I love Perl. Here's one solution to an interview question I was just asked to solve: Create a subroutine, in the language of your choice, that "compresses" the string "aaaabcccdd" to "4ab3c2d". The goal is an abstraction that could take any input of ascii characters. So I wrote: $string_to_be_converted =~ s/((.)\2+)/length($1) . $2/egs; :-)
Then I wrote the (relatively) long, drawn-out algorithm of checking each character against the previous one while walking through the string. But the one-liner still makes me grin. 2:26:21 PM
|
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||