Yesterday I answered this question, with a broader, step-by-step logical reasoning as the answer.
While I personally believe my answer would be helpful for the OP (and also other people who'll come down to this question seeking solutions), while revisiting the answer today, I got a feeling: "Am I overdoing it?"
Let me explain my two thoughts clearly.
- First: When I came across the question, I started writing the answer. In the meantime, another answer got posted which addressed the issue clearly. I read the answer, and it appeared fine. However, I thought it needed some more clarification on the actual behavior of the operators used so that, at a later stage, anyone reading this answer should be able to handle much more complex statements involving these operators themselves. So, I went on writing my answer and posted it finally, which is a rather longer one, containing each step-by-step explanation of how to get the answer. At that point of time, I was happy because I thought I wrote a complete answer.
P.S - My answer got accepted by OP, if that matters in this context.
- Second: Today while revisiting my answer to see any scope of improvement, I suddenly felt the answer was too long, and too elaborate, more appropriate to be posted on a tutorial site, but maybe not as an answer in SO. OK, I know I have added some citations and additional info; that is fine, but the step-by-step-by-step explanation is just too much. Even without the complete explanation, anybody having read the rest of the answer should be able to get the concept. Instead, I added all the explanations in my answer. Should I have added a required minimal explanation and have pointed to a tutorial in addition?
Now my question to the community: Am I doing it right?
If yes, fine.
If no, please suggest how I can limit my answers. I mean to say, any good examples of how to write a short but complete and helpful answer is all I am looking for.
Honestly, I believe that, instead of giving someone a fish, (spoonfeeding), if I can make someone learn how to catch a fish, I'll be helping in a better way. However, sometimes, firstly giving the fish and then making them learn is not a bad approach, either. Any suggestions?