1
vote
1answer
88 views

When should I pass value as class variable and when as a method argument?

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 ...
9
votes
11answers
2k views

What is the reason for using lowercase for the first word in a local variable (eg, employeeCount, firstName)

I take a good deal of criticism from other programmers due to my use of full proper casing for all my variables. For example, your typical programmer will use employeeCount for a variable name, but I ...
5
votes
4answers
544 views

Method flags as arguments or as member variables?

I think the title "Method flags as arguments or as member variables?" may be suboptimal, but as I'm missing any better terminology atm., here goes: I'm currently trying to get my head around the ...
3
votes
2answers
294 views

Better use on the name of variables

I have a method that looks like this: Public Function NormalizeStreetAddress(country As Namespace.Country, streetAddress As Namespace.StreetAddress) _ ...
4
votes
3answers
135 views

Using “prevent execution of method” flags

First of all I want to point out my concern with some pseudocode (I think you'll understand better) Assume you have a global debug flag, or class variable named "debug", class a : var debug = ...
7
votes
6answers
1k views

Prefer class members or passing arguments between internal methods?

Suppose within the private portion of a class there is a value which is utilized by multiple private methods. Do people prefer having this defined as a member variable for the class or passing it as ...