I've facilitated this workshop in different communities and events, from October 2017 to June 2018. Companion material (notes, resources…) including slides used in specific editions can be found @ https://github.com/dcarral/good-code.
Workshop summary:
After introducing the main topic (“What is good code?”), participants are asked to solve a simple algorithmic problem (the kata) pairing in their programming language of choice.
Once the coding session is over, it’s time for the “show & discuss” section, where volunteers show and explain their solutions to the group. Together, we discuss tradeoffs, design choices, etc.
Afterwards, concepts like software metrics and static code analysis are gently introduced before discussing even more solutions to the original problem and checking if the numbers align with the previously stated opinions.
The wide range of potential approaches (under slight time pressure, in several programming languages and with different development environments) provides an interesting context to discuss topics like:
– Software development concepts such as duplication tolerance, refactor aggressivity, layers of indirection, conditionals usage, KISS (Keep It Simple, Stupid) / DRY (Don’t Repeat Yourself), etc.
– (XP) eXtreme Programming practices: simple design, pair programming, refactoring, TDD (Test-Driven Development), etc.