3

In small programming examples, it is established that one will probably use foo, bar, and/or baz as variable/function names.

Are there accepted human names one can use? For example, if a program is sorting a list of people in alphabetical order, should I just use whatever names I think of?

2
  • 1
    If you don't want to think too hard about it, there are sample data generators out there like mockaroo.com that will generate sample data for you, including names.
    – Eric King
    Commented Oct 28, 2014 at 22:18
  • sure, use Bert and Julie :)
    – jwenting
    Commented Oct 31, 2014 at 10:28

1 Answer 1

5

Generally Alice and Bob and various others (mostly from Bruce Schneier's Applied Cryptography though Alice and Bob predate his usage of them by decades) are used in Cryptography. Various other names show up but they tend to represent specific things. They also pop up in other contexts such as networking on occasion but outside that there's no "official" set of names.

3
  • 3
    Do not forget about that sneaky Charlie, he is always trying to eavesdrop on Alive and Bob's communication.
    – user22815
    Commented Oct 28, 2014 at 21:45
  • 2
    Actually, the Eavesdropper is usually called "Eve", and then there's Mallory, the malicious man-in-the-middle. See wikipedia.org/wiki/Alice_and_Bob Commented Oct 28, 2014 at 22:42
  • Thanks! Turns out searching for placeholder names would've pointed me in the right direction, but I didn't know what they were called.
    – Haden Pike
    Commented Oct 28, 2014 at 23:23

Not the answer you're looking for? Browse other questions tagged or ask your own question.