hKit and Tidying (X)HTML: A Serious Failure [Update]

Posted on March 6th, 2008

After promoting hAvatar during BarcampBrighton and SemanticCamp, I was starting to get pretty happy with the response we got from people. So, you can imagine how annoyed I was when suddenly my own avatar stopped working on several sites. Today I took a dive into the code behind the hAvatar plugin for Wordpress, and most importantly: hKit.

Problem Found

As I expected the issue was not with Alper’s code of the hAvatar plugin but rather with the hKit PHP library. As a step in the process of determining the hCard in the hKit library, the source code that is read is “Tidied”. hKit has 3 build in ways of doing this, the default being using the W3C tidy service.

The W3C service is a very simple service that simply takes a URL as a parameter like this:

http://cgi.w3.org/cgi-bin/tidy?docAddr=http://google.com/

As a result this gives the tidied output of the source of that URL. Now the serious issue that I ran into was that for some weird reason my URL (http://cristianobetta.com) causes a timeout in this service. To be more precise: about every URL on my server causes an issues. Obviously I contacted my hosting provider about this issue but let’s put the problem in a different perspective.

The Bottleneck Dillema

The problem here in my opinion is that hKit relies on a “bottleneck” in their process. Normally this bottleneck only causes a performance issue, but this time it even caused errors. Sadly though, because of this use hKit is not really a standalone script and things can therefore go wrong without hKit knowing. In my opinion hKit would be much more interesting if it shipped with an in-build, platform independent solution to take care of this step.

There are currently some other options besides the proxy to tidy up code. One of the settings of hKit allows for changing the tidy mode to “exec”, “php” or “none”. The first tries to use the tidy command, the second the tidy php functions. Unfortunately none of both are by default available on most systems, making an easy deployment of hAvatar on those systems way harder. To use the “php” option the tidy library needs to be compiled into PHP, which is sometimes impossible, and to use the “exec” command a binary is needed, which makes the solution rather platform dependent.

The Plead

So here I am, asking for a new solution that makes hKit a more independent library. I think it makes sense from a technical and philosophical perspective, but most of all from a performance view. Currently hKit isn’t that fast already (you can’t instance it more than once, making parallel processing of avatars fairly hard) and I think that a server side, non-proxy solution would seriously give this kit a performance boost. Obviously I would be happy as people would by default probably be able to load my avatar, as where it is currently unclear why W3C can’t fetch my url.

* Update: After an email with my hosting provider it seems that the W3C proxy now has access to my server, enabling all hAvatar activities on my domains. Still, I think my point above is valid from a performance point of view.

Don’t Expect Me To Facebook Cause You Do!

Posted on March 4th, 2008

Recently I have been starting to get really fed up with Facebook (I am not the only one). My main problem is that I don’t use it but others do and expect you to be the same. My problem though is that Facebook data is very closed, inaccessible, and honestly I think I use better solutions.

One example is where I use Upcoming versus the Facebook event structure. More than one person have been nagging me about integrating the Upcoming events and the GeekDinner blog posts into the Facebook group because that’s easier for them. Honestly, I like Upcoming and Wordpress perfectly well on their own. How hard can it be for someone to simply add the RSS feeds from either to your favorite RSS reader and then add the iCal events to your favorite calendar utility when you feel like it?

Anyhow, I will be trying to auto-integrate the blog and upcoming into the Geek Dinner Facebook group because I caved in. But please don’t expect me to Facebook because you do. If I don’t reply to a wall message, send me an email. All my info is freely available online. It is not THAT hard to find, seriously.

The Software I Dumped in 2007

Posted on January 2nd, 2008 nederlands

Instead of focussing on what is coming in 2008, or what was popular in 2007, I wanted to focus on what I decided to dump in 2007. Not Melinda, I would never dump her, but software (and related) I did dump. Here is the software I decided to stop using in 2007:

  • Firefox: Although I still have Firefox installed, I never really use it anymore but for testing and debugging HTML. I don’t use it as a browser anymore because version 2 is so ridiculously slow in comparison to let’s say Safari. Furthermore I don’t like how insecure and inaccessible Firefox stores its login information for websites. Come on Mozilla, you do know that Mac OS X has a Keychain for that right? I mean, Mozilla Camino does it, Safari does it, then why doesn’t Firefox do it? Furthermore I don’t need 300 browser tweaks, so running Safari 3 with Saft and Inquisitor is all I really need.
  • Microsoft Office: With the release of iWork ‘08 the use of Microsoft Office has really become redundant. I wrote before on how I think that a combination of Google Docs and iWork could be a far more valuable asset for most people. I personally don’t work for a company that wants me to use MS Office, neither do I feel it gives me something extra. It has even gone this far that I seriously don’t care anymore about what Microsoft is doing with Office 2008. Is it still coming in 2008? Is it out yet? Don’t care.
  • FAT: Before we moved to London I still had a lot of data one external hard drives, partitioned in FAT32, because you never know when you need to access your data on a Windows machine. With the move to London and a very Mac oriented world I decided to dump FAT because it is too limiting and simply useless. If I ever need to share that data with a Windows pc I will just have to make the data available over Samba or something.

Analyzing The New Macbook Keyboard

Posted on December 20th, 2007

As some of you might have noticed: the new 4th generation Macbook has a new keyboard layout which looks much like their standalone keyboards. The keyboard is still the same floating-keys concept, but Apple moved around some buttons and deleted some others. As I had an old Macbook and now have a 4th generation Macbook, I thought it would be nice to quickly walk through some of the mayor changes.

First lets take a look at the 2 keyboards (top is a old european version, bottom is the new UK version):

Macbook Keyboard Coparison

1 - F-Keys Switcheroo

One of the most obvious and possibly most disturbing changes are the new F-keys. The previous Macbooks (and the iBooks and Powerbooks before) had the brightness and volume controls on the first few F-keys, followed by the num-lock and monitor-switcher. The last few keys were reserved for most of the Expose and Dashboard features, although they had the obvious design flaw of not being labeled and therefore rarely discovered.

In the new keyboard Apple tried to fix this flaw by assigning some icons to some of these features including Dashboard. But instead of keeping the buttons in the same position, they started to move them around. Dashboard is now not on F12 but on F4, “Show all windows” is now on F3 instead of F9. To make things worse they actually left out some of the functions like F11 (move all windows to show desktop) in order to have room for some extra buttons to control media playback.

Now, there are some notes here. First of all the media playback buttons are actually handy, though a bit redundant as every Macbook comes with a remote. Secondly, all the old functions are still available under the Fn key, but presseing Fn+F11 is not a very handy combo to do with one hand.

2 - Losing Useless Keys

The second thing Apple did was to get rid of a whole bunch of useless keys. First of all the entire num-pad has gone. Num-pads tend to only work if all 9 keys are aligned in a neat grid, but as they weren’t on a Macbook it made them pretty useless. As Macbooks aren’t used by administrative junkies anyway it seemed reasonable to drop the entire num-pad rather than thinking of some more elaborate solution.

Another thing that was removed is the key that nobody ever understood the function of, namely the smaller return key that used to be next to the right Command key. Instead they replaced it with a second Option key, which makes sense. I would have rather seen a second ctrl key there actually, so that you can switch Spaces with one hand (Ctrl+arrow).

Talking about the arrow keys: they look a bit cleaner! Removing the home, end, page up and page down functions made sense as most common people never use them, and all the others know how to find them anyway. I always thought they were a bit odd because it never stated properly what modifier key to use in combination with those arrows keys to get those functions. Is it Command or Option?

Finally it seems the screen output switcher key that used to be on F6 has been removed. That key was pretty handy for switching between dual screen and clone mode when connecting a Macbook to an external monitor or beamer. I have no idea if this button secretly still works with that function. Can anyone tell me?

3 - “Fixing” the Capslock

Finally, Apple decided to give the new Macbook keyboard the same feature as they gave their normal keyboards: anti-accidental-CapsLock-prevention. The idea here is that most people never use the CapsLock but most of the time accidentally hit it when they didn’t want to. To solve this Apple made sure that this new key doesn’t turn on the CapsLock if you tap it very quickly. Only when your really press it and hold it will it turn on. Reinier noted that this obviously isn’t a real fix, but more of a dirty hack. A proper solution would be to replace the CapsLock in its entirety with something far more useful. Maybe a left-side return key?

Why Ports for Old Media Suck

Posted on April 22nd, 2007

Before there was the internet, there was a different service that provided On Demand news and information called Teletekst (in the UK called Ceefax). Many people from before our generation (read our parents) grew up with this system and have created a so called lock in. I know for example that my mother often still uses Ceefax to check the news sometimes, and for the now “interneting” part of her generation many Ceefax providers have created an online version.

My mother also checks this online version because she knows how to use it and she probably likes the ugly high contrast (you need to become old to like that). Until recently I didn’t really mind that she used this system but now she started sending me some interesting stories, and I noticed that Ceefax has one big flaw: it doesn’t support links. And as it doesn’t support links, there is no reference to a story, no “reading on”, no more learning than there just is on that screen.

In school I learned that you always have to check your facts, and that a story doesn’t really have a value without its references. It is amazing in this sense that the past generation blames the internet for providing less value while I think most articles on the internet DO have references. Making a hyperlink is quite easy on the internet, but in a newspaper or Ceefax article this is simply impossible. I therefore would like to denounce my appreciation for old media like newspapers and Ceefax, and I would wish that people would stop making stupid ports like this Ceefax readers because they forget to force people to move to a system that is inherently better.

© Cristiano on Tech/Life • Powered by Wordpress • Using the Swiss Cool theme.