This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Cattle Drive and the fly likes R U getting a feel for the nitpicks ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » This Site » Cattle Drive
Bookmark "R U getting a feel for the nitpicks ?" Watch "R U getting a feel for the nitpicks ?" New topic
Author

R U getting a feel for the nitpicks ?

Stuart Goss
Ranch Hand

Joined: Mar 21, 2001
Posts: 169
Hi, Johannes and all.
Well I sent off my 3rd attempt of Say4b and slipped a global variable in so that I could do nice things with it without wondering about if it was only copied an d so forth. I no, I shouldn't have, but if I can remeber rightly it had been a long day at work and I just didn't think.
Sorry Marilyn. Marilyn nitpicked me with this
You're trying to use a global variable - which is taboo in OO techniques. Well, in procedural techniques too! I don't think you need this. Instead, you should be passing this into methods if you need it.

I am sooo ashamed of my self. I was even passing it in to the method, although it was a global variable.
The lesson is: Don't use GLOBAL VARIABLES
Bye, Stuart.
P.S. I am getting the feeling for the nitpicks maybe, because as soon as I sent that attempt for Say4b off, I knew I was going to be slapped.

Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
If Marilyn saw the PL/1 programs of myself & the +-500 other programmers here, she will get a fit.
We go GLOBAL
Michael Pearson
Ranch Hand

Joined: Mar 11, 2001
Posts: 351
If every variable has global scope than it's like all the variables are local.
"Go global or go home" - could be the motto for some people I know.
Michael
Johannes de Jong
tumbleweed
Bartender

Joined: Jan 27, 2001
Posts: 5089
I like it Micheal !!!
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: R U getting a feel for the nitpicks ?
 
Similar Threads
Say4b: Typecasting
void Say4b( String whilePullingOutHair )
Assignment 2: Is it really that easy ... ?
Say4b: "int cannot be dereferenced" error
My nitpicking resumed