What did you intend with all your comments on the given advice? It's my advice that you reflect on this, and then check if your intentions came true. It's not a question I want a you to post a reply to with an answer. However, should you in the future still feel the need to continue posting comments on advice given, I strongly recommend that you also write what effects are intended to come from them. I'm quite certain that would help your case a fair bit.
kbc1;11014529 wrote:
I am after some help, not a lecture.
First off, on forums intended for people who want to learn (this is such a one), this is commonly the form you'll get the help in. Help, lecture, it's all the same here. If you have decided you don't like lectures, you're better off taking your problem elsewhere where you pay for someone else to do it - There help and lectures aren't the same, but help and paid services are. Whining about it here only results in getting no help instead. I had actually written the code for you, which I now will not post. The only help I'm willing to provide is on how to ask for help and some generally sound advice on how to behave with people who try to help you, in case you are interested in receiving more help. But to be absolutely crystal clear: Do whatever you like, just keep comparing the actual outcome to the intended outcome...
Secondly, the answer to your question is in brad's post. The reason you get your so called "lecture", is because if you had read beyond the first sentence, you'd have your answer (or perhaps a followup question on why you didn't manage to integrate that properly with your current code).
kbc1;11014529 wrote:
The query was an example to keep it succinct within the forum post.
But since you've come to a place where people come to learn how to program, people here will let you know how that should be done. Certainly, it will be somewhat tailored to the competence level of the programmer. But if you show some inefficient crappy piece of code without including a comment that it's for brevity, people will assume you need to be told this. And even if you don't need to be told, other people might come to your thread looking for an answer as well. It's not all about you. There are a few other programmers out there. Some are even willing to learn.
kbc1;11014529 wrote:
This is good advice, thank you.
Why is the first comment on efficient code bad and the second good? All advice Weed gave you was good advice. That you don't like to hear some things doesn't change this.