
Show HN: Cookie Recipe Generator - dazsnow
https://thecookie.website/
======
azhenley
This is absolutely awesome and potentially very useful.

I know the other commenters are giving you plenty of TODOs, but what I think
could make this shine: explanations (like a ? by each dial) that give some
details by the property (what is smooth vs craggy?) and how extreme the
spectrum goes (is extremely soft just warmed cookie dough?). Photo examples
could help too!

Also, generating a deterministic name based on the inputs could help people
share or differentiate recipes, more so than by unlabeled values.

Fun project, good job.

~~~
jonplackett
What I thought you were going to say was an explanation of how each ingredient
affects the characteristics of the cookie.

Eg you could have the nice deterministic name like you say, but also something
like “with high flour to sugar ratio for softness” or whatever the actual
truth of the matter is

------
the_pwner224
It would be nice if you could create a sharable link to share your specific
recipe. You could encode it in the URL like
thecookie.website/?q=20&lightness=80&chewiness=80&... - or use a reversible
hash type function to get thecookie.website/2fa389dc. Then add a button to
show the link & copy it to the clipboard, and maybe also make the URL change
when dragging the sliders.

~~~
baddox
I did something similar with a recent useless Saturday toy project, if the
source code helps anyone.

[https://17dollarphone.com/](https://17dollarphone.com/)

[https://github.com/baddox/17dollarphone](https://github.com/baddox/17dollarphone)

~~~
captbaritone
I clicked through to your site and played with it a bit. Nice idea, and well
executed! Then I hit back to come back to HN... seventeen clicks later, I’m
back. Might be nice to update the URL without adding a history entry.

~~~
baddox
Ha yeah, very good point. I thought it was neat to have the entire state of
the app in the URL and use the back button to demonstrate that, but yes, I
should probably be replacing history instead of pushing.

~~~
smichel17
Suggestion: Push once after every complete phone, but replace after an
intermediate state. That way the back button goes through a list of complete
combinations you tried, without forcing you to walk back individual steps.

------
dazsnow
This was a Covid-19 side project to learn Svelte and Sapper.

Customize exactly how you want your cookies to turn out and it will generate
the perfect recipe for your perfect cookie. Would really like everyone's
feedback!

~~~
jonplackett
How did you work our all these different potential recipes and what their
characteristics would be?

~~~
js2
This excellent article explains how varying ingredients affects the outcome of
the baked cookie:

[https://sweets.seriouseats.com/2013/12/the-food-lab-the-
best...](https://sweets.seriouseats.com/2013/12/the-food-lab-the-best-
chocolate-chip-cookies.html)

~~~
jonplackett
That’s a lot of information to incorporate though. Well done!

------
maddyboo
You should offer an enterprise plan which increases the limit on the number of
cookies beyond 1000.

------
dazsnow
Added a switch for American units

~~~
klyrs
Thanks! I'm curious what the role of white vs brown sugar is in your model.
Personally I've taken to using brown sugar in place of white because I like
the molasses flavor better...

~~~
dazsnow
The type of sugar actually has quite an impact, other than just the color and
flavor. Brown sugar results in taller and softer cookies because it's slightly
acidic and so reacts with the baking soda. White sugar causes cookies to
spread more and become crunchier.

------
mabcat
Results of our User Acceptance Testing:
[https://imgur.com/Iwjwik2](https://imgur.com/Iwjwik2)

Some errors in the testing framework were identified and will be rectified in
subsequent test suite runs

------
thepratt
It's great that mostly everything is in grams, baking should be precise. It's
hard when you read a recipie that uses cups without knowing the origin, as US
vs not cups are different sizes (200mL vs 250mL). It would be nice if all
measurements were in grams, baking soda and water included.

------
ksaj
I like how it's really only one kind of cookie, but you can dial up/down
various facets of what it means to be a cookie, resulting in completely
different treats.

One would probably learn a lot about cookie baking by dialing up variations
and trying them each out.

BTW: you get really fun results when trying to make 1 cookie. I'm not sure I
have a teaspoon small enough for that.

~~~
dazsnow
yeah... try measuring out a tiny fraction of an egg... not easy. When I was
experimenting with small batches I used a syringe to measure out small amounts
of beaten egg!

~~~
mantap
It's probably easier and less messy to measure the egg by weight, that's how
pastry chefs do it. Apparently eggs are pretty close to water in density so
the conversion should be trivial.

~~~
kinghtown
One egg is about 50g plus or minus. If a recipe calls for one egg to make 12
cookies then some basic algebra can get you to a single cookie.

The real problem with testing a single cookie is creaming a tiny amount of
sugar and butter. Even if your ratios are accurate the preparation will be
somewhat different and texture will be affected. But small batch testing is
the way to go to dial in ingredients for ideal cost and flavour.

~~~
ci5er
Where do you live that there is one standard egg size? At the very small
market down the street from me, I count 3~5 sizes in their various packages
(depending on how picky you want to be about "same size")

~~~
nkrisc
You just weigh the egg you're going to use.

~~~
ci5er
Does everyone have a scale? I'm starting to think I should do more drugs...

~~~
nkrisc
If you do any amount of cooking I find that a kitchen scale is worth far more
than the little space it takes up.

~~~
ci5er
You don't know my apartment kitchen (which is the primary reason I am looking
to move)

------
thih9
Feature request: I'd love to see it work both ways, i.e. change the amount of
an ingredient and see how it affects the end result.

~~~
dolmen
Use cases: \- missing ingredients \- want low sugar

------
xori
I love it, I'm making cookies tonight. Some humble suggestions.

\- might be best to include the C as units for temp

\- somehow allow scaling recipe to whatever my eggs actually weigh, (I know I
can estimate manually bumping the output up and down, but it'd be nice to do
exact calculations)

\- generate cookie previews :P

------
surround
I’m surprised to learn how much effort it takes to make good cookies. One of
my selections on this website required a preparation time of two and a half
hours. I’ve always just thrown ingredients into a mixing bowl.

~~~
kijin
The prep time doesn't make sense. 30 minutes in the refrigerator and 10-15
minutes in the oven are totally understandable, but none of the other steps
would take 1.5 hours combined. Maybe the website just assigns a minute value
to each task and adds them all up, which is not realistic.

Recipes written by experienced cooks often parallelize 2-3 tasks. For example,
you can preheat the oven while boiling the pasta while you're making the
sauce. This not only saves time but is actually essential to the recipe. If
you try to execute all three tasks in serial, either the pasta or the sauce
will be in a less than ideal condition.

------
ars
Interesting combination of metric and imperial :)

Weights and lengths in metric, volumes and temperatures in imperial (or US
customary, I can't tell which).

And time in Babylonian.

Edit: Actually I can't tell if temperature is F or C.

------
devwastaken
Where does the recipe come from? The 150-160f bake temperature seems wrong,
eggs have to be internal temp of about 160 themselves, does that 12 minutes
fully heat saturate it?

I'm going to try baking these tomorrow, would be cool if cup-measiremrnts
mattered more than how many cookies come out. That way I don't have to do all
the calculation and figure out the exact number of cookies Id need to get nice
rounded numbers.

~~~
ethhics
Given the measurements in grams, I’d assume the temperature is Celsius.

~~~
ars
I wouldn't. One recipe has a temperature of 250 which seems pretty hot if it's
C. Also they are using teaspoons.

But 160 is way low if it's F, so ????

I think the creator needs to step in and let us know LOL

~~~
dazsnow
All units are in standard metric units because it's more precise / easier to
measure / more useful for the majority of people. I'll consider adding a
toggle for American units later. 250 is indeed very hot, but sometimes that
might the kind of temperature you need - it's the upper limit of most domestic
ovens. Some measurements are in teaspoons just because that's what most of the
recipes I was basing this on were using, and precision isn't really so
important for those ingredients, but yeah, the inconsistency is annoying. Will
consider changing that to grams later.

~~~
kijin
A short time at 250C will make for extra crispy cookies, but the dough will
have to be thin or the outside will be charred black before the inside is
cooked. It takes trial and error to find the right balance. :)

A metric teaspoon is 5ml and a metric tablespoon is 15ml. They're perfectly
acceptable units, not to mention convenient. Would you rather use 1/2 teaspoon
of baking soda or measure 2.5 grams on a kitchen scale? I live in a fully
metric country but whenever I need to use a recipe written in grams, I
immediately convert them to ts/TS/cups and never look at the gram figure
again.

~~~
fault_lines
I would rather measure 2.5 grams on the scale I'm already using, it's far
easier. Volumetric measurements should only be used for liquids.

~~~
thepratt
I go even further and use no volumetric measures. So grams for water, milk,
etc. Having to read off the scale I can assure I have 500g water and not 520mL
b/c I read the meniscus wrong.

I'll still convert for other recipies, water being the easiest to convert as
1mL should be 1g.

The grams for everything is a habit I've picked up from reading a lot of
modernist recipes.

------
js2
It seems like a lot of commenters here may have missed the fact that the site
is based on this Serious Eats article:

[https://sweets.seriouseats.com/2013/12/the-food-lab-the-
best...](https://sweets.seriouseats.com/2013/12/the-food-lab-the-best-
chocolate-chip-cookies.html)

------
cbsks
Hmmm... for some reason when I move a slider sometimes other ones will move.
Is that expected? I’m on iOS Safari.

~~~
dazsnow
Yeah it's a bit janky right now... it's because some properties change
ingredients which impact other properties... for example if you want a lighter
color then the brown/white sugar ratio might change, which also changes the
the texture and thickness.

~~~
jzwinck
I was able to understand this, but then I found that some sliders make other
sliders move farther than necessary. I even found a case where grabbing a
slider to move it but putting it back to the original position before
releasing the mouse button would change other sliders (surely that means
either the original positions were inviable or the changes were unnecessary).

UX wise, it would be far easier to understand if the other sliders responded
instantly so that I could see as I drag one slider how much it impacts the
others, without having to release the mouse at each step to find this out.

------
kennydude
Looks really useful, except for people especially in England, Corn Syrup isn't
a common ingredient :(

~~~
globular-toast
Corn syrup isn't a useful ingredient anyway. It only exists in the US due to
corn subsidies. I would be more concerned about the difference in flour
between UK and US. That would change a "perfect" recipe significantly.

~~~
js2
> Incidentally, if you want the absolute chewiest, most uniformly textured
> cookies, try replacing some of the white sugar with corn syrup, a sugar that
> is even more hygroscopic. Corn syrup is so darn powerful, in fact, that even
> a small amount of it will completely alter the texture of your cookie. In
> the cookies above, the batch on the left was made with 5 ounces each of
> white and brown sugar. The batch on the right was made with 5 ounces of
> brown sugar, 4 ounces of white sugar, and 1 ounce of corn syrup. A
> substitution of only 10%.

[https://sweets.seriouseats.com/2013/12/the-food-lab-the-
best...](https://sweets.seriouseats.com/2013/12/the-food-lab-the-best-
chocolate-chip-cookies.html)

~~~
globular-toast
That sounds like what we would call glucose syrup which is readily available
in Europe. I was thinking of high-fructose corn syrup.

~~~
js2
Yes, that's correct. Granulated sugar (sucrose) is fructose and glucose. Corn
syrup is glucose syrup made from corn. HFCS is made to simulate sucrose by
adding fructose to corn syrup.

In the US we like to market things based on what they don't contain (unsalted
butter, unsmoked provolone, etc), so glucose syrup is sold as as "0g High
Fructose Corn Syrup, aka light corn syrup with _real_ vanilla":

[https://www.karosyrup.com/products.html](https://www.karosyrup.com/products.html)

~~~
globular-toast
HFCS is actually more like invert syrup then, which consists of glucose and
fructose separately, like honey. Sucrose consists of glucose and fructose
chemically bonded together.

------
cbsks
I am definitely going to try this! Is there a link I can save/share with my
exact recipe?

~~~
dazsnow
Not yet, that's on the todo list. It does save any changes to local storage so
when you come back next time it will remember the recipe.

------
readme
I can't find where to pay? I selected all the cookie preferences I wanted. How
do I finish the transaction and get the cookies delivered?

~~~
js2
Ah, that's a different web site:

[https://insomniacookies.com/](https://insomniacookies.com/)

------
rosstex
I _really_ want to know the combinatorics of this.... super cool!

~~~
mellavora
combinatorics gets tricky when values can be continuous ...

~~~
rosstex
Surely this isn't purely continuous... the steps change dramatically from
partial changes to one slider. There must be a number of ranges that define
the steps and continuous values within thoes ranges, no? I want to know the
number of unique sets of steps/ingredients.

------
relbeek2
moved all sliders to the right, now it will take 25 hours to cook, might be a
bug, or maybe its because i like my cookies, dense, chewy, and crunchy

~~~
dazsnow
Probably factoring in 24 hours of refrigeration

------
lifekaizen
love the idea, how many cookies have you done with it? I got `About 25 hours,
32 minutes preparation time`

~~~
zakki
1 cookie with 25H 45M preparation time

------
gitgud
Very cool!

Also, this website would suit GDPR compliance perfectly. You need a popup with
one option:

 _" I'm okay with cookies!"_

~~~
franky47
Interestingly, this website does use cookies (the digital ones) but fails to
report them.

For example, Stripe is loaded early on and uses tracking cookies, which are
not necessary until a visitor decides to donate.

~~~
capableweb
> which are not necessary until a visitor decides to donate

While true and I agree, Stripe argues that their anti-fraud system is helped
if you load the JS code as early as possible, so assuming they are doing bunch
of tracking in order to identify fraud when they finally go to the payment
screen.

~~~
franky47
It may do that, but the fact remains that it uses cookies to do so, which
European users have a right to object to under GDPR.

------
matonias
"Donate $5 for a coffee with my cookie" Since when does coffee cost $5?

~~~
hazbo
[https://www.fastfoodmenuprices.com/starbucks-
prices/](https://www.fastfoodmenuprices.com/starbucks-prices/)

