Quick fix for strange CSS link behavior

Tuesday February 13, 2007 at 1:18 am

Posts on GTD and photography for Scenes and Emos in the pipeline, but just a quick update - something that I discovered working on a website for a school project earlier. If you’re not into webdesign, give this one a miss.

If you’ve any experience in semantic webdesign/xHTML+CSS, you will know how… well, frankly what an arse IE is to code for. One of my pet hates is the way that it handles the :hover pseudo class. Firstly, it only works on links, and secondly, I personally have encountered a large number of seemingly unexplainable errors that occur after the link has been followed.

First, some background theory.  The order of a CSS document is important - if two styles for an element exist, the last property will always win. Because of this, it is important to put your pseudo classes in the right order. This order is:

  1. :link
  2. :visited
  3. :hover
  4. :active

It is easy to remember this if you remember that you will have a love/hate relationship with pseudo classes - that’s link visited hover active.

This is fair enough, but sometimes certain properties won’t work after the link has been followed in IE<7.

OK. So, the solution?

Leave off the :link pseudo class. Your styles will work (as far as I can tell) just fine, without the strange, seemingly random errors. If in doubt, add a blank and pseudo-classed selector for each link.

Posted in Geekery, Site News. 3 comments so far.

Learning to program in Ruby in 15 minutes

Tuesday February 6, 2007 at 12:10 am

Ruby is an open-source programming language that can be used as a server-side preprocessor, similar to PHP, Perl, Python and so on. What sets it apart is that it is surprisingly user-friendly and programmer-orientated. The official description from the Ruby website is:

A dynamic, open source programming language with a focus on simplicity and productivity. It has an elegant syntax that is natural to read and easy to write.

It certainly does seem friendly enough - it is built-in to many major Linux distributions as standard and there are equally effortless installers for both Windows and Mac OS. There is also a nifty interface for testing little snippets of code on the fly, and for launching larger projects. And it really is elegant - much more so than PHP.

What impresses me most, though, is an online interface for trying out Ruby that doubles up as as brief walkthrough and tutorial to the Ruby language. Go on, try it out - if you’re new to programming it is a nice little introduction on how programming syntax works; if you’re a little more experienced, it is refreshingly natural.

Posted in Geekery. 1 comment so far.

Some things just don’t get done

Wednesday January 31, 2007 at 12:15 am

At the end of the day, as I empty my locker and pack my diary, I decide that once I am home I will concentrate on just perhaps one or two broad tasks before I sleep. Usually I have something specific in mind - installing a new hard-drive, learning more about PHP and finishing my coursework have been recurring themes recently. So why do I never get round to them?

By the time I have walked my girlfriend to her Dad’s office, taken the odd picture and walked home, it is often 6PM or later. When I get home I am cold, tired, suffering from iPod-induced deafness and occasionally in a cold sweat. The last thing I want to do is pour over a book the thickness of my clenched fist, operate on my PC or do school work. There is always that niggling little voice in my head telling me that I don’t have to worry, there are hours to go.

The problem is, it is… how can I say… hampering my productivity. So I have devised myself a little ‘Getting Things Done’ system. It seems to be increasingly effective - OK, so I am writing this blog post as I should be either sleeping or exercising, but you can actually see my carpet, I have practiced guitar for a solid hour, been for a jog and tidied out a cupboard.

I want to share this method of organization, which is based largely around a book that I have never read. I will share it sometime next week, after it has been refined and I can confirm its effectiveness.

If you want to join in my little experiment, you will need the following:

  • A note book, preferably unruled (I am using a slightly-larger-than-a5 blank-paper textile-bound book-thing from WHSmiths. Choose something without a cardboard spine - i.e. something that won’t fall apart within a week)
  • A good pen that you enjoy writing with (avoid cheap, nasty ones - you will resent using them)
  • Some mini post-its
  • A note block (the kind that you put by the phone to scribble things down, but don’t bother buying a pen for, rendering them totally useless and causing great frustration)
  • Tack of your choice (I use UHU white-tack rather than blu-tack because it is more pliable. That and you can get it from Poundland.)

Oh, and be prepared for some GTD geekery.

Update:

You might also want to prepare the following:

  • A couple of fleurescent highlighter pens in different colours (not a prerequisite of my GTD system, but they really do seem to have a positive impact… and they’re very pretty)
  • Some wall space for sticking notes to (I moved an A1-sized poster onto my ceiling and am using that space currently)

As an irellevant aside, if you’re into this kind of thing you may be interested to know that Partners are selling A1-sized whiteboards at stupid prices - you can get the board itself plus extra hooks and loops for wall-hanging and pens of your choice - black and red FTW - for less than £15.

Posted in Geekery, Ramblings, Thoughts. 1 comment so far.

My own personal blog

Tuesday December 12, 2006 at 12:39 am

Half an hour I installed a personal blog. It’s like orangeacid.net - it has a vague and undefined purpose, and by its very definition will be created, redesigned before the end of its natural lifespan, rebuilt from scratch every 6 months, and will in be generally even more incomplete than this site you are on now.

This blog is a little different, though - it’s mine.

Read more…

Posted in Geekery, Ramblings, Site News. 1 comment so far.

Boost your WiFi reception with a homemade antenna dish

Saturday December 9, 2006 at 12:18 am

I found a very interesting article on MetaFilter earlier on how to boost your WiFi reception - or, how to make a WiFi antenna out of a cheap USB WiFi dongle, an extension cable, and Chinese cooking utensils.
During my last holiday, I discovered that I could log in to a free WiFi hotspot from my balcony if I positioned myself in a certain way. Unfortunately, the source was a fair distance away and more than a centimeter or two of movement was enough to cause my connection to drop. However, it has come to my attention that it is possible to build a homemade WiFi antenna which could eliminate this problem.

However, a word of warning from a MetaFilter poster beforehand:

“Cantennas” are technically illegal in the U.S. under Part 15 FCC rules, and in some states, including where I live, arrests have been made for use of such devices, where they are considered evidence of intent for unauthorized network intrusion. Using highly directional antennas to leach WiFi access from fixed locations also makes it much easier to accurately triangulate your location as an infringing user; I’ve had a couple of idiot neighbors try to grab access from my WiFi signal, and I’ve really appreciated the reliable directional signals they provided while trying to do so, as it made it much easier to locate them, and play reverse head games with them.

WiFi “works” precisely because it is a very short range service. Using directional antennas, “power boosters” or other mechanisms to intentionally circumvent the Part 15 range limits entirely for your own convenience is boorish at best, and can disrupt legitimate users operating gear in the intended manner. Don’t be a jerk.

Read more…

Posted in Geekery, Mini Articles. 1 comment so far.

Banish your MSN Viruses

Tuesday November 28, 2006 at 12:12 am

There appears to be an epidemic of MSN-bourne viruses plaguing LFC students.  Perhaps more tragic than that people are gullible enough to download these viruses is that once infected, no-one who I have talked to has known how to remove them.

The virus itself (technically a ‘worm‘ in virus terminology) works by hijacking your MSN client and sending a message to your contacts to the tune of:

“OMG, is this you?! :p [download link]“

The link points to what appears to be an image file on some funny pictures website; however, the link redirects to a .pif file which self-replicates and attempts to further spread itself to your contacts, who download it and… repeat ad infinitum.

If you have fallen victim to this, you could always try this free online virus scan, Housecall, from Trend Micro. The online application is very straightforward and, being written in Java, works on the more secure Firefox web browser. It works on Mac and Linux OS, too… not that Mac or Linux users would realistically need it.

Housecall, although excellent for a web-based app (I first used it about four years ago) is not ideal - you should really have some form of dedicated antivirus software installed on your system.  Popular commercial software comes from companies such as Norton or McAfee, but personally, having used both commercial software and the free alternatives, I recommend AVG Anti-Virus (free edition) for your virus-busting needs as it is automated, unobtrusive and very effective.  It can also be set up to scan every file imperceptibly before it is opened to check for nasties.

For those of you looking for Firewall protection, I recommend ZoneAlarm Personal - another free program that I have personally used and sworn by for years.

Posted in Geekery, General, School. 3 comments so far.
« Previous PageNext Page »