Copyright © Philip M. Parker, INSEAD. Terms of Use.

HUNGARIAN NOTATION

Specialty Definition: HUNGARIAN NOTATION

DomainDefinition

Computing

Hungarian Notation A linguistic convention requiring one or more letters to be added to the front of variable names to denote scope and/or type. Hungarian Notation is mainly confined to Microsoft Windows programming environments, such as Microsoft C, C++ and Visual Basic. It was originally devised by Charles Simonyi, a Hungarian, who was a senior programmer at Microsoft for many years. He disliked the way that names in C programs could stand for any kind of variable. This was for ever leading to mistakes, as programmers tried to manipulate variables in ways that their type prohibited, which they would never had done if they remembered what sort they were. According to legend, fellow programmers at Microsoft looked at the convoluted, vowel-less variable names produced by his scheme and, like everyone else who has come into contact with them since, said something like "This might as well be in Greek - or even Hungarian!". They almost certainly had in mind as well another kind of mathematical system called "Polish notation" (a variant form called reverse Polish notation is commonly used in calculators, which leads to expressions without brackets or punctuation which are easier to enter). They put the two together and made up the name "Hungarian notation". Hungarian Notation is not really necessary when using a modern strongly-typed language as the compiler warns the programmer if a variable of one type is used as if it were another type. It is less useful in object-oriented programming languages such as C++, where many variables are going to be instances of classes [Why?]. In addition, variable names are essentially only comments, and thus are just as susceptible to becoming out of date and incorrect as any other comment. For example, if a signed short int becomes an unsigned long int, the variable name, and every use of it throughout the program, should be changed to reflect its new type. If used appropriately however, it does enforce a certain consistency, especially when scoping is taken into account as well as type (for example g_ for global variables, m_ for members, c_ for static members, l_ for local, etc.). Simonyi's original monograph (http://www.strangecreations.com/library/c/naming.txt). Microsoft VB Naming Conventions (http://support.microsoft.com/support/kb/articles/Q110/2/64.asp). (1999-06-03). Source: The Free On-line Dictionary of Computing.

Source: compiled by the editor from various references; see credits.

Top     

Specialty Definition: Hungarian notation

(From Wikipedia, the free Encyclopedia)

Hungarian notation is a naming convention in computer programming, under which the name of a variable also gives its type.

Whilst in some programming languages the type of a variable is usually explicitly stated (eg: name$, count% in Basic are a string and an integer), others (such as Perl) will let you concatenate 1 and 6, and then let you square-root it - and still give the right answer, and yet others (Pascal) have strong typing, many such as C do little to check whether an string is being multiplied by a pointer. Unintentional errors of this sort generally result in pseudo-random numbers.1 This is made worse by the hundreds of different types typically held within complex OOP-programmed software.

Hungarian notation attempts to remedy this by adding the type of the variable to the name. Examples from Microsoft include dlgFileOpen, keyCaps and rptQtr1Earnings. The use of Camel case allows for easy determination of the individual words within the name.

Hungarian notation was invented by Charles Simonyi, a GUI programmer whom Microsoft got from Xerox (and whose roots originated in Hungary). The name was probably a pun on Polish notation, a stack-based method of implementing computer languages.

Footnotes

  1. Unfortunately, not random enough for cryptography. In some incredibly rare cases, this can be done deliberately, but usually only to produce obfuscated code.

External link

Source: adapted by the editor from Wikipedia, the free encyclopedia under a copyleft GNU Free Documentation License (GFDL) from the article "Hungarian notation."

Top     

Crosswords: HUNGARIAN NOTATION

Specialty definitions using "HUNGARIAN NOTATION": Charles Simonyi. (references)

Top     

Frequency of Internet Keywords: HUNGARIAN NOTATION

The following statistics estimate the number of searches per day across the major English-language search engines as identified by various trade publications. Hyperlinks lead to commercial use of the expression at Amazon.com.
 
ExpressionFrequency
per Day

hungarian notation

25
Source: compiled by the editor from various references; see credits.

Top     

Anagrams: HUNGARIAN NOTATION

Scrabble® YAWL-Verified Anagrams

Words within the letters "a-a-a-g-h-i-i-n-n-n-n-o-o-r-t-t-u"

-5 letters: annuntiating, nothingarian.

Source: compiled by the editor from various references; see credits.

SCRABBLE® is a registered trademark. All intellectual property rights in and to the game are owned in the U.S.A and Canada by Hasbro Inc., and throughout the rest of the world by J.W. Spear & Sons Limited of Maidenhead, Berkshire, England, a subsidiary of Mattel Inc. Mattel and Spear are not affiliated with Hasbro.

Top     

Alternative Orthography: HUNGARIAN NOTATION


Hexadecimal (or equivalents, 770AD-1900s) (references)

48 55 4E 47 41 52 49 41 4E      4E 4F 54 41 54 49 4F 4E

Leonardo da Vinci (1452-1519; backwards) (references)

    

Binary Code (1918-1938, probably earlier) (references)

01001000 01010101 01001110 01000111 01000001 01010010 01001001 01000001 01001110 00100000 01001110 01001111 01010100 01000001 01010100 01001001 01001111 01001110

HTML Code (1990) (references)

&#72 &#85 &#78 &#71 &#65 &#82 &#73 &#65 &#78 &#32 &#78 &#79 &#84 &#65 &#84 &#73 &#79 &#78

ISO 10646 (1991-1993) (references)

0048 0055 004E 0047 0041 0052 0049 0041 004E      004E 004F 0054 0041 0054 0049 004F 004E

Encryption (beginner's substitution cypher): (references)

42554841355243354824849543554434948

Top     



INDEX

1. Crosswords
2. Expressions: Internet
3. Anagrams
4. Orthography
5. Bibliography


  

Copyright © Philip M. Parker, INSEAD. Terms of Use.