HACKER Q&A
📣 joshxyz

Best Practices Guides You're Aware Of


Hi HN, may I ask about any best practices guides that you're aware of. It could be about architectures or coding in general. Something like the two below:

- https://12factor.net/

- https://www.conventionalcommits.org/en/v1.0.0/


  👤 arp242 Accepted Answer ✓
I have come to believe that by and large "best practices" are actively harmful as they're mostly pounded by inexperienced programmers who lack the ability to judge the applicability or zealots who believe everything should be done the One True Way™, and they (ab)use these kind of "best practices" as an argument from authority. Everyone else just says "X is better because Y", which is an actual argument that can be discussed (engaging with actual arguments discovers what the best solution for the particular situation is).

Most "best practices" are just someone's opinion anyway, and little more. The exception to this are some things like "don't use mktemp(), use mkstemp()", but these are usually not called "best practices" but "footguns" or "things that will get you in to trouble sooner or later".



👤 dvh
After 33 years of programming, after going through OOP stage and DRY stage, I have come to conclusion that WET code is best for day-to-day, long-term maintainable code. DRY always leads to over engineering and premature abstraction that falls apart the moment new requirement arises. WET code is boring and tedious but simple to maintain. It scales fairly linearly and timelines are easier to estimate.

👤 dobladov

👤 JTyQZSnP3cQGa8B
I like https://trunkbaseddevelopment.com/ and I used it successfully in big projects. It’s less bloated than git-flow or GitHub-flow.

👤 idlewords
I wrote a best practices document for time travelers back in 2003 that had an enormous impact on that community, judging by their continuing low numbers: https://idlewords.com/2003/09/best_practices_for_time_travel...




👤 fzeindl
I summarized my own 15 years of full-stack development experience into such a guide: https://www.fabianzeindl.com/posts/the-codequality-pyramid

👤 eimrine
https://motherfuckingwebsite.com/ (there are several of them with a different level of motherfuckiness but this is my favorite one).

Also "The Inmates Are Running The Asylum" book.


👤 seanwilson
I wrote this one about on-page/technical SEO:

https://www.checkbot.io/guide/seo/

Most of the rules are sourced from something Google or Mozilla said.

A lot of people don't like the word SEO but this guide is really about having better structured pages that are easier for machines and humans to understand, rather than rules that people have tried to reverse engineer out of Google to game their search ranking.


👤 laserbeam
Most "best practices" are pretty flawed. The only one I found reasonable were some principles applied at NASA which mainly can be summed up as: be paranoid, limit the scope of variables, don't malloc like crazy and assert absolutely everything.

https://devm.io/careers/power-ten-nasas-coding-commandments-...


👤 whatusername
I've seen a few "Best Current Practise" RFC's around standards implementation. eg: here's one still in draft form for OAuth: https://datatracker.ietf.org/doc/html/draft-ietf-oauth-secur...


👤 bloopernova
Somewhat related, does anyone have a good in-depth guide to "clean architecture"?

I'm writing a Python developer helper app, and I'm trying to learn how to correctly design it so I can stick a Textual UI on top later. Someone mentioned that I should use clean architecture for that design, but I'm not familiar with the term.


👤 keyle
RFCs are pretty classic and they got us this far.

It starts in plain ASCII and plain HTML. Easy for searching and consumption.

https://en.wikipedia.org/wiki/Request_for_Comments


👤 officetme

👤 sterlinm
I’ve found the Python Speed [1] site an excellent resource for the quirks of working with Python in containers for data science use cases.

[1] https://www.pythonspeed.com


👤 ignoramous
RFCs are usually a good place to look for considerations and best practices.


👤 choult
https://phptherightway.com/ for our PHP-coding brethren

👤 zoomzoom
This is different than what you’re asking about but is a GPT-powered chat with a library of over 500 best practice whitepapers from cloud providers: https://cloudwhitepapers.withcoherence.com

Hopefully the chat and functionality makes it more useful than just a guide or manifesto.

Any ideas or feedback welcome!