Kurssiesittely | Luennot | Harjoitukset |
---|
max 7 points
The original SOLID principle articles (SRP, OCP, LSP, ISP, DIP) are on the page http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod (it's worth having a look at also the package principles: REP, CCP, CRP, ADP, SDP, SAP). You may get an overview of them by listening to the Hanselminutes #145 podcast where each of the principles is explained. The lecture notes for lecture 9 have also more links.
1 point: You have read and understood all the five SOLID principles.
2 points: You have found from your codes a violation of one SOLID principle.
3 points: You have found from your codes violations of three different SOLID principles.
Read the article Working Effectively With Legacy Code (PDF) and apply the techniques adviced therein to do this exercise. After you have written some tests, try making small changes to the code under test - if the tests do not detect the change, the test coverings are not complete enough and you must write more tests, before being able to refactor the code safely. The Sorsastus project can be compiled into an executable JAR file with the mvn package command.
1 point: You have identified the "change points" and the "inflection point" that surrounds them.
2 points: You have broken the "external and internal dependencies" of the change points, so that it will be possible to write tests for the code. The behaviour of the program has not changed.
3 points: You have written enough "test coverings" for the change points, so that it will be possible to modify the program safely. The behaviour of the program has not changed.
4 points: You have refactored the counting of lines of code into its own class, which does not have dependencies to the other parts of the program. The behaviour of the program has not changed.
In the exercise group we will leave course feedback and have a Coding Dojo.