My Definition of a Requirement

I recently received an invitation to join the Yahoo Requirements Engineering Group. This led me to thinking about my definition of a requirement. I saw a similar definition in a document (it was part of the boilerplate text) delivered by a consultant at a prior position. It was the most useful item in the document… (For the life of me, I cannot remember who the consultant nor firm was.)

Requirement – A testable assertion of a customer’s need.

I like this definition a lot because it is simple and lacks a lot of the technical jargon or background knowledge required for other definitions. The terms are understandable by business users. The one thing I always add when I deliver this definition is that customer is not limited to our external customers – it is inclusive of all our internal customers.

Validate But Realize You May Not Be In Control

In a previous post, I wrote about the value of using the HTML validation services available on the web. After I wrote that post, I thought I should run the validation on the blog site. Keep in mind that in my case, I have very little control over the HTML generated by the blogging software provided by my ISP. The software is WordPress which may or may not be customized beyond the default options by my ISP.

Overall, I have not noticed any errors rendering the blog site in a variety of browsers and a variety of operating systems. My initial impression is that the software appears well written and supported.

When I compose a post, I have the option of using either the rich text editor WordPress provides or write my own HTML. Currently, I use the editor provided. As such, I am completely at the mercy of the WordPress development staff.

Results of Validation

When I ran the validator against the blog site, 18 errors were identified — none of which appear to impact the functionality of the site. (FYI – the site is identified as XHTML 1.0 Transitional.)

1) (1 time) document type does not allow element “li” here; missing one of “ul”, “ol”, “menu”, “dir” start-tag.

This is from a system generated entry in the left hand menu.

2) (3 times) document type does not allow element “h1” here; missing one of “object”, “applet”, “map”, “iframe”, “button”, “ins”, “del” start-tag.

This is the title of a post

3) (14 times) document type does not allow element “p” here; missing one of “object”, “applet”, “map”, “iframe”, “button”, “ins”, “del” start-tag.
This is within the content of a post and is generated by the rich text editor.

Moral

While striving for cleanly validated HTML is a worthy goal and will help prevent issues it is not always achievable. Identify those errors and warnings which are important to you and investigate work arounds when you do not control the HTML.

Validate Early, Validate Often

With the release of IE7, there has been a lot of talk regarding web standards. In particular, IE7 is more web standards compliant than previous versions. This is of concern because prior versions of IE are very forgiving regarding the sins of invalid HTML. Sites that work perfectly well with prior versions of IE could very well look poor when viewed with IE7.

This is not a new problem. Testing with multiple browsers has been a mainstay for years. It is still required. While two browsers may be standards compliant, that does not mean that the browsers interpret the standard the same way.

A starting point, however, is to make sure the site is compliant with the version of HTML that it has been developed to… (Not sure what version? — that is probably indicative of a problem. Ask the development team which version of HTML / XHTML that they support…) The W3C offers a validation service, http://validator.w3.org, which allows the user to submit a URL or the page source.

Now, I had used this in the past but was not rigorous about. It was a pain to save a page to a file then upload it to the validator for any server not on the internet or if the page required a login. I usually would validate a page if it was having problems, otherwise I would assume it was OK. The firefox extension, Web Developer by Chris Pederick, makes validation a breeze. From the tools menu on the Web Developer toolbar, select “Validate Local HTML”. The extension will take care of saving the currently loaded page to disk and uploading it to the validator. The results of the validation are displayed in a separate tab.

I recently went through an exercise of submitting a bunch of pages to the validator. While it did not find anything major, it did find some stray characters in the HTML sources and pointed out some attributes that are not in the standard. Nothing that keeps me up at night but one less thing to nag at the back of my mind.