Learn to Write Clean Code with Java. Get Hands-on with Code Examples involving 4 principles of Simple Design, Refactoring & TDD.
- Step I : Understand Clarity of Code (Unit Tests)
- Step II: Focus on 4 Principles of Simple Design
- Step III: Get started with Refactoring
- Step IV : Understand TDD
- Goal
- Understand Clarity of Code
- Give importance to Unit Testing
GildedRoseADefaultItemTest.javaGildedRoseBAgedBrieTest.javaGildedRoseCBackstagePassesTest.java- More details - Gilded Rose Exercises
- Refactor Code
StudentHelper.isGradeB()StudentHelper.getGrade()StudentHelper.willQualifyForQuiz()
- Write Code
TextHelper.swapLastTwoCharacters()TextHelper.truncateAInFirst2Positions()
- Refactor Unit Test
CustomerBOTest
CustomerBOImpl.getCustomerProductsSum(List<Product>)Movie.isValidRating()MenuAccess.setAuthorizationsInEachMenus(List<MenuItem>, Role[])UserLoginChecker.isUserAllowedToLogin(long, String, boolean, User, List)
UserLoginCheckerTestMenuAccessTest
- More details - TDD Exercises
- Truncate A in first 2 positions of a String
- Check if first two and last two characters in the string are the same.
- Bowling Kata