by zeptomu · 7y ago · 0 comments
Actually I consider that a feature. If some piece of software requires some complex configuration I have to refer to some external documentation anyway. Many projects include the documentation (or parts) as comments in their configuration files (e.g. Postgres' pg_hba.conf), but I think it makes it harder to find the interesting parts.
> Readability
I think JSON is pretty readable, even for non-programmers, but this is highly subjective.
> Strictness
Good! Parsers are too lax anyway.
> Lack of programmability
Again, that's a feature: just keep it simple. Now JSON is not perfect (I would like to have a distinction between integers and floats), but it gets a lot right and it supports the most important data types and structures
- strings
- numbers
- dictionaries
- lists
that easily map to data structures found in higher level programming languages.Except something seemingly simple which doesn't attract your attention might have a weird reason for existing - for instance you might have dependency which has to be pinned to a certain version due to compatibility issue or an existing bug. Would you rather spend 2 hours troubleshooting that or maybe put a comment there so that the next person can easily understand the core issue and evaluate it in 5 minutes?
Where do you document you use of that external document? In a configuration file the support comments, you can do it in a comment:
# See Necronomicon, page 751 to determine these parametersThe fix was easy enough---change to a nonstandard port. But sans comment, there's no indication why we were using a nonstandard port. With a comment, the ops guys know why we're using a nonstandard port, and even ask "is that still an issue?"
Edit: clarify why we did the workaround we did.