Re: Free to do what I like, but is it right?




"MM" <kylix_is@xxxxxxxxxxx> wrote in message
news:8nrek25u4etepe039e31861jejeh5ssdnn@xxxxxxxxxx
For fifteen years I have religiously followed Hungarian notation and
prefixed every integer with an i, every string with an s. Often I have
wondered why the heck I do this. I have never, or hardly ever, needed
to puzzle for very long over whether a particular variable is an
integer or a string or whatever. The context usually tells all I need
to know.

Recently I wrote my first program since many months of serene
isolation from computing (except for surfing, email, writing my life
story, and other stuff) and I decided to knock Hungarian on the head.
Suddenly I felt as if a weight had been lifted from my shoulders. I
felt like those who have discarded their clothes on the beach and
disappeared to a new life. I've come this far without OOP (well, apart
from the built-in stuff in VB6) and now I can even manage to live from
one day to the next without those niggling little i's and s's
prefixing everything.

So, bite me, but that's what I'm gonna be doing in future. Hungarian
is dead as far as I'm concerned - unless anyone can give me a darned
good reason why I should continue with it.

MM


No reason to address whether adding "type or kind information" to a name is
useful or not. As long as it is consistent and holds faith to any of a
number of common conventions, IMHO, it is. This is based on twenty plus
years of evidence, albeit most of it anecdotal.

Even in the face of such experience, which I am sure in not unique, it
periodically becomes popular to deride naming conventions.

In OOA/OOD it makes a certain amount of sense - "Data-typing" items tends to
steer one towards "how" rather than "why" too early in the process. It is
only natural that this would spill over into OOP. Another reason is the pain
of having to follow a convention - the constraint of labeling items
correctly the first time, and the annoyance of going back and repairing it
if you change your mind.

And about twenty more excuses programmers give for not using a naming
convention.

I believe most just get wrapped up in the T-crossing and I-dotting of the
convention itself and forget why there was ever naming conventions in the
first place - adopting a convention aids communication. If one is a
lone-wolf, communication takes a back seat to convenience, but if one lives
in a world populated by others - then communication becomes very important.

IMHO, those that eschew naming conventions are just Humpty Dumpties. <g>

"There's glory for you!"
"I don't know what you mean by 'glory,' " Alice said.
Humpty Dumpty smiled contemptuously. "Of course you don't-till I tell
you. I meant 'there's a nice knock-down argument for you!' "
"But 'glory' doesn't mean 'a nice knock-down argument,' " Alice objected.
"When I use a word," Humpty Dumpty said, in rather a scornful tone, "it
means just what I choose it to mean - neither more nor less."
"The question is, " said Alice, "whether you can make words mean so many
different things."
"The question is," said Humpty Dumpty. "which is to be master-that's
all."

Has anyone ever met any programmer who didn't feel like he was the 'master'.
<g>

-ralph


.



Relevant Pages

  • Re: Open source C# namespace to convert many audio formats
    ... the maintainer suggesting he learns proper naming conventions. ... int count;. ... So using abbreviations for uncommon terms is a bad ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Let Over Lambda chapter 4
    ... *earmuff* convention for special variables, ... the are lots of naming conventions you find in Lisp ... distinguishing between macros and functions? ...
    (comp.lang.lisp)
  • Re: Database naming conventions?
    ... Just do a search for "naming conventions" ... I choose "ProductName" not because the table is named ... such as "ContainerNumber" to identify shipping containers, ...
    (comp.databases.ms-sqlserver)
  • Re: Using Hash (#) in a cell name
    ... link you can use to get an idea on some common naming conventions: ... Tony's Table and Field Naming Conventions ... Tony Toews, Microsoft Access MVP ...
    (microsoft.public.access.modulesdaovba)
  • Re: php variable in sql string
    ... put string in program works ok, but, if I use string from require file I ... ',member_lname) as 'member' from member_cccb_lnk join member on ... So your $cccb_id isn't inside the quotes. ... And if you don't follow normal usenet conventions, don't expect to get a lot of help from this newsgroup. ...
    (comp.lang.php)