The learning goals for Week 38 are:
Mon: Code Quality. Wed: Maintainability and Flexibility.
Notes for this weekplan:
Wedney's lectures are unfortunately cancelled due to illness. You can find the Lifesize 2018 lectures on 'maintainability' on these links: 2018 lecture one and 2018 lecture two.
Links to the Clean Code Classification Template
- Clean Code template (excel)
- Clean Code template (pdf)
As an alternative/supplement to my lecture on clean code, I have made ten screen casts in which I refactor the 'move(from,to)' method which I have coded heavily inspired by student's code from E16 (thus it is artificial, but all unclean aspects have real counterparts). You may study the GameImpl.java yourself before watching the screencasts.
There are a few places in the videos with rather long pauses! The reason? I think...
- Session 1 / Intro
- Session 2 / Duplication I
- Session 3 / 'If' cleanup
- Session 4 / Duplication II
- Session 5 / Remove nesting
- Session 6 / One level of abstraction
- Session 7 / Commenting
- Session 8 / One level of abstraction
- Session 9 / Bail out fast
- Session 10 / One Level of Abstraction
Find Dirty Code
Find some code from previous courses or projects, and analyze them according to the Uncle Bob+Henrik principles. If in the mood - clean them up.
Rehearse a clean code exam situation. Spend 25 minutes to prepare a 10 minute oral presentation of an exercise in the example exam question set: demo-question-final-2018.pdf.
Next, do a 10 minute presentation at the whiteboard in front of your team.
The team provides constructive feedback on the presentation: Is your presentation clear and understandable, do you discuss the concepts and terms correctly, is you Java example code correct, etc. Swap and ensure all in the team gets a chance to rehearse the situation.
Legend: The typography bold, normal, (brackets), above indicate my perception of how important the exercises are from high to optional. However, solve the mandatory project first!.