🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #1827

Re: Coding Rules/Suggestions

#1827
From: Steven T. Abell
Date: Thu, 19 Nov 1992 08:28
35 lines
2063 bytes
nevin@dtint.dtint.com writes:
>I've been the route of extremely strict conventions (see Charles  
>Symoni, MIT/Microsoft on type naming calculus commonly referred to as  
>"Hungarian"), and I find the middle ground more appealing (i.e. a  
>'relaxed' but enforceable, democratic group of standards).

I use a Hungarian style similar to Symoni's. It was forced upon me against
my will a few years back. Now, it seems to me to be a necessity. There are
several concrete advantages, some of which are:

1) Simpler semantics checking. You rely a *lot* less on your memory of
what kind of thing a variable represents. Multi-level pointers become
tractable. Mismatches between declaration and usage are visually apparent.
Related entities are clearly related by similarity of names.

2) Uniformity across a project. People tend to choose the same names for
the same things, even when they aren't communicating.

3) Name formation becomes much more mechanical. You can stop spending all
day looking for good names for your variables, and expend your creativity
in more valuable ways.

4) Simpler, more reliable global search-and-replace. With the right set of
naming rules, you can make some really scary name changes safely, and not
take all day to do it.

5) Code from code generators is more easily read by humans.

One of the greatest advances of the Industrial Revolutions was the idea
of standardized, interchangeable parts. Object programming does this at
a high level, Hungarian does it at a low level. Both matter.

If anybody out there hasn't seen this stuff and is interested, send e-mail.

Steve abell@netcom.com
Technical Details
Message-ID: <1992Nov19.082837.3889@netcom.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!abell
References: <1992Nov18.211313.25652@dtint.uucp>

Show Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!abell
From: abell@netcom.com (Steven T. Abell)
Subject: Re: Coding Rules/Suggestions
Message-ID: <1992Nov19.082837.3889@netcom.com>
Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
References: <1992Nov18.211313.25652@dtint.uucp>
Date: Thu, 19 Nov 1992 08:28:37 GMT
Lines: 35