- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
There's even a reference in literature (well, sort of) for entertaining variable names. In "The Wizardry Compiled" by Rick Cook, a programmer has a variable called corned_beef. it's a hash table, of course.
DISCLAIMER: Comment written from memory, so apologies if details are wrong.
Admin
Admin
IMHO, it's much more likely that there was no real guide to the names, than that a person took the time to actually document function names.
Admin
"my" has good meaning for scoping. Even if you didn't drink the M$ koolaid for the last few years where everything visible to the user is "my @#%^", Perl uses "my" to scope variables locally to the block and I've seen the terminology in manuals. At some point you have to go with common usage.
PLEASE, NOT "i"! Have you ever tried to search for all occurrences of a variable with that name using a text search? If you can't come up with something meaningful, at least use something like "ii" which is effectively the same but you can do a text search for it.
Admin
There is that, sure. By effectively prohibiting people to have services on their machines you are hindering the creation and growth of new and useful network services. (The early well-known FTP site "tsx11.mit.edu" started as the desktop machine of a guy who wanted to mirror some european stuff (Linux) that was slow to access over the old transatlantic links. This site effectively brought Linux popularity to the USA. The same with Yahoo, who started on students' dorm room machines, IIRC.)
But there's also the fact that many programs saves the hostname everywhere, especially in UNC paths. I'd rather not tempt fate by changing stuff beneath programs' feet any more than I have to.
(UUCP? The RFC doesn't even mention UUCP. I don't know what you're on about.)
Admin
"I've got someone who looks a lot like you; she does the things you do, but she is an IBM."
Admin
Plankton (of SpongeBob fame) has a computer wife named Karen.
Admin
Always always always always (did I mention always?) be descriptive with variable names. In my experience, "my(Anything)" is used by noobs who can't tell the difference between variables they declared themselves, and reserved words or classnames or whatever. The prefix "my" is a good way for them to tell the difference.
And don't reuse variables for different things.... unless you're doing something embedded or realtime, you're unlikely to be killed by the overhead of declaring a new variable.
Reading code should be like reading a well-written textbook, you may not understand everything at first glance, but the names start to make sense as you read the text.
The ONLY exceptions, would be a counter in a for-loop, where "i" is so standard, that anything else might just be confusing, and any place where obfuscation of some sort is useful.
Admin
This reminds me of some COBOL code I had to look at (early70's) with a view to modifications where all the 'lables' were rivers in New south Wales-- Australia
Admin
I wonder if there's another function called TrishaHappyEnd().
;)
Admin
One of our biggest technological assets was named after the (actually very awesome) engineer that took over the project years ago. The next generation version of the project is named after his daughter, Amelia.
When bugs are found, it's very hard to get angry about them: you can't just yell "Amelia is retarded, my data is gone!" across the room. One has to actually think about and share the problem reasonably and clearly.
Admin
I just loved this.
Admin
I took a class... in 2005... from someone who had a routine to generate unique function names.
As in 'PF0001','PF0002','PF0003'...
His reasoning? 'Meaningful variable names can be misleading when the purpose of the function changes.'
And he's the guru -- wrote-the-book, consults, teaches courses -- for an obscure but still selling programming environment.
(Yes, yes, I know, maybe there was some requirement that function names be globally unique, I don't know. I didn't ask. I got out of there as quickly as possible.)
Admin
is this the same dolo who lived (lives)in harlem?
Admin
Get a real IDE. Why are you still doing text searches instead of looking for references?
Admin
Admin
I use meaningful variable names. My code is usually clean. But ... i can't avoid funny references ...
For example, on one of the systems I maintain I use Lock files ... off course, they are called Locke files, and the array where they are store after being read is $John.
I think the most obscure reference I ever wrote is this one:
I save store the ethernet's MAC Address in a variable, and later into a file. Both are named ONEINFINITELOOP. Explained: Mac Address = Apple's Address = 1 Infinite Loop. :)