JavaRanch Home    
This page:         last edited 18 October 2008         What's Changed?         Edit

Avoid Red Herrings   

In the fable, to save the fox, a red herring (fish) was dragged across its path. When the hunter's dogs reached this spot in the path the scent of the fish overpowered the fox's scent and turned them in the wrong direction.

This term is used today to describe the practice of intentionally planting false evidence in hopes of leading the police in the wrong direction; to distract them from the real evidence. It is also used to describe a tactic politicians use to distract their constituents from serious pressing issues, that the politician can't or won't address, by speaking passionately about some trivial but controversial issue.

What does this have to do with asking questions on JavaRanch? When asking questions about code, or a software environment, it is easy to distract the people trying to help you by misrepresenting your code or by omitting important details.

A common example seen in the forums that deal with Java EE servers:

"I put my class files in myApp/web-inf/classes"

In a JEE application, the "WEB-INF" directory must be spelled with upper case letters. If someone takes the time to point out this mistake to the original poster only to find out that, in the application server, the spelling was really "WEB-INF" but the original poster didn't care to hold down the caps-lock key when typing the question, that person will often become frustrated and stop looking to see what else may be causing the problem.

How do you avoid this problem?

Take the utmost care when posting your code or the details of your environment. Don't ever re-type your code into the edit screen on Javaranch. PostRealCode. Alway cut and paste the the code from your actual application. While you're at it UseCodeTags to preserve your indenting.

If you feel you must type something, be very careful when doing it. Don't type "classpath" if you mean "CLASSPATH" Don't type "web-inf" or "webinf" if you mean "WEB-INF". In truth, there really is no reason ever to have to type code or settings into the JavaRanch edit screen. If something needs to be read by a machine, then there there must be a way to cut and paste it.

See: HowToCopyEnvironmentVariablesAndDirectoryStructures

Taking these steps to cut and paste your code/settings into the JavaRanch edit screen not only demonstrates that you are respectful enough to ShowSomeEffort when posting your question, it insures that the people helping you see exactly what your machine sees when running or compiling your application.

See the other tips on HowToAskQuestionsOnJavaRanch.

See also

JavaRanchContact us — Copyright © 1998-2014 Paul Wheaton