ScaTDD: Casting an eye over three major Test frameworks in Scala

Testing has traditionally been the gateway process for Scala development at a number of Java shops looking to evolve their tech stack with minimal disruption or committment. This posts hopes to cover three of the main testing frameworks in the Scala landscape, (Specs2, Scalatest and Scalacheck) with an example of the classic FizzBuzz test, for how they can be used for fun and profit.

3 commands, 2 dependencies, 1 minute.. blast off with Scala development using the mvn archetype

I go to a fair few (probably too many), tech conference and meetups. A passing observation, is that if code samples are shown a proportion of the audience will try to run them while following along. Initially, this seems counter intuitive (to try and both listen and absorbing information while also trying to perform actions as a background task), though my own experience is that this works suprisingly well for practical activities, (maybe the multi-sensory exposure helps learning and retention ?).
Continue reading

What’s the problem is often the problem…

Preface

Recently I’ve been involved in a number of ‘chats’ which have led me to revisit my understanding on what errors are versus exceptions and when each could and should be used. The wider context of this is based around my own belief that recoverable or application specific abnormal conditions should be returned to clients in the form of exceptions. Typically I’ve heard errors and exceptions referred to interchangeably, with some difficulty arising when the conversation covers ‘system failures’, at which point these are assumed to be ‘exceptions’ (versus everything else being implicitly deemed as errors). Continue reading