Archive for April, 2007

Why are you not POSH?

26th April 2007

In the UK Posh is a phrase meaning upmarket, rich or upper class. Its origins are based in the cruise liner industry. The most sought after cabins that were frequented by the richer passengers on journeys to India were on the port side for the outward-bound journey and on the starboard side on the home-bound journey, because they were more shielded from the sun.

‘Port Out, Starboard Home’ then became abbreviated to Posh and attributed to the rich passengers.

But now it has a new meaning. Some big names in development world came up with the acronym POSH, meaning ‘Plain Old Semantic Markup’, with a goal to promote semantic markup.

What?

POSH is an umbrella term for using semantic markup and best practices when creating markup for your web pages. Its all about using the correct semantic markup to create structured content in pages, separating out this structure from presentation and other good practices to make your markup play nice.

Why are you not POSH?

To be honest it is not hard to POSH, there is not real excuse for not producing POSH markup.
So why are there so many web pages out there that are still not built with proper semantic markup. I would say its down to a number of things.

  1. Ignorance - not being aware of these techniques and best practices. Hopefully snappy acronyms like POSH will bring about more awareness.
  2. Laziness - “It takes too long to learn CSS. I’ll do this page in tables because its easier for me.”, come on son! call your self a professional, get with the times and learn CSS.
  3. Old code base - Legacy code that spits out table based layouts need updating and that takes time and money, both of which you may not have.
  4. You use ASP.NET, although things are improving slowly!

There are many benefits to using POSH and not so many drawbacks.

Benefits of POSH

  • Pages are easier to read and understand, therefore they will be easier and quicker for developers to maintain and debug.
  • Pages are more portable to other devices other that web browsers.
  • Pages are structured correctly making them more search engine friendly.
  • Pages are more accessible, easer to read by screen readers.

Drawbacks of POSH

  • Effort, you have to get off your arse and learn something new.
  • Having to update your legacy CMS which will take time and money.

I know that this post may seem a bit biased but I can genuinely not think of a good reason not to use POSH in your code.

If your CMS still produces tables and all manner of tag soup then bear this in mind. It makes bad business sense not to update your CMS to use POSH, you are limiting your potential market. A CMS that produces more search engine friendly and accessible markup will be more attractive to clients and may well give you the edge you need against other competing CMS’s.

How can I be POSH?

A good starting point is to check out the POSH page on the microformats wiki. There is a good checklist and resources to give your markup the POSH touch.

If I am preaching to the converted then help spread the word!

Instant Rails, RadRails and a broken console

9th April 2007

This week end I was playing around with RadRails, putting it through its paces and seeing if I want to use it to develop my apps. I encountered a problem when I tried to use the Console.

  'irb.bat' is not recognized as an internal or external command,
  operable program or batch file

I did a little digging around on the internet and found out it was a problem with using Instant Rails and RadRails together. Instant Rails is a self contained development environment for Ruby on Rails on a Widows machine. It does not modify your system environment at all, as a concequence Windows did not know where to find my irb.bat file to run the Ruby shell for the console.

This is easily fixed though, all you have to do is go to

My Computer > Properties > Advanced > Environment Variables > System Variables.

Find the variable named Path, then click Edit and add in the following (this assumes you installed Instant Rails into a directory called InstantRails in your C drive, if not replace the path with your own path):

C:\\InstantRails\\ruby\\bin;

Make sure there is a ; separating the value you add and the current variable value. Windows will now know where to find the Ruby executable files. For completeness you could also add in some more paths to let Widows know where the executables are for MySQL, Apache and PHP.

C:\\InstantRails\\mysql\\bin;C:\\InstantRails\\Apache;C:\\InstantRails\\PHP

There does not seem to be a huge amount of support documentation out there at the moment for RadRails. I think this will improve soon. Aptana has only just taken over the RadRails project and are settling in at the moment, there is a good resource here for setting up RadRails and Instant Rails.

Clearing floated elements with or without structural markup: Presentation vs. Content

2nd April 2007

Recently in the office the developers having been having a debate about how best to clear the space below floated elements. It seems we fall into two camps, one using purely CSS and the other using an XHTML element with some CSS applied to it.

Before reading this post you may want to read Eric Meyer’s article Containing Floats which explains the clearing problem well.

What I really want to discuss the merits and flaws of both methods and try and decide which method is best to use. It is really a debate about whether or not to add extra markup to your XHTML document.

Read more »

PHOTOS

BITS AND PIECES

Bits of me scattered around the web.

SUBSCRIBE