home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.software-eng
- Path: sparky!uunet!europa.eng.gtefsd.com!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!agate!iat.holonet.net!tcsi.com!hermes!miket
- From: miket@hermes.tcs.com (Michael Turner nmscore Assoc.)
- Subject: Hungarian notation
- Message-ID: <1993Jan27.202958.1238@tcsi.com>
- Keywords: FAQ
- Sender: news@tcsi.com
- Organization: Teknekron Communications Inc.
- References: <faqmsg_728067750@qucis.QueensU.CA> <questmsg_728067750@qucis.QueensU.CA>
- Date: Wed, 27 Jan 1993 20:29:58 GMT
- Lines: 51
-
- From the FAQ:
- >------------------------------------------------------------------------
- >Subject: What is 'Hungarian Notation'?
- >Date: 19 Sep 1991
- >
- >
- >(see also the archive file "hungarian") A naming convention for C code. See
- >Charles Simonyi and Martin Heller, "The Hungarian Revolution", BYTE, Aug. 1991
- >(vol. 16, no. 8). There are other naming conventions; see, e.g. "A Guide to
- >Natural Naming", Daniel Keller, ETH, Projekt-Zentrum IDA, CH-8092 Zurich,
- >Switzerland. Published in SIGPLAN Notices, Vol. 25, No. 5, pages 95-102.
- >
- >
- >------------------------------------------------------------------------
-
- I've had to deal with C code written in Hungarian, and never liked it.
- What I'd like to know is: have the supposed benefits ever been
- quantified in controlled studies? Someone pointed me to some vague
- reference, but I think it was in a Microsoft publication.
-
- At minimum, I think I'd want to see research the following:
-
- 1. initial productivity: can you write more code, or more bug-
- free code, or improve on any quality/productivity metric,
- when using Hungarian over using some other convention (or
- over NO convention)
-
- 2. maintainability: can you find bugs by inspection faster?
- Can you find bugs in a debugger faster? Is it harder/easier
- more/less error-prone to add functionality?
-
- In the case of (1), you'd want to have a bulk-measure that wasn't
- biased by any differences in code size that were strictly related
- to the naming scheme.
-
- One difficulty would be finding impartial subjects. This problem might
- be sidestepped in an odd way: collect two subject groups, one
- fanatically pro-Hungarian, the other con, and hope that there isn't
- something in their preferences that makes one group more competitive
- than the other.
-
- Another difficult problem is avoiding sources of bias in the selection
- of examples to work from. My (biased) impression of Hungarian is that
- it's a bit of a crutch that helps you work on bad code -- by encoding
- lots of context that really should be near at hand in the code, anyway.
- How do you reasonably control for this?
-
- Any pointers?
- ---
- Michael Turner
- miket@tcs.com
-