Presented at SwanseaCon (2017-09-26)
We default to considering systems from an insider's perspective; the view from outside can be quite different. Can we apply this inversion to more than just requirements?
We may say we want testing, but what do we want from testing? We may say we want logging, but what do we want from logging? We may say we want clean code, but what do we want from clean code? We may say we want an agile process, but what do we want from an agile process? These are harder questions, but their answers can make for better solutions.
2. What We Talk About
When We Talk About
Development
@KevlinHenney
3. What We Talk About
When We Talk About
Requirements
@KevlinHenney
4.
5. Too often we push the problem
into the background because we
are in a hurry to proceed to a
solution.
6. If you read most software
development texts thoughtfully,
you will see that almost everything
is about the solution; almost
nothing is about the problem.
11. You have to finish things —
that's what you learn from,
you learn by finishing things.
Neil Gaiman
12. SCRUM: A Pattern
Language for
Hyperproductive
Software
Development Teams
Mike Beedle, Martine Devos,
Yonat Sharon,Ken Schwaber,
and Jeff Sutherland
14. Problem
You want to balance the needs of developers to work
undisturbed and the needs of management and the
customer to see real progress, as well as control the
direction of that progress throughout the project.
Solution
Divide the project in Sprints. A Sprint is a period of
approximately 30 days in which an agreed amount of
work will be performed to create a deliverable. Each
Sprint takes a pre-allocated amount of work from the
Backlog.
Sprint
25. I’ve never met a customer yet that
wasn’t all too happy to tell me what
they wanted—usually in great detail.
The problem is that customers don’t
always tell you the whole truth.
Nate Jackson
26. They generally don't lie.
They use their terms and their contexts.
They leave out significant details.
They make assumptions.
Nate Jackson
27. This is compounded by the fact that
many customers don’t actually know
what they want in the first place!
Nate Jackson
43. Make definite assertions.
Avoid tame, colourless, hesitating, noncommittal
language.
When a sentence is made stronger, it usually becomes
shorter. Thus brevity is a by-product of vigour.
William Strunk and E B White
The Elements of Style
48. public class Stack_spec
{
public static class A_new_stack
{
@Test
public void is_empty()
}
public static class An_empty_stack
{
@Test()
public void throws_when_queried_for_its_top_item()
@Test()
public void throws_when_popped()
@Test
public void acquires_depth_by_retaining_a_pushed_item_as_its_top()
}
public static class A_non_empty_stack
{
@Test
public void becomes_deeper_by_retaining_a_pushed_item_as_its_top()
@Test
public void on_popping_reveals_tops_in_reverse_order_of_pushing()
}
}
49. public class
Stack_spec
{
public static class
A_new_stack
{
@Test
public void is_empty()
}
public static class
An_empty_stack
{
@Test()
public void throws_when_queried_for_its_top_item()
@Test()
public void throws_when_popped()
@Test
public void acquires_depth_by_retaining_a_pushed_item_as_its_top()
}
public static class
A_non_empty_stack
{
@Test
public void becomes_deeper_by_retaining_a_pushed_item_as_its_top()
@Test
public void on_popping_reveals_tops_in_reverse_order_of_pushing()
}
}
50. public class
Stack_spec
{
public static class
A_new_stack
{
@Test
public void is_empty()
}
public static class
An_empty_stack
{
@Test()
public void throws_when_queried_for_its_top_item()
@Test()
public void throws_when_popped()
@Test
public void acquires_depth_by_retaining_a_pushed_item_as_its_top()
}
public static class
A_non_empty_stack
{
@Test
public void becomes_deeper_by_retaining_a_pushed_item_as_its_top()
@Test
public void on_popping_reveals_tops_in_reverse_order_of_pushing()
}
}
54. We want our code
to be unit testable.
What is a unit test?
55. A test is not a unit test if:
▪ It talks to the database
▪ It communicates across the network
▪ It touches the file system
▪ It can't run at the same time as any of your other
unit tests
▪ You have to do special things to your environment
(such as editing config files) to run it.
Michael Feathers
http://www.artima.com/weblogs/viewpost.jsp?thread=126923
56. A unit test is a test of behaviour
whose success or failure is wholly
determined by the correctness of
the test and the correctness of the
unit under test.
Kevlin Henney
http://www.theregister.co.uk/2007/07/28/what_are_your_units/