Ask HN: 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/
54 comments
[ 4.0 ms ] story [ 98.9 ms ] threadhttps://keepachangelog.com/en/1.0.0/
https://conventionalcomments.org/
https://semver.org/
https://0ver.org/
https://www.nohello.com/
https://nohello.net/en
--
EDIT: added ZeroVer: 0-based Versioning
The problem is when people write "Hi"/"Hello" without the question, then waiting for the reply, then want to simulate a smalltalk, and only then asking the question.
In many cases they're not even thought about this question in advance, and didn't framed it or phrased it, to make it easier on the other side to understand the problem.
[8 hours later due to different TZ]
"Hey there, can I help you?"
[8 hours later due to different TZ]
"Can I ask a question?"
[8 hours later due to different TZ]
"Of course, you don't need to ask that!"
[8 hours later due to different TZ]
asks question
[8 hours later due to different TZ]
gives answer
---
That's often been my problem with that.
I'm all for politeness, but these are people I work with, not strangers, and it's basically my job to answer their questions, and they know I'm in a different timezone, and whom I've told that they can just ask their question directly. Certainly in this context I don't think it's any less polite than "Hi there, how you doing? I'd like to ask a question: [question]".
No one is really helped with this: not the developer or support staff who wants an answer, not customer who has to wait longer for an answer.
I also answer these sort of things outside work hours (I don't mind doing that, I also get a lot of flexibility in return), and three different messages is more invasive than just one. Actually, come to think of it, it's less polite to do it the "polite" way.
If you say “Hi” I can’t tell what you want, and I tend to move onto somebody who actually asks a question because I know what I am getting into.
The conversation is marked as read, and you disappear into the noise.
Please help me to help you.
I mean would you send an e-mail with just a "Dear $name" and nothing else?
For example, this Informational RFC is literally a 4 page cookbook on how to use Kerberos in a practical way.
https://datatracker.ietf.org/doc/html/rfc4559
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".
Navigating the landscape and where things are headed is important.
Avoiding appeals to authority (or conversely ad hominem) is important, but if you don't have time or resources to evaluate the idea directly, it's useful to consider who the advice is coming from, and who the intended audience of that advice is (it might not be you) [2].
"Our lead developer said we should do X in this situation" has a better chance of success than "I found a random blog about this thing that could work for us".
[1] https://daedtech.com/how-developers-stop-learning-rise-of-th...
[2] https://news.ycombinator.com/item?id=36273917
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.
What is a "Python developer helper app"? Is it a standard application with a UI, some API calls, and a DB? In that case, you may want to use a standard layered architecture approach.
Python developers are generally horrible at architecture. They will defend it as "wanting to be functional" and call other devs "dogmatic" while duplicating code all over the place and writing 5000 line files.
By "standard layered" arch, do you mean model/view/controller? If so, I can read up some more on that. (I'm devops, mostly focused on terraform, and I'm trying to move away from writing bash scripts to Python)
EDIT: thank you for your answer, it's helpful to me.
Your app would look something like the example below. Note that the significant difference from MVC, which is a bit out of style, is that the front end is in a different Single Page Application written in React or Angular. You can still do MVC if you want, but then your display and business logic concerns are really mixed. An SPA/API pattern is probably easier too.
Frontend SPA
--Angular or React - user takes action, this is sent to the API via a RESTful http request
Backend
--FastAPI router receives request, authenticates user
--Service layer actually validates the request, tries to spin up AWS resources, and returns an error if something failed. Note that you want a library here, rather than trying to pipe to CLI to run ws s3api create-bucket \ --bucket my-bucket \ or whatever.
--Persistence layer - save any data you need to the database here, if any - your app might not need this
Concise summary of layered arch: https://cs.uwaterloo.ca/~m2nagapp/courses/CS446/1195/Arch_De...
Glad to hear the answer was helpful.
It starts in plain ASCII and plain HTML. Easy for searching and consumption.
https://en.wikipedia.org/wiki/Request_for_Comments
https://en.m.wikipedia.org/wiki/Best_current_practice
Although there's some expected overlap.
Also "The Inmates Are Running The Asylum" book.
Hopefully the chat and functionality makes it more useful than just a guide or manifesto.
Any ideas or feedback welcome!
https://devm.io/careers/power-ten-nasas-coding-commandments-...
Also, https://www.shellcheck.net/
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.
[1] https://www.pythonspeed.com