Geek Love

At PerlMonks today:

#!/usr/bin/perl -w
use strict;

     my$f=           $[;my
   $ch=0;sub       l{length}
 sub r{join"",   reverse split
("",$_[$[])}sub ss{substr($_[0]
,$_[1],$_[2])}sub be{$_=$_[0];p
 (ss($_,$f,1));$f+=l()/2;$f%=l 
  ();$f++if$ch%2;$ch++}my$q=r
   ("\ntfgpfdfal,thg?bngbj".    
    "naxfcixz");$_=$q; $q=~
      tr/f[a-z]/ [l-za-k] 
        /;my@ever=1..&l
          ;my$mine=$q
            ;sub p{
             print
              @_;
               }
                         
       be $mine for @ever
Yes, that’s working Perl code. No, not all Perl code looks like that. The heart shape is totally optional. It produces the output:

kristen, will you marry me?

The poster’s intended said yes. Awww…

# posted by Zed on August 20 2004 18:12. Comments (0)
TrackBack (0)
Comment spam

After a week of almost no blogging, I’ve had a day chock full of maintaining the blog.

MMG’s host’s sysadmin had updated some Perl modules, and my instance of MT Blacklist broke (I found the fix on this Taiwanese/English blog). And though my automated comment spam had trickled to a minimum after taking steps previously mentioned, those measures have since failed, and I was getting deluged.

So I’ve taken further measures to stay a few steps ahead of the spammers.

While doing so, I thought of a complicated scheme. Require users to preview their comment before they can post it. When they hit preview and the server sends the posting form, it slips in a hidden field encrypted by a PGP public key that contains a coded version of the time, a unique identifier (which the blog software stores together on the server side.) Users are warned that they only have, say, 15 minutes to post their comment after hitting preview (but, of course, they can request another preview, get another unique identifier, and start the clock running again.)

Upon submitting the form, the server decrypts the unique identifier and timestamp, looks up the identifier. If it doesn’t exist, or it was issued more than the given amount of time ago, the comment is rejected.

This means that spammers couldn’t just forge their own forms and submit them to your server (as they easily can today with default Movable Type installations). They’d have to request and parse your preview form first.

Unfortunately, this scheme would work only until a spammer felt like building a robot to automate doing just that, which wouldn’t be any great trick. And it’d cut through all the cleverness with the encrypted timestamp just as easily as it could a dumb hidden magic word field. The only advantage would be their limited time window to spam… which wouldn’t be an advantage once the spammer has compensated for it.

It’s another club solution. It would offer only relative security — it could make it less attractive for them to hit some particular blog in the short run, but once a large plurality of blogs had it, they would all become equally attractive again.

What we really need are omnipotent alien overlords who hate spam. That’d pretty much solve it.

# posted by Zed on August 18 2004 22:30. Comments (3)
TrackBack (0)
When Bookaholics Go Bad: a Locked Room Mystery

The Strange Case of the Latin Lover:

A mystery writer could not have plotted it better: an ancient convent perched atop a 2,500ft peak in eastern France, a locked library containing a priceless collection of early printed books and illuminated manuscripts, a secret passage - and a series of spectacular and inexplicable thefts.

The 8th-century convent of Mont Sainte-Odile towers over the picturesque small town of Saverne in the foothills of the Vosges mountains. One of the most popular attractions in Alsace, tens of thousands of people a year tour its abbey, church, chapel and cloisters, dine in its hotel and restaurants and admire the stunning view across the plain to the river Rhine and, beyond, the Black Forest.

Among them, from August 2000, was a curiously well-informed thief. From that date, a succession of immensely valuable works, including precious early religious texts and several dozen heavy 15th-century illuminated manuscripts bound in wood and leather, began disappearing from the abbey’s first-floor library.

(I’ll link to pretty much any news story with a secret passage in it.)

# posted by Zed on August 16 2004 03:09. Comments (0)
TrackBack (0)
Zed and Pocahontas at home

P: Were you up till the middle of the night?

Z: Yes.

P: What were you doing?

Z: Looking up the algorithm to find the longest common substring.

(pause)

P: Whatever. I’ll just assume you were looking at Internet porn.

# posted by Zed on August 14 2004 01:53. Comments (0)
TrackBack (0)
Life

Boy, sometimes you just blink and it seems like days have gone by since you updated your weblog.

I’ve got a contracting gig. It’s keeping me busy.

Regularly scheduled weblogging will resume later…

# posted by Zed on August 11 2004 22:44. Comments (0)
TrackBack (0)
One state, Two State, Red State, Blue State

I’m about ready to make Electoral Vote Predictor 2004 my home page.

You, too, can compulsively refresh it to see the latest poll results by state translated into an overall prediction.

At the moment, Kerry leads 307 to 231. But 104 votes are from states whose majorities only ‘barely’ favors one candidate, while the majorities of 115 more ‘weakly’ favor one candidate. 270 votes takes it.

So it could go any which way.

Assuming, y’know, no one cheats.

# posted by Zed on August 7 2004 23:22. Comments (4)
TrackBack (0)
Re-phi

A while ago, I asked:

Much has been written about the golden ratio in art and architecture and music.

Has anyone sought it in fiction?

Well,

Howard Suber, a film historian and prof at UCLA has posited that the Golden Section is used for a great deal of storytelling, particularly in screenwriting. There is a point, which any screenwriting how to book will mention, 2 thirds of the way thru the script, where the action takes a twist: the protaganist who previously "reacted" will begin to "act". Suber calls this the one hour pivot point as it usually falls 60 minutes into a 90 minute movie (ie, at the golden section).

Suber mentions this on what I believe is the greatest film commentary ever recorded: Criterion’s laserdisc for The Graduate. Though out of print, occasionally copies can be found on ebay. I highly recommend it. I learned more about storytelling and filmmaking from Suber’s 105 minute commentary than I did in four years of film school.

# posted by Zed on August 7 2004 22:44. Comments (0)
TrackBack (0)
Franco-American unity

Bart Simpson:

If you don’t like your job, you don’t strike. You just go in every day and do it really half-assed. That’s the American way.

The French way too, it seems.

Corinne Maier’s tongue-in-cheek book Bonjour Paresse, or Hello Laziness, has earned her a disciplinary hearing. Hello Laziness or “the art of doing the least work possible for your employer” was written as a comic antidote to all the “how to succeed” management books.

But sadly, Ms Maier’s bosses haven’t seen the funny side.[…]

It was Ms Maier’s advice to readers that probably stung the most: “You don’t have much to lose if you don’t do much at work,” she wrote, telling readers to choose the most useless sort of job - become a consultant, an expert or an adviser.

# posted by Zed on August 7 2004 19:52. Comments (2)
TrackBack (0)
Tonight we're gonna party like it's 1954

A Popular Science writer spends ten days without technologies more recent than 50 years old.

When friends heard about my foray into the simple life, they were evenly split as to whether the lack of e-mail or cellphone would break me first. Both camps were wrong: It’s the bad coffee that’s killing me. “In 1954, most home coffee drinkers in the U.S. used electric percolators,” explains Gregory Dicum, author with Nina Luttinger of The Coffee Book: Anatomy of an Industry from Crop to the Last Drop, when I called him for input. “And make sure you brew it weakly,” he instructs. “You should be able to see your spoon all the way to the bottom of a ’50s-style coffee cup.”

Chock full of fun info like how Prohibition killed rye and how Jack Kerouac wrote On the Road.

(Via Boing Boing)

# posted by Zed on August 6 2004 07:37. Comments (5)
TrackBack (1)
Bike National Convention

=v= I haven’t been blogging much; I’ve been busy with activism. Seems I moved to New York City just in time to get involved with groups who all have something to say about the impending Republican National Convention.

I and my fellow eco-bike activists are mostly working on a Bike National Convention, showing our vision of a positive alternative to what the warmongering oilgarchs are going to be hyping one week later. The event I look most forward to is with a group called Greene Dragon, a Paul Revere’s Ride to Lexington (Ave.) to warn people that The Republicans Are Coming.

Everyone, come to New York City and bring your bike — or rent one from our community bikes program. We’ve also got bike blocs and other events going on during the RNC.

Oh, and if you’re already in these parts, tomorrow is the 10th Anniversary of the Central Park Moonlight Ride, and next week is the second Brooklyn Critical Mass ride. (Lotsa URLs there, huh? I told you I’ve been busy!)

# posted by Jym on August 5 2004 09:11. Comments (2)
TrackBack (0)
Trudeau speaks

There’s a Garry Trudeau interview in Rolling Stone.

Turns out he’s boyhood friends with Howard Dean, and knew Bush at Yale.

We [Bush and Trudeau] both served on the Armour Council, which was the social committee for our residential college. Nobody in my freshman dorm knew what the council was. But I apparently had shown some leadership qualities in the first three or four days of school, so I was elected unanimously. George Bush was chairman. Our duties consisted of ordering beer kegs and choosing from among the most popular bands to be at our mixers. He certainly knew his stuff — he was on top of it [laughs].

Even then he had clearly awesome social skills. Legend has it that he knew the names of all forty-five of his fellow pledges when he rushed Deke. He later became rush chairman of Deke — I do believe he has the soul of a rush chairman. He has that ability to connect with people. Not in the empathetic way that Clinton was so good at, but in the way of making people feel comfortable.

He could also make you feel extremely uncomfortable. He was very good at all the tools for survival that people developed in prep school — sarcasm, and the giving of nicknames. He was extremely skilled at controlling people and outcomes in that way. Little bits of perfectly placed humiliation.

# posted by Zed on August 4 2004 01:05. Comments (0)
TrackBack (0)
Movie reviews

Mick LaSalle on Showgirls:

A camp classic can only be made accidentally. If you try to make camp, you just end up with something smirky and self-protective. Nine years after its release, “Showgirls” is a camp masterpiece, a movie worth watching over and over again because it features not only one of the worst lead performances in film history, but one of the most astonishingly misguided. Elizabeth Berkley thought she was playing a sexy woman (nope), a good dancer (nope), a sympathetic character (nope), a determined artist (ha!) and an interesting, complex woman (uh, no). At the time, I considered “Showgirls” one of the worst films of 1995, but I don’t think I’ve watched any other 1995 release more than this one. Age cannot wither it, nor custom stale its amazing awfulness. It’s 131 minutes of jaw-droppingly tasteless, crazily written, badly acted, mind-bogglingly strange scenes, and as such it is never, ever dull.

Roger Ebert on The Village:

Eventually the secret […] is revealed. To call it an anticlimax would be an insult not only to climaxes but to prefixes. It’s a crummy secret, about one step up the ladder of narrative originality from It Was All a Dream. It’s so witless, in fact, that when we do discover the secret, we want to rewind the film so we don’t know the secret anymore. And then keep on rewinding, and rewinding, until we’re back at the beginning, and can get up from our seats and walk backward out of the theater and go down the up escalator and watch the money spring from the cash register into our pockets.

(Ebert link via Defective Yeti)

# posted by Zed on August 3 2004 19:59. Comments (0)
TrackBack (0)
When etymology goes bad

From the A Word a Day mailing list:

Our seven-year-old daughter Ananya has developed an interest in etymology. Often she’ll interrupt her play in the backyard and peek in my downstairs study to ask about whatever word comes to her mind. Some time back she barged in with, “So how did the word dog came about?” I explained to her that the word dog came from Middle English dogge which came from Old English docga. Satisfied, she went back to her play.

I had completely forgotten about it when a few days later I overheard her
talking to her grandmother on the phone, “Amma, we got a dogga.” I was
puzzled and later asked why she said dogga instead of dog. She patiently
explained, “You know, Amma is old. That’s why I used Old English with her.”

# posted by Zed on August 2 2004 12:36. Comments (0)
TrackBack (0)
Wagging the dog

From the New Republic Online, Pakistan has been pressured to time their arrests of al Qaeda members for Bush’s political convenience (their website doesn’t make it clear, but the article was up at least as long ago as July 7.)

The Pakistanis “have been told at every level that apprehension or killing of HVTs [high value targets] before [the] election is [an] absolute must.” What’s more, this source claims that Bush administration officials have told their Pakistani counterparts they have a date in mind for announcing this achievement: “The last ten days of July deadline has been given repeatedly by visitors to Islamabad and during [ul-Haq’s] meetings in Washington.” Says McCormack: “I’m aware of no such comment.” But according to this ISI official, a White House aide told ul-Haq last spring that “it would be best if the arrest or killing of [any] HVT were announced on twenty-six, twenty-seven, or twenty-eight July”—the first three days of the Democratic National Convention in Boston.

Well, Ahmed Khalfan Ghailani was arrested over the weekend, and it was announced the day of Kerry’s speech at the DNC.

What a coincidence.

# posted by Zed on July 30 2004 12:09. Comments (0)
TrackBack (0)
Some Alan Moore, some of the time

Yeah, another Alan Moore interview.

No, I really don’t care about the movies [based on his work.] Less and less as time goes on in fact. My position six months ago was that I didn’t want to see them or have anything to do with the Hollywood process and that was probably when I was at my warmest towards Hollywood. I’m afraid there has been some downturn since then, now I’ve said that I don’t want any of my works filmed again. Those works, which I don’t have any control over, such as this new Constantine that’s coming out, I want my name taken off them and any money that would have gone to me should be distributed amongst the artists. I just don’t want any connection between me and the movie industry at all. I think that it’s a joke quite frankly and it’s not a very intelligent joke. It seems to be a joke for children. Any kind of involvement with Hollywood is a waste of my time and there is no amount of money that can compensate for that. I think the industry is an embarrassment on all sorts of levels but sure there are bad comics, bad books and bad culture so it’s not just films that produce an overwhelming majority of unwatchable rubbish but films that are unwatchable rubbish cost $100 million. That is the budget of an emerging third world nation, which is the point where it goes from being merely tasteless to being kind of evil. If it’s worth reacting towards something then it’s worth overreacting. Don’t expect me to be championing League of Extraordinary Gentlemen 3: The Empire Strikes Back or whatever.

# posted by Zed on July 28 2004 12:31. Comments (3)
TrackBack (0)
Amplifier

Danny went home and killed himself last night
She’d taken everything
She’d taken everything
She took his car
She took his bike
She took everything
She thought he liked
And what she couldn’t take, she found a way to break
But she left his amplifier

From “Amplifier” by the db’s

Danny might be with us today if he’d only had They Took Everything.

Every breakup, besides the emotional issues, has material issues as well. Unfortunately you and your partner aren’t the only thing that is “split up” when you go your separate ways. All of your stuff is too, and not always equally. When you are getting married you register for things then sit back and wait for the blenders and toasters. However, when you split up, then you really need those things, and there is no easy way to get help. Of course, all your friends feel bad for you, most of them even say “Do you need anything”? or “Please let me know if I can help”.

NOW THEY CAN!!

# posted by Zed on July 27 2004 21:30. Comments (0)
TrackBack (0)
Compare and Contrast

First amendment zone:

First amendment:

Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.

# posted by Zed on July 26 2004 20:06. Comments (0)
TrackBack (0)
Wish Fulfillment

Who wants to kill the president?

Recent widespread feelings of anxiety, frustration, and helplessness seem to have caused a curious blip on the cultural radar: Assassination has become the taboo du jour. Stephen Sondheim’s Assassins may be closing, but next month, I’m Gonna Kill the President!, a satirical play by the pseudonymous Hieronymous Bang, reopens at a top-secret downtown location. (We could tell you where it is—but then we’d have to kill you.) Jonathan Demme has remade The Manchurian Candidate with Liev Schreiber, Meryl Streep, and Denzel Washington, and Niels Mueller’s drama The Assassination of Richard Nixon, starring Sean Penn, is based on the true story of a salesman who attempts to murder the president. And although the novel won’t be released until August 24 (the eve of the Republican convention), Nicholson Baker’s Checkpoint has already caused a stir: One character ruminates at great length on his desire to assassinate George W. Bush.

(Via Follow Me Here)

# posted by Zed on July 26 2004 09:12. Comments (0)
TrackBack (0)
Keepin' it extra real

Apparently, if you scratch the surface of a black conservative organization, you find a lot of rich white backers.

“Black Conservative to Rebut NAACP Leader’s Remarks in C-SPAN Interview,” read the press release from Project 21, an organization of conservative African-Americans.

I had read in Reuters that Kweisi Mfume, president of the NAACP, had called groups like Project 21 “make-believe black organizations,” and a “collection of black hustlers” who have adopted a conservative agenda in return for “a few bucks a head.”

So I tuned into C-SPAN with interest to hear what a leading voice in the black conservative movement had to say. But then a funny thing happened: the African-American spokesperson for Project 21 caught a flat on the way to the studio, and the group’s director had to fill in. And he was white.

As the segment began there was an awkward Wizard of Oz moment as C-SPAN’s Robb Harlston – himself black – turned to Project 21’s Caucasian director, David Almasi, and said, “Um…Project 21… a program for conservative African Americans…you’re not African American.”

It was a remarkable moment. A flat tire had led to a nationally-televised peek into what lies behind a murky network of interconnected black conservative organizations that seek ostensibly to bring more African-Americans into the conservative movement. But they’re not just reaching out to the community. They also speak out publicly for conservative positions that might evoke charges of racism if advocated by whites. And while that’s not to say that there aren’t some blacks who embrace conservative values, the groups that claim to represent them are heavily financed by business interests and often run by white Republicans.

Bush talks to the National Urban League:

Do you remember a guy named Charlie Gaines? Somebody gave me a quote he said, which I think kind of describes the environment we’re in today. I think he’s a friend of Jesse’s. He said, “Blacks are gagging on the donkey but not yet ready to swallow the elephant.”

# posted by Zed on July 25 2004 18:23. Comments (0)
TrackBack (0)
Bush v2.0

Speculations on a second Bush term:

Musings about a second Bush term typically assume another four years of the same right-wing policies we’ve had to date. But it’d likely be far worse. So far, the Bush administration has had to govern with the expectation of facing American voters again in 2004. But suppose George W. Bush wins a second term. The constraint of a re-election contest will be gone. Knowing that voters can no longer turn them out, and that this will be their last shot at remaking America, the radical conservatives will be unleashed.

A friend who specializes in foreign policy and hobnobs with subcabinet officials in the Defense and State departments told me that the only thing that’s stopped the Bushies from storming into Iran and North Korea is the upcoming election. If Bush is re-elected, “[Dick] Cheney and [Donald] Rumsfeld are out of the box,” he said. “They’ll take Bush’s re-election as a mandate to wage the ‘war on terror’ everywhere and anywhere.” […]

Domestic policy will swing further right. A re-election would strengthen the White House’s hand on issues that even many congressional Republicans have a hard time accepting, such as the assault on civil liberties. Bush will seek to push “Patriot II” through Congress, giving the Justice Department and the FBI powers to inspect mail, eavesdrop on phone conversations and e-mail, and examine personal medical records, insurance claims, and bank accounts.

Right-wing evangelicals will solidify their control over the departments of Justice, Education, and Health and Human Services — curtailing abortions, putting federal funds into the hands of private religious groups, pushing prayer in the public schools, and promoting creationism.

Economic policy, meanwhile, will be tilted even more brazenly toward the rich. Republican strategist Grover Norquist smugly predicts larger tax benefits for high earners in a second Bush administration. The goal will be to eliminate all taxes on capital gains, dividends, and other forms of unearned income and move toward a “flat tax.” The plan will be for deficits to continue to balloon until Wall Street demands large spending cuts as a condition for holding down long-term interest rates. Homeowners, facing potential losses on their major nest eggs as mortgage rates move upward, might be persuaded to join the chorus.

# posted by Zed on July 25 2004 18:15. Comments (1)
TrackBack (0)
Geekiest joke ever

Read this if you fail to make your saving throw.

A fifth-level paladin drives his car to the repair shop…

# posted by Zed on July 24 2004 23:35. Comments (1)
TrackBack (0)
Chairman Bruce wins again

Life imitates a Sterling story, part #77832:

Gulab Devi, 45, of Harmara village in Rajasthan’s Ajmer district comes across as the quintessential rural woman from Rajasthan. Dressed in the traditional ghagra-choli (long skirt and blouse), Gulab is the sole bread-earner for her four children and her ailing husband who hasn’t had a job in the 24 years of their marriage.

Gulab is completely illiterate. Ask her what she does for a living, and she’ll tell you she makes electronic circuits and chargers for solar lighting panels. And before you start wondering whether you heard wrong, she’ll tell you that she also installs and maintains handpumps, water tanks and pipelines. Not only is she running her household comfortably with her salary from this work, she is also one of the most respected members of her community.

(Via Rebecca’s Pocket)

# posted by Zed on July 24 2004 12:42. Comments (0)
TrackBack (0)
Motherhood

Well, this throws a monkey-wrench into a lot of the “We need more education!” “No! We need no education!” rhetoric about teen pregnancies.

Susan L. Davies, of the University of Alabama at Birmingham led a team that questioned 455 low-income, African-American adolescent girls in Birmingham between 1996 and 1999. They found that nearly one-quarter — 23.6 percent — expressed some desire to become pregnant in the near future. […]

The most striking data revealed that adolescent girls with at least some desire to be pregnant were 3.5 times more likely to have a boyfriend or partner at least five years older, were more than twice as likely to have had sex with a casual partner in the six months prior to the survey and also more than twice as likely to have used condoms inconsistently in the prior month.

# posted by Zed on July 24 2004 12:34. Comments (0)
TrackBack (0)

About Zed
About Jym
Email Zed

MMG! Archives
Search MMG!


Advanced Search

Blogroll Me! Subscribe with Bloglines

Blogtree Pedigree
blo.gs relatives
Eatonweb profile

RSS 1.0 | Atom | RSS 2.0
Elsewhere
Rings
< # oddbloggers + >
Hosted by
Apricot Systematic
Powered by
Movable Type 2.661
Free Range Memes

Tech Books for Free

Perhaps I should have shot at him before now. But I was busy narrating. via

Spells and Potions of Quendor

Lemmings… in DHTML! via

Cinematic Supervillain Showdown

Respect Traditional Marriage! One Robot. One Octopus.

British to American lexicon via

“Our enemies are innovative and resourceful, and so are we. They never stop thinking about new ways to harm our country and our people, and neither do we.” via

If I’m so super, why did Daddy leave?

Daily reason to dispatch Bush

He still has his job. Do you have yours?

Hey, man… Great! I feel goofy, the way my old man looks when he’s drunk! via

There is such a thing as a pay-what-you-will lunch via

How do you make a blonde act stupid? via

Dammit, Jim, I’m the President, not a…

It’s not an orgy, but it is socially vigorous via

If I were going to have a press conference celebrating the joys of heterosexuality, that’s exactly what I’d wear

Home Plate is impossible!

Insofar as I may be heard by anything, which may or may not care what I say…

A farewell to the Corps

The Voyage of Terry Waite’s Clogs

Gustave Dore in stick figures

Your snake style is no match for my spider style!

Last 5 Comments

Zed on Comment spam

Jimcat on Comment spam

on Extraterrestrial life considered even more likely

Scanner on Comment spam

Zed on Basque scholar discourages innovation