• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Shoulda Coulda Woulda

 
Bartender
Posts: 1737
63
Eclipse IDE Postgres Database C++ Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
JavaRanch has had some interesting metaphysical and sociological discussions about the use of the word SHOULD.

I have a very big beef about the word that is not about snowflakes versus tough people who love criticism, or feelings or anything like that.

It is very relevant for real and mock exam questions.

A particular instructor who I like very much and have watched more than 100 of their videos, maybe closer to 200 uses SHOULD in an ambiguous way.

I am going to post something I just posted after the hundredth time he did this, because he was showing mock exam questions he made up which I found painful because he used the ambiguous word SHOULD.  The particular example was "True or False: a functional interface SHOULD be declared with the @FunctionalInterface annotation."

I know there is criticism of ISO for spending hundreds of hours fighting about usage of particular words in their standards documents.  While many criticisms of ISO are totally valid, I find their striving to use precise and well-defined languages purely admirable.

I would like anyone engaged in writing mock exam materials, and probably those writing tutorial information, to please consider this.
Java is hard enough to learn and be tested on when we don't stub our toes on words with doubtful or questionable interpretations:

Oy!!  At 55:50, one of my only complaints about your choice of words comes again.  Must, is required, needs to, mean you must do this or your code won't compile or will throw fatal exception when you try to run.  What if something is a good idea, and will make your code run faster, be easier to read, or will catch more possible mistakes at compile time rather than runtime?  I would say you SHOULD do these things, even tho they are NOT required, because life will be better, other programmers on your team will be happier, your life will be better.  You SHOULD say SHOULD for those things, and for things that are required or nothing will work, you SHOULD say MUST or NEED TO.
When you use SHOULD to mean MUST, IS REQUIRED, HAVE TO, then what do we call these things that are good ideas or better ways to do things?  You can say "You are not required to do this, but it is better to do such thing."  That is a lot more words than SHOULD which you can say, shorter and easier to read and follow like lambda expressions, if you don't waste the word for things you MUST and NEED to do.



Please consider that the correct answer to a LOT of questions on the certification exams requires distinguishing that which is a best practice or common custom from what is legal and will compile and run.  This one word causes me extra anxiety over which answer is intended beyond making that distinction according to the JLS.

Also, I didn't mean to impugn the very interesting and thought provoking discussions of the use of the word SHOULD on the forums which are provided free of charge and are providing so much value to so many people.  I have taken that to heart and deeply appreciate it, but I am only thinking of the meaning of the word in tutorial, mock and real exam question situations.
 
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am afraid I should mark that answer correct. Yes, you should mark functional interfaces with that annotation to make them easier to use, but if you forget it, as seems to have happened here, your code will continue to run normally.

But I agree, in many cases “should” is a sort of weasel word.
 
Jesse Silverman
Bartender
Posts: 1737
63
Eclipse IDE Postgres Database C++ Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In this case, the mock test would mark you wrong, because it is not necessary to mark the interface with the @FucnctionalInterface annotation, only a very good idea.
See my reservation?  I hadn't seen any mock questions prepared by you, but it is clear we use the term to mean the same thing.
My problem is that I literally have to know who wrote a mock exam question to know which answer to select due to the regrettable inconsistency in language usage that is the subject of my tirade.
 
Campbell Ritchie
Marshal
Posts: 79177
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:. . . I hadn't seen any mock questions prepared by you . . .

I have only written a few and they are on this forum somewhere. They took a good ten minutes to write
Although the exam doesn't test good proactice, the fact that something is good practice implies it should be done. Yes, I see the problem; as I said, should is a sort of weasel word. It also changes its meaning if you cross the Pond.
 
Ranch Hand
Posts: 499
9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jesse Silverman wrote:My problem is that I literally have to know who wrote a mock exam question to know which answer to select due to the regrettable inconsistency in language usage that is the subject of my tirade.


Thanks for writing this thread!  It's a perfect example of why we should only use "trusted" sources.
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Yes, I see the problem; as I said, should is a sort of weasel word. It also changes its meaning if you cross the Pond.



Likewise "NEED TO". If the security person at the airport says you need to do something, that means without doubt that you must do that thing. But if somebody says "I need to lose weight", there isn't nearly so much "must" in that "need to". I'm also not sure if the security person's "need to = must" is more common in American English.
 
Jesse Silverman
Bartender
Posts: 1737
63
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply, Paul.
That is certainly true about colloquial use of English in every day speech, and is more akin to the last 15 years of people increasingly misusing literally -- there was an entire Saturday Night Live comedy skit about that something like 15 years ago.  It failed to fix the problem.

In practice, if I see the words "need to" in a specification document, a real or mock exam question, or preparatory material pertaining thereunto, I am quite certain that something very bad will happen if I do not.  Admittedly, one needs to (see what I did there?) be careful to see whether a question is asking about if something will result in a compile-time failure, runtime exception or incorrect behavior, but I read carefully and have no extra anxiety from seeing that word.

When I see the word "should" on the other hand, I just don't know what I should do!
 
Jesse Silverman
Bartender
Posts: 1737
63
Eclipse IDE Postgres Database C++ Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was reading a Python PEP and they referenced this as to their working definitions of terms covered by this thread:
https://tools.ietf.org/html/rfc2119.html

It doesn't align 100.00% to Mock and Real Exams and prep materials, but whatever, it is an RFC, so that should count for something.
 
reply
    Bookmark Topic Watch Topic
  • New Topic