hungarian-notation Questions

10

Solved

I often see m_ prefix used for variables (m_World,m_Sprites,...) in tutorials, examples and other code mainly related to game development. Why do people add prefix m_ to variables?
Superintendency asked 21/10, 2012 at 14:54

20

Solved

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 ...
Jackpot asked 13/10, 2008 at 19:59

12

Solved

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...
Verine asked 18/2, 2010 at 21:51

2

Solved

I have the following code: var fxRate = new FxRate(); which is giving me the following StyleCop ReSharper warning: The variable name 'fxRate' begins with a prefix that looks like Hungarian n...

6

Solved

Our programming teacher taught us to use the Hungarian notation (e.g. intMyInteger, strMyString,...) while programming. But I have heard somewhere this isn't actually used in the professional worl...
Laconic asked 17/5, 2011 at 19:2

4

Solved

My code contains a variable named "m_d3dDevice". StyleCop complains about this name: SA1305: The variable name 'm_d3dDevice' begins with a prefix that looks like Hungarian notation. Remove t...
Demulcent asked 31/1, 2011 at 23:43

2

Solved

I'm a little confused now with the hungarian notation prefixes in WinAPI for CHAR strings and WCHAR strings. When we use a CHAR string usually such a prefix is used: CHAR szString[] = "Hello"; W...
Dressel asked 15/4, 2013 at 14:29

22

Solved

This question is to seek out 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...
Indention asked 14/10, 2008 at 17:37

2

Solved

Most programmers know of a thing called 'Hungarian Notation', each variable has a nice prefix to denote its data type, i.e. bIsExciting = false; // Boolean strName = "Gonzo"; // String iNumber = 1...
Carlina asked 30/9, 2011 at 12:11

2

Solved

I have a large codebase that uses Systems Hungarian for most variable names, which basically means I have lots of objQueue's, objCommon's, dtDataSet's et cetera. Is there any way to convert most ...
Flinders asked 22/2, 2011 at 18:43

1

Solved

Most functions are easy to name. Generally, a function name is based on what it does or the type of result it produces. In the case of a generator function, however, the result could be a i...

3

Solved

I have read tutorials all over the web with different kinds of tutorials specified on game (however, this turns out to be pretty general). Are there any reasons to why many developers name their v...
Pederson asked 2/9, 2010 at 16:30

25

Solved

I've never been a fan of Hungarian notation, I've always found it pretty useless unless you're doing some really low level programming, but in every C++ project I've worked on some kind of Hu...
Weitzel asked 18/3, 2009 at 18:30

4

Solved

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 ap...
Twospot asked 3/4, 2010 at 22:53

5

Solved

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 let...
Lotson asked 25/1, 2010 at 21:45

4

Solved

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...
Bitumen asked 4/12, 2009 at 17:58

29

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.
Incoherent asked 21/11, 2008 at 15:58

20

Solved

Is it worth learning the convention or is it a bane to readability and maintainability?
Blanka asked 7/8, 2008 at 22:31

2

Solved

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 inc...
Arthropod asked 24/3, 2009 at 1:5

16

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 Intellisens...
Mezcaline asked 13/1, 2009 at 18:23

20

Solved

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 c...
Coextensive asked 12/11, 2008 at 14:34

37

Solved

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 ...
Gastroenteritis asked 21/9, 2008 at 20:8
1

© 2022 - 2024 — McMap. All rights reserved.