On May 3, 2011, at 5:09 PM, Cédric Beust ♔ wrote:

> On Tue, May 3, 2011 at 8:04 AM, Kirk <[email protected]> wrote:
> 
> If you can't tell at a glance is a variable is local or a field without an 
> aid, your method is most likely way too large.
> 
> Yeah, I know XP people love this kind of one liners, but it doesn't really 
> fly in the real world.

yeah I know, but they are in there.. and they are for real if you choose good 
coding styles. I've had a few experiences where I've managed to wipe out 1000's 
of lines of code with some simple refactorings the most successful was breaking 
large methods up into smaller primitives and then reusing the primitives. It's 
amazing how much repetition you can eliminate when you start doing this. Also, 
you start seeing better ways of organizing the code that often results in even 
greater reductions. So yeah, it maybe hard to find in the real world but I've 
always managed to find it when I bothered to look.

>  
> Variants of the hungarian notation are just plain wrong. Variables should 
> reflect purpose, not type. I refer you to Uncle Bob.
> 
> Please, no, refer me to someone who actually writes large scale software more 
> than books.
> 
> Alexey gave a few examples where Hungarian Notation is useful, some others 
> that I came upon recently was in code that was manipulating file names and 
> path names. Using names such as fileString, filePath and fileBaseName helps a 
> lot, and that's Hungarian Notation.

Programing is about building a vocabulary that reflects the domain you're 
working in. Build that vocabulary in your application and names things for what 
they are and you won't need a notation and your code will be plenty readable.

As for Uncle Bob, he's stated, classes hide in methods and that is soooo true.

> 
> I'm sure even you will find occurrences of such names in your code.

Nope, you won't.

Regards,
Kirk

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to