February 18, 2006

Tag, you’re it!

We were out the whole day yesterday and so I didn’t get to make my usual blog entry. Because of this, I now have two blog entries queued. Yes, I could make them both today but I’m OCD-ness just wouldn’t permit me to do that – so here’s yesterday’s entry and today’s entry will appear tomorrow :p

I put sprucing up Blog on hold for a bit to do some investigating day before yesterday. I wanted to see how good Yahoo Content Analysis Web Services was when it came to getting keywords for a blog entry. I didn’t want to write any code of my own and so I settled on the Terms2posts plugin from Semiologic instead. Unfortunately, the plugin wouldn’t work out of the box and I had to do some debugging to first find out what was wrong. I did find what was going on and managed to get the plugin working but was not satisfied with the keywords that Yahoo returned – it had stuff like "unfortunately" and "ugh" (I say "ugh" a lot :p) and that just didn’t look appealing to me 🙂

So I turned my attention towards Tagyu. They have an API that developers can use to get suggested tags for a given post and I wanted to see how well that works. I quickly hacked the Terms2post plugin and added a function into it that would fetch posts from Tagyu by using some code that the Ultimate Tag Warrior plugin (UTW) used. This seemed to be just my day for non-working code because that bit of code wouldn’t work either :p I went through some debugging and discovered why tagyu tag fetching didn’t work, got it working and finally got some suggestions for my test post. I was actually happy with what I got this time. So I decided that Tagyu was the way to go.

Now came the difficult part. I needed a way to automatically tag posts in WordPress when they were published because I wouldn’t have categories working via XMLRPC for a while longer and I’m not known to be a patient man :p So I needed tagging working easily now, damn it! I decided to write a new WP plugin which would be an add-on to UTW and would simply get suggested tags for any new post and add the suggestions automatically to the UTW tables, giving me an automated tagger 🙂 After a couple of hours of tinkering with code, I actually had the plugin working – at least the base functionality. I’ve also added an admin menu which currently does not have any options (the options are there the admin screen just does not display or save any of it – they are hardcoded at the moment :p). The admin menu also has a button to populate all posts without tags in the blog with tags automatically but I haven’t finished this functionality either. I first want to check out the base functionality in a production environment and then I’ll get the rest working. So here goes ….

Tags: ,
Posted by Fahim at 7:12 am  |  4 Comments

February 16, 2006

Back to Blog

Boy, this whole tag cloud thing is conjuring up a cloud of its own :p Yesterday, I got the Ultimate Tag Warrior plugin but it turns out that I have to specify the tags for the plugin in WP for it to work 🙁 Sure, as Lorelle pointed out in the comments yesterday, I can always set the plugin to use categories as tags and that should solve the issue right? Except that I post to my WP installation via Blog and Blog currently has no support for categories 🙁

OK, that’s not entirely true. Blog has some great category support (though Laurie will tell you it is broken in the current betas :p) but those categories don’t transfer over when publishing to WP via XMLRPC. So, I decided to get back to Blog and fix that. Of course, me being me, I can’t work on one particular issue only – I had to go redo a whole lot of other things :p There was one outstanding issue from the early days of Blog – how I handled database tables internally. The way I was doing it was not quite efficient and rather clumsy because that’s how I had started all that time ago in the early days of Blog. Blog was my first Delphi app and it shows. However, I have not fixed this all this time since Blog has gotten increasingly more complicated over the years and fixing the way data tables were linked was a rather cumbersome task.

I began fixing that yesterday :p Yeah, I’m a glutton for punishment. I also added in support via the XMLRPC interface for working with categories. That part at least works now but I realized then that due to the way Blog works, categories were going to be a major pain! Blog can publish to multiple destinations and this means that conceivably, somebody can publish the same blog to two different WP installations. This would mean that each installation would have its own list of categories and Blog would have a third list of categories internally. How do you keep all these different categories distinct. How do you make sure that Blog marks the correct categories on each WP installation? This is going to require a whole new set of tables and logic 🙂 Ah well, the joys of coding …

Tags: , , ,
Posted by Fahim at 8:14 am  |  1 Comment

February 15, 2006

Can I tag along?

Yesterday’s serendipitous discovery of TagCloud has led to a few other developments since then :p I realized after watching my tag cloud for a while yesterday that it wasn’t changing at all – it was simply displaying the tags for wordsmith.org and nothing at all from my own blog entries. So I decided to do some digging to see what was going on. I still am not sure what exactly is wrong with TagCloud because I had assumed that the Yahoo Content Analysis service basically went through your site and figured out what the relevant tags for your entries were instead of you having to set up tags for each entry. However, nothing seemed to be happening – maybe their indexing service was slow or maybe it wasn’t functional. All I know is that even after 24 hours, my site was not displaying any tags.

So, I decided to look for alternatives tailored specifically towars WordPress 🙂 Or more accurately, I wanted to find something for WP which would generate tags in case I was wrong about TagCloud and they actually needed the tags somehow explicitly specified in the RSS feed. That was when I came across this blog post – now here was a solution (and a total solution at that :p) to what I’d been looking for. So I went over to the Ultimate Tag Warrior page, downloaded the plugin and installed it. I removed my existing TagCloud entry on my blog and added my own personalized tag cloud for my site. But nothing still showed up!

Why not? Because none of my entries had existing tags :p So now I had to find a way to add the tags to get a tag cloud. I spent a little time doing the entries by hand and trying to figure out what tags to assign before giving it up as too time consuming. The Ultimate Tag Warrior plugin does have a button which is supposed to retrieve the suggested tags for each entry from Tagyu but for some reason, the button wouldn’t work – at least at my end. I decided to go through the source and see what was happening and if necessary, write a plugin of my own which would connect to Tagyu and pull suggested tags for each entry at the time of publishing. Perhaps I could adapt the system to also go through all my existing entries and add tags …. So I have a new project to work on … Not that I really wanted one but oh well, need something to keep life interesting, right? :p

Tags: , ,
Posted by Fahim at 8:23 am  |  2 Comments

February 14, 2006

The scavenger hunt

It’s always interesting what you find when you go hunting early in the morning :p Today, I was deleting a few spam comment entries in my blog when the Incoming Links section caught my eye. So I took a look at the sites linking to me and one of those sites, came across TagCloud. This particular site only had a tag cloud but no information as to how to get one. However, I knew they were a WordPress site based on the links on their site and so I began doing a Google search for WordPress and TagCloud. So, by way of an entry on the WordPress support forums, I arrived at the TagCloud site that I already linked to :p

This of course, started me off on a whole new tangent. I had to learn what tag clouds were, how to implement them and how I could set one of my own up on my site. I signed up for their service and created my own cloud. I added my own RSS feed and then had to pause to wonder what else I could add. I first added an RSS feed from dictionary.com but didn’t like how that looked. My favourite wordsmith site is of course, wordsmith.org – I’ve been a subscriber to Word-A-Day for longer than I can remember 🙂 So I decided to see if they had an RSS feed, and what do you know, they did! So I added that to my cloud and I was happy for the moment – but not totally happy since my site by itself was still not appearing on the tag cloud. They say that it takes a few minutes to be indexed but nothing was happening even after 10 minutes. Oh well, guess I’ll have to check on that tomorrow :p

In the meantime, going through the stuff at TagCloud, I came across a reference to GreaseMonkey. So over to that page I went and in reading up about GreaseMonkey’s capabilities, I came across a link to the Coral Content Distribution Network. Now a friend of mine, Nige, has been having a lot of trouble lately because his site keeps on getting featured on digg and going down due to heavy load. This seemed like the perfect solution for the issues that he’d been facing. So I dashed off the link to him. Another problem resolved (or at least a potential solution discovered) all within the course of half an hour of aimless web surfing. Ah, the wonders of the Internet :p

Tags: , ,
Posted by Fahim at 8:10 am  |  No Comments

February 5, 2006

Upgrades and changes

Recently, there seem to have been a lot of new minor releases – FireFox 1.5.0.1, Directory Opus 8.2.1.0 and WordPress 2.0.1 for instance. Now I do use all of the above and I upgraded to all of them. The FireFox upgrade required that I also upgrade the AI Roboform extension but other than that, it worked fine. The Directory Opus upgrade has not produced any issues yet. The biggest upgrade, for me at least, was WordPress since I had not yet made the transition from WordPress 1.5 to 2.0 yet.

As I’d mentioned before, I didn’t particularly want to upgrade to WordPress 2.0 since there wasn’t anything much there that I really wanted. However, what with the release of 2.0.1 and the announcement that they’d fixed 100+ bugs in it, I figured that I might as well upgrade now since all future fixes would come for the 2.0 branch anyway 🙂 The thing I hate about upgrading WordPress is that they recommend deleting all WP PHP files and then installing the new code. I have WP installed in a folder where there are hundreds (yes, really, hundreds :p) of other files and trying to find just the WP files can be a pain in the posterior. I have tried simply overwriting existing files and it has worked every time I’ve tried but being anal retentive, that just doesn’t sit right with me :p I *need* to do it just the way the documentation says.

So, this time what I did was, I pulled out the WP 1.5.2 zip file, extracted the contents to a temporary folder, got a file listing and created a shell script from the listing to move all WP files to a temporary location. I then extracted the WP 2.0.1 install ZIP file’s contents on to the location where WP had been installed and we were up and going in a short time 🙂

Of course, now that I had WP 2.0.1, I had to go upgrade some of my plugins and remove unused ones as well. I found that I had a bunch of old plugins in the plugins folder for no reason – so out they went. Then I upgraded to Spam Karma 2.1 since I still had 2.0 installed. Now that I had WP 2.0, I could also go for the AKismet plugin to combat spam. I didn’t want to install the built-in AKismet plugin though since I prefer Spam Karma. So I got the Akismet plugin for Spam Karma and we were all set! Incidentally, Dr. Dave who develops Spam Karma had some stuff to say about a new breed of spam-bots but that’ll have to wait for another day …

Tags: ,
Posted by Fahim at 8:04 am  |  No Comments

January 13, 2006

Inconvenient breakdowns

Technology always breaks down when you least expect it and when it can cause the most inconvenience :p Of course, Murphy said it better with his law but still this fact was brought home to me once again this week.

I had been using Spam Karma 2 for about a month now. It worked well and caught everything thrown its way during that time period. So, with both Spam Karma and Bad Behaviour in place I went off for a couple of days secure in my mind that my blog would be safe. (BTW, I should mention that Bad Behaviour has been doing an excellent job with all that annoying trackback spam. I see a lot of trackback entries – sometimes all I see in my visitor logs is trackback entries – but none of them seem to make it through. Of course, it is possible that Bad Behaviour is blocking some legitimate ones but then again, I’m not absolutely certain this is the case.)

I come back after two days and what do I find? Not one, not two but three spam comments had gotten through everything and were sitting pretty in my blog. I immediately deleted them. I believe I know why they made it through (no, Spam Karma wasn’t malfunctioning :p) but the interesting thing is that this happened while I was away and so couldn’t deal with them immediately. So I’m left wondering as to whether the three comments were just because the first comment got through and the guy kept going or was it just another incident of things going wrong at the most inconvenient time where it could cause the most damage? :p

Tags: ,
Posted by Fahim at 7:16 am  |  No Comments

December 25, 2005

Pressing Matters

WordPress 2.0 is right around the corner. They released RC3 (Release Candidate 3) a few days ago and I downloaded it but have been too busy (or too lazy :p) to do much with it. I read up on what was new in WP 2.0 a few days ago after I downloaded the RC and none of it was actually appealing from an end-user point of view :p Most of the major changes are under the hood or in the admin panel. The under the hood changes promise new plugins and new functionality further down the road and the admin panel changes gives you pretty coloured feedback on when you delete a line or activate a theme. From an end-user perspective, big deal!

Of course, I’m not belittling all of the hardwork put in by the WordPress developers. But then again, given that when I came into WordPress a couple of years ago and they were working on WP 1.3 (I think?) there was all this talk about multiple blogs from the same WordPress installation. Every new release would be accompanied by the (perhaps implied) promise that multiple blogs were right around the corner and would be there soon. Now WordPress 2.0 has come around and it appears that the developers have dropped multiple blogs altogether since there are other projects around working on this. I feel cheated :p

When I switched from Movable Type to WordPress, I wanted a blogging system that would handle multiple blogs. There were other reasons for the move but at that point, one of the deciding factors in me picking WordPress was the fact that multiple blogs were supposed to be "just around the corner". Of course, it’s beside the fact that I don’t really need the multiple blogs functionality anymore – I still feel cheated :p Yes, I’ll stop whining about the multiple blog support now … though I might try to get at least one more whine in before this entry is complete 🙂

Overall, I’m happy with WP as it is. It does the job and some of the plugins actually make it totally worthwhile. For instance, Bad Behaviour and Spam Karma have almost eliminated all spam comments from my blog – now that’s a great thing. However, I don’t get a feel for where WordPress overall as a blogging tool is heading at the moment and that makes me wonder if I should start looking at alternatives again … and yes, I’d want an alternative which also has multiple blog functionality :p

Tags: ,
Posted by Fahim at 7:39 am  |  1 Comment

February 24, 2005

Backtracking on those trackbacks …

No sooner had I converted my site over to use WP 1.5 (after making the earlier entry about planning to do so), I got hit by one of those bits of new trackback spam – ugh! My first reaction was that perhaps the new trackback and pingback blacklisting features that I’d added to WPBlacklist weren’t working anymore due to some change in WP 1.5 (I had actually done the work before WP 1.5 was released …). I had almost gotten my development stuff ready to debug the code when I thought to go back and check on the trackback spam I’d received. Turned out that they’d come up with yet another variation on "texas holdem" – in their case, it was texas hold’em -. My initial reaction was to simply add an entry to the blacklist for the new variation and go on but then I decided to check how many entries I had in the blacklist for just the word texas and I was amazed to discover that I had over 300 entries! So I decided to come up with a regular expression which would catch all variations of texas holdem and after a little mucking around, the final masterpiece was "texas.*?hold.*?em" :p

Of course, the above may identify some benign stuff as spam as well but for the moment, I don’t care – I will deal with it when it happens :p (Oh if anybody is going to comment on this entry, you’d better not use the words texas holdem :p) I then set about deleting all the individual blacklist items which would be replaced by the regular expression and discovered that I could remove 316 items! Of course, I don’t know how many (probably all) would come back when I next update from Jay Allen’s central list but for the moment, I am happy the way things are 🙂 And the icing on the cake was just as I got done deleting all those 316 items, a new e-mail comes in saying that a comment was automatically deleted by WPBlacklist. The offender? The self-same guy with that new variation on the dreaded texas poker theme – gotcha sucker!! :p If anybody is eagerly awaiting the new WPBlacklist, I am happy enough with the way it is working at the moment (and what better way to test than in a production environment? :p) and so just have to make the necessary documentation changes, pack it all up, update the WPBlacklist page and then upload it. I promise that I’ll do that sometime tonight 🙂

Tags: , ,
Posted by Fahim at 4:26 pm  |  7 Comments

Pressing Updates

The next big release of WordPress, WP 1.5 code name Strayhorn, was released last week and unfortunately, they broke some of the stuff as far as plugins went 🙁 Since I use my own WPBlacklist plugin to safeguard against comment spam on this site, that meant that I couldn’t upgrade to WP 1.5 just yet. Of course, in the meantime, I’ve been getting inquiries about when I would fix WPBlacklist so that it would actually work with WP 1.5. I was planning to do all of this over the wekend but unfortunately, I got caught up in a different coding project – one involving C code and mingw32 … so lots of fun there :p – and so couldn’t do what I had originally planned to do – which was install WP 1.5 and get WPBlacklist working with it.

Yesterday, I finally decided to take the plunge and do the work even if I didn’t have enough time to work at it as I would have over a weekend. Of course, I didn’t install WP 1.5 on this site since I didn’t want to have to do without WPBlacklist in case I couldn’t get things working immediately – instead, I installed it on my development machine and I should say that the upgrade process went very smoothly. It wasn’t as painful as I’d thought it would be since they’d added a new template feature to WP in 1.5 and I had thought that I might have to redo the template for my site all over again. Actually, it wasn’t that hard at all. All I had to do was remove a few lines from my old template, replace a few lines and move it to a new location and I was done 🙂 The WPBlacklist changes weren’t that smooth though :p

Initially I was stumped because I wasn’t seeing errors where I was supposed to see errors – or at least, was expecting errors. So I spent quite a bit of time trying to figure out why I wasn’t seeing errors. Finally it turned out that the errors weren’t where I thought they would be :p In short, I spent a good hour running around in circles. Finally, once I got past that bit, I was able to make the code changes in a very short time and get things working. However, I am not too confident that I’ve caught all the little things that need to be fixed and so am taking another day to go through it all and to fix up the code, spruce up the documentation and so on. Then I’ll probably upgrade the site, install WPBlacklist here and see how it goes. If all goes well, then you should see the new plugin available for download in a couple of days – I promise 🙂

Tags: ,
Posted by Fahim at 10:49 am  |  4 Comments

October 25, 2004

Jersey Girls and Spammer Jerks

I watched "Jersey Girl" on Saturday with Laurie and I must say I loved it 🙂 I’ve seen other Kevin Smith movies like "Chasing Amy", "Dogma" and "Jay and Silent Bob Strike Back" and while they all had certain thought-provoking aspects, they never appealed to me emotionally the way "Jersey Girl" did. I don’t know if Keving Smith is growing as a writer and a director of if he is simply becoming one more "Hollywood" writer/director but what I can say is that I liked this one better than most of his previous works. It still had little touches which make it a non-run-of-the-mill movie – such as Gertie doing "Sweeny Todd" for the school (complete with slitting of throats and all :p) and Liv Tyler’s character which was so over-the-top and yet kind of true to life. Most people would probably say that Kevin Smith has sold out because this wasn’t a gritty, realistic, thought provoking movie but instead actually has a happy ending :p But I say, I loved it!!

Spammers seem to be evoking very harsh reactions these days. I’ve heard many people call them jerks (the title was just to go along with Jersey Girls – I really don’t think they are any more of jerks than the rest of humanity … people are just people :p) and even had a couple of users of WPBlacklist write to me and say that they should rot in hell 🙂 I don’t particularly like spammers myself (notwithstanding me not thinking of them as jerks) and so I’ve been conducting my own one-man campaign to do what I can to stop people from being bugged by spam. I’ve been posting over at the WP support forums in response to every spam-related query and have even updated the WPBlacklist plugin in a frenzy of updates to make sure that it can do the best possible to combat spam comments. While I was doing all of this, I seemed to be safe from spam myself for the longest time except for a couple of comments every other day. That seems to have changed now :p Either somebody is determined to get me (no, I’m not paranoid :p) or the spammers have come up with a new set of scripts/tools which circumvent most of the spam deterrents that I’d already put in place. I’ve been getting a steady stream of spam comments since I woke up in the morning today – but the good news is that WPBlacklist has so far caught them all and deleted them instantly. So I sit here with a smug smile on my face saying "another spam comment gone" while the flood of spam continues to hammer at my site :p

Tags: , , ,
Posted by Fahim at 10:24 am  |  5 Comments

« Previous PageNext Page »