this post was submitted on 17 Sep 2023
67 points (100.0% liked)
Free and Open Source Software
17930 readers
24 users here now
If it's free and open source and it's also software, it can be discussed here. Subcommunity of Technology.
This community's icon was made by Aaron Schneider, under the CC-BY-NC-SA 4.0 license.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
There are (roughly) two types of projects:
Projects that have coding standards that are documented. If you want to contribute to one of these projects then read the coding documentation and follow it. People will help you write code that fits the standards.
Projects that don't have coding standards. When you look at such a project you'll see endless layers of shitty hacks that mostly work, sometimes. Add your own shitty hack to the pile and as long as everything still mostly works, you're good.
Seconding this and wanted to add:
It's more or less the repo owner's job to keep the codebase organized. So if they created a set of standards, follow them. If not, submit as clean a PR as you can.
Even without clearly defined coding standards, always try to match the style of whatever code you're contributing to. It may make your code stand out less, but will make it easier for everyone, even your future self.