JavaRanch Home    
 
This page:         last edited 07 March 2010         What's Changed?         Edit

Use Code Tags   

One of the most important tactics for getting answers to your questions effectively is making your post easy to read. And one of the most important practices to make your post more easy to read is to put code tags around your code examples.

It's really easy: just put [code] tags around your code, such as in

[code]
System.out.println("Hello world.");
[/code]

Or just use the appropriate "code" button above the edit area.

That way, the formatting of your code will be preserved, and people who read your post don't need to waste valuable brain cycles on deciphering it - they can use them instead to formulate the answer to your question! Taking the time to ensure that your code is presented properly shows that you respect everyone's time enough to ShowSomeEffort when posting your question.

(If you remember this after already having posted some code, you can edit your post by clicking on the Edit icon at its right top.)

Finally, note that most people won't even try to read your code if you post more than about 15 lines. Remember that before you post your entire program and say "what's wrong with this?" Better you try to isolate the parts where the problem is and just post that.

Also take a look on our other tips on HowToAskQuestionsOnJavaRanch.


JavaRanchAbout us — Copyright © 1998-2010 Paul Wheaton