this post was submitted on 28 Jan 2026
196 points (96.2% liked)
Fediverse
39833 readers
301 users here now
A community to talk about the Fediverse and all it's related services using ActivityPub (Mastodon, Lemmy, Mbin, etc).
If you wanted to get help with moderating your own community then head over to !moderators@lemmy.world!
Rules
- Posts must be on topic.
- Be respectful of others.
- Cite the sources used for graphs and other statistics.
- Follow the general Lemmy.world rules.
Learn more at these websites: Join The Fediverse Wiki, Fediverse.info, Wikipedia Page, The Federation Info (Stats), FediDB (Stats), Sub Rehab (Reddit Migration)
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

But why is hardcoding shit code for open source code? The code is easier to read because no if or switch statements are needed to distinguish between the options. No configiration menu has to be maintained.
That if chain is horrendous. You should have a config json file with an array of links and then use a for and check for each of them.
The advantage of having a config file is that it's easily for others to see everything that can be changed dynamically without touching the code, and it's much easier to maintain forks that change or extend the configurable behaviour.
Hard coding shit is bad because it's actually harder to maintain. No programmer worth their salt has difficulty checking the json file that has the configuration for X list, hard coding an if chain is bad coding.
Open source just means people are free to edit it and distribute their changes. Hardcoding things like this is bad practice no matter if it’s open source or not. It’s not maintainable. Maintainable as in easily maintainable, I.e., configuration files not code edits.