by the_af · 10y ago · 0 comments
Littering your code with comments IS a huge readability problem. You are forced to filter them out to find the real code, since they are mostly garbage, but you can never be sure you aren't skipping some vital bit of information. Likewise, boilerplate and needless ceremony obscure the intent of the code, so they are obstacles to be reduced in good, clean code.
Contrast this with writing Yoda conditions. They are no big deal. They interrupt your flow of thought exactly once: the first time you encounter them. If your train of thought is interrupted every time you encounter them, you are way too novice a programmer. So I think this is a really minor issue in the sea of software complexity; so minor, in fact, that it seems bizarre to me to mention it.
I think whether to use Yoda conditions, much like the placement of braces or the number of whitespaces for indentation, are the stuff of flamewars and endless argument because they are the kind of things we programmers love to obsess about, but they are really not very important.
You're unimaginative.
This conversation is finished.
either ban me or leave me alone until I do something that's actually ban worthy please.
And to be clear, so there is no confusion here.
Your guidelines state the following:
> When disagreeing, please reply to the argument instead of calling names. E.g. "That is idiotic; 1 + 1 is 2, not 3" can be shortened to "1 + 1 is 2, not 3."
According to your guidelines, his comment:
> If your train of thought is interrupted every time you encounter them, you are way too novice a programmer.
Should have been something such as:
> If your train of thought is interrupted every time you encounter them you probably don't see yoda conditionals very often.
Please, do me favor, go warn him as well.
consistency and fairness.
Or just ban me since we both know that's what you want to do.
My use of "you" was the same as yours when you said "it makes you pause and interrupts your train of thought"; I didn't take it to mean you were referring to me specifically! Unfortunately written language is prone to this kind of misunderstandings :(
Inconsistencies in HN moderation are random side-effects of the impossibility of reading all the threads. You're welcome to bring them to our attention, but please don't take them personally.