Don’t just throw it over the wall

Something that really gets to me as a developer is when I hear developers say “throw it over the wall to the testers”. A good software team should be just that… a team. You are one team all helping to achieve the goal ie deliver the software.

Most companies now use Agile Scrum methodology and have cross functional teams that consist of a number of developers, testers, BAs and a scrum master. It annoys me when developers and testers sometimes consider each other enemies. Some developers treat testers like an annoying teacher marking their homework. Testers can be just as bad.

We all need to remember that we are part of one team. If you think of it like an F1 team where would the driver be without the mechanics to change the tyres, build the car and test it? No one skill can complete the task on their own so let’s all work together to get the job done.

JavaScript Falsy Values

Having read Douglas Crockford’s fabulous Javascript the good parts book I wanted to point out one of the biggest gotchas in JavaScript… Which values are false?

There are 6 values that evaluate to false in JavaScript, EVERYTHING else will evaluate to true.  The 6 falsy values in JavaScript are:

  • 0  – the number 0
  • NaN – not a number)
  • ” – the empty string
  • false – the boolean value false
  • null
  • undefined

This can lead to some surprising values being true for example:

if ('0') { // this is true
if ('false') { // this is true
if (' '){ // this is true

The top value is true because we are testing the string 0 not the number 0. The second one is true because we are testing the string ‘false’ and not the Boolean false. The last one is true because the string is not empty – it has a single space character.

So remember if you are not dealing with one of the 6 values above then the answer is true… simples!