Possible Duplicate:
Highlighting technical words?

Is it a good practice to add code brackets to Classes or Technical terms when asking or answering questions? Ex:

  • "Put the String in the end of the line...."
  • "In Visual Studio do this or that..."
  • "The Exception is there..."

I was wondering about this because when I write Javadocs I add {@code } to some technical terms and makes them stand out of the bunch of words so I was wondering if same applies to SO. ex:

 * Called when a new user has successfully register. It will add records in
 * then kind having X and Y push notifications set to
 * {@code true;} All other Kinds set to {@code false;}
  • 9
    No. No. No. Backticks are for inline code, nothing more nothing less. I'm horrified again and again at edits ruining posts by backticking virtually ANYTHING, to a point of rolling back such edits. – Shadow Wizard is Vaccinating Jan 19 '13 at 22:24
  • I can distinctly remember this question being asked before. – Madara's Ghost Jan 19 '13 at 22:46
  • I tried searching meta with no results before I asked. – wtsang02 Jan 19 '13 at 22:47

No, the type of formatting that you are using is for inline code blocks. Don't use this to highlight technical terms as it just clutters up the interface and makes it hard to read.

As an example, this would be okay:

I used this statement in my code: alert('hello world');

Whereas this would be unnecessary:

How should I instantiate a String? << This is bad.

From the editing help section (click the Question mark when editing to see the editing help section):

To create not a block, but an inline code span, use backticks:

 The `$` character is just a shortcut for `window.jQuery`.

Lastly, based on the example in the guide, it would be okay to use inline code blocks when an exact syntactic representation is needed to describe something:

You should use the identifier String to declare variables that hold text in Java, such as String myName = "Billy Bob";

  • 1
    Thanks for the constructive answer. – wtsang02 Jan 19 '13 at 22:43

Not the answer you're looking for? Browse other questions tagged .