Monthly Archives: June 2005

Elitist Light Sockets

Around a month ago, we had a spate of light bulbs blow. When I say spate, I really do mean it – I’ve replaced five in the space of two weeks. I wonder if the mean life to failure of an average light bulb is reasonably consistent? If that was the case, when the apartment was built and initially fitted with, presumably the same brand bulbs – they all failed around the same time. At which point, the then resident replaced them with, presumably the same brand bulbs, do you see the pattern emerging as well?

Back on track.

The light socket where my computer is, was a right royal pain in the arse. We already had spare light bulbs so I replaced it with whatever was in the cupboard (Brand A). Flick the switch, the light doesn’t come on. A little strange, so the next day I go and buy a different set of light bulbs (Brand B), change it – still nothing. I contacted our centre management that the light socket was faulty and they wanted me to try another brand, even after I explained that I’d already put a two different bulbs into it. I obliged and replaced it with another different brand (Brand C) – sure as the sun rising, it didn’t work. I contacted management again, to which they said they would now have an electrician come out. The electrician comes, does his tests and leaves saying the socket is working perfectly. So I put in a different bulb, but from one of the previous batches (Brand A or B) again, still nothing. Tonight, we went and picked up some groceries and I bought another different brand bulb (Brand D). This time, I put it in and the goddamn thing works, I just couldn’t believe it!

So, the question has to be asked: Do we have a fancy pants elitist light socket?

Disable Option’s In A Select (Dropdown) Element

The follow up article, Select, Option, Disabled And The JavaScript Solution has since been published. Please refer to it for more comprehensive information.

You would expect that being able to disable an option in a <select> element (read: dropdown box) would be a fairly important feature for a browser vendor to implement. From a Human Computer Interaction (HCI) standpoint, it is vital – as it lets the users know the option is exists, however under the current circumstances it is temporarily unavailable.

According to the W3C specifications for HTML4, there is an attribute available for both the <select> and <option> elements, which has the desired effect. The attribute in question is disabled (scroll down a little bit to see the option attributes).

According to the above specifications, you should expect that if you apply the disabled attribute to either a <select> or an <option> element, that it would become unavailable. If applied to the <select> element, the entire dropdown list will be greyed out and not selectable. If only applied to the <option> elements, the dropdown may be selected, however the options which are disabled will be greyed out, not selectable and focus will slide over them should you navigate through the options with the keyboard. The guidelines are very clear what is to be expected by this attribute.

Following is a small code snippet of how it should be implemented:

  1. <form action="form.asp" method="post">
  2. <select id="dropdown" name="dropdown">
  3. <option value="cat">Cat</option>
  4. <option value="snake" disabled="disabled">Snake</option>
  5. <option value="spider" disabled="disabled">Spider</option>
  6. <option value="dog">Dog</option>
  7. </select>
  8. <input type="submit" value="submit />
  9. </form>

You can use two variations on the syntax for the disabled attribute, depending on the version of HTML you are targeting:

  1. HTML4: <option value=”spider” disabled>Spider</option>
  2. XHTML: <option value=”spider” disabled=”disabled”>Spider</option>

The rendering of the above code snippet and the disabled select should be comparable to the below screenshots:

Compliant rendering of a disabled option element Compliant rendering of a disabled select element

This is where everything starts to slowly fall apart. The major browsers that are in use today are IE6, IE5.5, Mozilla/Firefox, Opera, Safari, OmniWeb. Of those, IE6 is without question the most used browser around the world. This strikes a problem for web developers, as its support for the new web development techniques (read: CSS1, CSS2 and soon CSS3) are either not present at all or worst yet, present but implemented incorrectly.

It never ceases to amaze me how a browser like IE6, managed to not implement something as trivial as an attribute like disabled. The IE team managed to implement it against the <select> element, but some how overlooked the <option> element. They implement the readonly attribute against the appropriate elements – yet some how the disabled attribute managed to be overlooked when they implemented it. More surprising is that, since the HTML4.01 specification came out in late 1999, IE has been updated and upgraded for various things literally hundreds of times. Why hasn’t this made it into an update? You’d begin to think that Microsoft aren’t aware of it, however the thought of that just seems too far fetched.

Combating Website Spam

Back toward the start of February, I wrote about the implementation and ramifications of the rel=”nofollow” attribute on user submitted content. Shortly afterward, I was prompted to write the rel=”nofollow” follow up entry as well. The idea back then was that website spam, in particular weblog spam, was rife and we (read: search engines) needed an answer. As a *cough*solution*cough*, some bright people thought that if they removed the reward (of PageRank in Google for instance), that the spammers would stop.

I’m here today to tell you that it hasn’t stopped, in fact I’d nearly say that it has increased. On the grander scale of things, I don’t get a lot of spam. A useful by product of that is, it’s also very handy for me to gauge how much spam I’m getting. If I were receiving hundreds or thousands of spam messages daily, I’d be handling them through ‘mass editing’ methods – “select all, delete”. Since I’m not though, I get to see, glance and sometimes even read the spam!

Over the past months, I’ve tried various spam defense mechanisms on the site. Some people have gone to extremes to implement some of the things I mentioned (ie: a ‘set’ of mechanisms that change each time you attempt to post) – so as to require the human factor to make the post. These systems no doubt work very well, however the problem I see with some of them is that they are restricting users from commenting on your site. A friend of mine has a small blog, hosted at Blogger – problem is that her site requires that you are a member before you can post. This single thing alone has stopped me to date from leaving comments – I want to but I just can’t be bothered signing up to leave a comment. I’d consider myself someone that will go to fairly long lengths to get between A and B, but if I won’t sign up for a dummy account on blogger to post – this to me proves that some anti-spam techniques aren’t just stopping the spammers.

One of the anti-spam techniques that I find works very well is keyword detection. If a spammer mentions a certain phrase in their spam, it is flagged that it requires moderation before it will go live. I think one of the primary reasons that this method is so easy to implement and effective, is that the spammers utilise SEO techniques in their spamming. By implementing SEO techniques, I mean that they, for instance use the same word or phrase to help build their keyword importance and visibility. A practical example might be having 100 inbound links to a particular page on your site, but all with different link text versus the same 100 links but all with the same link text. Since we know that they use these SEO techniques, it plays into our favour for simple detection. I’ve got a list of less than 50 words that I use to capture spam and so far they are working out wonderfully.

This isn’t earth shattering news for most but it might remind some people that simplicity is a beautiful thing. I often think we get caught up in overly complex systems to get between A and Z when there is often a shorter simpler path available that we’ve overlooked or discounted previously.

Dating A Developer

Matt posted an entry the other day about how to get lots of links and traffic. One of the links in his “list” was a link to Emily Hambidge’s site. The article in question was about dating an Apple developer and I just couldn’t help but put something down about it – it was pure gold.

Emily’s points were mostly generic to anyone that works in software development, not just software development at Apple. For the benefit of those that aren’t in the loop, the environment that software developers work in is generally more work than hours in the day and everything is mentioned today but needs to be delivered yesterday. If the latter fails, it is mentioned today and needs to be delivered in an unrealistic timeframe of say, tomorrow. This combination of attributes creates a fun and interesting environment to work in, which for some people is known to cause quite a bit of stress. Thankfully, I’m not the stressing type.

If you know a programmer or the wife/partner of one, you’ll probably get a kick out of 1o points to remember about dating a developer; especially if you’re a little computer savvy yourself!

McGooHQ Performance

25Mb file speed test, transferring at over 1MB/sOver the weekend, I was doing a little spring cleaning of files on my home computer and servers. Whilst in the mood, I thought I would also move some older data from my website hosted with McGooHQ to my home computer.

Since moving to McGooHQ, I’ve been nothing but impressed with the speed of their network and servers. Clicking through the site and browsing through FTP feels as though it is being done over LAN it is that fast. This LAN like speed is happening over ADSL though, which for me at home is limited to approximately 160Kb/s. So, I thought I’d give the server a little higher speed test from work, muuhaha.

What you’ll see above is me pulling down a 25,000,000 byte file from my site onto my work computer at just over 1MB/s. You might be thinking, 1MB/s to download a file isn’t that fast – maybe their servers and bandwidth isn’t that good at all; you’re wrong. To download a single file, using FTP in a single thread at over 1MB/s is absolutely hammering – most of the time you’d find you’d be limited to 400-600Kb/s.

Go McGooHQ, Go!

In case you were interested in seeing what everyone, not just myself are impressed about – I’ve made a 5Mb file for you to test the network speed on. Please don’t drill it, I do have a finite amount to data per month.