1 Observer pattern
We now need to enhance our Parking Lot class with some new electronic signs that shows how many vacant parking lots we currently have.
For the fun of it we are going to use the Observer pattern .
You need to:
- Be able to register and de-register observers
- Notify observers on cars arriving
- Notify observers on cars leaving
2 Code Smells
Generate a server in a programming language of your choice from your Swagger Definition.
Read through the code and find examples of:
- Code smells
- Hard to read code
- Naming gone wrong
- Is it consistent in way of working?
What level of Richardson Maturity Model is the generated code?
3 Design Patterns
Pick a GoF Design Pattern and implement an example of the pattern. Make sure you know exactly what is the Design Pattern, and what is the problem domain.
4 Cyclomatic Complexity
Calculate the Cyclomatic Complexity for your Java implementation of Parking Lots. Is all the methods below 10 in score? If not, refactor until below 10.
When/If your methods are already below 10 in complexity score:
- Is 10 still an OK boundary? Should it be higher? Should it be lower?
- Create a method with complexity 5, 10 and 20. Any patterns?
- Is the Cyclomatic Complexity language specfic? Could we allow for 20 in one language and only 5 in another? Why? Why not?
5 Cargo-Cult
Investigate the Cargo-Cult and why this is relevant to both Programming and Software Processes.
- Why did they behave as they did?
- Why is this a great example of “Doing Agile vs. Being Agile”?
- Why is this relevant in programming?