„Einen von zwei Schmerzen müssen wir ertragen: den Schmerz der Disziplin oder den eines schlechten Gewissens. Der Unterschied ist, Disziplin wiegt Gramm, ein schlechtes Gewissen wiegt Tonnen.“ – Jim Rohn, US-amerikanischer Motivationstrainer

This week was all about refactoring. We were supposed to download a repository on github and refactor the example code with the help of a book (http://silab.fon.bg.ac.rs/wp-content/uploads/2016/10/Refactoring-Improving-the-Design-of-Existing-Code-Addison-Wesley-Professional-1999.pdf ) and upload this to our own repository on github. The book and the methods in it were supposed to show us how to refactor cleverly using the example. The book also taught us how to cleverly shorten or move code to get a better overview. In the end, it was a matter of applying what we had learned with the help of the examples in the book. You can find our repositories at https://github.com/Sebastian-Zok/FowlerRefactoring (Sebastian) and https://github.com/0Raspbinary1/SE_Refactoring (Rouven). The original repository can be found here: https://github.com/gnilkreb/Fowler


Additionally we have 2 useful refactoring functions for you, which you can use (in the IDE Eclipse):





All the best,

Your workout-log team!