Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: How do you name the possibilities?

by TilRMan (Friar)
on Jul 08, 2004 at 03:31 UTC ( #372661=note: print w/ replies, xml ) Need Help??


in reply to How do you name the possibilities?

Pizza delivery places do something like this (never worked at one, but I've received more pies than is good for me): Start with a plain cheese pizza, "". Then you start adding toppings: "P" for pepperoni, "A" for anchovies, "N" for pineapple because "P" was taken. If you have more than 26 ingredients you start adding lowercase letters: "Bp" for banana peppers, "Bq" for barbeque sauce, "Bl" for bay leaves. (You can probably take away the cheese with "Z" or perhaps "Nc".)

Chemists do this too in the periodic table.

You will probably need to define the order in which elements can appear. For example, a classic "hawaiian" pizza would be "HN" (ham and pineapple) and never "NH". You might want to sort by either alphabet or by popularity. Then you need to arrange the keys on the register so that it "respects" that ordering.

If you pick very good names up front, you can use simple abbreviations. For instance, "C" for cheese, "W" for white (non-toasted). This is very hard to do, as you pointed out, especially when the options change over time. Paradoxically, you can get away with less intuitive names if the system is more heavily used. Memorization is your friend in this case.

As already suggested, take the most common cases as defaults. When you have binary "present-or-not" decisions (like cheese), a "C" means cheese and an absence of "C" means no cheese. But when you must select one (or more) from a list, only put a default if one selection is far more frequent than its alternatives.

Here's how I might do it. I make the assumption that most customers like their buns lightly toasted (or that the restaurant will serve them that way unless instructed otherwise). I also assume that plain buns and seeded buns are both popular.

Cheese: "C": with "": without Bun: "P": plain "S": seeds Toast: "W": white "": light "D": dark
I'd list them in that order too, since they seem to make sense that way. So my lightly-toasted seeded Big Mac with cheese is "CS".


Comment on Re: How do you name the possibilities?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://372661]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2014-12-21 21:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (108 votes), past polls