An answer that consists solely of a code block or "Try this" (and variations) followed by a code block and nothing else is usually not useful if not very low quality. So let's encourage people to fix them before posting them.
Here's the suggestion: If an answer consists solely of a code block, or just one line of text above a code block where the text has fewer than, say, five words, prevent submission with a message along the lines of:
Code blocks on their own are not usually useful answers, and are more likely to attract downvotes. Please explain what the solution you're showing does, and why/how that code answers the question.
On the rare occasions where five words are all you need (they exist), well, people will pad out as necessary. Or we could get into the regex game looking for "try this" and "please try this" and "see this" and "see below" and "this should do it" and... (Blech. Hence the word count, but the mechanism is a design detail; the point is the concept.)
Will people work around it? Sure, the same way they work around the new +1/-1 ban, the old @op removal, etc. But that doesn't mean we shouldn't nudge people the right way.
Related: Is there any benefit to allowing code-only answers while blocking code-only questions? (thank you BoltClock)
javascript
,java
, andhtml
tags. Perfectly reasonable question, answer consisting of nothing but a code dump. Sometimes the code dump is correct, often it's not, but even when correct it's giving a man a fish rather than teaching him to fish. The why is usually just as important as the code.