🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.folklore.computers
Article #4450

Re: Hungarian Notation

#4450
From: pal... David Palmer
Date: Wed, 12 Sep 1990 02:58
62 lines
2984 bytes
KPUR...@LIVERPOOL.AC.UK writes:

>I first came across this in the 'Programmers at Work' book put out by
>Microsoft Press.

>It was a notation that by working from a set of rules enabled programmers
>to independently come up with the same identifier names. The names were
>almost unpronoucable (and as the inventor was a Hungarian, hence the notation's
>name and he also worked for Microsoft).

The inventor was Charles Simonyi, who worked at PARC on one of the first
WYSIWYG (What you see is what you get) editors: BRAVO.  It was
part of his (PhD?) thesis on software development techniques.
He then went to Microsoft and was the project leader for WORD on the Mac.
I was a summer employee who worked on speedups on the same project.
(I estimate that I saved the equivalent of about 3 secretary's working careers
with my speedups.)  That is where I learned about this convention,
which was extensively used in the group.

>I also remember reading a letter in CACM refering to this technique. This
>gave me a little more detail. The idea was something like the following:

>   p = pointer to
>   i = integer
>   c = character
>   v = vector
>   fcb = file control block

ch = character
c  = a count of something
mp = a map (an array which converts from one thing to another, for instance
	a table which converts from a font number to a font name.)
rg = a range of things (an array)

>The first argument in a routine would have the number 1, second 2, etc.

>There were some extra rules that I forget. But this would give stuff like:

>int *pi;
>char cv[10];
This would actually be 
	char rgch[10];
But an ascii - ebcdic conversion table would be defined as
	char mpch[256];
>FILE *pfcb1, *pfcb2;

>Anybody got a complete set of rules they used to generate the names?
>What other conventions did you use? Did it work in the workplace? Do they
>still use it at Microsoft? Does this account for the MS Word command keys
>layout? :-)

They used it at Microsoft on Word in 1984.  As for the cheap shot :-) the
idea behind Hungarian is to remove all choice from the programmer.
If he doesn't have to think about what to name a variable,
he can concentrate on his programming.  In Word, the user has
too much choice.

--
		David Palmer
		pal...@gap.cco.caltech.edu
		...rutgers!cit-vax!gap.cco.caltech.edu!palmer
	I have the power to cloud men's minds -- or at least my own.
Technical Details
Message-ID: <palmer.653108313@coil>
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!jarthur!nntp-server.caltech.edu!coil!palmer
References: <90254.174745KPURCELL@LIVERPOOL.AC.UK>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!gmdzi!unido!mcsun!uunet!shelby!apple!usc!jarthur!nntp-server.caltech.edu!coil!palmer
From: pal...@coil.caltech.edu (David Palmer)
Newsgroups: alt.folklore.computers
Subject: Re: Hungarian Notation
Message-ID: <palmer.653108313@coil>
Date: 12 Sep 90 02:58:33 GMT
References: <90254.174745KPURCELL@LIVERPOOL.AC.UK>
Sender: ne...@laguna.ccsf.caltech.edu
Organization: California Institute of Technology
Lines: 62
Posted: Wed Sep 12 03:58:33 1990
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit