Presenter: Kevin Rutherford & Lindsay McEwan
Objective(s) of the session:
Participants will learn:
- How to discuss code quality in terms of Smells; they will also gain some understanding of when smells indicate real problems, and when they are more benign.
- Why technical debt is a financial drain on the business; how Smells can present opportunities to improve your, and your team's performance.
- Why not all design patterns are necessarily Smell-free; it often depends on how and when they are applied.
Contents:
Code Smells, like a pattern language, can help explain why some code is harder to change than it might otherwise be, i.e. why that code is hindering your progress on your current feature or bug-fix. Using Smells in such discussions, we feel, is less vague and less subjective, meaning a way forward is quicker and easier reached.
Participants will review some source code in the light of specific change requests and will explore the communication value of Code Smells as both a pattern language and a design vocabulary. We will discuss how Smells can indicate what code has become hard to change, and why that is a drain on the business.
Participants will also review some common programming and design patterns in the light of what has been learned, discovering tensions between the need for change and idealistic "by-the-book" design.
Format and length: 90 mins workshop
The session will be a workshop. Participants will work on code in pairs or small groups, and will discuss their findings as a group. The discussions and work sessions will be punctuated by brief presentations of new material.
Process and timetable:
The following outline will be refined in due course:
- Participants will review some prepared source code, in pairs or small groups, in the light of a specific change request
- The whole group will discuss the "quality" of the code
- Participants will be armed with information about some key code smells
- The pairs will then review the code again and the group will discuss the smells' use in communication and design.
- We will take a look at some major types of code smell and discuss their scope in the context of system architectures and popular design patterns.
Intended audience and prerequisites:
- Programmers, designers, architects, anyone looking to improve their team's performance.
- Anyone who wants to write better code, but who doesn't really know where to begin.
- Anyone who wants to understand why changeable code helps team performance, and why "technical debt" is a real cost to the business.
What do the presenters expect to learn from the session?
We want to explore whether the "anti-pattern language" of code smells can be used as a basis to:
- discuss and visualise change;
- de-mystify "technical debt";
- direct refactoring effort.
Materials needed, room layout, limitations...:
- We may ask participants to bring a laptop
- We plan to show some powerpoint slides
- The room should be laid out as a schoolroom, with desks for pairing.