"As is the case in so much of life, context is everything. Judgement has to enter into it. Personally, I'm inclined to run the risk of helping the lazy to avoid the risk of quelching someone's drive to learn."
I agree. It's sometimes tough to draw the line between those looking for easy answers and those who are actually trying to learn.
I think the thing to do is when something looks like homework, point them to resources instead of just handing them code. If they're not willing to do the work to figure out at least part of the equation, they don't deserve the answer. When someone's made the effort of writing and posting some code (or at least formulating an intelligent question that shows that the individual has at least tried to tackle the problem) and saying "This doesn't work - and I can't figure out why", then I think it's entirely appropriate to help them by solving their problem - and provide an explanation as to why that works.
There's more than one way to screw it up...
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link or
or How to display code and escape characters
are good places to start.