From the course: Java Refactoring Best Practices
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Refactoring bloaters - Java Tutorial
From the course: Java Refactoring Best Practices
Refactoring bloaters
- [Presenter] Let's talk about code smells. A code smell is a certain pattern that can be found in the source code that often indicates there are bigger underlying problems. The first code smell I'd like to talk about are bloaters. Bloaters are code smells that indicate areas of code that are too big, complex, or redundant. They can slow down development and make the code difficult to maintain. Luckily, we can make bloaters go away with refactoring. Imagine you have a class that has grown to be over a thousand lines of code with a lot of repeated code and complex methods. Thousand lines might sound like a lot, but trust me, I've seen worse. Touching the code in a file like this and trying to make additions is nearly impossible. It often turns out that it's all connected and if you change something, something you didn't know was there breaks. Clearly, these big files make it difficult to understand and modify the code.…
Contents
-
-
-
-
-
-
(Locked)
Refactoring bloaters4m 45s
-
(Locked)
Refactoring primitive obsession3m 48s
-
(Locked)
Refactoring incorrect object-oriented programming3m 45s
-
(Locked)
Refactoring excessive coupling2m 50s
-
(Locked)
Challenge: Refactor the legacy code2m 28s
-
(Locked)
Solution: Refactor the legacy code3m 28s
-
(Locked)
-