Archive for the 'about' Category

Meme time

The metros from the world I've used:
Berlin SBerlin U

Actually there are some cities listed on the original site I've been to, but didn't take the subway, like Toulouse, Rennes, Amsterdam, Barcelona, Stockholm, Fukuoka, Sendai...

2006-08-31 21:22:49+0900

me, p.d.o | Comments Off on Meme time

WordPress and daylight saving

WordPress has a wonderful feature: instead of providing a timezone where you live, you tell it how much hours your local time differs from GMT. Which just fails when dealing with daylight saving.

And I just noticed that my setting was still 1 hour, instead of 2. I remembered to change time on my wallclocks, mobile phone, but I forgot my blog... But changing that will change it only for future posts and comments.

So, for people who forgot like me, here are two SQL queries to fix the database:

update wp_posts set post_date = convert_tz(post_date_gmt, 'GMT', 'Europe/Paris'), post_modified = convert_tz(post_modified_gmt, 'GMT', 'Europe/Paris');
update wp_comments set comment_date = convert_tz(comment_date_gmt, 'GMT', 'Europe/Paris');

Don't forget to replace Europe/Paris with whatever your timezone is ;) . Note that this will require you to run, if you've never done it before, something like
mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql -p -u root mysql

2006-06-25 22:39:02+0900

p.d.o, website | 2 Comments »

Anti comment spam measures

In the past months, I was getting more and more comment spam. Even though the configuration was set to moderate comments containing a link. It was a good filtering measure at the beginning, but became less and less handleable. When I decided to act, I was getting more than a hundred comment spams in my "Awaiting moderation" list. Per day. Maybe even more, I can't remember. And about the same amount were actually able to go past the moderation filtering, by not putting links in the comment itself, but in the homepage field of the comment form.

While wordpress' comment moderation interface is pretty efficient at deleting a lot of spam, the comment management interface just sucks, even in the "massive editing" mode. So, after having spent quite some time in this sucky interface, I decided I didn't want to resort to it any more.

First I had to remove all these comment spams. I had to use use the SQL delete command myself, since WordPress is useless. I basically deleted all comments posted after the last real one I saw. Sorry if someone posted one I didn't see. The tricky part was that the comment count for articles is kept in a field of the wp_posts table. Which means there was a difference between the actual comment count and the count displayed. For those who'd want to do the same at home, here is the magical SQL query to refresh the comment count:
update wp_posts set comment_count = (select count(*) from wp_comments where comment_post_ID = id and comment_approved = '1');

Next step was to avoid getting more spam. I didn't want to use captchas or any turing tests, because they basically all fail to be accessible in some way. So, I took a balanced decision. While I appreciate to get comments, I can't stand any more the spam that get in posts as old as the blog. The best thing to do then, I think, was to allow comments on recent posts only. Sorry for those who'd like to comment on old stuff, but being able to comment on the newer posts is still better than nothing. I also kept the link moderation policy, which seemed to be helpful at the beginning.

For the little story, again, WordPress was not very helpful, so I had to resort to an SQL query to close comments on all the posts.

It's been 3 weeks or so, now, since I switched to this new policy. I got only 1 spam to moderate and none directly in the comments. Let's hope it will last.

2006-06-25 20:27:18+0900

p.d.o, website | 6 Comments »

What kind of language is that ?

Consider the following code :


for (var i = 0; i < 20; i++) {
var j = i;
}
alert(i + ' ' + j);

That's javascript. It gives "20 19". Would you expect that from a decent language ?

Update: Same result with a var j = 0; before the for loop. No surprise, actually.

Update 2: It seems what I'm complaining about has not been well received ;). I'm not complaining about the values, I'm complaining about the fact that there are values...

2006-03-11 19:20:42+0900

p.d.o, website | 7 Comments »

What is your Perfect Major ?

You scored as Engineering. You should be an Engineering major!

Engineering

92%

Chemistry

75%

Mathematics

75%

Philosophy

67%

Linguistics

67%

Psychology

67%

Sociology

58%

Biology

58%

Theater

42%

English

42%

Anthropology

33%

Art

33%

Journalism

25%

Dance

17%

What is your Perfect Major?
created with QuizFarm.com

2006-01-13 18:09:41+0900

me, p.d.o | 1 Comment »

Meme time


Your Inner European is French!



Smart and sophisticated.

You have the best of everything - at least, *you* think so.

Who's Your Inner European?

2006-01-13 18:04:17+0900

me, p.d.o | 1 Comment »

Upgrade

I just upgraded to WordPress 2.0. The change in the backend is really impressive, and the upgrade very easy.

I still should spend some time with the custom theme, though...

2005-12-31 07:45:30+0900

p.d.o, website | Comments Off on Upgrade

Which Superhero are you ?

Your results:
You are Spider-Man

Spider-Man
75%
Green Lantern
65%
Superman
60%
Batman
50%
Robin
47%
Supergirl
45%
Hulk
40%
Iron Man
40%
The Flash
35%
Wonder Woman
20%
Catwoman
20%
You are intelligent, witty,
a bit geeky and have great
power and responsibility.

Click here to take the "Which Superhero are you?" quiz...

2005-12-21 06:50:21+0900

me, p.d.o | Comments Off on Which Superhero are you ?

This blog is worth…


My blog is worth $0.00.
How much is your blog worth?

How surprised am I.

2005-11-22 19:01:33+0900

p.d.o, website | Comments Off on This blog is worth…

Yet another meme

Hobbit

Well, seems I belong to the Shire.

To which race of Middle Earth do you belong?

2005-11-15 19:31:00+0900

me, p.d.o | 2 Comments »