|
James Lonero wrote: In most cases, 'should' gives you some wiggle room. So, more a very strong recommendation. Something like "all variable names should have a meaningfull name", and "code comments should be not stating the obvious".
James Lonero wrote: For DOD purposes, 'shall' means absolutely must be, required to be. Good thing I don't work there then. We shall die, the rest is uncertain and open to discussion
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
When I was in MoSCoW[^], they said:
Must: Absolutely necessary,
Should: Important but not necessary,
Could: Desirable but not necessary,
Won't: Not appropriate for now.
|
|
|
|
|
When writing specifications, the customary usage is:
MUST: mandatory
SHOULD: highly recommended, but not mandatory
MAY: optional
SHOULD NOT: highly discouraged, but not prohibited
MUST NOT: prohibited
When speaking to non-engineers, "should" is often taken to mean "must".
If you have an important point to make, don't try to be subtle or clever. Use a pile driver. Hit the point once. Then come back and hit it again. Then hit it a third time - a tremendous whack.
--Winston Churchill
|
|
|
|
|
Insanity notwithstanding ...
* Should should be reserved for project stretch targets.
* Must must be used only in brewing.
* Shall, shall be used in the case of compulsory requirements.
* Will will only be used in the case of death
|
|
|
|
|
SHame + cOULD = SHOULD
Could says there is a choice to be made and is an element of should.
Shame on those who don't follow the implied directive is an element of should.
Should is one of the most stress-inducing words in the English lexicon and absolutely...
...ought not be used in message boxes, forms or web pages. IMNSHO
Cheers,
Mike Fidler
"I intend to live forever - so far, so good." Steven Wright
"I almost had a psychic girlfriend but she left me before we met." Also Steven Wright
"I'm addicted to placebos. I could quit, but it wouldn't matter." Steven Wright yet again.
|
|
|
|
|
I think it is just local interpretation. I used to work with a guy who thought if a sentence contained the word "are" that it was then a question.
"Are you going to do that?"
"Where are you?"
He didn't have an audible response when I said.
"You are out of your mind."
So maybe in the writer's local culture, saying "should" implied "have to".
Psychosis at 10
Film at 11
Those who do not remember the past, are doomed to repeat it.
Those who do not remember the past, cannot build upon it.
|
|
|
|
|
The software is being polite; it's anticipating users who do not like being told what to do.
|
|
|
|
|
As used in many standards documents, "should" means, "This is a best practice. You're an idiot if you don't." It is the concensus advice of the standard-writers who are usually very experienced people. It is the behavior of a very junior, very unimformed person not to treat "should" advice in a standards document as "do it". But hey, knock yourself out, do a half-assed job. That's the way to impress your boss and your customers.
I think there are people who are still rebelling against "should" advice in standards documents because they hated hearing their mom tell them what they "should" do. Chances are mom was right too.
|
|
|
|
|
Quote: Your password should contain at least 6 characters Isn't that another way of stating: "Penis" is too short ?
|
|
|
|
|
I would then expect the validator to say, "Is it in yet?".
|
|
|
|
|
serialPort1.BaudRate = 9600;
|
|
|
|
|
Sorry, you are wrong you do not get the point! The comment is for color blind.
And the variable Name Points to nothing other than COM1
modified 19-Jan-21 21:04pm.
|
|
|
|
|
Seems rather terse, surely
serialPort1.BaudRate = 9600;
would be more helpful
|
|
|
|
|
aha
or it is british humour, which of course I like, but usually do not understand it
modified 19-Jan-21 21:04pm.
|
|
|
|
|
No; you must remember that the BaudRate property expects SI units, so the comment provides the translation to imperial units.
|
|
|
|
|
No. Its not a comment. Rather, it is commented code. This is inferred from the ; at the end.
The programmer just forgot to remove that piece of commented code.
|
|
|
|
|
I think it means:
"If you're going to muck with this setting, this (9600) was the last good one; in case I forget or die..."
|
|
|
|
|
He/she forgot to mention that this is about setting the baudrate.
|
|
|
|
|
Try this extension method:
public static T Clone<T>(this T obj) where T : ICloneable
{
return (T)(((ICloneable)obj).Clone());
}
In VB:
<Extension()>
Public Shared Function Clone(Of T As IClonable)(ByVal obj As T) As T
Return DirectCast(DirectCast(obj, IClonable).Clone(), T)
End Function
(If the VB syntax is wrong, tell me. I don't use VB any more)
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
|
No, but I found this in my code today:
public static T
Clone<T>
(
this T Connection
)
where T : System.Data.IDbConnection , new()
{
return ( new T()
{
ConnectionString = Connection.ConnectionString
} ) ;
}
I get the feeling that I never even tried to test it. I'm not sure I ever should. But it compiles!
To make matters worse, I found that because I had just written this:
public static partial class LibExt
{
private static readonly System.Collections.Generic.Dictionary<System.Type,System.Reflection.ConstructorInfo> constructors ;
static LibExt
(
)
{
constructors = new System.Collections.Generic.Dictionary<System.Type,System.Reflection.ConstructorInfo>() ;
return ;
}
public static System.Data.IDbConnection
CloneConnection
(
this System.Data.IDbConnection Connection
)
{
System.Data.IDbConnection result ;
System.Type typ = Connection.GetType() ;
if ( !constructors.ContainsKey ( typ ) )
{
constructors [ typ ] = typ.GetConstructor ( System.Type.EmptyTypes ) ;
}
result = (System.Data.IDbConnection) constructors [ typ ].Invoke ( new object [ 0 ] ) ;
result.ConnectionString = Connection.ConnectionString ;
return ( result ) ;
}
}
Which I haven't tested either.
|
|
|
|
|
Note that this only works if T has an explicit implementation of ICloneable. Otherwise, Clone() will call the instance method and not the extension method.
And you don't need the cast to ICloneable.
return (T)obj.Clone(); will do.
|
|
|
|
|
I used to generate c# switch case blocks that were about 2 or 3 pages long.
Fun times. =)
No, I won't post a sample - it's even uglier than it sounds.
It also sometimes included "goto case" statements
|
|
|
|
|
danah gaz wrote: No, I won't post a sample
Ok, I won't read your sample.
Life is a computer program and everyone is the programmer of his own life.
|
|
|
|
|
Solved
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|