1. RE: Aesthetically pleasing identifier names
- Posted by "D. Brent O'Gara" <D_Brent_OGara at comcast.net> Mar 04, 2005
- 512 views
- Last edited Mar 05, 2005
I went through the exact same evolution myself. And while I don't code much, I use the BumpyCaps (or CamelCaps, if you prefer) paradigm for all my naming convention needs. As someone whose primary computer use is 3D modeling and animation, It lets me find what I need even when it's buried in a list of 500 similar objects. I also try to be obsessive about directory structure and file placement, so that a finger morph can always be found under World-> Figure-> HandRight-> IndexFinger-> Morphs. (For example) While most programmers don't spend all day with meshes and morphs, the paradigm holds true for code and libraries as well. When I was first starting out, everything went into the same directory, all with names like RHF2.obj... and that is a recipe for disaster. So yes, I think organization and structure are great things, (and yet I love Euphoria for letting me throw everything into one Sequence) and Your name is pretty cool too. -Brent O' -----Original Message----- From: Brent W. Hughes [mailto:guest at RapidEuphoria.com] Sent: Friday, March 04, 2005 12:01 PM To: EUforum at topica.com Subject: Aesthetically pleasing identifier names posted by: Brent W. Hughes <bwh566 at yahoo.com> When I was a young and tender programmer, if I wanted to declare a function to, say, set a menu bar to a certain value, I would probably name the function something like "smb" which of course, stood for "set menu bar". After a few years, I decided that that was not very self-documenting, so I would name such a variable "setmenubar". This made the code more readable and was worth the extra typing. Sometime later, I saw people using underscores in their identifier names, and I decided to give that a try. My function would hence be called "set_menu_bar". Still years later, I began to see people using case to separate the individual words in an identifier name. I tried it. My function would now be called "SetMenuBar". I found my code to be more readable and much more aesthetically pleasing. In fact, I have become a convert to this way of naming identifiers. As a convert, I am now trying to get others to see the light so that it will be easier to read their code. What do you think? Brent
2. RE: Aesthetically pleasing identifier names
- Posted by "Ricardo M. Forno" <rforno at uyuyuy.com> Mar 08, 2005
- 494 views
Agreed. I do so. Regards. ----- Original Message ----- From: Brent W. Hughes <guest at RapidEuphoria.com> To: <EUforum at topica.com> Sent: Friday, March 04, 2005 5:01 PM Subject: Aesthetically pleasing identifier names > > > posted by: Brent W. Hughes <bwh566 at yahoo.com> > > When I was a young and tender programmer, if I wanted to declare a function to, say, set a menu bar to a certain value, I would probably name the function something like "smb" which of course, stood for "set menu bar". > > After a few years, I decided that that was not very self-documenting, so I would name such a variable "setmenubar". This made the code more readable and was worth the extra typing. > > Sometime later, I saw people using underscores in their identifier names, and I decided to give that a try. My function would hence be called "set_menu_bar". > > Still years later, I began to see people using case to separate the individual words in an identifier name. I tried it. My function would now be called "SetMenuBar". I found my code to be more readable and much more aesthetically pleasing. In fact, I have become a convert to this way of naming identifiers. As a convert, I am now trying to get others to see the light so that it will be easier to read their code. > > What do you think? > > Brent > > > >