
Learn to write clean, maintainable code with simple design, refactoring, and test-driven development through hands-on exercises like GildedRose, improving clarity and unit testing.
Explore clean code principles by solving problems through simple design, refactoring, and TDD, starting with setting up a Maven project and running unit tests with JUnit 5.
Explore the Gilded Rose kata to practice refactoring and write clearer tests for a default item, tracking sell-in and quality changes, with unit testing that validates expired versus non-expired behavior.
Improve unit test clarity for GildedRose by refactoring test: extract constants and variables, create a simple setup, and write precise asserts for unexpired items with sell in and quality changes.
Refactor the gilded rose tests by introducing expired sellin and not expired sellin constants, ensuring expired items' quality decreases by 2 while improving test readability and clarity.
Explore aged brie rules and write unit tests for the Gilded Rose kata, including unexpired and expired sellIn scenarios, quality increases, and refactoring toward a maximum of 50.
Examine refactoring unit tests for Gilded Rose backstage passes, showing quality increases of 1 (>10 days), 2 (5–10 days), and 3 (<5 days), while prioritizing clear code and tests.
Embrace a learning attitude suitable for all levels, use simple examples, practice in a playground, target 90% solutions, discuss minor refinements, and prioritize expressive code over strict object-oriented focus.
Regularly review notes on key concepts in clean code with java to lock in long-term memory, and revisit them every few days or weeks to recall ideas quickly.
Discover the four principles of simple design—runs all tests, minimize duplication, maximize clarity, and keep it small—enabled by automated tests and agile refactoring.
Apply the four principles of simple design to isGradeB, improving clarity and reducing duplication by refactoring with extract constants, a maths-specific upper limit, and unit tests validate the solution.
Refactor the getGrade logic to reduce duplication and improve clarity by inlining methods, using constants, and aligning with business rules. Consider enum-based grades while keeping tests green.
Refactor the StudentHelper.willQualifyForQuiz method to eliminate duplication, extract small boolean helpers like isNotGood and isGood, and introduce an extraLimit constant to clarify business logic and improve readability.
Naming stands as the most difficult programming challenge, guiding variable, method, class, package, and API names; balance name length with scope and follow Java and project conventions.
Implement text helper to swap the last two characters and verify with the JUnit test. Apply four principles of simple design using readable variables and safe handling for short strings.
Learn when and why to use comments in Java, including API comments (Javadoc), type two notes, and to-dos or fix me reminders to keep code clear.
Implement TextHelper.truncateAInFirst2Positions to remove A's from first two characters using first2Characters and restOfTheString. Validate with TextHelperTest and JUnit tests, and consider refactoring with a replaceAll helper and a 2 constant.
Learn to apply simple design principles to refactor a unit test for CustomerBO, highlighting important values, extracting methods, and building a generic createProductsWithAmounts using an amounts array and streams.
Refactor and test the CustomerBO product sum method, handling euro and Indian rupee currencies, and assert exceptions like DifferentCurrenciesException with JUnit 5.
Adopt a clean code mindset by prioritizing unit tests, writing tests before code, refactoring with tests, and running tests continuously through continuous integration to catch defects early.
Explore five key unit testing principles to write easy-to-understand tests that fail only on production defects, minimize duplication, test all edges, and run quickly using mocks and clear naming.
Embrace a growth mindset by treating challenges as opportunities to grow, learn from constructive feedback, celebrate effort, and stay curious, recognizing hard work pays off over the long term.
Learn refactoring as restructuring code without changing functionality, focusing on the sequence of small steps and practicing with unit tests, aided by infinitest.
Refactor the getCustomerProductsSum method by extracting submethods, using streams to sum product amounts, and validating that all currencies match the first product currency, with Infinitest enabling continuous testing.
Refactor the Movie.isValidRating method to simplify logic, extract low level and high level helpers, and adopt a concise rating list with isValidBRating and isValidARating.
refactor the MenuAccess logic to simplify access checks for menu items, replacing nested conditionals with stream-based role checks, extracting helpers, and validating changes with MenuAccessTest.
Refactor the user login checker by renaming variables, extracting write and read lock methods, and simplifying conditions while using an infinite test to validate improvements.
Refactor a login lock mechanism by simplifying conditions, extracting variables and methods, and choosing write or read locks based on user id, time elapsed, and first screen.
Learn ten practical tips for becoming a good programmer, including pair programming, the Boy Scout rule, continuous learning, touch typing, IDE shortcuts, asking why, and exploring languages and programming approaches.
Learn test driven development by practicing red, green, and refactor: write a failing test, implement the simplest code to pass, and refactor while keeping tests green.
Practice test-driven development by building a StringHelper that removes A in the first two positions, using red-green-refactor cycles, JUnit5 tests, and step-by-step tdd exercises from the tdd.md.
Reinforce test-driven development through practical practice with StringHelper.replaceAInFirst2Positions, guiding handling of empty strings and other test scenarios, and building the TDD habit via small, iterative tests.
Explore test driven development by implementing a string helper that checks if the first two and last two characters are the same, using red-green-refactor cycles and evolving tests.
Practice the bowling kata to implement a bowling game using test-driven development, learning frames, rolls, spares, strikes, and the scoring bonuses across ten frames.
learn to apply test driven development to a bowling kata by writing JUnit tests, implementing a game with roll and score, and refactoring with red-green-refactor in Eclipse.
The lecture demonstrates TDD for the bowling kata, introducing a spare scenario, refactoring to store all rolls in an array, and managing frames and roll bonuses.
Advance test-driven development by adding tests for two spares and a strike in the bowling kata, refine bonuses, and refactor by moving logic into a Game class.
Unlearn old approaches, practice TDD with additional challenges, and pair program with an experienced mentor to establish the TDD habit in two to three months.
Deep work creates flow, boosting efficiency and rapid learning of complex concepts. Build it with an interruption-free environment and dedicated two to three hours per week for deep work sessions.
Celebrate your hands-on progress in clean code, share success stories, invite others to learn with you, and continue the journey with Code Complete, The Pragmatic Programmer, and Effective Java.
Discover how Java has evolved into a modern, cloud native, container ready language with features like lambda expressions, modularization, records, pattern matching, and virtual threads, enabling fast, scalable applications.
Explore the primary goals behind recent Java releases, highlighting concise code with records, switch expressions, and cloud-ready containers. Learn about improved concurrency with virtual threads, productivity boosts, and backward compatibility.
Take a 10,000-feet overview of major Java versions and their key features, including enhanced for loops, generics, enums, autoboxing, streams, lambdas, var inference, switch expressions, text blocks, and pattern matching.
Learn to Write Clean Code with Java.
Get Hands-on with Code Examples involving 4 principles of Simple Design, Refactoring & TDD.
WHAT STUDENTS ARE SAYING
5 STARS - Straight to the point concise and practical
5 STARS - It was a great course to get an understanding of clean coding and the TDD approach. Exercises in this course will help me to write in more cleaner and maintainable manner.
5 STARS - Very well structured course, starting from how to write clean code, then refactor and finally coding with TDD, but with a very practical approach.
5 STARS - Amazing Course !! It's a recommended course for every developer. The course will explain the best way to write standard, clean & maintainable code. Awesome refactoring tips & tricks .Hats off!! in28minutes team
5 STARS - This course is awesome; really liking the course so far. The instructor clearly conveys difficult concepts.
OUR APPROACH
Goal I : Understand Clarity of Code (Unit Tests)
Goal II: Focus on 4 Principles of Simple Design
Goal III: Get started with Refactoring
Goal IV : Understand TDD
STEP BY STEP DETAILS
Getting Started with Clarity in Code
Clean Code with Simple Design, Refactoring and TDD - Getting Setup
Step 00 - Clarity in Code - Problem 1 - Gilded Rose - Introduction
Step 01 - Clarity in Code - Problem 1 - Gilded Rose - Refactoring Unit Test 1 - Default Item
Step 02 - Clarity in Code - Problem 1 - Gilded Rose - Refactoring Unit Test 2 - Default Item
Step 03 - Clarity in Code - Problem 1 - Gilded Rose - Refactoring Unit Test 3 - Aged Brie
Step 04 - Clarity in Code - Problem 1 - Gilded Rose - Refactoring Unit Test 4 - Backstage Passes
Step 05 - Clean Code - Attitude for the course
Getting Started with 4 Principles of Simple Design
Step 01 - 4 Principles of Simple Design - An Introduction
Step 02 - 4 Principles of Simple Design - Exercise - StudentHelper.isGradeB
Step 03 - 4 Principles of Simple Design - Exercise - StudentHelper.getGrade
Step 04 - 4 Principles of Simple Design - Exercise - StudentHelper.willQualifyForQuiz
Step 06 - Most difficult challenge in programming - Naming
Step 07 - 4 Principles of Simple Design - Exercise - TextHelper.swapLastTwoCharacters
Step 07 - Should you have comments in code?
Step 08 - 4 Principles of Simple Design - Exercise - TextHelper.truncateAInFirst2Positions
Step 09 - 4 Principles of Simple Design - Exercise - CustomerBOTest
Step 10 - 4 Principles of Simple Design - Exercise - CustomerBOTest
Step 11 - Attitude towards Unit Testing
Step 12 - Unit Testing Principles
Getting Started with Refactoring
Step 01 - Introduction to Refactoring
Step 02 - Refactoring - Exercise - CustomerBOImpl.getCustomerProductsSum
Step 03 - Refactoring - Exercise - Movie.isValidRating
Step 04 - Refactoring - Exercise - MenuAccess.setAuthorizationsInEachMenus
Step 05 - Refactoring - Exercise - UserLoginChecker.isUserAllowedToLogin - 1
Step 06 - Refactoring - Exercise - UserLoginChecker.isUserAllowedToLogin - 2
Step 07 - My 10 Tips for Good Programmers
Getting Started with Test Driven Development
Step 01 - Introduction to Test Driven Development - TDD
Step 02 - Test Driven Development - TDD - Exercise - StringHelper.replaceAInFirst2Positions
Step 03 - Test Driven Development - TDD - Exercise - StringHelper.replaceAInFirst2Positions
Step 04 - Test Driven Development - TDD - Exercise - StringHelper.areFirstTwoAndLastTwoCharsTheSame
Step 05 - Test Driven Development - TDD - Exercise - Bowling Kata - Introduction
Step 06 - Test Driven Development - TDD - Exercise - Bowling Kata - Getting Started
Step 07 - Test Driven Development - TDD - Exercise - Bowling Kata - Spare
Step 08 - Test Driven Development - TDD - Exercise - Bowling Kata - Strike
Step 09 - 3 Tips for Test Driven Development - TDD
Thank You
Clean Code with Simple Design, Refactoring and TDD - Thank You