Do people use the Hungarian Naming Conventions in the real world?
Is it worth learning the convention or is it a bane to readability and maintainability? ...
Is it worth learning the convention or is it a bane to readability and maintainability? ...
I know what Hungarian refers to - giving information about a variable, parameter, or type as a prefix to its name. Everyone seems to be rabidly against it, even though in some cases it seems to be a good idea. If I feel that useful information is being imparted, why shouldn't I put it right there where it's available? See also: Do peopl...
Running a team of about 10 developers, mostly working in their own components, is it absolutely needed to force certain coding standards? Example 1 in function names: perform_action vs performAction vs PerformAction Example 2 in Using hungarian notation vs not. The reason I would not like to force coding standards is because each ...
Let's say you've inherited a C# codebase that uses one class with 200 static methods to provide core functionality (such as database lookups). Of the many nightmares in that class, there's copious use of Hungarian notation (the bad kind). Would you refactor the variable names to remove the Hungarian notation, or would you leave them alo...
Please answer with good examples of Hungarian Notation, so we can bring together a collection of these. Edit: I agree that Hungarian for types isn't that necessary, I'm hoping for more specific examples where it increases readability and maintainability, like Joel gives in his article. ...
If you take over a project from someone to do simple updates do you follow their naming convention? I just received a project where the previous programmer used Hungarian Notation everywhere. Our core product has a naming standard, but we've had a lot of people do custom reporting over the years and do whatever they felt like. I do no...
Hi, Since C# is strongly typed, do we really need to prefix variables anymore? e.g. iUserAge iCounter strUsername I used to prefix in the past, but going forward I don't see any benefit. ...
Which naming convention do you use and why? I like to use employeeNameTextBox, because: It seems more natural from an English language perspective. I find it's easier to look up with Intellisense. The convention is similar to the convention used for events (MouseClickEvent, MouseClickEventHandler) and dependency properties (VisiblityP...
I've run across many examples of Core Foundation variables named k + someVariableNameHere or k + APILibraryName(2Char) + someVariableNameHere. What does this prefix K indicate? Examples include: kGLPFAStereo kCollectionLockBit kSetDebugOption ...
An anonymous type can be thought of as a "Set Once" Object type, whereas an plain old Object or Variant can be set many times. An object or variant tends to be short lived, while an anonymous type is expected to live longer, making it important to communicate intent. What naming convention do you use to communicate intent when using ano...
I've stopped using Hungarian notation everywhere except in the UI, where often I have a username label, a user name text box, a user name local variable, a required field validator, a user name property and method parameter so on, often all in the same context. current: lblUser, txtUser, rfvUser, _User, User, user If I do the obvious, ...
i have an array wich contains another array Would i notate it this way? pseudocode: rgrgTest = newArray(2) What if the array contains i.e. a struct? pseudocode: rggrTest = newArray(2).newStruct() Or this way i.e. if i want to classify the data types of the struct? pseudocode: rggrlstlTest = newArray(2).newStruct(int id, str desc,...
Possible Duplicates: Why shouldnt I use Hungarian Notation? Are variable prefixes ( Hungarian ) really necessary anymore? Do people use the Hungarian Naming Conventions in the real world? I'm sure this subject has been discussed and argued countless times before, but I would like to see what the people here an StackOverflow...
Hello! I have this class: class DoSomething { private int timesDone; ... } Which is the right way to named variable 'timesDone'? Sometimes I see named as m_timesDone. Is this correct? Where I can find information about naming guidelines? Thank you! ...
I'm working on a legacy COM C++ project that makes use of system hungarian notation. Because it's maintenance of legacy code, the convention is to code in the original style it was written in - our newer code isn't coded this way. So I'm not interested in changing that standard or having a a discussion of our past sins =) Is there an on...
In Perl, reference to anything is a simple scalar, and has the $ sigil. It's sometimes hard to say what kind of reference it is. I personally prefix variable names for references with a letter, which indicates ref type. Examples: my $aValues = []; # arrayref my $hValue = {}; # hashref my $oValue = b...
The MFC has all class names that start with C. For example, CFile and CGdiObject. Has anyone seen it used elsewhere? Is there an official naming convention guide from Microsoft that recommends this style? Did the idea originate with MFC or was it some other project? ...
I'm dealing with different APIs that use Integers to model duration. Only they can't seem to agree on the units. Sometimes it's seconds and sometimes it's milliseconds. So far the best way to avoid errors I've been able to find, is to use Hungarian notation: durationInMillis, durationInSeconds and so on. It makes me wonder if there's ...
I don't use hungarian (str, int) prefixes in .Net, but I still find it useful in VBA, where it is more difficult to see types. Is this bad? Unnecessary? Maybe I'm missing something. I'd really appreciate any feedback. I've been wondering for a while. Thanks everybody. ...
I have generally always used some sort of Hungarian Notation for my field names in my tables e.g. #Table Users u_id, u_name, u_email etc... #Posts p_id, p_u_id, p_title, p_content etc... But I have recently been told that this isn't best practice. Is there a more standard way of doing this? I haven't really liked just using the field...