Click here to Skip to main content
15,885,366 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Thought of the Day Pin
  Forogar  22-Apr-21 5:53
professional  Forogar  22-Apr-21 5:53 
GeneralRe: Thought of the Day Pin
DRHuff22-Apr-21 6:52
DRHuff22-Apr-21 6:52 
GeneralRe: Thought of the Day Pin
W Balboos, GHB22-Apr-21 7:28
W Balboos, GHB22-Apr-21 7:28 
GeneralRe: Thought of the Day Pin
jeron122-Apr-21 7:42
jeron122-Apr-21 7:42 
GeneralRe: Thought of the Day Pin
  Forogar  22-Apr-21 7:56
professional  Forogar  22-Apr-21 7:56 
GeneralRe: Thought of the Day Pin
jeron122-Apr-21 9:10
jeron122-Apr-21 9:10 
GeneralRe: Thought of the Day Pin
jgakenhe22-Apr-21 8:45
professionaljgakenhe22-Apr-21 8:45 
GeneralNames Pin
grralph122-Apr-21 3:02
grralph122-Apr-21 3:02 
rnbergren's recent post about variable names was good.
Lots of helpful advice poured in.
I didn't respond but I think that I should have done so.

rnbergren's post was about using frivolous or silly names for Variables and other things in proof of concept code and then using this as in copy and pasting in the real code. Sometimes changing it and sometimes not. Enjoying it or not.

Most responses were like, do it properly in the first place and it won't end up in your production code.
I agree. I have done it in the past but not anymore.

However I do like to be creative and sometimes I look at a previously named function, sub or Var name and marvel in it's relevance. I often comment/remark on the name as well so that it makes sense to others.

Sander Wrote:
Quote:
So no, I've made doing it "right" a habit and would not even think about naming something "astr" or "ewww" Smile | Smile | :)

OK ewww is a bit weird unless the table has field names like ewww and ahhh. (I love and respect Sander.)

I used to always use nresponse as the throw away variable name for things like the result of an input box within a sub.
I remember using ansStr once which was commented as 'answer string'. So close to astr.
Personally I don't see the problem especially with a throwaway Variable.
It is only there for a few micro seconds.
Every other name is important.

So I am interested in what others use for a throw away variable names used to hold a response from something like an inputbox or similar.

Do you always use the same name and if so what is it?

Or do you change it to suit the situation?
"Rock journalism is people who can't write interviewing people who can't talk for people who can't read." Frank Zappa 1980

GeneralRe: Names Pin
rnbergren22-Apr-21 3:34
rnbergren22-Apr-21 3:34 
GeneralRe: Names Pin
grralph122-Apr-21 4:12
grralph122-Apr-21 4:12 
GeneralRe: Names Pin
OriginalGriff22-Apr-21 3:37
mveOriginalGriff22-Apr-21 3:37 
GeneralRe: Names Pin
Jörgen Andersson22-Apr-21 3:40
professionalJörgen Andersson22-Apr-21 3:40 
GeneralRe: Names Pin
OriginalGriff22-Apr-21 3:48
mveOriginalGriff22-Apr-21 3:48 
GeneralRe: Names Pin
Jörgen Andersson22-Apr-21 3:53
professionalJörgen Andersson22-Apr-21 3:53 
GeneralRe: Names Pin
grralph122-Apr-21 4:15
grralph122-Apr-21 4:15 
GeneralRe: Names Pin
Jörgen Andersson22-Apr-21 3:39
professionalJörgen Andersson22-Apr-21 3:39 
GeneralRe: Names Pin
grralph122-Apr-21 4:22
grralph122-Apr-21 4:22 
GeneralRe: Names Pin
User 991608022-Apr-21 4:36
professionalUser 991608022-Apr-21 4:36 
GeneralRe: Names Pin
grralph122-Apr-21 5:25
grralph122-Apr-21 5:25 
GeneralRe: Names Pin
honey the codewitch22-Apr-21 5:44
mvahoney the codewitch22-Apr-21 5:44 
GeneralRe: Names Pin
grralph122-Apr-21 14:05
grralph122-Apr-21 14:05 
GeneralRe: Names Pin
Mike Winiberg22-Apr-21 21:21
professionalMike Winiberg22-Apr-21 21:21 
GeneralRe: Names Pin
grralph122-Apr-21 23:56
grralph122-Apr-21 23:56 
GeneralRe: Names Pin
honey the codewitch23-Apr-21 2:01
mvahoney the codewitch23-Apr-21 2:01 
GeneralRe: Names Pin
Stefan_Lang2-May-21 3:02
Stefan_Lang2-May-21 3:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.