The Lair

Do not meddle in the affairs of dragons, for you are crunchy and taste good with ketchup

Archive for

SK2-WP2Compatibility

November 29th, 2005

Well, it’s hardly a secret that Wordpress 2.0 is drawing ever closer to release … But because there are lots and lots (and I mean literally hundreds) of changes across the board, it’s hardly surprising that plugin compatibility is a big issue.

In the big list of compatible plugins, Spam Karma features as well. It stops spam, regardless of your version of Wordpress.

But there’s a problem. Because one of the internal changes to Wordpress’ database tables introduced the comment_count field. And Wordpress 2.0 displays the number of comments against a post based on the value in this field. And Spam Karma in its current incarnation doesn’t know about no steenkin’ comment_count field.

Enter SK2-WP2Compatibility.

SK2-WP2Compatibility (yes, I tried hard to think of a fun name, honest!) is a plugin for Spam Karma 2. Anyone may download and use it; however, it only has any effect if you run it in a Wordpress 2.0 installation. Beta-1 is fine. Beta-2 is fine. RC1 is good too. Even bleeding edge SVN updated Wordpress 2.0 is fine.

It doesn’t kill any spam. It doesn’t make Spam Karma any better than it already is at killing spam. It doesn’t make you breakfast in bed. It doesn’t drag your lazy ass to work. Nope. None of those. It just tries to make sure that the poor comment_count field in your shiny Wordpress installation gets an appropriate amount of lurve. And updating. Don’t forget the updating.

So, if you’ve been plagued by a swarm of incorrect comment counts and you’ve identified Spam Karma as the culprit, maybe you should give this plugin a shot.

Simply download and copy to your SK2/sk2_plugins directory. If the plugin (SK2 plugin, not Wordpress plugin) detects that you are running Wordpress 2.0; it will run an extra update each time someone posts a comment. If you’re still running Wordpress 1.5.2, nothing happens.

Requirements: You must have Spam Karma 2 installed. If you have Spam Karma 2.1 beta 4 or later, you do not need this plugin. Simply upgrade to the latest Spam Karma and you get comment counts updated for free. No plugin required.

Current version: 1.0. Just download, unzip, read the included readme file and move the .php file to the appropriate location and you’re done.

Problems ? comments ? suggestions ? *gasp* bug reports ? Please leave a comment here or mail me directly at lair AT fierydragon dot org. Please make sure, however, that the title of your email includes the phrase sk2_wp2compatibility lest my overzealous spam killing bin your mail. I’m also available in the #wordpress IRC channel on freenode; with the innocuous nickname of tinster.

Update 3rd Jan 2005: The most recent beta of Spam Karma 2.1 fixes the comment count problem without needing this plugin. Please download SK 2.1 beta from this location. Simply delete sk2_wp2compatibility.php from your sk2_plugins directory to uninstall.

.

Update 10th Jan 2005: Spam Karma 2.1 final is out. The latest release of SK is fully compatible with Wordpress 2.0. Basically, if you upgrade to SK 2.1 (and you should!) then you no longer need this plugin. Delete the php file to uninstall.

all that glistens

November 24th, 2005

The cold snap of the last few days is about to get worse, we are gloomily informed … it’s going to start snowing around the northerly parts soon. Right now, it’s stupidly cold outside, despite the weak sunshine … and we had a few assorted hail storms. Oooh, the fun. The biting winds (all the way from the Arctic) aren’t all that fun either. If this keeps up, I’m going to have to start thinking about batches of mulled wine in hip flasks to prevent my freezing to death on the roads. Gah.

In case anyone hasn’t gathered, I cope with the lousy weather by complaining loudly to all and sundry. It actually does seem to help.

On a slightly more positive note, today marks the first day on which the new relaxed drinking laws go into effect … pubs can now apply for a 24hr license if they so choose. I’m ambivalent about all this, really. On one hand, I’ve seen the city center descend into a near warzone on Saturday nights, especially after the footie… It’s probably accurate (although a touch oversimplified) to say that regulated pub early closing helped avert more binging.

On the other hand, people who want to binge were going to do that regardless of the regulated hours, so I presume its not going to make a great deal of difference to many. I still haven’t discovered if my two local pubs have applied for later closing hours. One thing I can guess with a remarkable degree of certainty is that they won’t keep their kitchens open later… which means that if I want hot food late at night, my choices are still delivered pizza or Indian food. Yep, heretic that I am, I actually go to the pub to grab nicer food than I would get from takeout places… and the pubs are on my way home.

In other news, it seems that the Venetian city council has thought of a not-so-novel means of raising some cash to cover up its budget shortfall. They are planning on flogging some of the historic palazzos to all those interested. This is supposedly a legitimate offer, no scam involved. The catch ? Well, there are quite a few… For one thing, the buildings apparently aren’t in the best of repair. Another problem ? Venice is not the safest of places to plan on having anything that isn’t aquatic in nature. The city is awash, and not just with debt… it’s sinking.

the light at the end of the tunnel …

November 22nd, 2005

is probably not an oncoming train after all.

Mind you, there is no way to be really sure - one more week of hectic, panic stricken pandering to deadlines before I can go into hibernation for the winter and anything could happen in the next 3 days.

Read the rest of this entry »

QotD

November 18th, 2005

The occasional crook will band together with his kind and take your government away from you if you let him. It is very soothing to the conscience to tell yourself that, after all, you can’t do anything to change the sorry state of things. It is much easier to sit in your living room, skim the headlines, and then make bitter remarks about those no-good crooks in [government], and to complain about how they pay no attention to the welfare of the ordinary citizen (meaning yourself) …

Why should the average citizen bother with politics? Why touch the dirty business? Isn’t politics loaded up with crooks you wouldn’t want to eat with and crackpots you wouldn’t want to have in your house?

Then why bother? Why expose yourself to bad companions and snide remarks simply to make a single-handed attempt to clean the Augean stables, to bail the ocean, to clear the forest?

Because you are needed. Because the task is not hopeless.

Democracy is normally in perpetual crisis. It requires the same constant, alert attention to keep it from going to pot that an automobile does when driven through downtown traffic. If you do not yourself pay attention to the driving, year in and year out, the crooks, or scoundrels, or nincompoops will take over the wheel and drive it in a direction you don’t fancy, or wreck it completely.

When you pick yourself up out of the wreckage, you and your wife and your kids, don’t talk about what “they” did to you. You did it, compatriot, because you preferred to sit in the back seat and snooze. Because you thought your taxes bought you a bus ticket and a guaranteed safe arrival, when all your taxes bought you was a part ownership in a joint enterprise, on a share-the-cost and share-the-driving plan.

I let Robert Heinlein do the writing on this post.

my clock speed is bigger than yours

November 14th, 2005

Just had an interesting time benchmarking some code. I wrote and benchmarked it on my laptop, which is all of six to ten months old. With the supplied clockspeed adjustor widget - supposedly to conserve power, I had a series of benchmarks that looked exactly as they should. Linear inverse correlation between clockspeed and time expended.

All good ? Yeah. I then moved onto my desktop, which is a reasonably beefy machine - but is now 2 years old. Not that I care much, because I have more memory than I’ll ever need and it still “seems” fast to me. The benchmarks actually showed a slowdown from my laptop. In clock speed terms, my laptop is a 1.6GHz machine while my desktop is a 2.4GHz machine.

Hmmm. ok. That’s bizarre.

I then moved onto a third desktop machine - a 2.8GHz monster. Defying all logic, even this ran slower than my laptop’s max clock speed setting. I’m still wondering exactly what might have caused this surprising state of affairs. Surely, laptops aren’t allowed to be faster than desktop machines ? That’s like … against the law or something.

It took a very new 3.2GHz monster to haul things back into perspective - it outperformed the best benchmarks on the laptop by about 70% or so. Order has been restored. Now I’m left trying to find explanations… Maybe the Dothan 725 performs better than a vanilla P4 ?

And when I wrote this, I realized that I had, despite my best efforts, fallen back into the uninformed and incorrect clock speed comparison as a measure of performance. Megapixel values in digital cameras are not the sole determinant of picture quality. Similarly, clockspeed is just one indication of how fast a machine will execute something - hard disk speed, bus bandwidth and more importantly, processor class all play a role in determining a benchmark. In this case, processor class trumped clockspeed. By a fair margin, at that.

slithering

November 10th, 2005

My landlord wants to add to his extensive menagerie of two massive cats. He is now considering taking in a snake.

Quite apart from a somewhat amusing manifestation of a midlife crisis (ok, so I’m being nasty), this is causing me serious disquiet. The thought of sharing a residence voluntarily with members of the suborder Serpentes isn’t exactly a pleasant thought. In fact, it gives me the creepy crawlies. It’s not just about a snake being around, I’m sure lots of snakes have been around places that I’ve been (ok, so maybe that’s a stretch) … but the possibility of the reptile escaping and looking for a meal or two among the human populace seems well, a bit alarming.

Actually, my landlord is only considering taking the snake in because the current owner is sick and has difficulty taking care of it any longer. Also, the place where the current owner is moving to, a nursing home of sorts, refuses to have a snake on the premises (everyone roll their eyes and say doh! please). Among instructions about the care and feeding of pythons, I also heard the term reticulated python. Yes, the longest snake ever, and a constrictor to boot. Yes, I feel much better now. Hasn’t Hollywood already covered this angle ? Arthur Conan Doyle did, certainly. The gist of it being - they’re not pets and they can do nasty stuff to you. My name is not Steve Irwin, so I think I’m entitled to some snake hatin’.

And on a related note, the day our friendly neighbourhood python takes on one of the resident cats, this is what is going to happen to it.

Read the rest of this entry »

o tempora o mores

November 6th, 2005

Five weeks ago - in some random IRC channel

[me]OMG! The bastids!! They extended my paper deadline.
/me sobs
[me]Why ?! Dear god, why ?? Just let me finish it and get it done. Don’t keep me dangling for the next two weeks.

Today … oh, wait. yesterday… - different paper, same situation.
I got an extension. Yes ! Two weeks. Woo. Bring it. Yes! Yes!! YES!!!. Hmmm, maybe I can tweak that bit of code a bit now. No rush. I got two whole weeks. Hmmm. I think I’ll take the next few days off to recover.

The times, they are a-changing. This is going to be a prime example of Parkinson’s law. As in, it probably means that I’ll have to do even more work than I had originally planned for this silly paper. *le sigh*

height restrictions may apply

November 3rd, 2005

Ok, I’m feeling mildly freaked out by the events of the past few minutes - so clearly, the best thing would be to share with the anonymous intarweb. My survival instincts are only equalled by my capability to keep things to myself.

In a fit of boredom, I take this quiz - “what age do you act“. Yeah, I grinned to myself, this was going to be hilarious. The darned quiz got it exactly right. Yes, to the exact year. This is un-fricking-believeable. It’s got to be some evil trap.

I feel like such a precious and unique snowflake now.

Read the rest of this entry »

gremlins

November 2nd, 2005

Concurrent with the screening of Gremlins on free to air TV for the past few weeks, the electronic locks in the department failed mysteriously last weekend. When this happens, campus security can either call someone and get it fixed or they can cop out and lock the department up the old fashioned way. Guess which option they took ? Ah me, the bleak reality of a weekend without internet access.

And the gremlins took to LaTex as well - a few weeks ago, I was struggling with two column formatting and images on Microsoft Word. This time, the struggles have shifted to LaTex. About as frustrating to write a paper in LaTex as in Word, on the whole, except for two things. There are loads more LaTex experts around here than there are people who know how to do Word well - and also, perhaps unsurprisingly, there is an aura of eliteness in doing your paper in the less well known typesetting format. People tend to excuse minor overflow bugs and so on when they realize you’ve done it this way - it’s like using a typesetting language instead of the evil monopolist’s Office wordprocessor confers a few brownie points.

And somewhat shockingly, I actually pretended I had a social life (outside IRC and IM) and went out to dinner last night. Highlight of the evening was some strange Mexican tequila. Strange only in that I am not well informed about the varieties that are available and my tequila planet consists of Jose Cuervo and that awful rotgut which smells of turpentine and masquerades as tequila (People in the building trade tend to call that sort of liquid paint-remover) Yep, the same rotgut that is ultra cheap and come with a cute plastic sombrero covering the bottle top. This particular tequila was nothing like it - slightly more uh .. dignified presentation and it smelt fantastic. There is also something to be said for using garlic salt instead of plain salt - I quite liked the taste combination of the tequila coating the garlic salt crystals on my tongue - followed by lime juice concentrate which came out of a bottle. A stickler for tradition, that’s me.

Oddly enough, we avoided all conversation about anything computer science related for the entire evening, which has to be something of a record. Not that there is anything wrong with chattering obsessively about the latest GCC or the merits of one Linux distribution over another at the top of our voices, but ordinary talk about things other than computing make for a nice change. Need to do that more often.

And despite having a seemingly Sisyphean series of deadlines ahead of me, I’m going to take some time out tonight and watch Rome. The reviews that I’ve seen so far describe it as a depiction of 50 BC Romans, filled with gratuitious violence, nudity and sex. They had me at gratuitious violence, the nudity and sex are just extras. This screening might even compell me to resume an orderly read of Gibbon’s work - I just scanned through the parts covering the Caesars I knew of when I read the first time, so I probably lost a lot of the details.

Update:Hmm. Have I fixed the permalink now ? A post titled gremlins has problems with the permalink. How appropriate. And no, I still can’t figure out what went wrong.