2. What is clean code?
4
Bjarne Stroustrup, inventor of C++
“I like my code to be elegant and
efficient.”
“The logic should be straightforward to
make it hard for bugs to hide.”
“Clean code does one thing well.”
3. What is clean code?
5
Grady Booch, author of Object Oriented Analysis and Design with Applications
“Clean code is simple and direct.”
“Reads like well-written prose.”
4. What is clean code?
6
Dave Thomas, founder of OTI, godfather of the Eclipse strategy
“Clean code can be read, and enhanced by
other developers.”
“It has meaningful names.”
“It provides one way for doing one thing.”
“... minimal dependencies, … minimal API”
5. What is clean code?
7
Michael Feathers, author of Working Effectively with Legacy Code
“Clean code always looks like it was
written by someone who cares.”
6. What is clean code?
8
Ward Cunningham, inventor of Wiki, inventor of Fit, coinventor of eXtreme Programming.
Motive force behind Design Patterns. Smalltalk and OO thought leader.
“On clean code, each routine
you read turns out to be pretty
much what you expected.”
7. public void sendMessage(Object o) {
//...
}
Concretely
9
public ChatMessage(String message, Object o) {
//...
}
public Message(Object o) {
//...
}