Author Archives: admin

Map upgrade

I have just completed the upgrade of my map application to use version 2 of the Google Maps API. I had a few issues but there doesn’t appear to be any problems now. Permalinks generated previously should still work. Unlike Windows Vista I decided to maintain backwards compatibility!

In the new API Google provide a method to automatically calculate the distance between two points. I wrote code to do this in the previous version, which I have now removed, so if you are using a permalink generated using version 1.0 there may be a slight difference between the total distance calculated for the route.

Any problems, please leave a comment.

Comment spam

Well I appear to have the comment spam situation under control. I installed Spam Karma 2 as Miles suggested and so far so good. I am still getting comment spams but they all appear to be getting caught. I refuse to turn comments off or to make people register as I think this discourages people from leaving comments. I quite like this idea although I am not sure how well it will work if spammers specifically target your site because it has lots of traffic, as suggested in some of the comments. Still, it may be worth a try.

Another option would be cut the spammer out at the transport level: if a machine with a blacklisted IP address tries to make a connection, just drop it. This would avoid the need to have fancy filters that try and figure out statistically whether something is spam or not.

The battle is won but the war is not over! Ding ding. Round 2.

Restricting comments by IP

Is there a way in WordPress of being able to reject comments based on the IP address they came from? I had a brief look at the available plugins on the WordPress site but there doesn’t appear to be anything that does what I want.

Basically for about the last week or so I have been getting numerous bogus comments that I keep having to delete; all of the IP addresses are in the range 64.62.228.x. Using Arin’s WHOIS service it appears that all of the comments are originating within a range of IP addresses owned by an ISP called Hurricane Electric.

If there was some way of telling WordPress to automatically reject comments that fall within a certain IP range, I wouldn’t have a problem. I remember the discussion forums in the old ACS had such a feature. If you have any suggestions, let me know.

Fun with SQL

So I was minding my own business trying to manually insert an entry in the user table for the XMPP server that I am using when I got an error when I tried to set the creation date. Turns out that the creation date column in the user table is a 15 character string, 0 padded, that represents the number of milliseconds since January 1st, 1970. Why it is not a standard date type is beyond me but I digress.

Well if you ever need to do such a thing, and who doesn’t, here is the SQL query to do it:


select lpad(round(extract(epoch from now())*1000),15,0) as result from dual;

result
-------------------------
001144246603582

Note that this query is specific to Postgres. You may have to alter a few things to get it to work with whatever database you are using.

It is also worth noting that extracting the epoch from the date only returns the number of seconds since January 1, 1970. To get milliseconds we need to multiply by 1000.

Yet more randomness

I’m suffering from writers block so in the meantime here is a summary of some of the things I have come across in the last half an hour.

I have just discovered The Dilbert Blog by Scott Adams. Judging by the number of comments on some of the posts it’s rather popular. I already get my daily Dilbert cartoon via my Dashboard, now I can read the blog too. Maybe I should spend more time working and less time reading comics.

Philip Greenspun shares his thoughts on the real reason why Bill Gates is so interested in HIV and Malaria.

There’s a new competition in town, the Blooker Prize, for bloggers who have turned their online journal into books. Seems there’s a market for it. Blogs to books. Rags to riches. Who knows! The BBC has more about it here.

Never mind the bollocks

This afternoon I was reading Richard Branson’s autobiography when I came across an interesting fact about the word “bollocks”. In 1977 when Virgin Music were promoting the Sex Pistol’s album “Never mind the bollocks, here’s the Sex Pistols”, the police arrested the manager of one of Virgin’s stores under the Indecent Advertisements Act of 1889 because the posters displayed in the shop window contained the word “bollocks”. The case went to trial. In preparation for the court case Richard Branson spoke to a linguist, a Professor James Kinsley, to clarify the meaning of the word. Turns out the word “bollocks” is an eighteenth-century nickname for priests. As priests generally seemed to speak such a lot of nonense during their sermons, the word “bollocks” gradually came to mean “rubbish”. The case was subsequently dismissed. So there you go: the word “bollocks” has nothing to do with testicles, it means “rubbish”. So the next time your boss has a crap idea …

ICANN, you can’t

The topic of who runs the Internet and how it is governed is an interesting one. It also came up in Vint Cerf’s talk last week at Google. As I know very little of about how organisations such of ICANN actually operate I decided to ask a friend of mine to write something about the topic for me. This is the first in a series of mini-essays that will appear on this site over the coming months. Well, that’s the plan anyway.

The fragile reign of ICANN

a review by Dagmara Kodlubanski

About the author

Dagmara is doing an MSc in Media and Communications Policy and Regulation at LSE. Her thesis is about Internet Governance. She works at Camden Council and listens to strange music.

That last part about the music is just my opinion 🙂

Google write on the money

Google has just bought startup Upstartle the makers of Writely, the online word processing software. According to the article this puts Google in direct competition with Microsoft Office, except they now need a spreadsheet program and something for doing presentations.

If it’s a spreadsheet Google want then how about wikiCalc, an online spreadsheet created by Dan Bricklin. Bricklin was the co-author of VisiCalc, the first ever spreadsheet that appeared way back in the early 80’s, or was it the late 70’s.

And what about using Wimpypoint for creating online presentations. OK, maybe not!

I particularly like the comment at the end of the article:

Writely’s founders said on their Web site they sold to Google to broaden the user base from thousands to millions.

Yeah right! I suppose the large amount of cash on offer had nothing to do with it right?