In this series, I’ll talk about common refactors I suggest when doing code review in my day to day. I’ll start with conditionals, including severals example refactors. The goal is to help produce code that’s easier to read and understand, and thus, easier to maintain and produces fewer bugs.
These examples will be in TypeScript but the refactors are common patterns and can apply to most languages out there, such as Python, Ruby, Swift, PHP, Java, Go, JavaScript, etc.
Continue reading “Common Refactors: Part 1 – Conditionals”