

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Welcome to Object-Oriented Programming
incomplete
2: Clean Code
incomplete
3: DRY Code
incomplete
4: DRY Review
incomplete
This lesson's interactive features are locked, please to keep using them
The purpose of programming paradigms like OOP is to make code easier to work with. Code that's easy for us to understand is called "clean" or "maintainable" code.
Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
-- Martin Fowler
Clean code doesn't make a program faster or more correct, but it does make bugs easier to find and future changes easier to make.
The calculate_remaining_health function has clear names, making its bug easy to spot!
Fix calculate_remaining_health so it subtracts damage from health instead of adding it.