31
\$\begingroup\$

Fellow member @SteveC has been doing diligent work editing questions and answers to put the names of Dungeons & Dragons terms into code text: from Toughness to Toughness, as an example. Is there a practical benefit on the site in doing so, or is it just an aesthetic preference?

Return to FAQ Index

\$\endgroup\$
18
  • 4
    \$\begingroup\$ Define "practical benefit". Is making game's "key words" easier to identify a practical benefit? \$\endgroup\$
    – C. Ross Mod
    Commented May 8, 2012 at 13:30
  • 2
    \$\begingroup\$ @C.Ross I'd define a practical benefit as one that serves as a mechanical aid to users of the site. Turning references to websites into clickable links, for example, or turning mentions of games into tags. The code text boxes are used, as I understand it, to render text into a version that can be copied into programming tools. That doesn't happen here. Does the code text do anything for us? \$\endgroup\$
    – Jadasc
    Commented May 8, 2012 at 13:43
  • 13
    \$\begingroup\$ In summary: if doing this is no different in effect than doing this or this, then I'd call it an aesthetic choice. \$\endgroup\$
    – Jadasc
    Commented May 8, 2012 at 13:44
  • 3
    \$\begingroup\$ In those terms, yes, but I think some sort of formatting is obviously helpful. \$\endgroup\$
    – C. Ross Mod
    Commented May 8, 2012 at 13:49
  • 3
    \$\begingroup\$ Relevant discussion on MSO: Inline Code Spans should not be used for emphasis, right? \$\endgroup\$ Commented Aug 1, 2013 at 5:43
  • 1
    \$\begingroup\$ Seems to me like rules quotes are basically the equivalent of code in our domain, \$\endgroup\$
    – mxyzplk Mod
    Commented Aug 9, 2013 at 20:40
  • 3
    \$\begingroup\$ I am now irritated (situational aspect!) with your question. Alternatively, I am irritated. But I am definitely not irritated. \$\endgroup\$
    – user8248
    Commented Aug 11, 2013 at 7:18
  • 1
    \$\begingroup\$ @Emrakul I don't know what to tell you. I asked it a year and change ago, and it keeps coming up. \$\endgroup\$
    – Jadasc
    Commented Aug 12, 2013 at 4:59
  • \$\begingroup\$ @Jadasc I'm kidding :P Though it's still an open discussion. \$\endgroup\$
    – user8248
    Commented Aug 12, 2013 at 6:25
  • \$\begingroup\$ I'd add if someone wants to edit the code tags out, don't assume what should be in the place of them- just remove them. Emphasis and Strong mean something different- and to just replace code tags with italics or bold ignores that meaning in favor of the meaning that some place on the Code. If one is wrong, then both are. \$\endgroup\$
    – Chuck Dee
    Commented Mar 18, 2014 at 15:50
  • 1
    \$\begingroup\$ @ChuckDee Often it's obvious in context what formatting convention should have been used instead, so often it's not wrong at all to replace misused code formatting with other formatting. We profitably leverage editor experience and judgement that way. When in doubt though, or when the original highlighting was unnecessary in the first place, just removing the formatting is a sensible judgement, yes. \$\endgroup\$
    – SevenSidedDie Mod
    Commented Dec 13, 2016 at 23:53
  • \$\begingroup\$ I see frequently and use myself the "blockquote" function when quoting books such as the D&D PHB, I don't know whether this is a necessary format or personal preference but I think that should be necessary for all quotes. \$\endgroup\$
    – rpgstar
    Commented Dec 6, 2017 at 3:41
  • \$\begingroup\$ Can we get an inline quote, though? \$\endgroup\$
    – Stackstuck
    Commented Mar 15, 2019 at 20:14
  • \$\begingroup\$ @Stackstuck What utility for SE does an inline quote markup have that “” doesn’t? (Markdown doesn’t have anything for inline quote, so SE is unlikely to invent one without a pressing need, especially since it would have to be justified adding for the whole network.) \$\endgroup\$ Commented Oct 7, 2019 at 16:47
  • \$\begingroup\$ @SevenSidedDie "" isn't consistent with the formatting for blockquote, at the very least. \$\endgroup\$
    – Stackstuck
    Commented Oct 8, 2019 at 19:05

7 Answers 7

37
\$\begingroup\$

Code formatting should never be used for non-code markup.

Semantic markup (like code tags) was not added just to make HTML pages pretty, it was added to make the structural meaning of parts of the page comprehensible to software so that it can be rendered correctly. Misusing it can have unexpected consequences, especially for users who use accessibility software to render the page. For example, visually impaired users might hear code tags spelled out, instead of given spoken emphasis as intended.

Code formatting means code (more generally speaking, a copy-and-paste text target), and is not for giving visual emphasis to stuff that isn't code. To give words emphasis (for technical terms or otherwise) that is correct regardless of how the user is rendering the page, we are obligated to use bold and italic, which are provided by semantic HTML precisely to produce an emphasis effect in all contexts.

\$\endgroup\$
1
  • \$\begingroup\$ As of the date for this comment the link in this answer goes to a page that doesn't make any mention to visually impaired users hearing media spelled out. Remove or replace? \$\endgroup\$ Commented Mar 6, 2021 at 14:48
32
\$\begingroup\$

I feel that other formatting would be more appropriate than code tags. It's highly unusual for that formatting style to be used for every book title and game term, and some users may not appreciate their questions and answers being edited to include a non-standard formatting type.

It doesn't adhere to the HTML5 specification for the 'code' element, which specifies that it is used to represent a "fragment of computer code", including a string that a computer would recognize such as a filename or program name.

I also feel that in the current design, it breaks the flow of text and makes the proper nouns stand out too much, when simple capitals or italics would suffice.

The following are more standard:

  • For D&D spells, lowercase italics: summon monster i
  • For book titles, italics: Eberron Campaign Setting
  • For proper nouns including D&D magic items and feats, plain capitals: Hand of Vecna, Power Attack, Argonessen, Dragonborn, Monte Cook
\$\endgroup\$
3
  • 7
    \$\begingroup\$ The code tags kinda feel like GM-read-aloud text to me. :) \$\endgroup\$
    – Alex P
    Commented May 25, 2012 at 0:24
  • 6
    \$\begingroup\$ It reminds me of the Orz from Star Control II. Do you know? Orz can dance very well. Now you are a happy camper and Orz can make heavy space ships for dancing. \$\endgroup\$ Commented May 25, 2012 at 1:55
  • 6
    \$\begingroup\$ This is a good point. Messing with the tags messes with the page's HTML semantics. That might actually be a problem for site visitors who use accessibility technology in order read the page. \$\endgroup\$ Commented Jun 1, 2012 at 1:03
7
\$\begingroup\$

I prefer putting special terms in bold font, but can live with the code formatting.

I think SteveC's format for DDI links is sub-optimal though and have been pondering mentioning it. I find having the ddi link sitting all by itself in brackets after each linked term interrupts the text.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ yeah I'd rather just link them. Assume if its a link to a 4e concept its probably DDI \$\endgroup\$
    – wax eagle
    Commented May 8, 2012 at 13:57
  • 1
    \$\begingroup\$ I'm good with the code formatting as well as it gives us a specific standard text for RPG/system terms. \$\endgroup\$
    – wax eagle
    Commented May 8, 2012 at 14:01
  • 1
    \$\begingroup\$ Also, by making the special term the link itself, it no longer needs any other formatting. If every special term links to the page talking about it, they stand out enough. \$\endgroup\$
    – dlras2
    Commented May 9, 2012 at 22:53
6
\$\begingroup\$

Code has just few valid aplications for RPG, it should not be used for others:

  • proper code in a programming language
    • by extent command code for a plugin/program/page such as anydice
  • pseudocode isn't proper code but highly relies on code structuring

Examples

An example for proper code using BASIC. This is a non-aborting loop that just continiues to print the line 10 onto the screen until the program is manually halted:

10 print this SPAM was made using 2 lines of program code
20 goto 10

An example for command code, using the cmd of your PC to access the system32 folder in windows and then listing the contents:

C:
cd windows\system32\
dir

An example of pseudocode, using the TDE rules for HP at 5 or lower. The formating chosen here is "LSL Style":

if (5>=HP>=0) 
  {
   Dying = FALSE;
   if ("Iron Will" == TRUE)
      {Unconscious = FALSE;}
   else
      {Roll = 1d20;
       if (Roll<=CONstitution)
         {Unconscious = FALSE;}
       else
         {Unconscious = TRUE;}
      }
   }
else if (0>HP)
   {
    Unconscious = TRUE;
    Dying = TRUE;
   }
\$\endgroup\$
2
  • 3
    \$\begingroup\$ I suspect there's a lot of proper use along these lines in our anydice Q&As. \$\endgroup\$
    – CTWind
    Commented May 1, 2018 at 23:08
  • \$\begingroup\$ It may be best to avoid code tags even for code whenever possible since they break screen readers. \$\endgroup\$ Commented Jun 17, 2020 at 4:57
4
\$\begingroup\$

It has the practical benefit of making keywords standing out.

The way this has been done does not meet my personal aesthetic preference.
Also, it's difficult to define a rule when doing this kind of review.

How Deep?

Which are the terms to be formatted?
If a system has a clear definition for attack, should the word attack be formatted? Should it be formatted when appearing as a noun, as verb or both?

How Far?

Should every keyword and definition in a post be formatted? Some technical answers and questions could become a clutter of formatted keywords that really defeats the purpose of formatting them in first place.
Should someone format only the terms relevant to the question title? The, who defines how distant from the original topic a term is?
Should the formatting being used only on the term's first occurrence in the text or every time the term is used?

\$\endgroup\$
-2
\$\begingroup\$

Yes. Years ago my D&D group got into a stupid argument over the interpretation of a rule. Shocking, I know. IIRC the debate was whether or not Fireball would clear out a mage's Mirror Images. The text we got hung up on was:

Any successful attack against an image destroys it.

Basically we weren't sure if "attack" was a game term or not. A successfully cast fireball attacks an image. But no attack roll is made, so no game term attack has ever taken place.

I would argue that there should be syntax to indicate what is and isn't meant as a game term. Of the available syntax, code makes sense to me. I also wouldn't want to imply that bold or italics couldn't be used elsewhere because they were reserved for game terms. I see no other use for code text, so why not use it in this way?

That said, most of the time applying code is just being pedantic. I wouldn't use it everywhere, only when it resolves ambiguity.

\$\endgroup\$
2
  • 3
    \$\begingroup\$ If the rulebooks themselves aren't even clear about what is and isn't a technical term, how then would we decide which terms get technical-term-markup? \$\endgroup\$ Commented Dec 11, 2012 at 17:35
  • 1
    \$\begingroup\$ @SevenSidedDie the source text in my example is vague. That doesn't mean I'd like to be vague when I ask a question. If I want to know about game-term-attack I wouldn't want someone to think I was talking about colloquial-attack. \$\endgroup\$
    – valadil
    Commented Dec 11, 2012 at 18:40
-4
\$\begingroup\$

As mentioned in certain comments, there is a practical benefit to putting things in code text: It changes the appearence of the text. Since a largely text-based site is a visual medium, any form of unusual formatting can be used to highlight or draw attention to important phrases and terms. Of course that's useful!

Yes, it could potentially be overused or used poorly, but you could say the same thing about exclamation marks. Are they useful?

Anyway, highlighting is not the purpose the code text boxes were introduced for, but neither was the stack overflow QA site format designed for questions about role-playing games. In both cases, the new use to which they have been put works for us. What's the problem?

\$\endgroup\$
8
  • 4
    \$\begingroup\$ Depends on how you feel about the editing tally and the reputation that arises from it. I could easily go back through the archives and change the spelling of words and the use of punctuation to match U.S. English rather than U.K. English; it would suit my aesthetic sense just fine. But I don't think I'd consider those "useful" edits; I wanted to poll the community and see whether this falls into that category or not. \$\endgroup\$
    – Jadasc
    Commented May 24, 2012 at 21:28
  • \$\begingroup\$ @Jadasc Ah, I see - I misinterpreted your question as being whether code text was useful at all, but it was about whether editing code text into existing answers was useful. I shall think about it, and change my answer. \$\endgroup\$
    – GMJoe
    Commented May 25, 2012 at 2:16
  • \$\begingroup\$ @ Jadasc So, to clarify, would you say that your question is about whether there's a benefit to using a single standard of formatting? Or is it about whether this particular element should be included in an existing implicit standard? \$\endgroup\$
    – GMJoe
    Commented May 25, 2012 at 6:04
  • \$\begingroup\$ If I understand you correctly, the second. The page where one accepts or rejects suggested edits asks you to accept those edits that are correct and reject those that are wrong. I was looking for a consensus as to whether this is a type of correct edit or not -- it doesn't change the content at all; just reformat it in a way that's arguably more pleasing. If it were an answer or a question, I'd vote it down. However, that's not available to me on edits — it's either accept or reject. \$\endgroup\$
    – Jadasc
    Commented May 25, 2012 at 11:45
  • \$\begingroup\$ @Jadasc My version of the accept/reject screen has an "improve" button (maybe that's just a mod thing?) that'd allow you to pick out the bits you like on the fly. \$\endgroup\$
    – AceCalhoon Mod
    Commented May 25, 2012 at 13:20
  • \$\begingroup\$ @Jadasc Ah... In that case, I don't really have an opinion on the matter. The way I see it, if an individual answer or question is made more readable by the addition of code formatting, than that's a good thing - but if there's no effect (such as when the code formatting is just replacing existing bold formatting) then it probably shouldn't be approved. To put it another way, I can't honestly say whether code format is better or worse than the obvious alternatives. \$\endgroup\$
    – GMJoe
    Commented May 28, 2012 at 8:12
  • 5
    \$\begingroup\$ Screen-readers will also render code-text as code, which is undesireable. Abusing the semantics of semantic HTML tags (and the code ticks do generate HTML <code> tags) is considered harmful. Bold, italics, and Title Case are three valid choices before we need to go abusing semantic HTML tags. \$\endgroup\$ Commented Dec 11, 2012 at 17:31
  • \$\begingroup\$ @SevenSidedDie Hmm, that is undesirable. Nevertheless, it doesn't make code text useless, just less useful (and not as good an option as some alternatives), so I'll leave my answer as-is. \$\endgroup\$
    – GMJoe
    Commented Dec 12, 2012 at 5:35

You must log in to answer this question.

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