SWEA 2023 Weekplan 4

The learning goals for Week 38 are:

Mon: Clean Code (Screencasted only/Lectures cancelled). Wed: Maintainability and Flexibility. Debugging.

Literature:

Slides:

Notes for this weekplan:

Note: The monday live lecturing is cancelled and replaced by screencasts. To ensure that my hints are available early, the "W4-4 Mandatory hints" for Iteration 3 mandatory is a video.

Wednesday I will talk about maintainable software and an optional debugging talk, for those who are a bit rusty in that aspect.

The topic of Clean Code is the main topic of this week, but will purely be based upon screencasts. The theory and practices will be exemplified through my refactoring/cleaning up of the HotStone 'attackCard(...)' method. You may study the StandardGame.java yourself before watching the screencasts. The reason for not doing the clean code lectures live is that A) it is a complex code base so refactoring it live easily goes wrong and B) it allows you to skip repetitious tasks like session 'doing more bail out fast'.

The Clean Code presentations consist of

  1. Session 0 / Clean Code slides (52min) (same as the 'W4-1' screencast above)
  2. ... on to the actual live coding, presented in the following sessions:
  3. Session 1 / Do not repeat yourself (11.40)
  4. Session 2 / Bail out fast (6.30)
  5. Session 3 / Bail out fast (6.30)
  6. Session 4 / Do one thing (6.30)
  7. Session 5 / One level of abstraction (9.30)
  8. Session 6 / One level of abstraction (5.50)

Links to the Clean Code Classification Template

  1. Clean Code template (excel)
  2. Clean Code template (pdf)

Additional exercises:

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.

Exam Rehearsal

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-2022.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!