Re: How to name variables in a program?
- From: "mensanator@xxxxxxx" <mensanator@xxxxxxx>
- Date: 29 May 2005 12:39:28 -0700
Jens.Toerr...@xxxxxxxxxxxxxxxxxxx wrote:
> spinoza1111@xxxxxxxxx wrote:
> f
>
> > Alf P. Steinbach wrote:
> >> * Paul Hsieh:
> >> >
> >> > int dbPop3MsgHdrGet (struct pop3Db * db, struct mimeMsgHdr * msg);
> >>
> >> It's difficult to say whether this is irony or just misguided.
> >>
> >> Presumably it's for C?
> >>
>
> >> Have you tried to _pronounce_ those, uh, "names"?
>
> > Why is this important?
>
> > Does any one read programs out loud?
>
> > I would say that the desire to "pronounce" names comes from Derrida's
> > syndrome: the rage to return to speech and to jettison writing.
>
> > Suppose we could "speak" to a computer in true "voice recognition". The
> > ABILITY to reify speeches-to-computers would immediately transform
> > those texts into writing even as Grace Hopper discovered the value of
> > paper tapes filled with scraps of equations as coded for an early
> > computer...despite John von Neumann's dismissal of the very idea that
> > "programming" was anything more than trivia unworthy of notice.
>
> > Instead of repeatedly instructing the computer to fix a certain
> > breakfast, "computer fix me breakfast" would become the reified name
> > for a text written on a (magnetic) medium.
>
> > This is why this rage to jettison Hungarian notation is mere barbarism,
> > for it is a rage to return to the immediacy of speech when the
> > immediacy of speech is as much a part of the problem set as it is of
> > the solution set.
>
> Complete drivel from someone who is obviously an armchair programmer
> at best. Nobody sane is able to parse stuff like "LPCTSTR" or
> "dbPop3MsgHdrGet" correctly when reading a program or seeing the
> difference between e.g. gibberish like "LPCTSTR" and "LCPTSTR". We
> are all trained to read words, not more or less random sequences of
> characters. That's what makes HN that horribly annoying: you can't
> recognize what's meant when you read it and 90% of the time (see, I
> also can make up my own statstics as I go) type information is either
> not important or clear from context when variables have reasonable
> names - you pay for information you don't need most of the time with
> making the whole source code much harder to read. And since everybody
> is prone to make typing errors it's also much more difficult to spot
> typos when using variable names that look like line noise instead of
> names that can be read easily. A misspelt word often immediately
> comes to your attention, but when you type "LCPTSTR" instead of
> "LPCTSTR" you will have problems to see the difference, even when the
> compiler explictely tells you that there's something wrong with the
> variable (let's hope you're using a language that requires a defini-
> tion of a variable before it can be used and doesn't silently create
> a new one with the misspelt name...)
>
> Just have a look at the source code in what seems to be the original
> paper by Simonyi at
>
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs600/html/hunganotat.asp
>
> (it's somewhere at the end of the page). The source code gives you
> no indication at all what it does since neither the function nor the
> variable names tell you anything about their purpose. In contrast to
> the intention of the author it's probably difficult to come up with
> an example that more clearly shows why HN is completely useless and
> actually counterproductive.
My hovercraft is full of eels.
> Jens
> --
> \ Jens Thoms Toerring ___ Jens.Toerring@xxxxxxxxxxxxxxxxxxx
> \__________________________ http://www.toerring.de
.
- References:
- How to name variables in a program?
- From: SerGioGio
- Re: How to name variables in a program?
- From: websnarf
- Re: How to name variables in a program?
- From: Alf P. Steinbach
- Re: How to name variables in a program?
- From: spinoza1111
- Re: How to name variables in a program?
- From: Jens . Toerring
- How to name variables in a program?
- Prev by Date: Re: How to name variables in a program?
- Next by Date: Re: Suggestions for double-hashing scheme
- Previous by thread: Re: How to name variables in a program?
- Next by thread: Re: How to name variables in a program?
- Index(es):
Relevant Pages
|