Archive for May, 2006

Comment Spam

Sunday, May 21st, 2006

Since a couple of days my blog has been under attack of comment spam.

Since the beginning of this blog I had some comment spam. At first it was only one or two a week, which wasn’t that much of a problem. I looked into some possibilities to have a user-friendly way of stopping this. I ruled out CAPTCHAs, while these may be “friendly” to users who can see, they are not for the visually impaired, and besides, there are already programs that can do them about just as well as humans.

Then I encountered the Hashcash plugin for Wordpress. It provides the browser with a simple mathematical puzzle, which solved correctly, allows for the comment to be posted. Most browsers can do this without a problem, so that looked to be the solution.

After a while, comments again started to trickle in, first once or twice a week and the last couple of days it became more than 20 a day. I have now installed the (SpamKarma)[http://unknowngenius.com/blog/wordpress/spam-karma/] plugin (see the footer of the page), which does some filtering and other smart stuff to figure out if a comment is spam or not, once it has been posted. This (and Wordpress itself) is turning out to be a pretty heavy load for my poor little server, so I might soon have to look into other possibilities.

To have a frame of reference of how fast things are going with the comments, at the time of writing it has caught 117 comment spams. Most of those are from before, which I had either forgot about or were in the archive but not displayed.

Held up by Hold’em

Monday, May 15th, 2006

Since a few months I have taken up a new hobby, playing Texas Hold’em Poker. I have mostly been playing online, with friends and have been doing so-so for the last 8 months. I’ve won some, and lost some, overall, I’m about equal. I like the game very much, it is a very interesting mix of psychology, statistics and bluffing. While there is some amount of luck involved, you can influence the odds you get, by betting, not betting or simply not taking part in the hand.

I do not aspire to be a professional pokerplayer, I do like to play the occasional game and earn some small money on the side. It is mostly about fun for me, but earning some money with it is nice. So I have been taking it a little bit more seriously, bought some books and of course browsed the Internet for more information.

Then I learned of the freeroll qualifier tournament near where I live. Which I thought would be a very nice opportunity for getting some free live poker experience. The idea is that Everest Poker is organising free qualifying tournaments across Europe, for the Everest Poker European Championship. The finale is in Barcelona with a prize pool of $50,000.

Just on Thursday I received my copies of Harrington on Hold’em volumes I & II. I had heard from some of his concepts before, and quickly started reading to prepare for the tournament. I only managed to get about halfway through the first volume, but I learned a lot from that book.

So I went to the tournament, with some degree of confidence, and set my goal to just enjoy myself. I wanted to learn from the experience of my first live tournament and just play as well as I was able to, meanwhile, trying to observe my opponents and get used to poker-table manners. It turns out that I did a little bit better than that…I managed to win the entire tournament, from 63 other players. The skills of the players varied from some completely clueless, who had not played a hand of Hold’em before, some like me, but also some experienced cash-game and online players. A report on the tournament will be posted on the Everest Poker Blog soon.

I will not turn this blog into a pokerblog, but on occasion I will post some results of how I am doing, results of tournaments, et cetera.

Semi Fullscreen mode in OS X

Friday, May 12th, 2006

Computers are a constant source of distraction. Staring at your screen, there are lots of little icons, time, menus and others windows, just begging for your attention. On OS X this is thankfully a bit less than on Windows (apps don’t just grab focus when they need your attention, and Growl is also a very unintrusive way to stay updated). But sometimes that still is not enough.

Enter the Semi Fullscreen mode, as suggested by Merlin Mann. Install the following apps:

  • MenuShade - dims the menubar, until you put your mouse over it.
  • Spirited Away - hides inactive applications after a specified amount of inactivity.
  • Backdrop - displays a full screen image or color as a layer between the front applications and the applications beneath it (and the desktop).

Then:

  • Turn on dock hiding.
  • Launch Backdrop and Spirited Away and put Backdrop in Spirited Away’s exception list.
  • Set Backdrop to display a completely black background color.
  • Launch MenuShade and make the hidden menubar completely black.
  • Start working on the app that you want.

The neat thing is that there are no more distractions. Once you start working on something else, your original work will disappear, triggering you to get back to work again.

I have also created two small scripts to quickly launch and quit these applications, put them somewhere where Quicksilver will find it and you can quickly start and stop the mode.

My Applescripting skills are limited, but I haven’t been able to get the script to automatically close Spirited Away’s startup dialog. Any suggestions?

XML is not the solution to everything

Tuesday, May 9th, 2006

In the past few years, the use of XML has risen a lot. People have become more aware of the importance of having a portable data-format. One that does not die when your application is not supported anymore. However, XML is not only that, it also makes it easier to use your data in other applications.

That being said, just naively applying XML is not the solution to everything. In the past few weeks I have seen some completely moronic uses of XML that have left me stumped. Consider the following gem (taken from an article in IEEE Communications):

    …
    <timestamp>14:12</timestamp>
    …

Now in this case, everybody will be able to figure out that the time-stamp here is in a 24 hour format. But what if the time-stamp was 08:12? I don’t want to bore you with the rest of the XML, but take my word for it that there was no accompanying date information, nor was there any hint on a time-zone.

In short, there is no way to know what kind of time-stamp is actually meant by the above piece of XML. Just because a time-stamp has been surrounded by XML tags doesn’t add more meaning. Even if your application would use these kind of things very briefly, you will run into problems when someone starts replaying old messages, or if for some reason packets are delayed very long in the network.

So please, if you’re considering using XML, please read “Don’t Invent XML Languages“. If you really have to create a new XML language, also read the accompanying piece: “On XML Language Design“. The only thing that I have to add to that is you should seriously consider adding type information to your mark-up.

Over the past few months I have used RDF a lot and have become convinced that in most cases it is better to use that. It allows you to easily create a small language, that can be easily parsed, is very extensible and mixable, and can be very easily queried. So give that a try when you are in need of a quick new data-format.