Re: grid



On Sun, 22 Apr 2007 14:26:58 -0400, Joseph M. Newcomer
<newcomer@xxxxxxxxxxxx> wrote:

Hi Joe,

int iWindowWid, iWindowHei;
*****
Generally, it is good practice to avoid using commas in declaration lists. One variable,
one line. It would be a lot better use of the names if you eliminated the 'i' (which
conveys nothing useful) or the "Window" (which conveys nothing useful) and simply called
them "Width" and "Height", which would mean the meaningless abbreviations of the most
important part of the name would be eliminated.

So, it seems to me that you don't like the Hungarian Notation, or you
don't consider HN useful.
I agree exspecially for simple cases like integers and the "i" or "n"
prefix.

But, why was this notation invented?
And why Windows PSDK, and even some of the MFC and ATL sources [*],
use HN? Is HN important in huge projects?
(However, it seems that in the "new" C# world, HN has been discouraged
by Microsoft coding standards.)

[*] I downloaded ATL Server shared-sources:

http://blogs.msdn.com/vcblog/archive/2007/03/02/atl-server-shared-source-release-now-available.aspx
http://www.codeplex.com/AtlServer

and they use prefixes like sz, str, wsz, etc.

Thanks in advance,
MrAsm
.



Relevant Pages

  • Re: grid
    ... I typically put on some sort of prefix character just as extra insurance that my names won't conflict with some built-in keyword. ... I typicaly use str for string and cs for a CString, but there is nothing hard fast about it. ... conveys nothing useful) or the "Window" and simply called ... And why Windows PSDK, and even some of the MFC and ATL sources, ...
    (microsoft.public.vc.mfc)
  • Re: To Hungarian or not to Hungarian
    ... standard found at: ... The argument was "Hungarian notation is no longer the recommended practice". ... The prefix should either be 2 or 3 characters long. ... Counter variables can be i,j,k but anything else gets a word - TempString, IsEmpty, AnimalType. ...
    (borland.public.delphi.non-technical)
  • Re: Questions about components naming convention
    ... Should I use the same prefix for components which have the ... hungarian notation is not necessary as long as you give your variables ... TeamBUG support for UK-BUG ...
    (borland.public.delphi.language.objectpascal)
  • Re: Member Variables Naming Convention
    ... references to controls a bit different than straight variables. ... Actually, in the Microsoft guidelines, it really is. ... Hungarian notation isn't completely outlawed, ... any argument for me to adopt the "_" prefix as my personal style. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Another newbie question
    ... Actually these days the most common emphasis I see is on meaningful names, ... real-world situations you will discover that 'hungarian notation' is equally ... Right, but if you read what Joel suggested, you can see how even the naming he suggests becomes wrong in a strongly typed system. ... Now if instead you create a unsafe string type, then the naming prefix is meaningless, the behavior that the "us" was meant to relay is encapsulated inside the type. ...
    (microsoft.public.vb.general.discussion)

Loading