practical emergent design - the sisyphean dilemma

19
PRACTICAL EMERGENT DESIGN The Sisyphean Dilemma Noam Kfir Consultant & Trainer [email protected] | http://noam.kfir.cc | @NoamKfir

Upload: noam-kfir

Post on 14-Apr-2017

255 views

Category:

Software


0 download

TRANSCRIPT

PRACTICAL EMERGENT

DESIGNThe Sisyphean

DilemmaNoam KfirConsultant & [email protected] | http://noam.kfir.cc | @NoamKfir

Noam Kfir ■ Consultant and Trainer

■ Telerik Developer Expert■ Ranorex Professional■ ISTQB Reviewer■ Agile Practitioners Meetup Co-

organizer

■ Specialize in test automation forboth testers and coders

– Ranorex, Selenium…– TDD, BDD, Unit & Integration

Testing…– JavaScript, C#…

THE MYTHOF SISYPHUS

The Story of Test-Driven Development

The Myth of Sisyphus

■ A king who tricks and defies the gods■ Who repeatedly confronts death and

even withholds it from the world■ Is given an unimaginably grueling

punishment■ Is either resigned to his unending fate

or forever refuses to abide

■ This is actually the story of TDD– And BDD, ATDD and the other

derivatives

The trickster who would best the gods

■ Overcome human nature

■ Programmers are people and imperfect

■ Programs are complex systems■ Communication can be a force

multiplier but is often an impediment

■ So we need a disciplined process to overcome human fallibility, simplify code and streamline communication

■ Hence TDD

Recurring confrontations with death

■ TDD is dead, long live TDD!

■ Can I do TDD…

■ without some of the tests?■ without any of the tests?■ with integration tests?■ with end-to-end UI tests?■ differently?■ in my mind?

Hubris, pride and defiance

■ Does TDD really save time and money?– TDD is lengthy and expensive, but

worth it!

■ Based on very little conclusive research

– Mostly individual experience and bias– Too many factors to isolate

■ Conclusions often drawn from preconceived notions

– For example, less time is better

https://dzone.com/articles/whats-wrong-test-driven

Eternal repetition

■ Iteration is a foundation of TDD■ And an essential discipline for

practitioners

■ But repetition is difficult…– Psychological fatigue– Does the discipline impede

creativity?– Does it really guarantee safety,

stability, timely feedback, emergent design…?

A king brought low

■ Quality is often derived from the number of bugs or tests, or by other similar analyses

– More tests ~= higher quality

■ But is it really a numbers game?– The numbers are often misinterpreted– Could indicate high churn– Full coverage is often impractical

■ Test quality is essential, but we must:– Be cautious of cyclic arguments– Be aware that quality is partly

subjective

Finding joy and meaning in a bleak landscape

■ We often practice development-driven tests

– Because “tests” comes first?– Tests for their own sake…– We tend to focus almost exclusively

on quality indicators and immediate feedback

■But tests are not the essence of TDD– They are only a tool– Our trust is misplaced

■ Is discipline a punishment or a virtue?

TOWARDSEMERGENT DESIGN

The Fallacy ■ We expect elegant design to magically emerge when we use TDD

– But TDD is designed for immediate feedback, quality, coverage and trust

■ TDD does help us achieve emergent design

– There are also other tools– Likelihood of success increases when

multiple tools are used together properly

■ The essentials of TDD have not changed much in the past decade

– But our understanding of emergent design has evolved significantly

Emergent Design in Theory

■ Typically described as the eventual result of development that focuses on incremental delivery

■ A happy accident, expected but unplanned

■ The result of an iterative evolutionary process

■ The design naturally emerges when coders write good code

■ Fails to capture the human element

Emergent Design Factors

■ Emergent design is partly evolutionary and partly guided

■ Affected by many factors…– experience and skill level– team guidelines and project plans– architecture and development

principles– tooling limitations and time constraints– mood– and many others

■ TDD and Agile control for some factors while encouraging emergent design

Practical Emergent Design

■ The biggest mistake of TDD is the assumption that one size fits all

■ Just as Agile has to be adjusted for personal, team and company factors, so does the emergent design approach

■ TDD is a good starting point and can be adapted or even replaced

Planning an Emergent Design Strategy

■ The conversation should focus on the Sisyphean aspects of your development process and your personal experience

■ Can you find the balance between complexity and human fallibility?

■ Are discipline and creativity complementary or at odds?

■ What are the objective and subjective criteria for a good test?

■ How can you move the focus from the tests back to the design, where it belongs?

DIALOGUE ON CODEEmergent Design Under a Microscope

ONE MUST IMAGINE SISYPHUS HAPPY

Back to TDD

THANK YOU!Practical Emergent Design: The

Sisyphean Dilemma

Noam KfirConsultant & [email protected] | http://noam.kfir.cc | @NoamKfir