Three Paradigms: Taking An Extreme Position on Code Style in a Safe Environment

Keith Braithwaite (Zuhlke Engineering)

Guided Exercises with Reflection

60 minutes

You Will Need: A laptop with a suitable Java or .NET IDE

Process:

A small piece of fairly representative "enterprise" class Java (you know the sort of thing) will be presented, along with functional tests. Attendees will execute three different refactorings upon it, each starting from the initial state:

A) eliminate all the conditional expressions in certain designated classes

B) eliminate all non-final variables (method parameters excepted) in certain designated classes

C) eliminate all the getters (definition: methods that return the value of a member variable, whatever else they might do) and setters (definition: methods that change the value of a member variable, whatever else they might do) in certain designated classes

Each should take about 15 minutes. We will then contrast and compare the resulting state of the code. In particular, how easy would it seem to be to make a small functional change, which Keith will specify, in each final state vs. each other and the initial state.

 

About The Presenter:

Keith Braithwaite is a Principle Consultant with Zuhlke Engineering, and leads their Center for Agile Practice in London. He provides Agile training, consultancy and mentoring to development teams in the wholesale finance and mobile telecoms industries.

Previously he was Head of Technology Solutions for the ASIA-PAC region of WDS Global, and co-authored the first published descriptions of successful distributed Agile based on his experience there. He is a frequent speaker at Agile conferences around the world.

 

© Jason Gorman 2008