Somehow everything complex can be refactored into something simple.
Big fan of Sandi Metz, Kent Beck and Uncle Bob.
“All I do these days is *think” about writing better code. It all comes down to one piece of advice. A simple solution. Make smaller things. Smaller methods. Smaller classes. Smaller pull requests.” -Sandi Metz
In my view this comes to an appreciation for refactoring along the way. Given that I’m beginning to appreciate the idea of shifting the refactoring left. A prefactor pull request* followed by a one liner feature based pull request.
“Make the change easy (warning: this may be hard), then make the easy change.” -Kent Beck
The squint test.
“Squint you eyes. Lean back. Look for changes in shape. Look for changes in colour. Shape reflects cycolmetric complexity - lots of nested conditionals. Colour reflects differing levels of abstraction, differen types of things are in a mish mash. The squint test can help!” -Sandi Metz
Your code is a landscape.
“Think about your code has a mountain range and try to make it as flat as possible. The higher it goes the more complexity it will have.” -Uncle bob.