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.

12
  • 1
    hypothetical example
    – user252684
    Commented Sep 8, 2017 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? Commented Sep 8, 2017 at 21:23
  • 1
    Maybe "constructed" rather than "contrived"?
    – Barmar
    Commented Sep 9, 2017 at 1:22
  • 4
    Here is an illustrative example
    – Jim
    Commented Sep 10, 2017 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.
    – user10126
    Commented Sep 10, 2017 at 21:05

3 Answers 3

0
+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.

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.

0

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.

You must log in to answer this question.