fbpx
Have something to share about engineering practices, architecture or DevOps?
Become a speaker now

TDD secrets in live cyber-dojo session

TDD secrets in live cyber-dojo session

Abstract: In this live coding session I will solve a small programming problem in C# using TDD. Along the way I will demonstrate many tips, traps, and pitfalls I commonly encounter on my travels as a software consultant. For example, “always start with a red” is a very good rule of thumb but it raises some interesting questions… How do you “force” the test to start at red? Do you deliberately make the test expect an incorrect value? Or do you deliberately make the code return an incorrect value?

I will also examine ‘sliming’ – the technique of hard-coding magic-numbers to make tests pass. How can sliming help guide your choice of what test to write next? How can sliming be combined with deliberate duplication? With micro-refactoring? How do you know you’ve slimed too much? How and when should you unslime?

We will look at the definition of the word “unit” in Unit Testing in detail to understand why the definition is useful. We will consider some very important differences between “real” code and “test” code – they are not the same. We will also consider how combining tests with coverage can greatly improve the feedback cycle, especially if we are prepared to look beyond a single simple coverage percentage.

Format: Master-class (1 hour 30 minutes)
Language: English
Jon Jagger

Jon Jagger

Independent consultant, UK

I’m 2E years old (hex). I’ve loved software since I was 10 (dec). I run my own software consultancy specializing in practice, people, process, agility, test driven development, and complex-adaptive systems thinking. I built cyber-dojo.com to promote deliberate practice for software developers. I’ve worked with Accenture, Aviva, Cisco, Ericsson, Friends Provident, HP, Microsoft, Opera, Ordnance Survey, RBS, Reuters, Renault F1, Schlumberger, Tandberg and many many more. If you don’t like my work I won’t invoice you. I’m the ex ECMA TG2 C# convenor. I’m the current ACCU conference chairman. I’ve had some C# books published. On twitter I’m @JonJagger.

Видеозапись выступления