• 3 Posts
  • 225 Comments
Joined 1 year ago
cake
Cake day: July 7th, 2023

help-circle
  • 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.


  • Eager Eagle@lemmy.worldtoPrivacy@lemmy.mlWhat browser do yall use?
    link
    fedilink
    English
    arrow-up
    2
    arrow-down
    1
    ·
    edit-2
    23 hours ago

    valid question, idk why would people downvote it

    broken websites on desktop are rare and not nearly enough to drive a browser change, but they usually fall into two categories:

    1. websites that “break” on purpose for no good reason when they detect it’s not chromium. Either avoid the site or change the user agent.

    2. websites that degrade some functionalities because they rely on newer features or on how things appear on chromium. They’re usually CSS breakages and do not affect browsing that much.

    Support for manifest v2 greatly outweighs these potential issues imo.


  • Because you’re assuming foo won’t be renamed when it becomes a function. A function should start with a verb, say get_foo(), because just foo() tells me nothing about what the function does (or what to expect as output). If you make it a property, get_ is implicit.

    So if the age is computed from the year of birth for example, it’s really e.g. thing.age or thing.get_age() - both of which are fine, but I’d pick the property version.










  • Eager Eagle@lemmy.worldtoProgramming@programming.devWhy YAML sucks?
    link
    fedilink
    English
    arrow-up
    11
    arrow-down
    5
    ·
    edit-2
    5 days ago

    YAML sucks because, among other things, indenting it is not obvious.

    In contrast, the only mistake of Python when it comes to whitespaces was allowing hard tabs, which makes it too easy to mix them if your editor is not configured.

    Improper indentation stands out more than missing or unbalanced braces and it’s really not an issue to delimit code blocks.


  • Eager Eagle@lemmy.worldtoProgramming@programming.devWhy YAML sucks?
    link
    fedilink
    English
    arrow-up
    15
    arrow-down
    7
    ·
    edit-2
    5 days ago

    False dichotomy. Optional braces are bad practice because they mislead the programmer that is adding an additional clause to the block.

    This misleading behavior wouldn’t happen in Python, as it would either be invalid syntax, or it would be part of the block.

    Indentation problems are pretty obvious to the reader. Even more than missing or unbalanced braces.