Showing posts with label code audit. Show all posts
Showing posts with label code audit. Show all posts

Saturday, February 17, 2007

BarCamp Day 1 - Evening Sessions

Mark Norman Francis on Don't Be Scared of Code Reviews

Norm explained that the purpose of a code review is not to criticise other people's code. The findings are not escalated, there is no formal output - just for folks involved. Except Security problems, which are tracked in Bugzilla. So why bother?

  • Verification - adhere to internal standards.
  • Training - informal education of expectations of new hires
  • Collective wisdom - [you will be assimilated!] Experts pass on their knowledge.
They are looking for, in HTML - valid, semantic, accessible.
CSS - valid (hacks separated out), modular (hung off ONE id - means you can reuse code on another part of site without relying on cascade), cross-browser (graded browser support)
Javascript - unobtrusive (pull it out into separate files, still get to the content with JS off), optimised, cross-browser.

Don't care too much about programmed page weight - ads multiply page weight hugely anyway. Page weight is not very relevent to each user but is to Yahoo!, since so many hits could mean server overload.

Perl/PHP must be documented (in the code, externally), understandable, standardised

[Olé Norm!]

How do they work? Time taken doing them is minimised. Quiet time is set aside beforehand for people doing the reviewing, away from email, IM etc.
During review, items are explained by reviewer, while the coder keeps quiet. A mooderator takes notes for them both, which are tabled for later. Then follow-up - the lead developer confirms that the problems identified have been rectified before code goes live.

Me on Taking Better Pictures
I'll post the main contents of my presentation in later posts, but it seemed to be fairly well received, with about a dozen folks coming to listen.

Andy Mitchell & James McCarthy on "Free Schmee"
Andy and James were talking about APIs and using them in a modular fashion - why invent the wheel again when you could reuse another API to do certain tasks, such as user verification. They freely admitted they'd been penning their presentation hastily when they'd rather have been attending mine. But never mind, it was still an interesting few minutes!

[James and Andy argue about who's going to work the slides...]

Next was dinner: geeks + pizza + beer = culinary carnage. At least there was no washing up!

[Colin Schlüter surveys the carnage]

I stayed chat with Andy Mitchell and John Wilson for quite a while after dinner, but made it to the main auditorium , back end of Ask Us Anything panel. Someone rashly asked to see the panel dance!

[Norm! shakes his booty, watched by Simon, Steve, James and Aral]

Of course, it wasn't long before someone asked "when can we play Werewolf!" So, most reconvened to the restaurant area and three groups started. Not sure how many games were played altogether, but I think it was at least nine, with various permutations of people flitting from one circle to anther.

[a wolf in gnome's clothing, perhaps? Tom Coates ponders who he's going to bite next; James Wheare (Wolf??) and Cristiano Betta don't seem worried by his proximity!]

And so to bed, perchance to sleep, at 4am... fat chance - wished the floor wasn't so hard. Got up again 4 hours later to find most still comatose:

[geek dorm, aka conference room]

Friday, June 16, 2006

@media, Beyond A Code Audit

Accessibility is about more than just making sure you have passed the code audit points in WCAG, said Robin Christopherson of abilitynet.org.uk

Useful Test Tools/Tips:
Home Page Reader (text only) - cheaper than JAWS.
Natural Language - if you switch language mid-paragraph, use the Inline Language Tag to flag it so that screenreaders know how to correctly interpret the change for pronunciation.
Always define background and foreground colours by default, you can never assume they will be black and white (say).
textaloud.com is a text-to-speach engine.

Problems with FLASH
Dynamic content is difficult to make accessible in Flash. For instance, ALT text should exactly match the words shown in an image or Voice Recognition Software doesn't work properly. Flash breaks the Say What You See rule.
The Flash Accessibility presentation at macromedia.com is totally aural with no text transcript => breaks one rule of accessibility straight away! No tool tips on any of the Flash buttons. Dynamic content requires a screen refresh otherwise screen readers are not aware that content has changed (one of the big problems with some emerging Web2.0 apps). Presentation is low contrast - which would probably fail the Vischeck criteria.
Flash content is never as accessible as HTML (and by inference to search engines also). Robin (blind) did not find it easy to use Flash presentations as he was never sure if he was missing something. Also for partially sighted people, you can't change the font style or colours in a Flash movie.

Problems with Javascript
JS can be a nightmare when its used to provide main functionality for a site - it's sometimes not enough just to produce a no-JS version of a page if you're relying on it to accomplish something fundamental. Non-JS versions of a page need to be flagged as available as Home Page Reader is a plugin to the IE engine, and therefore the user agent could well have JS enabled.
Using a Javascript routine to update the time displayed on a page every second can cause havoc - the screen reader has barely had time to read out the nav links before the page is declared to have been refreshed and it all starts again from the top - you get stuck in an infinite loop and can never get out!

Problems with Colour / Whitespace / Text Alignment
Never use colour solely to convey meaning - The Tube Map fails the colourblind tests!
People with congnitive disabilitities can have big problems if enough white space is not provided - don't crowd things together. Use the tags to define abbreviations, plus a decent-sized sans-serif font.
Folks with Dyslexia have trouble reading fully justified text due to the uneven word spacing - left justified text is much better for them.

Assistive Technologies and their special requirements:
Headset mouse emulator - fine control of movement can be limited - don't make links too close together like lastminute.com. Google's Next page links have good spacing.
On-screen keybord - takes up valuable screen real estate
Suck/Blow tube for left/right mouse click - again, can make movements clumsier than with a mouse alone
Screen Magnifiers - disney.com was a nightmare to view with a magnified screen because of the lack of proper TAB order - the cursor went all over the place, often out of the immediate viewport of the magnified screen. Users get lost.
Screen readers - IE7 is not good with these at present.
No Mouse - tab order is vital - take a look at the Vatican's site to see what a screwed up tab order can do :-(
Also, Tab Focus can be tricky to distinguish - some sort of obvious highlights work best..
Skip Nav Links - when they get focus they can have unhide set on them with CSS which is quite neat.