cjsmith: (Default)
cjsmith ([personal profile] cjsmith) wrote2007-10-02 01:47 pm

Wheel of Lunch

Can't decide where to eat? (and you're in the USA, I presume)? Grab the Wheel of Lunch and give it a spin!

I will not publicly admit that I have a shellscript to do the same thing. If I did have such a script, its database would be populated only with restaurants I happened to like, all near my current place of work, and I would be about half way through implementing "attributes" such as "quick" or "inexpensive" -- but only if I had such a script. Of course I don't. Only a computer geek type of person would have such a thing.

[identity profile] therobbergirl.livejournal.com 2007-10-02 09:08 pm (UTC)(link)
I have been directed to skip lunch. Yay, the decision has been made!

[identity profile] cjsmith.livejournal.com 2007-10-02 09:41 pm (UTC)(link)
I bet the combination of "invite one more" (before being given a restaurant) followed by "skip lunch" is a popular one!

[identity profile] just-cyd.livejournal.com 2007-10-02 10:24 pm (UTC)(link)
well, it's a darn good thing that you're not such a computer geek type person!

*off to spin the wheel myself* YAY! i got Waffle House!

[identity profile] cjsmith.livejournal.com 2007-10-02 11:23 pm (UTC)(link)
Aw man, I never get Waffle House! My zip code is defective.

[identity profile] just-cyd.livejournal.com 2007-10-03 01:39 am (UTC)(link)
i refrained from ever saying "move to ohio!" when you were feeling out places to move to, knowing that we don't fit a lot of your main criteria. however, i'd like to amend that and say "Move to Ohio!! we have Waffle House!!" ;-)

sadly, there are only about four other choices on my Wheel of Food, and not very veg-friendly choices. but i'm having fun spinning the wheel and cheering it on.

[identity profile] cjsmith.livejournal.com 2007-10-03 04:28 pm (UTC)(link)
Waffle House is worth a road trip every so often. We even did that once. Phoenix, Arizona has the closest one.

[identity profile] lrc.livejournal.com 2007-10-02 11:01 pm (UTC)(link)
It's too bad that you don't have such a script.

It's really too bad that that script isn't someplace that people could get a copy.

[identity profile] cjsmith.livejournal.com 2007-10-02 11:22 pm (UTC)(link)
Yeah, it sure is. It's a darn shame the script doesn't look anything like this. (Check out the /bin/date args available on your OS.)


#!/bin/csh -f

######################################
# Enumerate the potential food choices
######################################

echo "Amarin Thai on Castro" >> /tmp/cj.food.txt
echo "Amici's Pizza on Castro" >> /tmp/cj.food.txt
echo "Armadillo Willy's" >> /tmp/cj.food.txt


##########################################
# Pick a random number, spit out that line
##########################################

# Replace "%s" with %N" on RHEL3 machines.
# %s is seconds since the epoch; %N is nanoseconds and makes a better
# randomizer. (However, it seems always to report an even microsecond.)

# setenv OSVER `head -1 /etc/redhat-release | cut -d ' ' -f 5`
# echo $OSVER

# if ($OSVER == "WS") then
setenv RANDOM_NUM `/bin/date +%N`
setenv RANDOM_NUM `expr $RANDOM_NUM / 1000`
# else setenv RANDOM_NUM `/bin/date +%s`
# endif
# echo $RANDOM_NUM

setenv NUM_LINES `cat /tmp/cj.food.txt | wc -l`
setenv PICK_LINE `expr $RANDOM_NUM % $NUM_LINES`
setenv PICK_LINE `expr $PICK_LINE + 1`
# echo $PICK_LINE

head -n $PICK_LINE /tmp/cj.food.txt | tail -n 1


rm /tmp/cj.food.txt

[identity profile] hitchhiker.livejournal.com 2007-10-03 11:37 pm (UTC)(link)
now you're just trying to get us hot :)

[identity profile] cjsmith.livejournal.com 2007-10-04 12:06 am (UTC)(link)
I admit it would work on me too -- mainly because there are comments in it. Anyone who writes comments gets a thumbs up from me. Years of being a contractor will do that to a person. :-)

[identity profile] hitchhiker.livejournal.com 2007-10-04 12:11 am (UTC)(link)
*makes a mental note to write more comments* :)

[identity profile] cjsmith.livejournal.com 2007-10-04 12:22 am (UTC)(link)
Now THAT'S geek flirting! ;-) ;-)

[identity profile] hitchhiker.livejournal.com 2007-10-04 12:24 am (UTC)(link)
ideally, geek flirting would have used /* rather than * :)

[identity profile] cjsmith.livejournal.com 2007-10-04 12:54 am (UTC)(link)
or # or // or even ;

:-)

[identity profile] hitchhiker.livejournal.com 2007-10-04 12:59 am (UTC)(link)
# no comment :)

[identity profile] klwalton.livejournal.com 2007-10-02 11:30 pm (UTC)(link)
Heh. It wants me to go to a restaurant that closed about a year ago :).

It has some great restaurants for my zip code, however.

(You *GEEK*!)

[identity profile] cjsmith.livejournal.com 2007-10-02 11:55 pm (UTC)(link)
Yeah, there are some slight problems. The display gets weird if you want something unusual, too (try 94087 dinner or 94087 saravana, and yeah, they misspelled saravanaa).

No, wait, see, I'd be a geek if I had that script. ;)

[identity profile] psi-star-psi.livejournal.com 2007-10-03 05:33 am (UTC)(link)
If you had such a script, then this icon would be appropriate. But since you don't, it's wholly out of place.

[identity profile] cjsmith.livejournal.com 2007-10-03 04:26 pm (UTC)(link)
What is it about geeks and inability to decide where to have lunch? At my previous company we all used to stand around muttering "I don't know, where do YOU want to eat?" for about ten minutes, which is how long it took us to default to Thai Spoons yet again.

[identity profile] psi-star-psi.livejournal.com 2007-10-03 08:10 pm (UTC)(link)
Back in college, after Star Trek ended on Sunday afternoons, a group of 8-16 people would form up to try and figure out where to go to dinner. I know you can imagine exactly how well that went. Vegetarians, limited drivers, blah, blah, blah.

When I first encountered "Pizza Dictator" with the Frisch gaming group, I thought it was the most brilliant application of game theory I'd ever seen. If you are not familiar with this algorithm, maybe we can get [livejournal.com profile] joedecker to explain it. He has more experience with it than I do.

[identity profile] cjsmith.livejournal.com 2007-10-03 08:32 pm (UTC)(link)
If it's the algorithm Joe once explained to me, I love it. Could really suck for one vegetarian in a group of ten carnivores, but otherwise, it's fabulous!

[identity profile] mbumby.livejournal.com 2007-10-03 03:52 pm (UTC)(link)
Heh. I worked on an excel macro (I needed to do that at work, so I was learning) driven off of a front page with restaurant names and weightings a while ago, but I figured I needed the weightings (so that the really expensive ones would show up less often, as well as the ones that I'm in the mood for less) but I got disgusted at my inability to figure out reasonable weightings and don't know what happened to that project.

[identity profile] cjsmith.livejournal.com 2007-10-03 04:25 pm (UTC)(link)
I came up with a very simple weighting system for the shellscript I, uh, certainly would never spend work time fooling with. Nearby, cheap restaurants can be listed multiple times, while farther away and expensive ones get listed only once. Then the "random" pick can choose some places more often.

piet hein on randomised decisions

[identity profile] hitchhiker.livejournal.com 2007-10-03 11:39 pm (UTC)(link)
A PSYCHOLOGICAL TIP

Whenever you're called on to make up your mind,
and you're hampered by not having any,
the best way to solve the dilemma, you'll find,
is simply by spinning a penny.
No -- not so that chance shall decide the affair
while you're passively standing there moping;
but the moment the penny is up in the air,
you suddenly know what you're hoping.

-- Piet Hein

Re: piet hein on randomised decisions

[identity profile] cjsmith.livejournal.com 2007-10-04 12:06 am (UTC)(link)
[livejournal.com profile] lkeele does this too, but I hadn't heard the Piet Hein bit!

Whenever you're called on to make up your mind,
and you're hampered by not having any,


That's definitely my usual problem. By the time I need food I don't have a mind at all.

Re: piet hein on randomised decisions

[identity profile] lkeele.livejournal.com 2007-10-04 02:29 pm (UTC)(link)
It is quite possible that I came by this particular decision procedure through the poem, and quite probable that I first came by the poem thanks to [livejournal.com profile] hitchhiker's lovely poetry list.

Now that I've incorporated the decision procedure into my daily life, it's about time I memorized the poem.

[identity profile] lkeele.livejournal.com 2007-10-04 02:21 pm (UTC)(link)
Fun. Now what I need is a wheel that has a list of the ingredients I already have in my refrigerator, and tells me what to make out of them, especially since I ate out at restaurants three times yesterday, and I'm in quite a hobbit-hole mood today.

[identity profile] cjsmith.livejournal.com 2007-10-04 03:17 pm (UTC)(link)
There IS a web site like that, but I can't for the life of me remember what it's called. You type in a pile of ingredients and it comes up with what you can make from them - usually fritatta :)

[identity profile] cjsmith.livejournal.com 2007-10-12 06:27 pm (UTC)(link)
Now what I need is a wheel that has a list of the ingredients I already have in my refrigerator, and tells me what to make out of them

Found it!!

http://www.cookingbynumbers.com/frames.html