Overview
Engineering Best Practices is a fast-track exploration of the disciplines, techniques and thinking that enable the creation of great software. By the end of this workshop, delegates will have a much better understanding of why clean code matters and of the techniques for creating better, cleaner, more robust code. Topics covered include:
- how to structure and decompose code at the class level
- how to partition code across classes and subsystems
- how to create intention revealing code
- how to apply data structures effectively
- how to unit test and test for behaviour properly
- how to identify and rectify code smells through refactoring
- how to apply the SOLID principles in practice
- how to use the IDE for ultimate productively
This is an intensive 2–3 day workshop (depending on level) and can be tailored for beginner and advanced developers alike. We simply ratchet up the complexity of the exercises for the advanced attendees, and build in additional time for discussion.
We aim to move the delegates away from thinking and struggling at the syntax level, and give them a toolset of best practice thinking and technique so that they code better. Students should come armed with a good understanding of the language chosen at booking. (The course can be delivered in any modern OO language.)
Outline
This is a workshop in the truest sense in that it mostly stays clear of slides. The majority of the class is delivered through programming exercises of various complexities, with the instructor live coding with the class. Along the way, we discuss topics such as:
- Functional, imperative and object-oriented thinking
- Managing state: mutable versus immutable
- Single responsibility principle, intention revealing names, information hiding, etc.
- Using standard data structures (sets, maps and lists) to better solve problems
- Understanding essential and accidental complexity
- Unit testing basics: white box, black box and grey box testing
- Developing backwards through BDD and letting the IDE do the heavy-lifting
- Understanding when to mock, when to stub and when to avoid
- How to write better (and shorter) unit tests using DSLs
- Loose versus tight coupling
- Separating creational logic from business logic using dependency injection
- Understanding cohesion, from scattered logic to monolithic classes
- Design by Contract: defensive programming versus assertions
Requirements
- The course can be tailored to any modern OO language (Java, C# etc.), but the delegates should come armed with a good understanding of the language used.