Keep your logic outside of the trigger.
Tag Archives: refactoring
Refactor the spaghetti code.
Learn techniques to replace messy software.
Follow the campsite rule.
Leave it better than when you found it.
Little things matter.
Cover your code in unit tests.
Don’t be afraid to refactor.
There’s no time like the present to make things better.
Kent Beck’s Rules of Simple Design, #1
The code must run all the tests.
Don’t be offended when your code gets refactored.
The Law of Demeter
Chaining a series of methods together can increase dependencies on distant objects.
Don’t use conjunctions in method names.
Two great ideas taste great together, but not in a method.
These can come in handy when refactoring boolean logic.