Stop overthinking that variable name. Call it Bob for now. You can change it later... ...or save yourself that hassle and just give it a short but descriptive name
@JavaScriptCoff1 I'll do that as soon as I remember what the bob, rob, and tob variables do
@JavaScriptCoff1 I'd say give it a description: Is it a string? strBob is it an integer? intBob is it a float? fltBob
@JavaScriptCoff1 Oh, my ... what about Bob. What have I done now. It seems like there’s always a Bob: movies, TV, now variables. I generally use Bob as a string for mock data in Unit Testing for somewhat obvious reasons!
@JavaScriptCoff1 I would not do that. Don’t overthink, but never call it non meaningful name. Also refactoring is not cheap.
@JavaScriptCoff1 Some people out here using every letter in the alphabet to make var names
@JavaScriptCoff1 I have a question for you... Now I’m learning JavaScript but I’m not getting any idea? Am I stupid or I’m not alone
@JavaScriptCoff1 I use //TODO as comments and later I search with same and update 😃
@JavaScriptCoff1 This is the story of how Bob went into production
@JavaScriptCoff1 Uh, be careful... Remember, in programming terms "later" means.... "never". Say hello to Bob, codebase 😁
@JavaScriptCoff1 That's so true, mostly because you often don't know what the best name for a variable or function is until you've finished coding it. It's also a good reason to develop naming conventions so you have something to lean on first.
@JavaScriptCoff1 I always call things as descriptive as possible for readability. It can end up with some horrible variable names, but you know _exactly_ what they are for!
@JavaScriptCoff1 Name it Bob for now. Get an earful from tech lead in code review. 😢
@JavaScriptCoff1 @palaeolina made me think of you 😂
@JavaScriptCoff1 for checking things, bob is fine, but if you would commit that code, I'm thinking more like this
@JavaScriptCoff1 For method vars, I default to letters at first and refactor once I have an idea what the hell im doing. Good point though, figure out what is going on before worrying the details 👍
@JavaScriptCoff1 My rule for naming: start typing the first thing comes to mind After typing: re-evaluate to make sure it makes sense. Very few times when it doesn’t
@JavaScriptCoff1 Usually a short descriptive name is not that difficult if you know what you want the function to do, like sayName(person), buildTemplate(taskFooter), findIndex(clientCollection). If the function does more than one things it's probably too big anyway 🤷🏾♂️
@JavaScriptCoff1 Lol or name it some absurdly long name, for real.