July 29th, 2004

Museum Hijinks

Today was the second time I have been to the Westward Expansion Museum in St. Louis, MO, under the giant Gateway Arch. Today was the first time a female museum employee has approached me and asked “Would you like to pet some beaver fur? It’s very soft.”

Hmm.

No thanks. The mental image just implanted will quite sufficiently haunt me for the rest of the day, Miss.

Posted by Mark | July 29th, 2004 @ 2:57 PM | "Personal" :: " Humor"
PermalinkPermalink | Add a commentAdd a comment


  • Get a free iPod! Click here to get your free 20GB gen 4 iPod, Mini iPod, or $250 iTunes gift certificate!

July 27th, 2004

Safety over Freedom

I f***ing told you.

Think the Patriot Act is only used to prosecute terrorists? Wake up, you blind, stupid fool.

Patriot Act used to prosecute for copyright infringement

Posted by Mark | July 27th, 2004 @ 1:49 PM | "Political Commentary" :: " Rants"
PermalinkPermalink | 1 comment1 comment

Static, Dymanic, Fast!

Matt has released version 2.5 of his Staticize Reloaded. Not only has he coined a word, he’s made WordPress a heck of a lot faster!

Here’s how it works. After uploading and activating the plugin, all first-time views of a specific page on your blog will have their output cached to a file. Subsequent views will get the cached version, saving precious clock cycles on your server (which could serve static pages with its eyes closed). Whenever anything on the blog changes (post an entry, delete an entry, edit an entry, post a comment, approve a comment, delete a comment, etc), the cache is flushed, so people never see outdated versions. It caches a different version for each unique cookie-posessing visitor who visits each page. Thus, if I visit a page, I’ll get a static version that says “Welcome back, Mark!” down where the comment cookie remembers my info. The version you see will be the version based on your cookie, and thus you get a static version that says “Welcome back, YourName!”

The plugin also has support for content that should always be dynamic. If you have a script that rotates images or shows a link to a random entry, you can do this in your template to ensure that that portion will always be dynamic:

<!--mfunc function_name('parameter', 'another_parameter') -->
<?php function_name('parameter', 'another_parameter') ?>
<!--/mfunc-->

This way, you can turn the plugin on or off, and you get the same functionality. Similarly, you can do dynamic includes like so:

<!--mclude file.php-->
<?php include('file.php'); ?>
<!--/mclude-->

Matt notes that you should turn the plugin off before modifying your templates. In addition to this advice, I would recommend that you manually flush the cache as well, so everyone gets to see your tweaks. You can do this by either editing an entry and saving it (no need to make changes), or by visiting any page on your blog and adding ?staticize-flush=TRUE to the end of the URI, which will do a manual flush of your cache. After activating the plugin, expore all facets of your site, especially those that used external PHP includes or custom form submission, to ensure that they work. Then, make changes if necessary, by using the mfunc and mclude comment syntax explained above.

The performance boost given by this plugin is very impressive. I see no reason for the majority of WP blogs not to use it. One day, you might get Slashdotted and your server will thank you for being prepared.

WordPress 1.2 users: when static pages are served, there is a comment at the bottom of the source with the time it took to serve the static version. In WordPress 1.2, this is broken, and shows some huge number. In order to fix this, take out this line in wp-blog-header.php:

if ($pagenow != 'post.php') { timer_start(); }

And add this line, in wp-settings.php, right after require (ABSPATH . WPINC . '/functions.php');:

timer_start();
Posted by Mark | July 27th, 2004 @ 3:25 AM | "Site Announcements" :: " WordPress"
PermalinkPermalink | Add a commentAdd a comment

July 24th, 2004

Freak Show

My family had our yearly (or so) photography session this morning. As we sat in Perkins afterwards, eating breakfast in our Sunday best, enduring quizical looks and whispered remarks from the proletariat diners, the conversation somehow wandered to the topic of my brother, Stephen, and his new penchant for theater (or “theatre,” likely). Lately he has been chiding my father for not being more in touch with his “feminine side.” As my mother chuckled about his concern, inspiration struck me as to how best describe the situation.

“Pfft… dad’s feminine side has a beard.”

Posted by Mark | July 24th, 2004 @ 12:47 PM | "Politics" :: " Humor"
PermalinkPermalink | Add a commentAdd a comment

July 22nd, 2004

WordPress: Conversational Categories

A friend asked if there was a way for WordPress to display the categories under which an entry is filed in the following way:

Single category: Category1
Two categories: Category1 and Category 2
Three categories: Category1, Category2 and Category3
Four categories: Category 1, Category 2, Category 3 and Category 4

And so forth.

The existing the_category() function has no way of telling how many categories there are, and so can’t do something fancy like inserting the word “and” between the penultimate (second-to-last) and ultimate categories. So I just made a plugin with a new function called the_nice_category().

Download
WordPress Nice Categories Plugin

Posted by Mark | July 22nd, 2004 @ 4:39 AM | "Programming" :: " WordPress"
PermalinkPermalink | 21 comments21 comments

Classes for the Esmays

Dean and Rosemary Esmay have a habit of taking jabs at each other on their blogs.

Rosemary:

Classes for Men at The Learning Center for Adults

  • Class 1: How to Fill Up the Ice Cube Trays. Step by Step,
    with Slide Presentation.
  • Class 2: The Toilet Paper Roll. Does it Change Itself?
  • Class 3: Is It Possible to Urinate Using the Technique of
    Lifting the Seat and Avoiding the Floor/Walls and Nearby
    Bathtub? Group Practice.

Dean (in response):

  • Class 4: Summarizing Conversations. How to relate an entire conversation you just had with your sister, mother, or best friend in 25 words or less. 10 week intensive training course, meeting 3 nights a week. Advanced students only.
  • Class 5: God’s Intended Purpose For The Remote Control. Runs most week nights from 7-10, call ahead.
  • Class 6: PMS Only Comes Once Per Month. No other excuses. Meets every Tuesday night. Don’t come if it’s Cranky Tuesday for you.

In this spirit, I’d like to point out the other classes offered at The Adult Learning Center. The series is entitled “Classes for the Esmays.”

Posted by Mark | July 22nd, 2004 @ 2:43 AM | "Weblogs" :: " Humor" :: " Shoutouts"
PermalinkPermalink | Add a commentAdd a comment

July 20th, 2004

9/11 Commission

The 9/11 Commission, which is set to deliver its 500+ page report on Thursday, is not going to say that the terrorist attacks of September 11th, 2001 were preventable.

Via MyWay.com:

In the end, the panel’s five Democrats and five Republicans did not want to draw a conclusion on that major point, believing it could open the way to partisan sniping in a presidential election year.

“My personal view is that the intelligence system we have has been broken for a long time,” said Republican commissioner John Lehman, a former Navy secretary. “But we wanted to let the American people make up their mind. They don’t need our editorializing.”

This is possibly the most levelheaded thing to come out of the commission yet.

I believe that given the state of our intelligence at that time, stopping the attacks would have been in incredible stroke of luck. I’m not even sure that had Clinton gotten Osama bin Laden when he had the chance, the attacks wouldn’t have happened. So here’s to solutions, instead of finger-pointing.

Posted by Mark | July 20th, 2004 @ 5:26 PM | "Political Commentary" :: " News"
PermalinkPermalink | Add a commentAdd a comment

Arnold to Pump “Dems” Up

California Governor Arnold Schwartzenegger, about Democrats:

“If they don’t have the guts to come up here in front of you and say, ‘I don’t want to represent you, I want to represent those special interests, the unions, the trial lawyers, and I want them to make the millions of dollars - if they don’t have the guts, I call them girlie men,”

Art imitates life, and then life imitates art. Arnold is quoting a parody of himself, a Saturday Night Live skit called “Hanz and Franz.” (“Vee are here to puhmp YOU up. Jah… cause vee are not GIRLIE MEN.”)

Hanz and Franz with Arnold

These are NOT girlie men

(via QOAE)

Posted by Mark | July 20th, 2004 @ 5:10 PM | "Politics" :: " Humor"
PermalinkPermalink | Add a commentAdd a comment