Hacker News new | ask | show | jobs
by zeptomu 2629 days ago
> Lack of 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.
3 comments

> If some piece of software requires some complex configuration I have to refer to some external documentation anyway.

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?

> If some piece of software requires some complex configuration I have to refer to some external documentation anyway

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 parameters
Here's a very real issue we had at work. I wrote a program (and it's configuration file) to process SIP messages. We installed it with using the default port of 5060. It kept failing. After much investigation, it was revealed that some piece of router gear was "helpfully" processing any SIP message it saw on port 5060 (and it couldn't be turned off because of a bug in the router).

The 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.