Picture spam_sandwich.jpg
UPDATED: 12/09/2004 15:46 JST From now on, please check the central Spam Karma page to get the latest updates and news on this plugin.

Yet another techy update for my fellow bloggers using WordPress.

Now that it’s reached version 1.4 and that most (all?) major bugs have been ironed out, I feel it’s time to introduce the latest member in the ever-expanding WordPress plugin family

Spam Karma is a mean critter that truly enjoys killing

In fact it is so mean that we had to keep it in a special military-grade containment unit on this server.

Genetically engineered in the dark recess of our Secret Spam Research Labs and trained through months of reflex conditioning and shock therapy, this thing, once unleashed on your comments, will only let go of its death grip after the last spam has been shredded to pieces.

We haven’t fed it for a week now, and it could smell spam miles away in its sleep.

But while a fierce and merciless spam killer, this plugin is also a perfect companion for your kids and friend’s comments. Only the unmistakable foul stench of spam will trigger its ire… while questionable, yet potentially legit, comments will always be given a chance to clear themselves before being irremediably disposed of.

If you are using WP Plugin Mgr, install is as easy as a click on the “Check Updates” button and a click on the “One-Click Install”… Yep, that’s all.
For those still stuck in the last century, a manual install archive is available here. Please, please, RTFM: it’s short, sweet and contains essential details.

Once installed, make sure you check at least once the Option screen (in wp-admin, click on Options >> Spam Karma).

I strongly recommend you check for updates (if you are using WPPM it will do it automatically for you) at least once a week so as to make sure you benefit from the latest bug fixes I might make.

Spam Karma v. 1.4 is now compatible with WordPress 1.2: however due to the lack of certain functions in WP 1.2 Plugin API, some of the features are missing (Option Page integration etc). It is fully enabled for use with any fairly recent release of WP alpha 1.3.

Last Update: The WordPress Plugin manager is no longer available for download and support has been discontinued. More info here.
10/20/04 Update: Check out the new version

If you are a WordPress user, go check out the shiny new WordPress Plugin Database!

If you have written plugins for WordPress, go add them already!

If you do not use WordPress, then, well… you should.

But I’ll still talk to you if you don’t…

Will I come out as an insensitive cold-hearted bastard if I publicly lament here the fact that all things interesting and exciting only happen in Japan when I’m not there, stuck six thousands miles away, in a city where major earthquakes, flood and other cool natural disasters are about as likely as a shred of human soul mistakenly finding its way into Dick Cheney’s corpse…

On that count, Paris is quite boring.

I am told the floods of yore, when the as-of-then-undomesticated Seine river expanded its bank to all surrounding neighbourhoods, were a vision of surrealistic awe. What with the people, bank clerks and congressmen alike, having to swim their way back from work, French baguette in one hand, cigarette in the other and beret on top.

OK, perhaps the congressmen didn’t have to go freestyle swimming, but surely there couldn’t be enough boats for everybody…

So, this time of the year is approaching again (well, round two of “this time of the year”) and I am trying my best to find interest in endless strings of exciting problems involving decks of cards being shuffled and drawn randomly (that’s the warm up part, nearly fun in comparison to the rest), Gaussian distributions and Kolmogorov-Smirnov tests (that’s the part where you wish every Russian great minds had focused solely on refining vodka filtering processes instead of coming up with barbaric statistical formula)…

All these coins tossed a million times, checkmate combinations, statistics and game theory stuff reminded me of something I used to read with much more passion (back when I could still summon some sort of enthusiasm for math-related stuff): MIT AI Lab Memo 239 aka HAKMEM.

The HAKMEM is a compilation of tips, tricks and riddles for the math and computer geek.

Some of them are very outmoded (unless PDP-10 programming is your thing), but most are still entirely relevant (notably a handful of small theorems and empirical results, some of which still haven’t been proven to this day, afaik). There is also a lot of small numerical tricks, à la TAOCP that can be really useful in [near-]everyday software development.

Anyway if geeky math is your thing and you feel bored, then you should probably check it out. And if that sounds like rather uninteresting stuff, let me assure you that what I’m reading right now is a thousand times worse.

This, also to announce that post frequency on this blog is going to be lowered dramatically over the next 15 days (by a forecasted 58% ±6.3%, with a posting average standard deviation of 0.276), due to intensive last-minute efforts to reverse the adverse effects of a life of mind-altering substance abuse and cram two years of university Math & Physics program in whatever’s left of my brain.

After that, expect to see a lot of pretty pictures of European cities including many depictions of yours truly in miscellaneous advanced states of drunkenness, celebrating either his miraculous success in this venture or, quite possibly, his utter failure and ensuing humiliation at the hands of a hord of vicious French university scholars.

One day, YOU shall be mine!

And I must say if I didn’t already hate Apple for all the sucky hardware they’ve managed to sell me over the past year or so, the fact they use Logic’s position as compulsory industry standard to shove their ludicrous price down your throat (without any upgrade discount)… that would do it…

And don’t give me any of that “Logic Express” Lite version crap: I have seen Amiga software that could do more in 94.

Anyway, don’t have much of a choice: Logic Platinum 5.2 isn’t gonna cut it any longer and I can’t afford to go to SF each time I need access to decent compression filters or studio mastering tools.

On a totally unconnected though music-related note (note, haha…), a personal message to all my fellow sound tweakers out there:

Stop using out-of-the-box speech synthesis software in your fucking tracks!

It might have sounded retro-futuristic cute or witty post-modern electroclash a few years ago. Now, it just reeks of unimaginative track filler. At best, it sounds pretentious and gratuitous, at worst it only emphasizes the fact you were basically too broke or too lazy to get decent vocals on your track but still wanted to divert attention from its overal emptiness. Fuck, it’s not like broke and aspiring singers are hard to come by. They only come second behind broke and aspiring DJs in sheer number (though thankfully the latter are slowly disappearing, probably finally dying of starvation or something). And if you are too lazy to get out of your basement to grab the first person with a semi-decent voice, then just record yourself: who cares if you sound like a shrieking asthmatic dachshund. hell, that’s what vocoders are for. Look at Mr. Bangalter and the Daft Punk boys: couldn’t sing a C sharp to save their life, didn’t stop them from hitting it big all over the world with their hour-long tribute to band-filtered candy pop.

In short, unless you are Thom Yorke and it’s 1997, just leave that speech synthesis function the fuck alone. Thanks.

By the way, to all the Apple zealots out there: I was kidding when I said I hate Apple. Of course I don’t. I love Apple. Rhhaa, oh yea, hurt me harder, mistress

Finally got around to writing some kind of doc for my mail posting script for WordPress. And I can therefore finally release it for the world to use and enjoy.

Please welcome a new member in the WP plugin & hack family: wp-keitaimail v. 1.0b!

Actually, it is not technically a plugin, nor a hack, rather a standalone script that interfaces with WP to let you post entries to your blog via Email.
The name ‘keitai’ simply means ‘cell phone’ in Japanese… This script might as well have been called wp-cellphone-mail, I just liked the sound of ‘keitai’.

You can see a working demo on the right-hand side of this blog where it powers the “keitai log”. I have been using it for nearly a month now and it should be really stable albeit a tad complicated to set up (see below).

Just installed the awesome language picker plugin for WordPress.

At long last, Dr Dave’s Logs is joining the truly multilingual blogging crowds !

Do not expect real full-on translations for any of my posts. I have neither the time nor the slightest motivation to post redundant content. However, I will probably post from time to time a full entry or an extended discussion in the language relevant to certain items of a particular country/culture, without fear of boring my beloved ignorant American English-speaking-only readership.

Japanese is a special case though: half for my own practice, half to spare my poor Japanese friends the pain and suffering of reading my already convoluted English through Babelfish, I’ll try as much as possible to post a small sum-up of every entries somewhat relevant to my life in Japan and/or my friends here. If you are a student of the Japanese language trying to improve your practice, I strongly sugest you stay the hell away from these, as they certainly won’t do you any good. I do not assume any responsibility for the permanent damage to your practice you might incur by exposing yourself to my crappy grammar and overall appalling level of written Japanese.

If you are really bored with yourself and have a better master of the language than me (basically: if you speak any Japanese), feel free to mock my errors and even possibly point them out to me. I yearn to learn.

Note: if you are reading this blog through RSS, you won’t be able to see alternate language content or links. You need to use the website version. I’ll work on fixing this later.

J’ai enfin installé le formidable plugin language picker pour WordPress.

Dr Dave’s Logs peut donc enfin rejoindre le camp des blogs véritablement multi-lingues !

Ne vous attendez pas à des traductions complètes du moindre de mes billets. Je n’en ai ni le temps, ni vraiment la motivation. Néanmoins, je posterai probablement de temps en temps des remarques ou des développements de discussion spécifiques à une langue/culture.

Le japonais est un cas à part: autant pour pratiquer que pour éviter à mes amis le douloureux passage par babelfish, je compte essayer de fournir un résumé succinct de tous les billets qui se rapportent à ma vie au Japon ou à mes amis ici. Je vous déconseille fortement de vous inspirer de ma grammaire ou d’un quelconque élément de mon style litéraire japonais (la seule utilisation du mot litéraire dans cette phrase devrait pousser plus d’un citoyen japonais au suicide).

En cadeau bonus spécial pour mes chers lecteurs francophones, voici un petit post que je viens de retrouver et qui date de l’époque plus ou moins lointaine ou j’étais tellement désoeuvré que je trollais même en Français sur Usenet… C’était vraiment très stupide, mais je le reposte pour la postérité… et aussi pour prouver que j’ignore jusqu’à la définition même du mot honte.

Cher Monsieur,

Conformement a votre commande, vous devriez recevoir prochainement votre Kit de Cat-Trap via FedEx.

Neanmoins, j’ai oublie d’inclure les instructions et c’est relativement
complexe, donc voici une retranscription fidele du mode d’emploi:

—-
Notisse d’emploi
—-
Bonjoure, tu vient de recevoir la kit de Cat-Trap Nvgrdå (TM)(R)
de Ikea, voicie les explicaziones pour construire et te servire de ton
Nvgrdå (TM)(R)

1) sort precautionamment du carton la partie A (voir shema 1) que tu
fixes a l’armateur B a l’aide des vis C et D que tu fixes dant les
emplassements E et E’. A l’aide de la manivelle F, rotationne plusieurs
fois l’axe G jusqu’a ce que la partie H soit tendue aux maxima. En
manipulationnant la vis H, inclinationner le partie A a drei-und-zwanzig
degres avec respect pour l’armature B. Replacer la manette H pour le
levier J.

shema 1)
                   ------------  <- A
                   X X X X X X  
                   /         \
             H -> X H X X X X X   <= B
                   \         /
                   X X X X X X
 

                   ----------- 
                   X X X X X X  
             J -> X J X X X X X  
                   X X X X X X

                   ___
                      `---\___
                   X X X X X X  
                  X J X X X X X  
                   X X X X X X

2) Sorter maintenans de l’emballage le Bazooka Vrbrø Krgki (TM)(R) en
prenant soin de ne pas titillationner la gachette K. Placer le Vrbrø
Krgki (TM)(R) sur le trepied L et regulant l’orientation vers
aproximativetivement funf-und-sechszig degree vers les cieux. Enfilez la
rocket M dans le tube N de votre Vrbrø Krgki (TM)(R) (au cas on
l’enfilationnement de la rocket M echouerait, vous trouverais dans le
carton une rocket M’ de rechange). Placez alors le trepied L comme
indique sur le shema et branchez le connector O dans les emplacements J
et P en respectant les couleurs indiquees sur le shema 2).
  N-> =p====        ___
      /\__ < -P        `---\___
      |-| \         X X X X X X  
 L => | |  \       X J X X X X X  
      |_|   \____/  X X X X X X

3) Prenez maintenant le chat et installez le a environ 25 pieds et
demi de l’armature et posez le sur un coussin suffisament douillet pour
qu’il ne bouge pas dans les 5 suivantes minutes.

4) Prenez alors position sur la partie B de votre Nvgrdå (TM(R),
prenez une grande perspiration et tirer un coup sec sur le manette J.

5) Si tout s’est bien deroule et que vous avez encore ce brochure
entre les mains, vous avez maintenant atteint votre vitesse de croisiere
de 163.5 mph et votre altitude est de 425 pieds. Vous aurez notice qu’il
n’y a pas de parachute fourni dans le kit, neanmoins, le minuteur que
vous venez de declencher sur le Bazooka Vrbrø Krgki (TM)(R) devrait vous
eviter la peine d’une douloureuse chute au sol en declenchant le
lancement de la rocket remotement controlee M d’ici quelques dixiemes de
seconds.

6) Le systeme visuel et auditif des chats est extremement develope et
tres sensitif a la moindre stimulation, essayez donc de faire de grands
mouvements coordonnees de vos membres inferieurs et superieurs tout en
poussant de hauts cris afin d’attirer l’attention de votre fidele
compagnon qui ne manquera pas d’assister a votre magnifique ascension
suivie d’un feu d’artifice qu’il n’est pas pret d’oublier.

7) Nous esperons de vous avoir completalement satifactionne avec votre
kit de Cat-Trap Nvgrdå (TM)(R) et esperons de vous rester fidele a notre
magazin…

これから日本語で書いて見る!間違えるとき教えてください。
Ich könnte jetzt auf Deutsch also schreiben. Ich werde aber es vermutlich nie machen.

In my ongoing quest to bring flawless multi-language (multi-encoding to be more accurate) support to WordPress, I just had a blindingly simple, yet highly efficient, idea for an improvement.

If your blog is accustomed to receiving trackbacks or comments containing non-standard characters (accents, kanjis etc.), then you have probably noticed that a fair share end up getting mangled in the process. WP is not really at fault here, since this is caused by some browsers’ failure to respect the encoding set in a page when sending form content (e.g. submitting a comment). No need to tell you which poor excuse for a browser so shamelessly ignore proper web standards. This is of little comfort anyway, since in the end, all that matters is that WordPress is getting toh-mah-toh when it is expecting toh-may-toh, and pretty much ends up displaying poh-tah-to to everybody else.

The fix, as I was saying is ridiculously easy. And to the best of my knowledge it won’t break anything in your current WP install. Worst that could happen is that it won’t fix your problem, but it won’t break your blog.

UPDATED 07/24/04 18:02 JST
Super Geeky entry on Blog migrations… you can safely skip if you do not have any idea what the names “WordPress” and “Movable Type” stand for. [I also added 100% WP stuff down there]

A temporary entry on the work in progress that is my move from Movable Type to WordPress.

I ported a bunch of scripts and plugins I was previously using with my MT installation. Also hacked happily through WP’s PHP sources…

Not completely done, but here are already a few usable hacks (I would not quite call them “plugins” given the amount of tweaking required to use them):

  1. mt2wp: Redirecting old MT entries to WP entries

    This script will not only redirect your old Movable Type archives (both categories and monthly), it will also redirect direct entry permalinks (e.g. “000123.html#000123”).
    To do the latter, you will need to have your old ‘mt_entries’ table in the same database as your current WP tables (you do not need the full MT install, just this table), but you can still have archive redirection by date and category even if you have thrown out your MT tables.

    Please read the instructions for more details on how to install and use.

    Overall, don’t forget to:

    1. Edit the script (mt2wp.php) with your blog archive’s URL
    2. Upload the script to your WP directory
    3. Edit your index.php template file
    4. Edit your .htaccess file
    5. Optionally edit your css file (usually wp-layout.css)

    SourcesZip File

  2. Picture Glue: Image Posting Plugin

    A port of the small plugin I had written for MT. By far not the most advanced picture import plugin for WP: there are better and nicer plugins out there doing roughly the same. But I needed backward compatibility and after all, it’s a convenient lightweight plugin to seamlessly upload and insert pictures in an entry.

    Picture Glue automatically looks in a predefined location for folders containing pictures (presumably uploaded through FTP), generates thumbnails and insert HTML code (with css tags) at the top of appropriate postings. Each picture folder must contain the ID of the post it is to be inserted into and must be writable by anybody (for thumbnail generation). This plugin updates the entry content in the DB once and for all, instead of dynamically filtering, thus creating less runtime overhead.

    To use, upload the php file in your plugin folder (located in WP wp-content directory). Read the plugin instruction for details.

    SourcesZip File

  3. Updated! wp-Filterz: Dynamic meta-filtering of your main content

    This plugin lets you define a bunch of meta-filters controlled by checkboxes. Checking/Unchecking boxes will show/hide entries dynamically. You can try it by going to the left bar of this site and playing with the boxes under the “Filterz” section.

    Now supports both IE and Mozilla-like browsers.

    To use it:

    • drop the plugin file into your plugin folder (located in WP wp-content directory)
    • edit the sample preferences with your own categories (you will need to know the ID of the categories you want to filter by)
    • upload the pref file to the wp-content directory (*not* the plugin directory)
    • edit your index.php file to include <?=filterz_class()?> inside the class declaration of your entry divs. Your template should look something like this: <div class="storycontent<?=filterz_class()?>">
    • use <?=$filterz_html_code?> in your template to output wp-filterz’ checkbox list
    • BTW: make sure you activate the plugin in WP’s admin tools.

    Plugin SourcePrefs file sampleZip File

  4. wp-Mood-Quote: Random quote matching your mood (codeveloped with Masquerade)

    This plugin lets you define a list of quotes/taglines/sentences to be displayed randomly when people load your page… with a small extra feature over the countless other random quote generator: this one will let you assign a “mood” to each quote and will then try to match the random quote with the current mood of your blog (using the last “mood” tag you set in one of your post). See docs for more details. (docs wiped out from Masquerade’s server, following some infortunate adventures in shell scripting involving the use of ‘rm -f *’ and no backup whatsoever).

    Zip FileTar Gz File

  5. New! Getting the “updated links” feature to work

    Not a hack. Just a little bit of help to those who might be confused on how to get that sort-by-last-updated feature to work in WP.

    Supposedly, WP lets you sort links. But simply following the instructions and calling get_links() with the proper parameters won’t suffice to enable that feature. To enable it, you must also:

    1. include (before calling any link output function) the file links-update-xml.php as such: include_once(ABSPATH.WPINC.'/links-update-xml.php');
    2. if you have upgraded (and still possibly if you have not), you must make sure you have a file named links-update-cache.xml in your wp-content folder and that it is writable by the server (chmod 666). caveat: it looks like previous versions of WP used a slightly different file name (link-update-cache.xml: mind the missing ‘s’), make sure you have the correct filename.

    Of course, you must also set the parameters in your function call correctly, as well as the options in WP-admin option panel.
    As an example, here is the code I use to output the bookmarks section on this site (it uses a list of IDs for the groups of links I want to display there). Feel free to adapt to your needs and reuse:

    <?php
    include_once(ABSPATH.WPINC.'/links-update-xml.php');
    foreach (array(2,3,5,9,7,8) as $this_cat)
    {
    echo "<li>", get_linkcatname($this_cat), "<ul>";
    get_links($this_cat, '<li>', '</li>', '<br>', false, '_updated', false, false, -1, 1);
    echo "</ul></li>";
    }
    ?>

  6. More will be coming… including:

    • a patch for MooKitty’s show_category plugin to generate a side blog from a specific category (the patch adds date synchronization between the main entries being displayed and the sideblog). it’s already being used on this very blog, I just need to clean it up and write a blurb for it.
    • small snippets that display smart navigational bars at top and bottom of the page… need to put these in a plugin and will release.
    • a patch on wp-mail plugin (allows posting of pictures through email) to use my Picture Glue plugin and generates thumbnails automatically (doesn’t do it at the moment). Actually, I made a whole plugin to do that (and more), it’s there: Keitai Mail Plugin
    • probably other stuff as I come across it…