• Stars
    star
    153
  • Rank 243,368 (Top 5 %)
  • Language
    JavaScript
  • Created about 4 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Learn to Write Clean Code with Java. Get Hands-on with 20+ Code Examples involving 4 principles of Simple Design, Refactoring and TDD.

Clean Code with Java: Learn Simple Design, Refactoring & TDD

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

Exercises

GildedRose

  • Goal
    • Understand Clarity of Code
    • Give importance to Unit Testing
  • GildedRoseADefaultItemTest.java
  • GildedRoseBAgedBrieTest.java
  • GildedRoseCBackstagePassesTest.java
  • More details - Gilded Rose Exercises

4 Principles of Simple Design

  • Refactor Code
    • StudentHelper.isGradeB()
    • StudentHelper.getGrade()
    • StudentHelper.willQualifyForQuiz()
  • Write Code
    • TextHelper.swapLastTwoCharacters()
    • TextHelper.truncateAInFirst2Positions()
  • Refactor Unit Test
    • CustomerBOTest

Refactoring

  • CustomerBOImpl.getCustomerProductsSum(List<Product>)
  • Movie.isValidRating()
  • MenuAccess.setAuthorizationsInEachMenus(List<MenuItem>, Role[])
  • UserLoginChecker.isUserAllowedToLogin(long, String, boolean, User, List)

Try on Your Own (With Solutions)

  • UserLoginCheckerTest
  • MenuAccessTest

TDD

  • 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

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

More Repositories

1

devops-master-class

Devops Tutorial for Beginners - Learn Docker, Kubernetes, Terraform, Ansible, Jenkins and Azure Devops
Java
2,203
star
2

spring-microservices

Microservices using Spring Boot, Spring Cloud, Docker and Kubernetes
Java
1,770
star
3

java-tutorial-for-beginners

Java Tutorial For Beginners with 500 Code Examples
1,312
star
4

java-best-practices

Best practices in Coding, Designing and Architecting Java Applications
1,254
star
5

master-spring-and-spring-boot

Spring and Spring Boot Tutorial For Absolute Beginners - 10-in-1 - Spring to Spring Boot to REST API to Full Stack to Containers to Cloud
Java
1,226
star
6

spring-boot-examples

Code Examples for everything thats written on www.springboottutorial.com
Java
1,207
star
7

spring-master-class

An updated introduction to the Spring Framework 5. Become an Expert understanding the core features of Spring In Depth. You would write Unit Tests, AOP, JDBC and JPA code during the course. Includes introductions to Spring Boot, JPA, Eclipse, Maven, JUnit and Mockito.
Java
1,142
star
8

java-a-course-for-beginners

Java Programming Tutorial for Beginners
JavaScript
1,044
star
9

JavaInterviewQuestionsAndAnswers

Java Interview Questions and Answers
Java
973
star
10

spring-boot-master-class

Understand and love the power of Spring Boot - All its features are illustrated developing a web application managing todos and a basic API for survey questionnaire. Also covers unit testing, mocking and integration testing.
Java
965
star
11

course-material

Course Material for in28minutes courses on Java, Spring Boot, DevOps, AWS, Google Cloud, and Azure.
947
star
12

SpringMvcStepByStep

Spring MVC Tutorial for beginners - In 25 Small Steps
Java
828
star
13

spring-microservices-v2

Microservices + Spring Boot 2 + Spring Cloud + Docker + Kubernetes - https://www.udemy.com/course/microservices-with-spring-boot-and-spring-cloud/. Latest Repo - http://github.com/in28minutes/spring-microservices-v3
JavaScript
714
star
14

learn

How do you achieve your career objectives? Complete career paths with amazing Cloud, Full Stack and Microservice Courses and Videos from in28Minutes
685
star
15

SpringIn28Minutes

Spring Tutorial For Beginners
Java
657
star
16

spring-interview-guide

200+ Questions and Answers on Spring, Spring Boot and Spring MVC
JavaScript
642
star
17

MockitoTutorialForBeginners

Mockito Tutorial for Beginners
Java
632
star
18

jpa-with-hibernate

Master JPA using Hibernate as the implementation. Learn the basics of JPA - entities, relationships, entity manager, annotations, JPQL and Criteria API. Take a step into the advanced world of JPA - caching, performance tuning(n + 1 queries), mapping inheritance hierarchies. Get a peek into the magic of Spring Data JPA & Spring Data Rest.
Java
630
star
19

SpringBootForBeginners

Spring Boot Tutorial For Beginners
Java
609
star
20

full-stack-with-react-and-spring-boot

Your First Full Stack Application with React and Spring Boot
Java
606
star
21

full-stack-with-angular-and-spring-boot

Your First Full Stack Application with Angular and Spring Boot
Java
605
star
22

in28minutes-initiatives

All initiatives to build a connect between industry, instructors and learners
596
star
23

java-cheat-sheet

Java Tutorial For Beginners - Companion Reference
588
star
24

JavaWebApplicationStepByStep

JSP Servlets Tutorial For Beginners - in 25 Steps
Java
534
star
25

spring-web-services

Spring Web Services - SOAP and RESTful
Java
532
star
26

spring-unit-testing-with-junit-and-mockito

Spring Unit Testing with JUnit and Mockito
Java
359
star
27

docker-crash-course

Docker for beginners - with Java and Spring Boot Applications and Microservices
Java
350
star
28

functional-programming-with-java

Learn Functional Programming with Java using a Hands-on Step by Step Approach
Java
340
star
29

kubernetes-crash-course

Learn Kubernetes and Docker with Google Kubernetes Engine deploying Spring Boot Microservices
Java
327
star
30

interview-guide

Java interview guide - 200+ Question and Answers
297
star
31

deploy-spring-microservices-to-aws-ecs-fargate

Take your first steps towards cloud with AWS ECS Fargate. Deploy REST APIs and Microservices with Spring Boot and Docker Containers to the cloud.
Java
265
star
32

SpringBootWebApplicationStepByStep

Develop your first web application with Spring Boot Magic
Java
256
star
33

spring-boot-react-fullstack-examples

All full stack examples with Spring Boot and React for articles on our website http://www.springboottutorial.com
JavaScript
255
star
34

roadmaps

Roadmaps of in28minutes courses!
245
star
35

spring-microservices-v3

JavaScript
228
star
36

JUnitIn28Minutes

JUNIT Tutorial For Beginners
Java
216
star
37

automation-testing-with-java-and-selenium

Learn Automation Testing with Java and Selenium
HTML
193
star
38

MavenIn28Minutes

Maven Tutorial for Beginners with Examples
Java
193
star
39

python-tutorial-for-beginners

Python Tutorial for Beginners with 500 Code Examples
182
star
40

in28minutes.github.io

Spring Boot Tutorials
HTML
171
star
41

deploy-spring-boot-aws-eb

Deploying Spring Boot Apps to AWS using Elastic Beanstalk
Java
160
star
42

getting-started-in-5-steps

How to install and get started with Java, Eclipse, Maven, JUnit, Mockito & Spring in 5 easy steps
JavaScript
154
star
43

first-steps-to-software-architect

How to start your journey towards software architecture?
136
star
44

MockitoIn28Minutes

Learn Mockito from In28Minutes
Java
121
star
45

learning-paths-cloud-and-devops

How to learn Cloud and DevOps
119
star
46

spring-boot-angular-fullstack-examples

All full stack examples with Spring Boot and Angular for articles on our website http://www.springboottutorial.com
TypeScript
109
star
47

in28Minutes-Course-Roadmap

A Roadmap for our Courses. Remember we focus on Java, Microservices, Web Applications and are big Spring Shop - Spring, Spring MVC, Spring Boot, Spring Cloud...
104
star
48

docker

Docker for Beginners - Learn Docker in 5 Steps
Java
101
star
49

pcf-crash-course-with-spring-boot

PCF Crash Course for Java, Spring and Spring Boot Developers - Deploy Spring Boot REST API, Full Stack Applications and Microservices to Pivotal Cloud Foundry (PCF)
Java
98
star
50

azure-devops-kubernetes-terraform-pipeline

https://github.com/in28minutes/devops-master-class
Java
87
star
51

deploy-spring-boot-to-azure

Deploy Spring Boot Applications to Azure Web Apps
Java
82
star
52

camel

Learn Enterprise Integration Patterns with Apache Camel
JavaScript
80
star
53

Design-Patterns-For-Beginners

Design Patterns for Beginners
80
star
54

JavaObjectOrientedProgramming

Learn basics of object oriented programming with Java
Java
69
star
55

learn-programming-with-python-

learn-programming-with-pythonโ€‹
Python
67
star
56

10-Steps-to-High-Quality-Java-Developer

You Key to Becoming a High Quality Java Developer
61
star
57

java-to-python-in-100-steps

Learn Python using your Java Knowledge
Python
58
star
58

java-technology-for-beginners

In my 15 years of designing and developing more than 100 java web applications, there are a number of terminologies, standards, frameworks, tools that I have used. I know how difficult it is for a beginner to understand them. And imagine the trouble non techies face - the business, testing teams and others. So, this guide is to demystify these terms! Enough talk. Let's Rock and Roll......
58
star
59

spring-boot-vuejs-fullstack-examples

All full stack examples with Spring Boot and Vue JS for articles on our website http://www.springboottutorial.com
Java
57
star
60

EclipseIn28Minutes

Eclipse Tutorial for Beginners - From in28Minutes
53
star
61

jenkin-devops-microservice

https://github.com/in28minutes/devops-master-class
Java
49
star
62

spring-complete-career-path

Level 1 covers Basics of Spring Developing a web application with Spring MVC Basics of Spring Boot - Autoconfiguration, Starter Projects Basic Todo Management Application with Login/Logout Model, Controllers, ViewResolver and Filters Forms - DataBinding, Validation Bootstrap to style the page Spring Security Exception Handling Level 2 (coming soon) will cover Rest APIs with Spring Boot SOAP Web Services with Spring Boot. Level 3 (coming soon) will cover Spring Cloud Microservices
Java
44
star
63

go-serverless

Go Serverless with AWS Lambda and Azure Functions - Udemy Course https://www.udemy.com/course/serverless-tutorial-aws-lambda-and-azure-functions
JavaScript
41
star
64

Tips-Database

Tips about Web Services, APIs, Microservices, Spring, Spring Boot, Maven, Eclipse etc
37
star
65

TDDin28Minutes

TDD Tutorial For Beginners - from in28Minutes
Java
31
star
66

spring-boot-to-cloud

Spring Boot to Cloud (AWS, Azure, GCP and PCF) with Docker and Kubernetes
Java
30
star
67

JavaTutorialForBeginners

Java Tutorial for Beginners with examples
Java
29
star
68

BasicWebServletsIn28Minutes

Java
28
star
69

campus-interview-guide

60 Day Learning Challenges for Campus Interviews
28
star
70

CTutorialForBeginners

C Tutorial for Beginners
27
star
71

Java-EE-Design-Patterns

26
star
72

HibernateJPAStepByStep

Hibernate Tutorial For Beginners - Step by Step with Examples
22
star
73

in28minutes.com

Awesome Courses from the Best Selling Instructor
HTML
22
star
74

RealWorldWebApplicationWithServletsAndJspIn28Minutes

Learn to Develop your first web application with Servlets and JSP
Java
20
star
75

cloud.in28minutes.com

cloud.in28minutes.com
HTML
20
star
76

jenkins-pipeline

Java
18
star
77

spring-boot-rest-api-playground

Java
18
star
78

spring-microservices-v3-old

JavaScript
16
star
79

microservice-reference-archetype

Java
14
star
80

hello-world-rest-api-aws-ecs-codepipeline

Java
14
star
81

Struts2StepByStep

Learn Struts 2 Step By Step
Java
11
star
82

jshell-for-java-programmers

An introduction to JShell for Java Programmers
11
star
83

hello-world-rest-api-azure-pipelines

Java
10
star
84

in28minutes

9
star
85

getting-started-for-beginners-v2

Updated Getting Started Guides for Beginners Recorded with Spring Boot 3 - Spring, Spring Boot, JUnit, Mockito, JPA, Hibernate ....
Java
9
star
86

spring-boot-todo-rest-api-h2-aws-codepipeline

Java
8
star
87

In28MinutesTemplate

Serves as template for my new courses
8
star
88

todo-app

Java
6
star
89

automatewithselenium.com

Learn how to automate your tests with Selenium - Java, Python, C# and JavaScript - automatewithselenium.com
CSS
6
star
90

dev-config-server-test

4
star
91

config-server

2
star
92

programmingabc.com

Master Content for our Programming Website - programmingabc.com
CSS
2
star
93

Future-Course-Preparation

1
star
94

hello-world-playground

Java
1
star