0

I have been using the word strawman to describe source code that is extremely simplified or contrived to illustrate some syntax or usage of something where the actual source code is irrelevant and the contrivance is not important much less a negative connotation.

Motivation:

I want to convey that the specific example is not relevant as a discussion point for criticism and that the focus is the syntax usage of the annotations that start with @ without having to give a long disclaimer. That said, it is for StackOverflow so either one is probably a waste of time since 99% of the time over there people do not read for comprehension.

Here is a(n) ?????? example:

I would like to replace the word strawman with something more semantically positive. This is just showing how to use the annotations, the actual code is irrelevant. Pseudo is not semantically correct here as this is actual correct executable code.

Here is a strawman example:

@JsonCreator()
public static Item construct(@JsonProperty("col1") String col1, @JsonProperty("col2") String col2) {
  this(col1, col2, col1 + col2 + "some other stuff");
}

private Item(final String col1, final String col2, final String col3) {
  this.col1 = col1;
  this.col2 = col2;
  this.col3 = col3;
}

I have researched here and the general internet and can not find anything suitable. I would even accept a non-English term if it was semantically what I am looking for.

  • 1
    hypothetical example – user252684 Sep 8 '17 at 1:54
  • 1
    No, there are no words meaning contrived example without a negative connotation. Contrived is a great example of the difference between made by man and naturally ordained… and naturally ordained to most people matches divinely ordained. That seems purely positive but on second thought, is made by man equivalent to, or might it be less than naturally ordained? – Robbie Goodwin Sep 8 '17 at 21:23
  • 1
    Maybe "constructed" rather than "contrived"? – Barmar Sep 9 '17 at 1:22
  • 4
    Here is an illustrative example – Jim Sep 10 '17 at 3:21
  • 2
    @JEL - just because most people use it incorrectly do not make it correct. pseudo-code is not executable code in any specific language, I specifically explain why this word is semantically not correct in my question. – Jarrod Roberson Sep 10 '17 at 21:05
1
+50

You might try illustrative

defined by American Heritage Dictionary 1 as

Acting or serving as an illustration.


1American Heritage® Dictionary of the English Language, Fifth Edition. Copyright © 2016 by Houghton Mifflin Harcourt Publishing Company. Published by Houghton Mifflin Harcourt Publishing Company. All rights reserved.

1

Regarding code that is meant to illustrate usage, I think pedagogical works well - it's certainly carries no negative connotation.

From Merriam-Webster:

pedagogical

of, relating to, or befitting a teacher or education - pedagogical methods

Thus, pedagogical code becomes code that is intended to teach.


In the context of code that is overly simplified, I think elementary works well.

From Merriam-Webster:

elementary

  1. a: of, relating to, or dealing with the simplest elements or principles of something

There is no negative connotation when used in a teaching/academic context. For example, Elementary Number Theory - referring to number theory without the use of analytic or geometric methods.

Perhaps combine the two.

0

You could try mockup

(M-W)

  1. a working sample (as of a magazine) for reviewing format, layout, or content

If you want a fancier word, you could try exemplar or epitome.

protected by tchrist Sep 8 '17 at 3:20

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.