tldr
- Keep Commits Small: Ensure commits are small and manageable to facilitate easy reverts and debugging.
- Continuous Refactoring: Prioritize frequent, minor refactorings to simplify future changes.
- Deploy Continuously: Regularly deploy code to ensure it works in production, as working software is progress.
- Trust Frameworks: Avoid over-testing framework capabilities; focus on application-specific logic.
- Create Independent Modules: Place functions in new modules if they don’t fit existing ones, preserving code organization.
- Write Tests Early: Use tests to design APIs and guide development, but don’t be rigid about TDD.
- Avoid Duplication: Prevent repeated code by abstracting similar implementations after copying once.
- Embrace Change: Accept and adapt to evolving designs, understanding that change is intrinsic to software development.
- Manage Technical Debt: Focus on minimizing immediate blockers and plan for potential future issues.
- Prioritize Testability: Ensure that your code and design facilitate easy testing to maintain code quality and coverage.
Re: trust frameworks
I often find myself writing scratch work within tests because it’s just the easiest way to get stuff up and running. Sometimes I’ll leave these as a way to show that my assumptions about a less used feature (by my team) of a framework works the way I believe it does. But it’s rare.
I 98% agree. Only thing I’m not sure about is if third copy/paste is always a bad thing. There are things like configuration and templates where independency is more important than DRY. Sometimes you do those through code.
Yeah in reality it’s even the fourth or fifth copy-paste that actually warrants generalizing, inevitably I find some tweak I need to make to two of the places to render the original generalization a waste of time
But if you are going to copy and paste make sure you keep it as similar as possible to the other instances to make it easy to refactor if you revisit in future
Totally agree. Like most “rules”, it just needs treating with nuance and context.
Tip #1: if you’re gonna post your programming blog to social media, make sure it can handle the traffic…?