In general; if you see someone post a question which includes code, and you know there's a better/safer way to perform the same function, should you address their coding deficiency or just stick to answering the question they've posed? I'm just thinking in terms of what SE stands for; a repository of coding questions and answers and NOT for specific questions geared towards one individual. Addressing issues outside the question won't help future visitors as they'd never be looking in a question about, say, connection strings if their question relates to If/Then/Else loops. The flip-side is, if it only takes you a minute to point out a better way to do something, then that person has learned more and will be more likely to return/stick around and join the community.
Just curious what the masses feel about this topic.