...OOP allows you to describe the problem in terms of the problem, rather than in terms of the computer where the solution will run.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Originally posted by Pauline McNamara:
I've never really liked the use of s as an identifier for a generic String. That's it for my moan. On to the provocation...
I was thinking that, strictly speaking, String s = args[0] could be considered a minimalist's use of Hungarian notation. And therefore not in keeping with the Style Guide...
JavaBeginnersFaq
"Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
As I understand it, Hungarian Notation includes a reference to the data type of the identifier, which would be information specific to the program and its structure.
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Originally posted by Barry Gaunt:
Any more for any more of this fun stuff?
Originally posted by Michael Matola:
public void myMethod( String bossSaidIHaveToPickBetterNames )
OR
public void myMethod( String s ) ?
Originally posted by Pauline McNamara:
public static void main( String[] args )
...
Originally posted by Barry Gaunt:
If a local variable's "scope of use" (as distinct from "scope of existence" ) is over just a few lines of code then using a quicky like s for string, l for length, w for width, n for a number of times to do something is OK, especially if the variable appears a couple of times in the same or similar expressions.
Originally posted by Michael Matola:
Why not "argghhs"?
Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
Group them togther into a new object with "label" and "field" attributes. Then you can use "userName.label" and "userName.field". Doesn't that look nicer?
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |