A favorite local bar called Flatiron has some absolutely wild specials daily, which look quite appeasing. But for years, we’ve been joking that they must be using some random food generator to come up with the recipes, because the combinations are things that most sane people wouldn’t consider. Things like this:
Which sounds completely random, and might be. Either case, sounds completely delicious. We had been joking for ages though, that someone should create a food generator. Which sent me down a rabbit hole. A friend spent some time creating up a list of ingredients, which I used to generate a word list.
I found some great code for a Adlib generator, which is what was the base of the code I used to create our new toy.
When you goto the page, it pulls from the word list we have created, and combines the 5 ingredients into the creation you see above. While my math isn’t the best, I believe there is about 90,000 potential combinations. So the likelihood of 2 people getting the same creation is pretty low.
The actual code itself is pretty simple – there are 5 variables and it picks a random variable from the list. Each one is named: flavor, protein, dish, served, entree. The example above: General Tso is the flavor, Smoked Turkey is the protein, Quesadilla is the dish, Habanero is the served, and Hummus is the entree.
The page pulls from the javascript and displays the output whenever someone visits the URL or clicks the Refresh button. It’s super simple, and was a fun coding exercise! On top of that, the staff loved it so much that they plan on using some of creations from the page one day.
You can either click here or click the Flatiron image above to visit the page. You definitely need to visit Flatiron in East Atlanta Village and try out some of their specials. The food is amazing and it’s a great atmosphere to throw down some beers.