Nine years ago the World Wide Web Consortium’s working group for web accessibility issues, the Web Accessibility Initiative (WAI), produced a set of guidelines for web developers on how to build and publish content for disabled users.

The Web Content Accessibility Guidelines (WCAG) provide website authors and designers with a collection of best practice standards that should be applied to website development regardless of which user agent the end user views the final product with. The guidelines are aimed at promoting accessibility and generally improving web content for all users.

In the original specification (1.0) each guideline contained checkpoints and those checkpoints were assigned a priority. The checkpoints defined how the guideline should be implemented and the priority stated how important that particular checkpoint was.

  • Priority 1 are checkpoints a web content developer must satisfy
  • Priority 2 are checkpoints a web content developer should satisfy
  • Priority 2 are checkpoints a web content developer may satisfy

In contrast to this, version 2.0 places each of the twelve guidelines into one of four principles which “provide the foundation for web accessibility”; perceivable, operable, understandable, and robust. Each guideline has a number of “success criteria” which have levels (A, AA and AAA) associated with them which are used to indicate levels of conformance, similar to the priorities in the previous version.

In addition, all of the success criteria have two links from the document, the first provides methods for meeting the criteria and the second is background documentation for understanding the criteria or the guideline itself.

The WAI state that each success criteria is testable and has either a true or false result when applied to web content. This has caused a stir in the web development community and I can understand both sides of this coin however I do not want to comment quite yet on my opinion until I have had the time to study the final document in more detail.

I am strongly in favor of web standards and I think it is great to see WCAG 2.0 making it to the level of final publication. The question now remains, will the guidelines be followed? Time will tell.

Developer Developer DeveloperFor those of you who do not already know, Developer Day Scotland 2 is now in planning (has been since last week, I have just been slow to post) and is now looking for speakers. As you can probably see from the banner on the right, the date for the event is the 2nd of May 2009.

What is Developer Day Scotland?

Developer Day Scotland (DDS) is a community event, run by community for community, which is based upon the highly successful Developer! Developer! Developer! (DDD) community conference events. - Developer Day Scotland website (http://www.developerdayscotland.com/)

Industry professionals (and students) come from all over scotland to attend sessions presented by members of the Scottish development community. These sessions span numerous areas including C#, Visual Studio, ASP.NET, Web Development and Internationalisation.

What happens next?

At present a call for speakers has gone out so if you have a talk you think you would like to submit then now is the time. For details on how to submit a session, visit the Developer Day Scotland website.

After sessions have been submitted voting will open to the public allowing the community to decide what they would like to see most at the event, this will dictate the agenda for the day and will narrow down the number of sessions.

Finally, the only thing left to do is attend the event. If your session is selected then you should be preparing your talk, presentation slides and code demos. If you are simply planning on attending then the only thing you need to worry about is writing the date down in your diary ;)

These events are made a success by community participation and the fantasic support of the sponsors who make all of this possible at a price everyone can afford: FREE. So what do you have to lose?

 | Posted by Andy Gibson | Categories: Events, Scottish Developers |

Well, I was going to be writing up a review of DDD7 but after seeking out a good 3 column layout that I actually liked for WordPress last night (and failing) I have decided to take a new course of action.

I have been wanting to write a blog with ASP.NET MVC for quite some time, just never really found the time. I am now however, faced with a 7+ hour drive home from Reading and I think this would be the perfect time to write one, if nothing else just to see if I can actually do that in 7 hours :)

The tools I have with me are:

  • Laptop
  • Mobile Broadband Dongle
  • Visual Studio 2008
  • SQL Server 2008 Express
  • ASP.NET MVC
  • ADO.NET Entity Framework
  • Endless antics from Gary Short
  • Time

Update:

I knew it was adventurous and it was far more fun to be sociable in the car and help Colin Mackay out on the Developer Day Scotland website than it was to work on the blog. Saying that however, I think I am going to continue on with the blog and turn it into an MVC tutorial (or perhaps “Yet Another MVC Tutorial” better suits) which would allow me more time to develop it and actually provide something useful on the actual blog as well.

So while I don’t actually have a new blog yet, this has given me the idea to develop my own blog system in MVC and publish a tutorial along the way. Neat huh? (Well I think so)

DDD7 post will follow in the next couple of days but in the meantime, a big thanks to everyone who helped organise and run Developer Day 7 and a huge shout out to everyone who attended and made it what it was!

 | Posted by Andy Gibson | Categories: .NET, ASP.NET, MVC | Tagged: , |

 

University of Dundee

University of Dundee

Hard to believe that this is now week 9 of my penultimate semester/term at Dundee University, time has just flown in. While this is normally a good thing I am left realising that the available time to work on my honours project is deminishing rapidly. 

 

My honours project is focused around the management of software projects and teams across more than one methodology or management style. In-keeping with the theme of the project, I am working under an agile approach and will be utilising a number of aspects of Scrum (user stories, sprints, user-centred development, etc.) and because of this I am keen to enlist the support of the development community.

I am looking for open-minded people who will have a little bit of time going spare from January to April to play the part of the “customer” or “customers” in my project. My supervisors are keen to bring real people into the development and felt it would be a good to get some input from people involved in the software development process.

I am still in the planning stages of user involvement but I am aware of the need to start finding people willing to help out.

Ideally I am looking for managers a developers and designers in order to get a good spread of expertise and requirements although I am not expecting to get exactly what I am looking for.

More details of the project can be found on my Honours Project page.

 | Posted by Andy Gibson | Categories: Honours Project, Projects, University |

During work on a security module I have run into the question of whether or not I should use a CAPTCHA technique on user registration or if an alternative should be employed.

CAPTCHA’s in my mind are quite frankly annoying, like many other web users I have run into my fair share of those that either just don’t work or are very hard to read/interpret. Because of this I felt that some research into how good they actually are at preventing or reducing spam and automated bots from registering was needed.

A quick google for “CAPTCHA disability” returns an interesting article on the W3C [http://www.w3.org/TR/turingtest/]. I draw your attention to the final two paragraphs of the conclusion:

The widespread use of CAPTCHA in low-volume, low-resource sites, on the other hand, is unnecessarily damaging to the experience of users with disabilities. An explicitly inaccessible access control mechanism should not be promoted as a solution, especially when other systems exist that are not only more accessible, but may be more effective, as well. It is strongly recommended that smaller sites adopt spam filtering and/or heuristic checks in place of CAPTCHA.

Lastly, new approaches focusing on using exclusively visual or auditory means for access control, such as the “PIN Guard” mentioned above, should be scrapped until a reliable method exists for users who cannot access them to authenticate themselves. A short-term security benefit is not worth threatening a person’s autonomy by denying them access to such important data as their finances.

OK, So given that what I am working on is supposed to emulate a small e-commerce website, I can take that on board and I agree. So the question becomes do you abandon this kind of check and “sort it out later”? Or are there other things you can do?

I found a a blog post by Slobodan Kovacevic in which two non-discriminatory approaches are explained, they are not a 100% guarantee against spammers but they can help reduce the impact.

The first one generates a unique hash string in the page session where the form to be protected is located when the GET request for the page is received. When the form is submitted the hash is validated and if they do not match the request is denied as it means that a direct POST request was sent. The idea is that anyone who wants to send the form data has to visit the page with the form first, it prevents automated form submissions over POST. As Kovacevic points out this does not prevent someone paying a human to process form submissions by hand but it does add an unobtrusive extra measure with a very small overhead.

The second idea is to use CSS (and maybe some JS as well) to place “bogus” form fields on the form using names that bots will commonly fill out. If any of these fields contain data when the form is submitted the request will be denied. Downsides to this approach are two fold; First if the user disables CSS or JavaScript (or is using technology which does not use either) the fields will be visible and can potentially cause confusion, two name fields for example. Secondly it feels a little, well “clunky” to me, generating extra HTML just to catch out spam bots? I could be wrong but I can’t help but wonder if that violates one of the unwritten laws of web design.

This is not a huge considderation in the grand scheme of things, but it does pose some interesting questions. If anyone has any ideas or comments on this, please let me know.

 | Posted by Andy Gibson | Categories: HTML/CSS, University | Tagged: , |

C# 3.0 added lambdas to the language syntax. I wont go into details as to what those are as there is pleanty of information on the web, what I will show is how you can assign a lambda to a variable for later use.

I do a lot of work with LINQ and the Entity Framework and as such lambdas come in very useful when using LINQ expressions (I am not a fan of the query syntax), however it is sometimes useful to reuse a lambda. A lamda is simply a delegate that has a number of different prototypes all under Func.

All of the lambdas take a result type and each varient adds an additional input type. 

How does this help us save a lamda? Well lets take an example piece of code

Here I am searching through the Users collection for any users which have UserName equal to the username variable. The input type for the lamda is User as Users is actually an ObjectQuery<User> object, the return type is bool as I am comparing 2 values and returning the result.

To store this lamda I do the following:

If your lambda uses say 2 input types your code would look something like this:

The main difference here being that the list of input types must be wrapped in parenthesis (u,t) followed by the => operator.

For more information on lamdas have a look at this InformIT Article

 | Posted by Andy Gibson | Categories: .NET, LINQ |

Download Day 2008

Update: What I did forget to post was when the day will actually being, well I will let someone else show you: http://www.labnol.org/software/download/download-firefox-3-exact-time-world-map/3595/ (Digital Inspiration)

It doesn’t seem that long ago that I was all hyped about the new features that Firefox 2 brought to the internet, seeing how much of an improvement it was over Firefox 1.5 and now, here we are again with Firefox 3.

Well after 5 betas, 2 Release Candiates Firefox 3 is finally going live and this time the Mozilla team want to set a new Guiness World Record by having the most amount of downloads within a 24 hour period.

So, if you use firefox and want to see the new browser but didn’t want to get a pre-release copy, now is your chance, and what better way to do it than help break a world record!

Good look to the Mozilla guys for this one and thanks for making Firefox what it is!

 | Posted by Andy Gibson | Categories: Events |

This may have just been a result of my PHP background trying to tell me how to do things and so it is quite possible that this post is common sense and obvious to others in the .NET / LINQ community.

I have been working on an ASP.NET MVC prototype application (Preview 3) and I ran into a very frustrating problem. Part of the system allows users who are logged in to vote a post up or down, a user can only vote once per post. There is a Posts table, a Users table and a Votes table and Votes contains a foreign key for both Posts and Users.

Now when a use submitted a vote the system created a new Vote object, passed in the PostID, the UserID of the current user and the result. LINQ then stuffed it in the data context and saved it back to the database. When a user came back to the post or a listing of posts, it didn’t display as having registered their vote although if they voted again the system blocked it which told me the data was there and LINQ could read it.

After quite a bit of head scratching and googling I came across Chris Rock’s post “LINQ TO SQL Caching Gotcha” which identified a similar problem and it did seem like mine was a caching issue. I tried his suggestion but to no avail so I ruled out caching.

So what was the solution? Well, let me do a before and after for you:

Before

After

The key is on lines 2 and 4. In the first snippet I am assigning the numerical IDs to the foriegn key fields PostID and UserID, in the second I am passing in actual objects; the Post object found using the id variable and the User object found by using the CurrentUser property.

LINQ does not seem to connect the Vote to the User or Post if you directly assign the ID values, evidently you need to pass the object which is being referenced in order to get LINQ to recognise the connection and perform the required updates, despite the DB knowing exactly what is going on.

As I said before, perhaps this is well documented and I am just being slow to catch on but that took the better part of a week to find and fix.

 | Posted by Andy Gibson | Categories: LINQ |

Update: Some how I now have a twitter account, i’m saying nothing on how that happened.

First, sorry for the lack of updates and also the fact the blog had to be rolled back, there was a problem during an upgrade and the database decided to throw a wobbler so I had to restore from backup. I am also in the middle of my 3rd year degree examinations (3 down 1 to go) so time has been pretty scarce of late.

I start my position at NCR on the 19th and between now and then I seem to have been filling up a rather busy schedule between both work and social life. I guess I want to make the most of my last few days of “freedom” before my summer of corporate life begins.

Developer Day Scotland

Anyway, one of my lighter items is tomorrow. I will be attending Developer Day Scotland at Glasgow Caledonian University which has been very kindly organised by Colin Mackay. The event will see speakers from across Scotland talking on a variety of .NET and SQL Server related topics.

Barry Carr (a ex-colegue of mine) will be delivering his talk on Regular Expression (which I have actually yet to witness and I wonder if the Macbook will be aiding him this time) and another North East Scotland .NET founder Gary Short who will be presenting on The Web Client Software Factory. I will also be attending Tom Wardill’s talk on the ASP.NET MVC Framework which is of great interest to me since I have been doing quite a bit of work with the framework and I do like the features it brings to the ASP.NET dinner table.

So it’s late and I have some last minute things to catch up on before I rest, I just wanted to post this last minute item so that when I return and do a write up it wont be so out of the blue.

Anyone attending tomorrow I will possibly see there.

 | Posted by Andy Gibson | Categories: ASP.NET, Events, Software Engineering |

Courtasy of a couple of power cuts earlier in the week which affected most of the City Centre and as far out as the University Campus I had to replace my trustworthy Netgear DG834G router. At first it only appeared to be the power adapter which had gone however yesterday the modem inside of the router failed and forced me to replace it.

Now networking products are a point of contention for me, there are certain brands I just refuse to buy on principle, the worst being Linksys. Despite being owned by Cisco Systems, I just keep reading about how bad their equipment is and so despite being cheaper, I still avoid them. Belkin and D-Link are supposedly allright but  when it comes to routers and networking I work on the same principle I do with hard drives; If a brand hasn’t failed on it’s own within it’s reasonable lifespan then why change?

So sticking with the devil I know I bought another Netgear and effectively the same one, the DG834GT which has 108mb wireless instead of 54mb and came with a USB wireless dongle, that was the only difference. Thanks to the handy configuration backup and restore facility on both routers I could copy the settings across instantly so no need to re-write 30 or so port forwarding rules.

Everything is back online and working quite happily again.

 | Posted by Andy Gibson | Categories: Life |