Blog
Comment Spam Gone Wild
You may or may not have noticed that the volume of comment spam here has rocketed over the last few days. Starting Christmas Eve this site has been hit hard by the scum of the Earth. I've been working to prevent this being a problem and now have it under control. If all goes well for the next few weeks, I'll turn the systems in use here into a publically available system for comment spam prevention. In the meantime, however, please let me know if anything is behaving strangely!
Publish Outlook to iCal over FTP
I'm looking for something that by all accounts shouldn't be too hard to find. I've failed to find it, though, which leads me to believe that it might not exist. Therefore, I turn to the good people of the web for help.
I'm looking for a plugin or macro for Outlook that can invisibly (without prompts or notices) create an iCal (.ics?) file that is then sent via FTP to a remote server. The idea is to be able to subscribe to this with a Mac (or phpiCalender etc) elsewhere. I would like the plugin to update the file whenever the local calendar is updated. And to keep track of categories. I'd also like it to support both appointments and to-do lists, if possible.
Does anyone have a bit of spare time to put something like this together? From what I've seen so far trying to find something like this, it would be very very popular indeed.
Maybe this is one for the LazyWeb ...
Juno Records Win Again!
Juno Records have, for the second year in a row, scooped the Best Independant Store award at the prestigious House Music Awards. Congratulations, again!
A Del.icio.us Directory (Updated)
del.icio.us describes itself as a social bookmarking site, for it allows all users of the net to share their bookmarks with others. Unlike similar enterprises that went before it, users' shared bookmarks are not listed only under their name. Each bookmark also has a set of "tags" associated with it. These tags are words that identify what that page is about. An article on, well, security in PHP would have the tags "php" and "security". Maybe even "webdev" and "programming" as well.
Each user can pick their own tags for their own bookmarks. You can also browse all available bookmarks by tag - meaning that if you wanted to see all bookmarks about PHP, you would simply browse to the PHP tag, and voila - there you would find all bookmarked pages about PHP.
What's Wrong with Directories?
Tags are an intelligent way of organising data. Regular directories work on a similar basis to a filing cabinet - items are stored within folders within drawers, and often only to be found in one place. Of course, that fails to make use of the power of databases and computers. Tags, on the other hand, allow a single item to be found in all the places it should be, rather than just the one place that is the single best fit.
This site, for example, is listed at DMOZ under "Web Design and Development: FAQs, Help, and Tutorials" - a good fit, but it also contains writing on internet marketing, browsers, usability and accessibility, and there are resources available as well as a blog. DMOZ cannot reflect this with its rigid and antiquated structure. At del.icio.us, however, it is associated with the following tags: css, php, design, web, programming, blog, webdev, blogs, development, webdesign, reference, cheatsheet, resources, code, mysql, tips, apache, web-design, tools, tutorial, tech, tutorials, computer, web-dev, html, database. And that's just the front page - specific articles are all listed with their own tags. This means that sites and pages listed by users of del.icio.us are classified and organised in a much more effective and user-friendly way.
There are more serious flaws in the directory model though. The most significant problem with web directories is the editors themselves. A web directory requires editors in order to function, and these can either be paid employees or volunteers. If your directory has paid editors working for it, you are left with no serious choice but to charge a fee for submission, in order to cover your editors' wages. That system scales pretty well - if the directory succeeds and becomes popular, the fees for the extra submissions should be enough to cover the wages of the extra editors required to process those submissions.
A volunteer system does have advantages over the paid-editor model. Because volunteers are not paid, a listing in a directory with volunteer editors can be free. This means that non-profit information sites and low-traffic sites can be listed in the directory (a fee for submission will usually prevent that), and means that editors can go out and find sites themselves to be listed.
Both of these systems have their problems. Volunteer editors are volunteers - making it much harder to hold them accountable for laziness or incompetence. DMOZ - a directory with around five to ten thousands volunteer editors - is a great example of this: submissions are often not processed for many months, if at all. Also, because it is a volunteer position, uncrupulous folk are far more likely to accept bribes to list or de-list sites - they stand to lose very little if discovered - and there are plenty of people who claim that a great many editors do just that. The system can also scale badly - if tens of thousands of submissions suddenly require processing, it can be very difficult to source the hundreds or thousands of editors needed to manage that influx.
The paid system leads to an exclusive directory, which by definition becomes one that is missing out on a huge amount of quality content. Yahoo's fees of hundreds of dollars for a submission have always seemed to many to be completely disproportionate to the benefit of a listing and for many people are higher than the cost of hosting a site or the income from it. As a result, for a long time (and this is still true to a great extent) Yahoo has been an incomplete directory, lacking the in-depth listings required by today's discerning web surfer.
Why is del.icio.us better?
del.icio.us is different to both of these systems. It is similar to a peer-review system, in fact. One person bookmarking one page can count as a vote for that page. As the user will have added tags as well, their vote tells the system that one person believes that the page in question is related to each of the tags they listed. After a few hundred people have bookmarked the same link, you'll begin to see some tags used more than others, giving you an idea of how closely the target page relates to each of those tags.
What this has created is a kind of directory with a distributed editting system. The editors are volunteers, but because of their sheer numbers it it much harder for any one editor to affect listings. If one editor is lazy, it does not matter - there are thousands more covering the same topic. If an editor makes a mistake, and lists a page or site under the wrong tag, it doesn't matter - the huge numbers of other editors will make up for it.
Spam is likely to become a huge problem for del.icio.us. To a degree, there is already spam within the index, and some work has already been put in to preventing spam. del.icio.us's robots.txt file prevents indexing of the whole site, so no link popularity benefits from spamming the index directly. However, del.icio.us can still generate plenty of traffic and by virtue of the RSS feeds it generates can generate link popularity from other sites.
Luckily, there are plenty of signals they could look for to weed out spam. Their database can already tell them what tags are related, and what sites. If a user starts to list unrelated sites with tags unrelated to those sites, they may well be a spammer. If lots of new users suddenly join and all bookmark the same page instantly, using the same tags, again that may well be spam. IP tracking and the registration system (that requires a valid email and features a turing test) should make automated spam far harder. Ultimately, it may be del.icio.us's own success that makes spamming virtually impossible. With enough users on the site, a spammer may need to create hundreds, even thousands, of fake users to have a site listed in the "popular" section, or listed highly for a specific tag.
What next?
The intention of del.icio.us is not (at the moment) to become or create a directory. It is by pure fluke that they have created a site and a system so able to perform the same function as a directory but without the problems associated with that. It may well be that other similar sites will spring up whose aim is to build a directory, especially those involved in search, with a large user base. I would be greatly susprised if Google, MSN and Yahoo were not already watching del.icio.us very closely and with great interest. I would be equally surprised if none of them bought or created a social bookmarking product in the next few months, as the power of a distributed editting becomes apparent.
Update (14th December 2005)
It appears that I was rather close to the mark with my guess at what would happen next for del.icio.us - they have just been bought by Yahoo. It will be interesting to see how Yahoo integrate del.icio.us with their other services. I only hope they don't mess it up like so many promising sites before!
CSS Reboot
The CSS Reboot kicks off in about an hour, and unfortunately, yours truly has simply not had time (despite having 4 months) to get the new design finished. Thus, I am going to be one of the late ones. The new design is on the way, but not today. In the meantime, be sure to check out all of the very impressive new designs going online today on various sites as part of the CSS Reboot Fall 2005.
Happy 30th Birthday Microsoft
Those who know me know I am not the biggest fan of Microsoft. My personal opinion is that their products are often below the standard they should be, and Internet Explorer especially causes me daily grief. I dislike their unique way of interpreting standards, and their ongoing use of proprietary file formats. I dislike their arrogance.
All that said, Microsoft have done a lot of good. They are in a large way responsible for bringing computers to the masses, and for that they deserve a lot of credit. They are responsible, in many ways, for Open Source software. Were their products better and cheaper, there's a good chance that Linux, as well as programs like Apache and OpenOffice and languages like PHP, may never have seen the light of day, or if they had, not enjoyed quite as much success. They might not be too happy about that last bit though.
Microsoft turns 30 years old today. I'm sort of hoping that now it's out of its 20s, Microsoft will mature somewhat and start being more altruistic. Hope springs eternal. Happy Birthday Microsoft - may you have at least a couple more before that youngster, Open Source, finally puts you into a retirement home.
Screen Readers Suck!
Accessibility has now become a major issue in web design. One benchmark of an accessible site is that it works in common screen reading programs. However, screen readers are making the job of conscientious web designers harder than it should be.
Ignore Directories in mod_rewrite
A quick piece of code for you. If you are using mod_rewrite and creating RewriteRules for a website that emulate a directory structure, you might happen across the same problem I've had. If you have actual, real folders on the site as well, you don't want requests for items in those folders to be rewritten. You need a way to prevent the RewriteRule(s) matching the real folders. The easiest way to do this is (I think) by adding a RewriteRule for each of the real folders, like the below. This rule will match any request to those folders and prevent it being rewritten later in the set of rules.
RewriteRule ^folder_name/.*$ - [PT]
Happy Birthday Jack, Again
Another year on, and it's the 7th September again. Much like last year, that means that this site is another year older, and as it's September, it's Jack Daniels birthday all month as well. Much like last year, most alcohol-serving establishments are offering freebies through the month.
There are now 130 articles on the site - 66 of those in this second year. I was hoping that would be higher, but work, as ever, is very hectic and doesn't leave a lot of time for quality posts. The read count has jumped a bit from last year - up to 2,248,545. Comments are up along with reads - 680 now. I'm sure the vast majority of that interest has come from the cheat sheets I've been releasing (and will continue to release).
There haven't been many changes to the site this year, which is rather surprising for me. There is a redesign on the way though (as part of the CSS Reboot), as well as some nice new features.
So Happy Birthday Jack, and Happy Birthday to this site. Here's hoping next year is even better.
"Select All" JavaScript for Forms Posting to an Array
This may be useful to someone - a question on the BNM list led to this small piece of JavaScript.
The original problem was that when posting to a PHP script, in order to have the result as an array (when using a set of checkboxes for example), the quickest way to do this is to add "[]" to the item name (eg 'name="area[]"). Then, PHP can access $_POST['area'] as an array in the receiving script.
Unfortunately, the addition of square brackets causes trouble with JavaScript, especially with a "Select All" function. This script works around that using regular expressions, and might prove useful to someone experiencing the same problem later.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html><head><title>Checkbox Fun</title><script type="text/javascript"><!--var formblock;var forminputs;function prepare() {formblock= document.getElementById('form_id');forminputs = formblock.getElementsByTagName('input');}function select_all(name, value) {for (i = 0; i < forminputs.length; i++) {// regex here to check name attributevar regex = new RegExp(name, "i");if (regex.test(forminputs[i].getAttribute('name'))) {if (value == '1') {forminputs[i].checked = true;} else {forminputs[i].checked = false;}}}}if (window.addEventListener) {window.addEventListener("load", prepare, false);} else if (window.attachEvent) {window.attachEvent("onload", prepare)} else if (document.getElementById) {window.onload = prepare;}//--></script></head><body><form id="form_id" name="myform" method="get" action="search.php"><a href="#" onClick="select_all('area', '1');">Check All Fruit</a> | <a href="#" onClick="select_all('area', '0');">Uncheck AllFruit</a><br><br><input type="checkbox" name="area[]" value="1" />Apples<br /><input type="checkbox" name="area[]" value="2" />Bananas<br /><input type="checkbox" name="area[]" value="3" />Chickens<br /><input type="checkbox" name="area[]" value="4" />Stoats<br><br><a href="#" onClick="select_all('location', '1');">Check All Locations</a> | <a href="#" onClick="select_all('location','0');">Uncheck All Locations</a><br><br><input type="checkbox" name="location[]" value="1" />Brighton<br /><input type="checkbox" name="location[]" value="2" />Hove<br /></form></body></html>
A Book Baton
I think these "batons" are a pointless waste of time, but still can't resist joining in when invited. I'm late too. Not that any of that actually matters. Many thanks, Ben.
Number of books on the shelf
Around 600, at a guess (about a quarter of those belong to the missus). I tend not to keep books on a shelf - once I've read them, I don't see the point in keeping them to gather dust. I only keep books that either I'm likely to re-read or that friends of mine will probably want to borrow. The rest end up at charity shops (or soon released into the wild through BookCrossing).
Last book purchased
Ender's Game - Orson Scott Card (actually the first book I've bought in a while - since stopping commuting I've been spending much less time reading).
Book I'm reading right now
I'm halfway through Terry Pratchett's Going Postal, Michal Palin's Himalaya and Donna Tartt's Secret History. I have this annoying habit of reading several books at once, some more slowly than others.
Last 5 books read
- Incompetence - Rob Grant
- Want to Play? - P.J. Tracy
- The Devil in the White City - Erik Larson
- Life of Pi - Yann Martel
- Things My Girlfriend And I Have Argued Above - Mil Millington (for about the 90th time)
Books that mean a lot to me
The books that mean a lot to me now might not mean as much were I trapped on a desert island (where, much like Ardal O'Hanlon, I would make sure I had a giant inflatable book, and one entitled 'How to Make Oars Out of Sand'). Good books convey emotion, so the books that mean something to me are usually those I've read at a particularly emotional point in my life, and whose names I can rarely remember, but when (or if) I re-read them I come over all emotional.
Passing this along to
- Diane Vigil
- Kim Krause
- Brian Warren
- Adrian Lee
- ... and anyone else who wants to tell the World what books they've read (without an opportunity to list the books they actually like) as a thinly veiled excuse for reinforcing the ludicrous hierarchy of the blogosphere (I'm in a slightly cyincal mood today).
Happy Birthday PHP!
PHP is 10 years old today! Version 1 was announced to the World on June 8th 1995, and since then a huge community has built around the language, now one of the most widely used, powerful and flexible languages on the web. Long live PHP!
AddedBytes.com is the online playground of