Tag Archives: Conditional statements

Code Refactoring 6

Code Refactoring 6In this part of the Code Refactoring tutorial I’ll focus on conditionals. Conditional statements can very often make your code very hard to read.

Here we’ll clean up conditional statements by extracting them into methods. We’ll look at how important naming can be to writing understandable code. We’ll take a look at guard clauses and when to use them. Then we’ll see how polymorphism can eliminate conditionals all together.

The code follows the video, to help you learn. Continue reading Code Refactoring 6