Sunday, September 21, 2014

Back to basics 2a: Did you know what I missed yet? Browsers!

You can find the "game rules" for this series here.

Yesterday I was posting a series of ideas for testing a registration page.  In my head there was a really important area though that I missed.

I've been tempted to just go back an update the page, but I do like the idea of just admitting to being in a rush and missing it.  Because even with experience, we're not infallible as testers, and under deadline pressures we can end up in a rush and miss something (in my case, my son wanted to do some World Of Tanks on the laptop).

There is actually one heuristic that's missing from Elisabeth Hendrickson's cheat sheet, and it gives an indication of the age of that sheet (2006 was when it was last updated).

Device/browser heuristic

Yup - back in 2006, IE was the dominant browser, and there was a wee upstart browser called Firefox which a lot of geeks raved about.  But generally it wasn't considered to be too important or mainstream.


Welcome to 2014 - we have a host of browsers such as Chrome, Firefox, Safari.  And we still have IE, but which version is important - IE6?, IE11?, every possible version?

Do we need to test on Windows 8, Windows 7, Vista?  Do we need to test on Apple and Linux machines?

And that's not even going into mobile devices or tablets?  Are we going to choose out a few versions of iOS or Android which are important?

I covered some aspects of pure PC browser testing here and here in 2013, which are useful places to get a feel for some of the measures.  But even then I didn't cover web testing on mobile devices which themselves have their own complications - the biggest of which being it's free to install a new browser on your machine, but if you need to test on a mobile device, then you have to justify the purchase of the device for testing or else see if you can bring in a mobile specialist.

The best thing to do is to work out which are the most currently popular devices out there - even better, ask marketing for what their target market is.  Don't trust to devices you have in your testing pool to be representative of your market!  [And that market pretty much changes every time Apple makes an announcement]  A good place to look through is Synapse Mobile who have links to what are the most popular mobile device platforms at present.

I never got to meet him, but when I lived in Farnborough, Stephen Janaway was just down the road from me testing for Nokia, and he has some excellent insights into mobile testing.  One of his pieces on building a testing lab of mobiles is here.

As discussed back last year, what you're looking for when you're cross-browser testing (considering you've narrowed down your mobile and browser options to a suite to test on) is,

  • Are all my fields present?
  • Can I enter data/select items as expected?
  • Is information displayed to me consistently?
  • Does it look ugly and unusable?  Sometimes alignment can be all over the place, and it makes the screen look ugly.  And something that's ugly often undermines trust in the legitimacy of the website.
  • How does the screen look on different resolution settings?
  • How does the screen look on maximum vs resize of the browser?  Or when I minimise the page?
  • Does the description of the page on the tab bar make sense?
  • What happens if I use the back/forward/refresh buttons?
  • Do all error messages get displayed appropriately?
Playing around with mobile browsers, several interesting additional areas I've found are,
  • What happens if I click a drop down box?  Apple and Android have their own built in methods for dealing with these, and sometimes it can't handle drop down boxes with large amounts of text well.
  • How does the mobile browser handle being turned sideways from landscape to portrait and back again during an operation?
  • How useable is the keyboard in landscape and portrait mode?
  • Apple and Android don't really have pop-up boxes.  Does your system have any?  How does it handle them?

Most of these test ideas will of course apply not just to the registration but all the pages ongoing!

Saturday, September 20, 2014

Back to basics 2: Registration

You can find the "game rules" for this series here.

Registration is the first time that a user encounters your system - make it too difficult or painful, and they won't get past this.  Most people - and especially developers - when faced with "testing" this page will just enter their own personal details, hit "create" and if it works, then job done.

However there's certain things you'd want to try out beyond that.  Having a system that allows you to login is okay - as long as you're going to be the only person who uses the system (unlikely).  As a tester your mission is to try out a representative sample of scenarios which will cover all the other potential genuine and malicious users.

Okay - this is Twitters current registration page ...


Oracles

Let's set up some basics oracles - our expectations from this process.  As discussed we don't have any requirements from Twitter, but having done this on other systems, we have a good indication,

  • The system should set up a brand new account when done (but we won't test this fully until part 3) and an email sent to user
  • If the system doesn't like what I'm doing, it should at least fail gracefully with an error message that gives me meaningful information
  • My email/username should not have been used by anyone else before.
  • The terms and conditions should be clearly readable
  • All fields are mandatory - if not entered, no account will be created
  • Email field must be valid according to rules from here (that page forms an oracle)
  • Password will need to be of a set complexity (but exact rules unknown)
  • The text you enter into the password field should be obscured to prevent someone from leaning over your shoulder and seeing it

Not at use here, but what I'd expect on this kind of page,
  • I need to confirm I'm above a certain age (usually by entering your birthday)
  • I need to agree to terms and conditions before creating my account (here they have put that "by selecting 'create my account' you are agreeing to our terms and conditions)

Picking out heuristics

From the cheat sheet, areas which seem to be in play here,
  • strings - most of the fields are strings to enter, so most of the areas there apply to each field
  • date and time - would apply if we had a date of birth field (we're going to pretend there is)
  • boundaries - would apply for date of birth if we had a minimum age (again, going to pretend there is)
  • input method - makes sense to ensure we can copy and paste to fields


What we're going to do now is to combine these to generate test ideas.  Don't be afraid to try them out with me.  Here goes ...

Test 1: Looking holistically ...

We're going to look initially at the system holistically, and then break down to be put each element under duress.

Let's start off with a few really basic tests ...
  • Enter your details, including all the fields, confirm that account created (might need to check the database for this) and potentially an email is generated when account created.  According to the CRUD heuristic, you might also like to once created to retrieve the account in some way.  We'll cover some of this in part 3, but you might check in the back end to make sure the data entered is really that the system stores (not just for this test, but for other variants where an account is created).
  • Enter absolutely no data, and try and create.  Expect an error message to be created.  [It actually 'wags' the 'create my account' box at you to show an error, but close enough]
  • Create all the registration information, bar one field which is kept blank. Try to create.  It should warn you.

Test 2: Name field

Okay so it can work for some people from those tests.  Lets try out some other options.  We're going to exercise the name field under duress now.

The most obvious things to appy here from the cheat sheet are strings and input methods. So ...
  • We've tried it being blank already.  But let's make it really long, and see what happens.  There are some tools out there to make really long strings.  But I like going "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMONPQRSTUVWZYZabcd...".  Typically eventually the field just stops, and I remember what letter it stopped at.  I then create the account, and retrieve the name (either from the account or by looking in SQL) and check it stops at the same letter, ie the name hasn't been unnecessarily truncated
  • The field "the quick brown fox jumps over the lazy dog" is helpful as it includes all the letters of the alphabet - if you use this and it's returned in full, then there's no crazy truncation of letters or after spaces.  It's useful to also include in UPPER CASE.
  • Not all names are alpha characters.  Some people have an apostrophe or insist on having a double barrelled name.  And yet their names are valid names.  How does your system handle that?
  • Some people will insist on being French or German.  Yes there is a world of accented characters out there - àáâãäåçèéêëìíîðñòôõöö - how does your system cope?
  • Can you copy and paste your name into the field?
  • How does it handle characters you don't ordinarily associate with names?  Things like numbers or special characters like '123...' or '!@#*$(%*'.  Eliminating these characters from entry into your system helps security - particularly the * is used in Unix and SQL can can cause all kinds of mischief.
  • If my name is entered and including spaces, make sure that "Mike Talks" is retrieved as "Mike Talks" and not truncated on the space down to "Mike".
  • What happens if I start my name with a SPACE or use multiple spaces?


Test 3: Email field

As with the name field, you can try really long fields, copy and pasting etc.  But there are also special rules for email fields.

A lazy (but useful) basic test would be to try the valid email addresses found here and the invalid email addresses found here.  Or at least try your own variants.


As mentioned in the oracles, if you include an email address previously used, you'd expect some kind of warning.

Also would expect some "case insensitivity" in the checking of email.  If I've used an email "testsheepnz@tester.co.nz", I don't expect to be allowed to use "testsheepNZ@tester.co.nz".

Test 4: Password field


As said, blank should be unacceptable.  Typically as mentioned in oracles, passwords have to be longer than 6 characters, and include not just lower case alpha, but some upper case of numberic/special characters are mandated.

Tests for passwords which are too short or too long should be considered, or those which break the rules.  Also include copy and pasting passwords in.

Test 5: Username



Again too long/too short variants again need to be used.  If you try to go too long it should warn you, and you should try out using numbers and special characters to see whats allowed and what's discouraged.

As with email address, if you try to use an account already used it should warn you.  And likewise employ a case insensitive check to prevent you from creating "testsheepnz" when there is already a "TestSheepNZ".

Test 6: Date of birth (bonus feature)

Okay, Twitter doesn't have date of birth, but a lot of places do.

To throw some very basic spanners in the works, you should try and enter,
  • A completely garbage date, confirm the system warns you it's not a valid date
  • Include a date in the future for date of birth
  • Try the 29th February for some valid/invalid leap year options
  • Try some dates that don't exist such at the 30th February or the 32nd September
  • Try first/last valid dates in the months
  • Try entering dates in different date format - ie 12/01/94 or 12 01 1994 etc, to see how the system copes
  • If the system asks you to select a date from a GUI, try different options, including selecting days that aren't there.
Typically most systems have business rules that "you need to be 13 or more to sign up for an account".  This is a great time to try some boundaries,
  • Try someone who is minimum age to the day
  • Try someone who is minimum age minus one day
  • Try someone who is minimum age plus one day
  • Try someone who is over 100 years old.  Pre year-2000, many computer systems stored date of birth year as a 2-digit field.  So people over 100 sometimes cause a bit of a fit in legacy systems.
Test 7: Terms and conditions

Yeah, most people just go "yadda, yadda, yadda" for the terms and conditions.  Typically you should not be able to create an accoutn unless you select you're accepting the terms and conditions.  But also they need to be displayed well.

On Twitter it doesn't seem to be very well displayed, until you click in the box, and it expands like so ...


Nice!

Wrapping up ...

As you can see just from this very basic pass, we have created a whole ream of test ideas for a very basic operation.

You can see how a lot of testers (especially context driven ones) will look at these ideas and prefer to either have a check list of them or mind map.  It's going to take a lot of time to write those all up as formal scripts, but you probably have a good idea how to execute them right now (which makes one wonder 'so what benefit exactly do I get from scripting?').

In fact, have a go at trying a few tests on the Twitter registration right now.  Then take a look at the registration pages for Facebook, Hotmail, Instagram - pretty much anything you can find (that doesn't involve a legal obligation).  Drop in the comments below any oddities you found, or indeed any different oracles or heuristics you used when you did ....

Happy testing!

Back to basics 1: Testing with oracles and heuristics

Reading back over my blog for the year, there's been some interesting and philosophical items.  But following Let's Test Oz it's time to get back to some good old fashioned basics of testing!  So here we go ...

Setting out the rules and objectives

On the Tuesday night at Let's Test Oz we were talking about oracles over dinner, particularly around three fundamental aspects which are the core of most online systems now,
  • registration
  • log in
  • account self management


Doesn't matter if you're Amazon, Facebook, Twitter or Hotmail, these elements are likely to be within your system somewhere.  So we're going to go through and explore each one, with a list of how I'd approach testing any such system.

I'm going to use as the core system under test Twitter, so if you've never used Twitter, now's a good time to get a handle.  Now obviously some screens will change once this is published, but it's likely the core basics will stay the same (so roll with it).

Oracles

Now obviously I don't work for Twitter, so I have no idea of what requirements they have for their processes.  Thankfully though requirements aren't the only way to guess how a system should operate.  There is a testing superpower I call "common sense" (which to be fair, is fairly uncommon) or James Bach calls oracles which is useful here.

As I discussed a while ago, an oracle is, "guide for understanding how the system’s supposed to behave".  Whilst it's true a requirement is an oracle, they're not the only ones.

An oracle is something that helps you to determine if a test has passed or fail.


Let's give you a sneak peak into part 3 on logging in.  You enter your username and an incorrect password.  I have no requirements here - but what do you think will happen next?  [No, I'm not going to say until part 3 - but really hope you've guessed]  And how do you know you're right?

In part because you've used other systems with these core elements in, and expect the behaviour from one to be pretty close to the behaviour from another.  And partly because it makes a kind of sense.  If you can log into an account with any old password (oops - spoilers?) - then really, what's the point of your login screen?

Heuristics

Together with some oracles to guide us, I'm going to use heuristics to generate test ideas.  Heuristics are rules of thumb used to test an element of a system.  Typically for instance when you see a name field, you'll be generating test ideas such as,
  • what if I leave it blank?
  • what if my name is REALLY long?
  • what if I've got apostrophes and double-barrelled elements to my name?
  • what if my cat runs along the keyboard and it's a jumble like 89dee8(#EH#(*E?  [If you look at the pattern those letters make across the keyboard, then it's likely the cat was really breakdancing]
All these test ideas are called heuristics, they are rules of thumb where you know systems can get into difficulty.  So they're a good idea to test.

Occasionally I meet a worried customer who'll desperately ask me "your testing will include some negative testing, won't it?".  It's the sign of a customer who has had someone work for them going "I log in with my name and password ... the login page is now tested", it means that the tester is likely to have not used enough heuristics to generate test ideas.

And let's be frank, sometimes you don't have enough time to apply every test heuristic, but you should try out as many as you have time for, often starting with the ones you know are likely to cause the most trouble!

During this series I'll be using Elisabeth Hendrickson's excellent heuristic cheat sheet as the source for a few ideas ... if you've never come across this page before, (a) print it and (b) laminate it.  It's that useful!

Friday, September 19, 2014

The Let's Test Oz experience ...

The Personal Journey


There were a lot of nerves on my behalf leading up to the Let's Test Oz conference this week.  My wife was diagnosed with severe anxiety much earlier in the year, made much worse by the death of her mother.

Leaving her whilst I went to the neighbouring country for the best part of a week was worrying, but I also knew it had potential to be good for her to know that she could cope and was more capable than she knew.  It could be a great point on her recovery, or a point where she badly relapsed.  Thankfully we had a backup plan in our number one son, who is a very capable and level-headed man at sixteen now.

It was great that at Let's Test I had a couple of people who knew this backstory - I was checking into the hotel with physical and emotional baggage - and were there to check on me and understand if I didn't want to be super-social all the time.  I think at times this support net is what the online testing community has learned to weave best.

What I'm going to do is pick up on a few of the best moments and revelations from the conference, to condence my experience ...

The Train Ride


I had a two hour train ride in the morning with tester Kim Engel, fresh from our conversation about flat earth's.  It was a great journey, and a great conversation to get me in the mood - I almost talked myself hoarse.  It reminded me one of my favourite pastimes with my son is travelling, because whether hiking or driving, it gives you opportunity to talk and explore.  With my son it's about exploring history and ideas around it.  With Kim it was exploring aspects of testing and mental health that we've both had personal journeys with.

With such conversations it's actually often a disappointment when you reach your destination, because you've enjoyed the journey too much.  Yup - I was actually slightly sad to arrive (but not for too long).

Coaching Testers Workshop


I've spoken previously about James Bach and Anne-Marie's workshop on coaching testers.  It had some great ideas circulating, and James had found some examples from movies of people coaching others.  I had to say I feel slightly ashamed that I have not yet watched the Magnificent Seven, despite liking Westerns - I need to remedy this at some point!

Great focus was given to understanding yourself as a coach, who you are and what your behaviour is.  How do you interact with people?  What's important to you in others?  Then to look at the person who is looking for coaching, and asking what they need in a coach.  Sometimes that's not you.  James and Anne-Marie talked frankly about their coaching, and that occasionally they will recommend an individual goes to the other for coaching.

As always with a good workshop, this included reams of hands-on.  We logged in anonymously to Skype and we got to work with other people in the room, taking turns to be the coach and to be the student.

I'll be absolutely blunt, I thought the person I was coaching knew me, and was playing a game.  I kept getting incredibly frustrated but trying to be calm with them.  When it came to debrief it turned out that the person I paired with had never used Skype before and was a slow typist.  I learned a valuable lesson there that especially online you need to get some form of check-in about the student, how they feel and what their backstory is, rather than "leap into" the coaching.

It's a lesson I really should know - but it's amazing how the session helped to reinforce that, and instead I made my own assumptions that it was someone trolling me.

So you wanna be a boxer?


SoftEd ran a couple of boxing training sessions which were absolutely superb.  I occasionally do something similar in Wellington (I've talked about Josette, one of our instructors here).



Boxing training is a very intimate kind of training.  You pair up with someone, and take turns doing exercises,with one person using gloves to hit, and another holding the pads being hit (you hit the pads, not the person!).  You have to both be mentally in a similar zone, and develop a kind of rhythm with each other.

That makes it oddly quite a social activity.  The best kind of pairing is when you're both supporting the other with "try moving your stance", "we're half way, don't give up", "c'mon, keep going, nice" - it was some of Bach and Charrett's coaching tips in miniature.

Half the success of any conference like this is being able to mingle with people who you don't know.  Meet new people, make new allies.  The boxing sessions proved to be a great "meet and greet" event, with conversations with other boxers strung out through the rest of the conference.

Which brings me to this tweet ...


The boxing was one method (I'll talk about the other in a moment), but there were the experienced keynote speakers touring the conference, and there were other speakers such as myself.  But mingling and listening I realised something important, "everyone has an experience report and a story inside them, just keep your ears open".

As I said in that tweet, in some ways listening to the raw stories from others was a great opportunity to really spread my net over the conference.

Put yourself around people with passion


The other method of putting myself around a bit came at lunchtime.  It all felt like being a bit at High School with "who shall I sit with?".  Occasionally I just really needed to eat and dash, and I'd just sit alone.  But I tried to use it as an opportunity to sit with new people, and introduce myself.

I however earned myself the "special little snowflake" achievement on Monday lunchtime though - finding a table of people I didn't know, and asking if it was okay to sit with them.  They were from a completely different conference!

But this actually led to a bit of a revelation.  They were a conference of ultrasound operators and were curious about who we all were.  So I got to tell them a little about software testing, as well as ask them a bit about their conference.

My interest was hightened a bit.  Recently my brother and his wife had a daughter.  One thing that surprised me was the ultrasound. When my son was "under development", we had a couple of ultrasound pictures of him, and they were a bit like one of those 3d puzzles.  If you stared at really hard, you couple perhaps make out a skull.  Ish.

But for Thea, her pictures were strikingly clear, the technology had really come along leaps and bounds.  So surely being an ultrasound operator was a lot easier now?  Wrong.

Turns out they do more and more checking with ultrasound as it's such a non-invasive proceedure.  They were spending a conference looking at example images of different ailments such as a damaged appendix.  In their normal routine they might not see some of these examples, so it was all about improving their ability to look and and recognise issues.  They were using the conference to broaden their experience from other operators, so when they went back to work on the Thursday they were just that bit sharper.

The improvements in technology made some things a lot easier.  But at the end of the day it required a human eye and human judgement.  And damn it - wasn't the same true about testing's relationship to technology over the same timeframe?  Some things had got easier, but at the end of the day, it's about a human eye and human decision making.

This led me to an important understanding - I learn a lot about testing, but not always from testers.  I'm quite a talker, but I'm a good listener too.  In fact when we go touring around New Zealand, my wife despairs of me as I really enjoy going into quiet shops and talking at length to the owners, where we come from and finding out some of their history.

I am attracted to spending time with people with a passion, and an ability to animatedly talk about that passion.  It doesn't have to be anything I'm interested in - in fact often it helps if it's not.  Just this year I've spun pieces off from conversations with Josette my boxing instructor and Lotz my musician friend.

Testing has a good few parallels, and if you listen out, there is knowledge out there from people going through similar experiences which you can Shanghai, and add to yours!

An interesting chat with Erik Peterson leads to some self-reflection ...


I had an interesting lunchtime chat with Erik Peterson where we talked about heuristic models for testing.  I came to the realisation that I'm heavily dependant on an "experiental model" (although I do use others) - basically "when I used to program, I once saw this happen" or "I've seen a bug like this in a similar system".

That's of course okay, as long as you realise it's fallible.  And it's greatest fallibility is you aren't looking for a bug you've never experienced before - you have a blind spot to anything you've never seen or heard.  It also made me look at some of my writing - overall my writing heavily leans towards a "series of experience reports", occasionally postulating a model from this experience.

It's an interesting look in the mirror at my way of thinking - also tying into my previous post about trying and failing.  It's like I'm drawn to having a pool of experiences to base judgements on.

My talk


Yup - I'm not being egotistical here, but not only did I enjoy giving my talk on "deprogramming the cargo cult of testing", but to my shock, I walked out with an expanded take on it.  Some of the questions asked allowed me to think and explore the subject in ways I'd not expected.

The topic was really talking about the system of testing we've put into place over the last 12 months, and I talked about it back in my piece on exploratory testing.  We put together a new way of testing when we moved to being agile, but we engaged with our customer to talk to them about what they felt they got out of our old methodology?  What did they feel they get from a test plan, a test script or a test report?

The point was this was to form a matrix of values from our customer - this meant whatever approach we took for testing it needed to address these values in some manner.  If it didn't then we weren't done with our approach, it wasn't hitting the needs, and we needed to rethink.  But not only that, we had to make sure we were making "how our testing worked" visible to the customer.

An example of this would be how the customer saw test scripts both as "proof of testing" and "training material".  We ended up using qTrace to record our sessions as "proof of testing" and for "training material" sharing an internal testing handbook we already had, and making sure we kept it up to date sprint on sprint.

Someone noted the piece tied in a bit with Keith Klain's keynote where he talked about avoiding being overly whiny or self-centred about testing's problems, but understand the person you report to "has problems and needs" that you don't know of.  To try and go to them, not with more problems, but trying to help and aid them.

The bottom line to this approach was that we made sure we had an evangelical fervour to delivering real value to our customers, in a testing approach that we felt accurately addressed their needs.  In this I really was pleased we seemed to carry on the spirit of Alessandra Moreiraa's talk about engaging and influencing people.  In fact the conclusion from our talk was it would be a mistake to wait for a major shift from waterfall to agile before engaging with a client to ask if the testing you're performing is really "ticking the boxes" from both the client and the test team point of view.

Final thoughts ...

These are the things that really stuck with me - a very interesting conference, with a lot to take home.  I sadly missed the Fiona Charles keynote at the end of the Wednesday, which I was looking forward to.

There was a lot to take in, but also fun to be had along the way - one of the funnest activities being Joanne Perold and Carsten Feilberg's workshop where we replicated problems in communication by using a Lego building exercise to replicate the the software building process.  This was an exercise I would love to try again with different rules to see if it causes some of the outcomes I expect.  Likewise the boxing and the coaching activities were nicely hands on.

The team behind Let's Test Oz really did an excellent job in making this happen - the venue and food was amazing, everything ran well, and everyone seemed to come to the conference ready to really share and engage.  I made sure before writing this, I sent an email to the key players, asking them to circulate to all who needed to read it.

Thanks guys!

A tale of two tutors ...

Several of my recent blog posts have talked back to my experiences at University, and I'm somewhat shocked to find out that 25 years have since passed, and yet I still feel I'm out on an active path of learning.

University was a formative time for me in a lot of ways, as it is for many people. Apart from the independence aspect, it's also a time where you learn there isn't a textbook syllabus anymore.  Instead there's a whole world of different ideas and theories in your chosen discipline, many of which contrast, and education at this point becomes trying to reason between this knowledge.

An important role in shaping me as a human being through these years came from two very different individuals who were my tutors in physics and astronomy at the University of Sheffield, and this post is about who they were and where that influence came from ...

Professor Fred Combley



Fred was my tutor for physics.  It's hard to think of him as "Prof Combley", he was Fred, a very warm and gentle person, whose office was almost always open to any student.

His approach for our third year course in cosmology was really unique.  He didn't teach a single lecture. We did!

Now that might seem like a very lazy lecturer, but it was both inspiring and revolutionary.  Each week, three students were given an area to prepare a lecture for, and we'd present the next week.  We'd have to go to the library to research, and we had a session booked with Fred to discuss the topic.  We were in fact given the keys to our own learning.

I loved doing it, and loved sitting and exploring the topic with him.  Versus the many other lectures we attended that seemed to get droned out by writing out mathematical formulae by rote, this was us, the empowered student, picking out what was important and what to say.  And the information from those lectures stuck.  I loved it so much that it led me to trying teaching, and is one of those reasons why I'll almost always put my hand up to speak or present when given an opportunity.

But what stuck with me most of all was as I said was his warmth.  I wasn't a model student at all.  At school I was the top of the class in physics, but at University within a group of my peers, I was decidedly below average at the subject, and that caused me a lot of stress.  I felt almost robbed of my identity.  In fact I failed exams in my first two years and had to do resits (I did say that failure was my natural style).  But with perseverance I got through - although despite not being a star student, as I said Fred always had a time for me, and more respect than I felt I deserved at the time.  I always felt he believed in me, even when I didn't believe in myself, and that was important getting through some tough times.

I bumped into him again three years later - I was popping back to the University of Sheffield to have some lasers etched for my project at the University of Essex.  [Essex was partnered with Sheffield, who had superior clean room facilities].  He saw me in the corridor, and to my amazement remembered me (as a physics tutor I imagined I was one in a sea of faces), and dragged me into his office to catch up - he was very pleased to hear I was still in physics and enduring (although I was still failing exams).

Thanks to the wonder of the internet (Fred was involved with CERN, so got it first), we kept in touch afterwards, with an email a year to catch up and tell him about my new career in software, and the interesting things I was learning.

Then one day in 2001, I realised he was no longer on the staff at Sheffield University, and smiled as I realised he must have finally retired.  Sadly no, as another of the teachers at Sheffield, Dr Susan Cartwright had to inform me that he was due to retire, but alas an aggressive cancer had killed him before that could happen.

I was gutted.  Anyone who knew him couldn't help but be gutted ...

Prof David Hughes


David Hughes was my tutor for astronomy and in many ways the polar opposite to Fred.  I mentioned him of course in previous blog posts ...

David was a hero of mine, I'd seen him speak on astronomy on The Sky At Night, and he was simply brilliant in the televisation of the Giotto probe intercept with Haley's Comet.  I've put up links before (such as this) of him speaking - he is without doubt the greatest speakers I've ever heard, able to convey incredible concepts in a simple and entertaining form.

But there was a problem - we really didn't get on well, at all.  I talked in my previous post that when we were asked to plot out a graph of 200 points, I asked why we weren't using a computer for the task, to which he replied ...

"You can feed a computer a string of numbers, and it can add them and divide them, and multiply them faster and more accurately than any human will.  It will even draw a mean graph line through them.  But it will never go "uh-oh, that piece of data looks out of place".  Only human beings can look at, and if need be, ignore data that could be erroneous.  If you just feed numbers into a computer without an intrinsic understanding of the data and the measurements you're using, you're essentially cutting out human judgement and intuition.  You're not here to learn how to enter numbers into a machine, but how to see those patterns for yourself, and trust to your own judgement over that of a computer."

In that blog, I mentioned how inspirational that quote is, and how I return to it again and again.  But what I didn't tell you was how I responded to it at the time.  I hated it, and I didn't like him for what he said.  I felt belittled over my idea to use a computer program (I was good at using computers for such tasks) and annoyed at him over it.

It didn't help that unlike Fred, David seemed to have his favourite students to whom he was always joking and telling funny stories to.  However when I had to spend time with him, he always seemed to be being on my case and being incredibly pushy.

It took me years though to realise that compared to those student who got the funny tales, that I got the best from David Hughes.  I had excuses galore to hide behind, but he had a habit of blasting them away, and not letting me settle for "not giving it a go", frequently pushing me with "you can do better than this".

Another conversation I remember having was of me whining about a 1000 word essay we had to complete in a week, and how that was almost impossible.  He told me bluntly that if I did my research and got the ideas in my head, I could easily sit down an knock out that length (as he often did for astronomy magazines) in just a couple of hours.

And damn, he was right!  I've been working on this blog post for about an hour, and Microsoft Word tells me I'm over 1200 words.  Every time I do a word count on a blog or magazine piece, I just remember that conversation, and go "damn, you're right again!".  So it's fair to say he has been a major influence in my writing on testing.

But he wasn't always so gruff, when I started to appreciate how he'd not let me sabotage myself with ideas that "it can't be done", I also remembered him talking to me when I failed an astronomy paper, telling me not to let it worry me too much, and it was a mark that we could work on and "make alright" next time.

Unlike the tragic story of Fred, Prof David Hughes is retired, but still talking about the subject with which he has boundless passion, and has a nice gig doing astronomy lectures on cruise ships ...

Models of tutoring and coaching

These two characters were going through my head for the last week, and I've realised how much in any mentor or coach we need elements of both of them.  David's pushiness to not allow me to settle for second best or to sabotage myself with negativity before I'd begun and Fred's gentle nature to help pick you up and gently say "well, what do you think you can do better?".  A mixture of hardness and softness dictated on which is needed to coax out the best from an individual.


Everyone probably need a bit of pushing and a bit of picking up, but the focus for different individuals is completely different, because those people, how they view themselves is different - making learning and coaching itself a contextual activity. It makes me think of Shifu, the master and trainer in Kung Fu Panda.  He originally tries to teach Po how to do Kung Fu in the exact same manner he's trained all his other students.  But the training is disastrous, and Po eventually gets really dejected.  However when Shifu sees Po in the kitchen climbing shelves to find cookies, he realises that Po has more raw ability than he originally thought.  He comes up with a training scheme different to the others, and which focuses on what motivates Po.

In many ways, all these elements turned out of be part of the model that James Bach and Anne-Marie Charrett presented at Let's Test Oz 2014 as part of their workshop on coaching testers.  However instead of the two data points in my life called "Fred" and "David", they've been researching, trying out models, and looking for fundamental truths about what makes good coaching.  I'm going to resist the urge to paraphrase them but it was without doubt the session at Let's Test that I found myself taking the most away from.  If you have the chance to ever attend their workshop in future, I recommend you get yourself along to it!

[And if you can't manage that, hound them to write a book about it]

Saturday, September 13, 2014

Reality, models, and all that jazz ...

My last few posts, on flat earths and my experiences at University, have brought me very close to a topic I've really wanted to cover this year - how do you work out what reality really is?

One of the reasons I wanted to go to University was to study the latest knowledge about physics and astronomy.  But to my initial surprise that wasn't completely the case.  In most subjects, but especially the history of astronomy, we studied how past civilisations viewed the universe.  

So we were presented with ancient models of the universe, why they thought like that, and about the critical observations which ended up leading to new a understanding (and occasionally the controversy that produced).  Prof David Hughes encouraged us to look out through old papers, for instance where astronomers were convinced that the craters we see on the Moon were actually volcanoes.  The point was not to laugh at these people from history and feel smugly superior because "we know better than you", but to understand how our ideas evolve as we find out things from observation to develop a sense of intuition around science.

Having thought about this a bit, this is my view around what scientists such as Stephen Hawking call "model dependant realism" - which is a kind of scientific version of Plato's allegory of the cave (the one that says we're often trying to understand reality not from direct observations, but from watching shadows on a cave wall).


"Reality"

Much like in Plato's cave, "stuff" is going on.  And actually here "stuff" can be the science of the universe, a historical event, even a crime.  It's something that's going on - and it happens whether or not it's being observed, and whether or not people have an adequate model to understand it.  I mean it's not like a tree in a forest starts to fall over and goes "wait, should I hold on until someone is around to hear this?".

Now here's the important thing, we might think we know what reality is, but we don't all we can say is we think we have a good working model of it (you'll get this as we go on).

"Evidence"

As we watch "stuff happening" we start to gather information or evidence from this observation, and build up more and more of a record.  Just because we have a pool of information though doesn't mean we know what's going on - we often will witness things which at the time seem contrary to what we understand (heck, that's the basis of most scientific experimentation).

"The Model"

The model is basically a set of rules or an understanding taken from evidence which we use to piece together an idea of "what reality might be".  

If you like, it's pretty much the best fit of how reality might work based on the evidence we have.  To do this we have to sift through our evidence, and try and work out which pieces seem the most accurate, and try and work with them.  Whatever model we have has to fit the evidence we have as best we can.  If we're using an existing model, and a lot of the evidence doesn't fit the model, we have to think about building a new model.  

We also have to be careful (as with our flat-earther yesterday) about using the model we have to eliminate any evidence we see which doesn't fit our model (also see; climate change denial and Creationism), and I'll talk about that later.

An example of this process would be for instance Tycho Brahe recorded astronomical information religiously for years, but it was only when mathematician Johannes Kepler started to work on this that he found several mathematical patterns, developing astronomical models to cover them.

But you'll also see it in court - when someone is under trial, a jury is presented with two sets of evidence "for" and "against" including eye witness statements, forensic information, records.  Some of this information will be contrary.  They're then put into a room to sift through everything they've been exposed to, they will deliberate and choose some evidence over others, to attempt to determine a model (guilty or not guilty) that is their best determination of what "reality" probably was (ideally beyond reasonable doubt).

And again in history - as a historian you may find the letter written from a leader after a great battle going, "the enemy surrendered in droves at the end, and we took their arms, and after they pledged to go home and fight no more, they were free to go".  However an archaeologist finds a mass graveyard nearby.  Is that the burial site of the dead from the battle, or did some great atrocity happen?  [A good example is King Richard and his nephews]

So we ignore some evidence?


Unfortunately, sometimes we do have to, but we have to think very carefully when we do.  If you're timing how long it takes raindrops to fall down a window and you get a set of times like "11.1 seconds", "10.4 seconds", "110.9 seconds", "17.2 seconds", "9.2 seconds".  One of those times just stands out as questionable.  Is is possible it really took 110.9 seconds?  Did maybe you leave the stopwatch on without realising?  Or did you do a transposition error when recording?  That piece of data is highly suspect as it doesn't fit in.  You carefully repeat and repeat, but never get anywhere close, and so you do somewhat suspect that data to not be reliable.

In a trial, someone might say they've seen someone at a certain place and time - could it be they're mistaken?  Or that they just saw someone who looked like them?  Or they are flat out lying?  All are possibilities.

I myself suffer occasionally from a very weird condition called sleep paralysis.  It means sometimes I come out of sleep in a very confusing half-awake, half-asleep manner.  You are aware of being awake, but your body is still paralysed as if asleep.

It's a very confusing state to be in.  For instance, this year I've woken up to find my dead father-in-law sitting on the bed, and he had a decent chat to me about some guy he knew who used to go fishing.  The scary thing is it feels incredibly real, and it registered in my brain is as real as any waking conversation I've had.  That said, I don't find myself believing in ghosts from it, despite having witnessed this.  The clues are (a) I suffer from sleep paralysis and (b) I couldn't move or speak.  This sadly causes me to have to disregard the experience, although of course I do want to believe I've spoken with him, it's hard not to.  As with our flat-earther, there are things we find ourselves emotionally attached to, and you don't get any more emotionally attached than to someone who died who you loved.

Where it all goes wrong

The models we have of course are only as good as how they help us to make sense of this thing out there called "reality" - to understand our observations, and indeed to predict what may happen.  Science, understanding of some historical event and indeed religion are all models.

Sadly humanity goes wrong though when we start to hold a model sacred, especially if there's a vested interest in the continuance of that model.  Invariably then that happens is the model is used to filter out observation and evidence that contradicts it, instead of using this evidence to drive towards a better understanding of reality.  Our flat-earther yesterday pretty much dismissed all evidence provided because it contradicted his model.  If he could find the smallest area of doubt, he dismissed the whole piece of evidence entirely.

You see a similar phenomenon when fundamentalist religions (of all denominations) will dismiss anything which seems contrary to their teachings and understanding of the universe.  It happened to Galileo when he suggested the world might orbit the Sun, instead of the Sun orbiting the Earth, and he wasn't alone.

Sadly this is a course of action which can keep people in ignorance, and leave us "blaming the observers" over seeking better models.  I actually don't think religion needs to be all bad - many of them have been around for hundreds of years.  I fundamentally (but not too fundamentally you understand) believe that religions in a similar manner to Shakespeare's old plays, endure because they speak to an inner questioning voice we all have.  [Shakespeare's plays though based hundreds of years ago are still fundamentally about love in the face of obstacles, revenge, jealousy, betrayal, joy - human conditions which continue to endure in modern life]

As a scientist when I used to read Genesis's version of the creation, I didn't take it literally, but liked the idea of how God related to each step of creation, and it all formed a logical sequence.  Following our current scientific models of the evolution of the universe, we do believe still that it did begin with light, created land then the sea, then animals and finally humans.  Ish.

But it's the ideas of how we should treat each other that endure the most and from that we hold most dear and relevant from religion.  Ideas like "thou shalt not kill", "thou shalt not steal", "thou shalt not commit adultery" and "thou shalt not covet thy neighours ass" do make a kind of sense, and have been the fundamental basis of most human laws (although sometimes badly followed according to if you're the person in society "with the power).

In general, I as a human am going to find myself a lot happier if I don't go around killing others, and likewise it causes others around me to reciprocally be happier.  Okay there might be special cases, for instance if someone is intent on committing harm to myself or my family, but generally it holds.  A similar logic goes for stealing and those other items.

Even the most ardent atheist I know has a strong sense of justice, which in many ways is a distillation into our society of those originally religious laws (just leaving behind some of the God bits).  But even so, it's another example of people finding some things from a model useful and applicable, so using them to move forward, but leaving those elements which can't be supported behind as superstition and "past their sell by date".

We can do that without leaving the religion behind altogether if we still find it has value - not everyone who wants to revisit their models has to be an atheist.  Indeed, I'm not.  As a young man in my early 20s I found the teachings of Christianity really important, especially the redemptive message of forgiveness for ourselves and others.  We don't have to be perfect, we just need to strive to be our best (sadly not all Christians take it that way).  And hence my faith allowed me to strive to be the best person I could be (over sadly how others will use it as a metre to measure others as unworthy).  I took the pieces from the Bible that inspired that, but with the case of pieces from Genesis I took them more as a "metaphorical explanation" over a "nuts and bolts description of how the universe was created".  After all it was a model, and we'd happened to find better models ...

The bottom line is though, don't be a slave to your models!  And yes, that includes certain models of testing ... cough ISO 29119 cough ...

And finally

Since writing about Prof David Hughes and my experience with him, I've found a couple of presentations by him.  He's without doubt one of the most inspirational speakers and thinkers I've met, and even if you've got a casual interest in astronomy, you may find a lot to take away from his talks ...

Friday, September 12, 2014

Do we live on a flat earth? A mental exercise ...

Yesterday I was exchanging some travel information with fellow Kiwi tester Kim Engel (btw, she does contract testing, and she's currently free) ahead of Let's Test Oz.

During the course of the day we were talking about opinion vs fact, and she came out on Twitter with this,


This really interested me, and we ended up continuing our conversation on email afterwards.  I've spoken before about asking "how do you know if something is true?".

I remember in a book I read at school about someone scoffing at some tribe they met "because they probably think the Earth is flat".  We though can usually feel smug and secure we know better, "because someone told us it's round".

But typically that's all it is, someone telling us something, and we take it as gospel.  In truth one of the huge problems is we're bombarded with so much misinformation, we often have to relearn some of the garbage we learn.  When I was five, we were watching John Craven's Newsround and I tried to understand what the big deal about the Voyager probe launches were - I mean we were sending manned spacecraft to other stars and planets, what's the big deal.  My parents asked me what I meant, and I said we saw it all the time on Star Trek (they were avid fans).  Somehow I'd thought we really had ships like the starship Enterprise.

And through school I learned so much misinformation through friends.  Somehow in my mind I had it that the Earth spun to create gravity.  I took as gospel that there was a witches house in the trees on the school grounds (this was infant school folks, not senior school) and that kinds that went into the woods there never came out.  Heck even Santa was a difficult thing for me to shake, I'd seen him at department stores, and my parents had even faked a phone call from him once to get me to go to bed (and muddled my concept of reality in the process).  I will not even begin to tell you all the misinformation I had about sex from my peers at high school!

Okay - so believing everything you hear can, and in my case did, get you into difficulties.  But what of the other polar opposite?  And this is where my conversation with Kim went.

Is the Earth flat?

Looking at the Earth and is it spherical or flat from first principles.

Using my own eyes and experience.  Certainly I've looked at the Earth every day in my life, and from my perspective it certainly does look more like it's flat than spherical.

But haven't you seen picture of the Earth from space, it's a sphere!

That's true, I've seen pictures of the Earth where it does look spherical.  But (a) I've never seen the Earth beneath me like that with my own eyes and (b) I've also seen similar pictures of Tatooine in Star Wars, so I know the technology to fake that view is there.



What about the fact that you can fly from the UK to NZ via America OR via Asia.  Getting to the same point via two opposite directions.  It's a sphere!

I've only ever travelled here via America.  And even then for starters I didn't really know where we were at any given point, and half the time it was in darkness.  My wife once travelled there and back via Asia, but having used her to read maps when we're driving you'll forgive me for not putting much faith her word.

If you've ever seen a partial lunar eclipse, you can see the Earth's shadow, and it's round!

You see, this is where a lot of people get confused.  Of course the Earth is round.  It's round, but flat.  Just like a plate.


But the Earth is a sphere.  Different cities are in different timezones.  When London is in daylight, Auckland is in darkness.  You wouldn't get that with a flat earth.

I only know if it's daylight or darkness where I am.  I can't be in two places at the same time.  I might Skype someone in London, but how do I know what I'm seeing isn't just a studio set somewhere?

-----------------

And on and on it goes.  This is actually a peek into what my grandfather is like.  He's one of the smartest men I know, has studied all his life, and someone I admire a lot.  But he's of the opinion the Apollo Program was faked, and try as we might ...

Kim had noted she'd seen this phenomenon herself especially when people try and engage about religion or climate change.  "Correlation vs. causation comes up a lot with the remaining sceptics out there.  The difference between opinion and fact is empirical evidence. But empirical evidence has a way of changing, and the facts change with it."

As with my flat-earther or my Moon conspiracy grandfather, people have an odd way of filtering out evidence that doesn't fit their model.  With such people, will you ever be able to provide sufficient information to their satisfaction of how their model is wrong?  No, because invariably they'll alway find some area of doubt in something you've provided to undermine it.  Their model is right, not because they can prove it, but because there is a 1% area of inaccuracy or doubt in yours.

Carl Jung noted this has, and always will be a problem.  There are a lot of people like us who are used to dealing with things from a pure logical point of view.  And therefore when you're presented with a disagreement will get as much information and logic to sway the other person.  But not all people are wired that way, with some people having a much more emotional over logical response to things, and it being their core way of understanding and responding to the world.  And it's hard (if not damn near impossible) for a person using logic to sway someone who is used to making decisions in this manner.

And even people who think they're super-logical can have their off days!  I mean the kind where you pass by an electronics shop and go "oh, they've released a new phone ... it's only slightly bigger than the one I have, and not much faster, and it's so expensive, it makes sense to keep to my current phone".  And as you take the bus home surfing on the new phone you bought regardless, asking "how did this happen again?".

But the bottom line is you can't sway or convince anyone of anything if they're not coming to the conversation with an open mind.  If their mind is already made up, good luck!


The Razor

How do you keep an open mind though, without being duped by everyone who had a tale?  This is probably where we need to reach for the razor blades, namely Occam's Razor.

Occam's Razor accepts that basically you can't witness and observe everything (like our flat earther wants to).  But neither should you take everything on faith either.  When empirical evidence is provided to you, it's either going to be true or false, but which is more likely?  Typically the one with the least number of assumptions.  The universe after all tends toward simplicity over elaborate and needless complexity.

So if the spherical Earth is being propagated as "a big lie", then ...
  • Someone has been paying off every space launch since 1955 to fake evidence of it being flat.
  • This conspiracy would include both the USA and the USSR, bitter enemies at the height of the Cold War, but united to suppress the truth about the flat Earth
  • When someone flies from London to Auckland via America, it's okay, because that route exists.  But if they go via Asia, then the pilot flies around Africa for a bit until the passengers get disorientated and it gets dark.  He then heads via America, to New Zealand, stopping off at a secret replica of Singapore they've build deep in the Andes.
  • When it's morning in New Zealand and I ring my mother in London, and she says it's evening, she's lying.  As is my brother when I ring him.
  • You're all lying to me, because you're in on it!

However if the spherical Earth was true, then maybe it's just that some people are convinced that Governments will lie to us about just about everything (although really ... that's a good point as well).

Is this a testing skill?

Being able to navigate bias is a key skill for a tester.  In many ways testing is about like Kim mentioned, finding empirical evidence to support or challenge someone's opinion.  Typically for us testers that "opinion" is that "we've done coding this software, and it's ready for release".  That can be an opinion as emotional and occasionally irrational as our flat-earther (let's face it, no-one likes to think they've done a bad job on something), especially if timescales are getting tight.  Great we have a new user registration page, and I can create A user - but does that mean I can create ANY user?  And what do I mean by ANY?

Right now there are all forms of different approaches to testing out there, but which are the ones worth trying and putting your neck and reputation on the line for?  Maybe you want to just stick with the method you've always done, because it's always worked (doesn't that feel a bit like you're being a flat-earther there?).  Then again, maybe something really does sound too good to be true, and you feel right to be sceptical without more information?

No-one can make these decisions for you, and ideally no-one should make those decisions for you.  However to really attain our potential as smart testers we need to understand our own thought processes, and challenge ourselves over the filters we use regarding new ideas and information.