this post was submitted on 24 Feb 2026
148 points (96.8% liked)

Programmer Humor

42569 readers
10 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] Faux@lemmy.ml 2 points 3 months ago (1 children)

In yaml a mistake in indentation can easily result in a business error without config becoming invalid.

Writing too much complex configs in files is a problem too ofc, we ended up moving a lot of stuff like that to a DB lately.

I'm not a fan of indentation being logically meaningful not just in yaml. If you mess up indentation in python you can also get a technically valid code that's wrong logically.

[โ€“] thebestaquaman@lemmy.world 1 points 3 months ago

Oh, I definitely agree that meaningful whitespace can be a pain, and I'm not a very big fan in general (although I prefer meaningful whitespace like in Python to terribly indented code with regards to readability). I guess my point was just that if you're having a lot of failures due to incorrect indentation, it sounds like a systemic issue somewhere. While meaningful indentation can be annoying, I think it sounds like symptom of something more if it's responsible for most of your production failures.

I think the bottom line for me is that if a config file regularly causes errors because of incorrect indentation, it should probably be refactored, since it's clearly not easy enough to read that those errors are caught.