Quality Matters

When I hear “JUST BANG OUT CODE THAT WORKS” I think of all the apps I don’t use anymore because they gradually lost the ability to iterate.

– Avdi Grimm

Source

Don’t do hard things, do easy things.

  • Simple is better than complex.
  • Complex is better than complicated.
  • Flat is better than nested.
  • Readability counts.
  • If the implementation is hard to explain, it’s a bad idea.
  • If the implementation is easy to explain, it may be a good idea.

– The Zen of Python

Source

Shortlist cut from Jack Diederich’s “Stop Writing Classes” talk

Don’t Write Code

Don’t write code (write new code only when everything else fails) is the single most important lesson every developer needs to learn. The amount of duplicate, crappy code (across projects) that exists today is overwhelming. In a lot of cases developers don’t even bother to look around. They just want to write code.

Source

Reducing the amount of code in your product should be a goal.

“I hate code, and I want as little of it as possible in our product.” – Jack Diederich

Source

Keep Lean Dependencies

The old adage “don’t reinvent the wheel” doesn’t apply when the wheel comes attached to a locomotive engine.

Source

Stop Writing Classes

The signature of “this shouldn’t be a class” is when the class has two methods, and one of them is the constructor. Any time you see these signs, you probably should have just written a function.

– Jack Diederich

Source

Reinvent the Wheel

Inventing your own wheels gives you a deep appreciation and understanding of how wheels work and what makes a good one.

Source

Refactoring > Rewriting

Common Excuses For A Software Rewrite

  1. The Code Sucks
  2. “We’re So Much Smarter Now”
  3. We Picked The Wrong Platform/Language

Why Rewriting Is (Almost) Never A Good Idea

  1. It Always Takes Longer Than You Expect
  2. Markets Change
  3. Existing Customers Become Frustrated
  4. Refactoring Can Cleanup The Code
  5. You Don’t Control The Rewrite, It Controls You

Source

Rewriting > Patching

If you are changing more than 25% of a class or method, consider simply rewriting it. You will write the code more cleanly.

Forget new features, Just do the same stuff better.

The problem: it is too easy to lose sight of what users often care about more, which is the performance and usability of the applications and features they already use most often.

– Tim Anderson

Source