• Eager Eagle@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    9 days ago

    tldr

    1. Keep Commits Small: Ensure commits are small and manageable to facilitate easy reverts and debugging.
    2. Continuous Refactoring: Prioritize frequent, minor refactorings to simplify future changes.
    3. Deploy Continuously: Regularly deploy code to ensure it works in production, as working software is progress.
    4. Trust Frameworks: Avoid over-testing framework capabilities; focus on application-specific logic.
    5. Create Independent Modules: Place functions in new modules if they don’t fit existing ones, preserving code organization.
    6. Write Tests Early: Use tests to design APIs and guide development, but don’t be rigid about TDD.
    7. Avoid Duplication: Prevent repeated code by abstracting similar implementations after copying once.
    8. Embrace Change: Accept and adapt to evolving designs, understanding that change is intrinsic to software development.
    9. Manage Technical Debt: Focus on minimizing immediate blockers and plan for potential future issues.
    10. Prioritize Testability: Ensure that your code and design facilitate easy testing to maintain code quality and coverage.
    • JackbyDev@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      8 days ago

      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.

  • heikkiket@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    8 days ago

    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.

    • KellysNokia@lemmy.world
      link
      fedilink
      arrow-up
      2
      ·
      8 days ago

      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

  • Technus@lemmy.zip
    link
    fedilink
    arrow-up
    1
    ·
    9 days ago

    Tip #1: if you’re gonna post your programming blog to social media, make sure it can handle the traffic…?