Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
worst variable name
#11
(Apr-21-2017, 07:22 AM)idontreallywolf Wrote: Why Would data be a "bad" variable name?

i guess it depends on the context. in a small function where unknown data is being passed along or buffered with no concern of what is in it and it is the only instance of data, then it is probably ok.  in a big application with lots of data in lots of variables, it can be confusing.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#12
FIVE. Because somewhere someone did FIVE=8
Unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.
Your one-stop place for all your GIMP needs: gimp-forum.net
Reply
#13
(Apr-22-2017, 01:03 PM)Ofnuts Wrote: FIVE. Because somewhere someone did FIVE=8

or true=False ... seen it.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#14
Once worked with a guy who thought it was clever to use O0 as a variable.
Reply
#15
You could use o_O :D
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#16
(Jun-06-2017, 03:18 PM)agrajax Wrote: Once worked with a guy who thought it was clever to use O0 as a variable.

My boss once worked at a place where they'd pissed off the previous coder, and he did a global replace of all zeros with ohs, and had to go back through and figure out which was supposed to be which.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#17
Did they not use version control? A simple revert to a specific version would have undone all of that.
Reply
#18
Nope, no version control. We don't use version control at work. I've never seen statisticians use version control for their work.
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
Reply
#19
And all the code is in a shared place? You guys don't each have a copy of it on your local machines?

You really should look into something. git is super easy to setup, and could make situations like that a <5 minute problem.
Reply
#20
How do you get someone else's changes? You just never have multiple people write to the same file?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  The most popular [worst] passwords of 2019 buran 0 1,884 Dec-17-2019, 07:08 AM
Last Post: buran

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020