I am in sort of a dilemma (in a geekish way of course). I love to declare variables at the beginning of my methods, and usually order them in some logical way. The problem is, when the list gets ...
Should I reuse variables? I know that many best practice say you should not do it, however later when different developer is debugging the code and have 3 variables that look a like and only ...
Possible Duplicate: Where do you declare variables? The top of a method or when you need them? Does it make a difference if I declare variables inside or outside a loop in Java? Is this ...
Clean Code suggests avoiding protected variables in the "Vertical Distance" section of the "Formatting" chapter: Concepts that are closely related should be kept vertically close to each other. ...
When you are defining a function/variable/etc and are not sure what to name it, what do you name it? How do you come up with a name? If you use a temporary name as a place-card until you give it it's ...
Ok, so this is a bit of a devils advocate question really. When are global variables ok, and if never, what would you use as an alternative? An interesting side-case to this question, how is a ...
This is a bit pedantic, but I've seen some people use Id as in: private int userId; public int getUserId(); and others use: private int userID; public int getUserID(); Is one of these a better ...
What is the best practice, most commonly accepted naming conventions for private variables in C#? private int myInteger; private int MyInteger; private int mMyInteger; private int _myInteger; ...
I often see code that include intentional misspellings of common words that for better or worse have become reserved words: klass or clazz for class: Class clazz = ThisClass.class kount for count in ...
What is a good way to define "state", as in state variable or state machine, to a new (previously non) programmer? What are some good ways to explain why this concept is useful for writing software? ...
Is there a general rule of thumb, when we should pass a value as as class variable and when as a method argument? Or is it just a choice of the developer? For example -- are there any reasons, why ...