Thank you for noticing, Maneesh. Maybe you should have left it, so we could have discussed the drawbacks( ) of "Jave Thare"'s solution.
"Jave Thare" and Viidhya Kishore: please note what it says on the title page for Beginning Java:
We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers.
Please don't ask for and please don't give such answers. It does more harm than good, giving somebody code which he never learns to understand. Also, if that is handed in as an assignment, it will attract a mark of 0 because of plagiarism.
Joined: Dec 31, 2010
@Campbell, the title does not say "You are not allowed to post answers....", so its not fair to just edit my post. Also, giving them code does not mean that they won't be doing their own code analysis and understanding. Don't generalize. I don't give any comments, in the hope that they will have the decency to find out for themselves why and what the code does. If they don't understand after trying to find out for themselves, they can ask and I will kindly explain. Besides, no teachers/schools are stupid enough to pass students that hand in code without explanation or comments. haven't you heard of learning by example?
Campbell, Maneesh and myself are all moderators here, It is our right (and our job) to edit your post to have it comply with our standards. As long as we are not changing the meaning of what you said, we are WELL within our rights to edit your post.
Never ascribe to malice that which can be adequately explained by stupidity.
Joined: Oct 13, 2005
It wasn't me who edited that post. I might have left it as an example of a solution with poor features.
Yes, of course I have heard of learning by example, but I know learning by doing is better. I also know how easy it is to read code and not understand what it is doing.
I do not know whether this is to be handed to be marked, nor whether anybody marking it has a policy about commented code.
We have our policies; if you are on this website, you are here as a guest, to abide by our policies. We don't abide by yours.
If you came into our homes and we told you to take your shoes off, or not to smoke,because that is our policy, you would doubtless accede. The only difference here is that you and I are several thousand miles apart.
Campbell Ritchie wrote:It wasn't me who edited that post.
My bad. I once again claim the 'no coffee' defense. I have edited my post accordingly.
Joined: Oct 13, 2005
No problems; the main reason I didn't do anything is because Maneesh happened to see the post first. It did have some poor features which might have made for interesting discussion.
Joined: Oct 13, 2005
James Sabre in the "BJ" post this was split from wrote:Why would the solution need to be deleted? In the unlikely event that this is a homework assignment then it is probable that the use of 3rd party libraries will not be acceptable so the OP will have to do the work himself anyway. I want to encourage people to make use of existing technology and I feel that Rewriter needs more exposure. By waiting a couple of days I will have given the OP chance to find a solution with or without using Rewriter so he will have put in some effort. The chances are that the OP will not have used Rewriter (I have shown him the water but it is up to him to drink) but I believe that viewers of this thread will be best served by seeing how this problem can be solved using Rewriter. Hopefully then in the future they will be able to apply Rewriter to other problems.
As you will have seen from this discussion, we have different opinions about what constitutes giving a straight answer and what doesn't. I might find a Rewriter solution acceptable, myself.
I'm 100% behind a policy of not posting code that is likely to be used as a homework submission. Since not everyone has the ability to take an abstract concept and immediately see how it might be used to solve their problem, I believe that short code examples that illustrate the use of a particular technology are one of the best ways of promoting that technology. Where these two conflict with one another I tend to err on the side of not posting code.
In the case of thread 'Append another string at 150th location of current String' I see two possible scenarios. Either this is homework and the OP will be required to provide a solution that will not involve third party libraries/classes or it is a requirement for a company where the third party classes will be acceptable if the license is acceptable. I could not decide which of these scenarios applies. The topic seemed more advanced than that normally posted in the 'Beginning Java' forum but I still decided that it was too likely to be homework to risk posting even an example solution that was probably not going to be acceptable to examiners.
If 'Append another string at 150th location of current String' is homework then the OP will have had to submit his solution within a couple of days so what is the harm in then posting a solution based on Rewriter. The point is not really to post a solution to that particular problem but to post a solution that illustrated the possible use of Rewriter by relating it to that problem so that the reader may compare-and-contrast.
If this is unacceptable then I have a major problem with this site because I would view it as being over moderated. Even posting a short example that was not even a direct solutions to a particular problem would most definitely be a no-no because the example might be used by someone else as a homework solution.
Retired horse trader.
Note: double-underline links may be advertisements automatically added by this site and are probably not endorsed by me.
I actually can see a lot of gray area in this debate. How do you confirm that something is actually homework? How do you confirm that you crossed the line from helping to doing someone's homework? IMO, you probably can't. Probably not 100 percent.
Now, if the argument is that doing homework should be allowed, then I disagree. If the argument is what is homework, then there can be more than one answer. And I like the current solution; when anyone thinks it's homework, and wants to moderate, then fine. It's better to just play it safe, than to have endless discussions between moderators.
Henry Wong wrote:I actually can see a lot of gray area in this debate. How do you confirm that something is actually homework? How do you confirm that you crossed the line from helping to doing someone's homework? IMO, you probably can't. Probably not 100 percent.
Of course one can't tell 100% whether or not something is homework or not. I don't think anyone has said otherwise. I certainly haven't. A balance of probability decision is required.
Now, if the argument is that doing homework should be allowed, then I disagree.
I can't see anyone saying that doing homework should be allowed. To me that is an non-issue; of course it shouldn't be allowed.
If the argument is what is homework, then there can be more than one answer. And I like the current solution; when anyone thinks it's homework, and wants to moderate, then fine. It's better to just play it safe, than to have endless discussions between moderators.
Which is exactly what has happened except that there seem to be a disagreement as to whether or not some code be let through that uses a third party library that would almost certainly not be a valid solution if the thread was actually homework and almost certainly too late for the OP to use anyway.
Tomorrow I will publish the code based on the Rewriter class. If the moderators do decide to remove it then I hope they will provide better reasons for the action than have been provided so far. I hope the moderators will review the code before "playing safe".