About the Book
The purpose of this book is to show common code smells or patterns that often (but not always!) lead to poor code readability, and how you can refactor the code to make it more readable and maintainable. The book contains a lot of code examples, mostly based on real code with only minor adaptations.
Who is this book for
The book probably will be most useful for intermediate developers. If you’re a beginner, you probably have enough of other things to think about. If you have decades of experience, you probably can write a similar book yourself. This book is going to be opinionated, but you don’t have to agree with everything I’m saying, and that’s not the goal of the book. The goal is to show you one possible path, mine, and inspire to find your own. These techniques help me to write and review code every day, and I’ll be happy if you find some of them useful.
What you will learn
I’ll show code smells and patterns I often see during code reviews (and I review a lot of code every day!) and will walk you through the refactoring process to make code more readable and maintainable. I’ll also show when you shouldn’t follow my recommendations and keep using smelly code.
I’ll show you how to:
- Replace loops with array methods.
- Replace conditions with tables or remove them entirely.
- Replace imperative code with declarative and separate “what” and “how.”
- And more.
About the Author
Frontend developer living in Berlin, award-losing photographer and owner of two crazy dogs. Creator of React Styleguidist.