CODEBASE COMPLEXITY: LESSONS LEARNED Dumb, readable code is infinitely better than clever.

Don’t listen to vendors blaming the hardware and recommending expensive server upgrades.

Be aware of the danger of shortcuts and the importance of understanding how code works under the hood.

Opening and closing a database connection is a slow and expensive operation.

Consider the potential risks and implications when installing new npm modules or importing someone else’s code.

Beware of teammates who refactor code based on personal taste without proper documentation or completeness.

Ensure code changes are well-documented.

Be cautious of colleagues who make undocumented changes that create subtle traps for others.

Improve the code review processes to address flaws.

Acknowledge that even big companies like Facebook can make mistakes, as seen in their DNS record issue on October 4, 2021.

Don’t ever be the guy who accidentally breaks something on prod.

Broken code is fixable. People, now, that’s another story.

  • Semi-Hemi-Demigod@kbin.social
    link
    fedilink
    arrow-up
    11
    arrow-down
    1
    ·
    1 year ago

    Opening and closing a database connection is a slow and expensive operation.

    That depends a lot on your RDBMS and its configuration. For example, MariaDB can use a pool of connection threads so opening one doesn’t take a lot of time.