NHacker Next
login
▲Dicing an Onion, the Mathematically Optimal Waypudding.cool
272 points by surprisetalk 19 hours ago | 94 comments
Loading comments...
1a527dd5 17 hours ago [-]
This is fun!

I really struggled to effectively cut onions until this: https://www.youtube.com/watch?v=CwRttSfnfcc

Haven't looked back since.

tptacek 15 hours ago [-]
Hopefully you're not bothering to core the top and the bottom of the onion; fussy, a waste of time, and works against his later goal of keeping the root intact while dicing.
rjh29 1 hours ago [-]
Yeah you know better than a classically trained French chef. LOL. Do you think he never considered that?
finebalance 15 hours ago [-]
I do it more or less this way - except I keep the root intact until the end. It keeps the onion structurally intact until I'm done with the dicing. At which point, the root takes a single chop to lop off, and then the whole thing scatters into tiny, mostly uniform dices. It's quite satisfying.
fifilura 14 hours ago [-]
I also keep the root. But I am on the radial team!
haunter 2 hours ago [-]
Ah the famous oñyo video
ndr42 10 hours ago [-]
Sorry, but I had to link to this video as you said "effectively": https://www.youtube.com/watch?v=eQgIwwKmjdo
p1dda 5 hours ago [-]
Chef Jean Pierre is the best, he explains so good that I really need to listen once to remember forever. Before discovering him, I wasn't interested in cooking at all and I listened to all the other chefs like Ramsay and Oliver but they don't tell you the complete story.
dyauspitr 9 hours ago [-]
This is silly. I’ve seen Indian street vendors do it the most efficient way. You tilt the knife with the front part down and the back maybe a quarter inch above the surface. That way as you slice the onion the little quarter inch holds it together as you turn it 90 degrees and make the perpendicular set of cuts.
reddit_clone 2 hours ago [-]
Yep. I arrived at the same solution after trial and error.
morninglight 16 hours ago [-]
That may be the most useful thing I've seen on the internet in months.

Thanks much!

re 17 hours ago [-]
> It turns out that making horizontal cuts almost never helps with consistency.

They made the horizontal cuts evenly spaced between the cutting surface and the top of the onion, which is nonsensical to me. I believe that a single horizontal cut at around 15-20% height would be better for uniformity than a horizontal cut at 50% height.

wkcheng 12 hours ago [-]
Yeah, that's the way that I cut onions: you make vertical cuts followed by one single horizontal cut slightly above the cutting board.

This way of calculating doesn't take into account the creative ways you can make cuts. You could also do mostly vertical slices, and then slightly angle inwards when you do the final few cuts. That would get you a more optimal distribution as well.

jillesvangurp 2 hours ago [-]
A lot of people insist that this is the way. However, at some point, I figured out that making the horizontal cut (or cuts) before you make vertical cuts is a lot easier. You can do it by simply putting the onion with the root on the board and cutting down at an angle of about 5-10 degrees. When the tip of the knife hits the board, simply don't press down all the way to keep the root intact. Then put it down normally and make the vertical cuts. You can easily manage 3 or 4 horizontal cuts this way. And there's no awkward cutting towards yourself with a sharp knife. All this business of first making lots of vertical cuts and then attempting a horizontal cut is a lot more fiddly. The vertical cuts affect the structural integrity of the onion. This makes the horizontal cuts harder. And it also makes the process of dicing harder.

Of course, as the article points out, the horizontal cuts don't really do much that a chef should care about. You can dice an onion super fine with just vertical cuts very close together. And it's a lot faster and easier. You might angle some of the cuts towards the edges. But honestly, even that is unnecessary and a bit overkill. With a good knife, you can put the vertical cuts really close together. So close that any kind of angle would mean the cuts cross each other. Once you are that close, a horizontal cut really does not matter. And if you do a rough cut, the size matters even less.

If you are interested in this topic, there's a French chef on Youtube called Jean Pierre who is full of practical wisdom and techniques. You can learn a lot from him. And he's highly entertaining to watch too. He's very opinionated on onions. Or Onyo as he pronounces it. You won't see him making horizontal cuts, ever.

jaxn 14 hours ago [-]
Which is exactly how I was taught to do it while working in kitchens 25 years ago.

The other thing is that this seems to ignore that the onion is round in the other direction too. As far as I can see, it only covers the first dice cut.

dcrazy 14 hours ago [-]
The planar cuts just determine the thickness of the dice. You just want to make them equal to the thickness of the rings.
indy 16 hours ago [-]
Yes! They had all those visualisations and you could see the problem areas from vertical slicing were at the bottom of the onion, a couple of horizontal slices down there would have given the best solution.
9 hours ago [-]
ethan_smith 2 hours ago [-]
A single low horizontal cut (15-20% from bottom) specifically targets the elongated base pieces - this would likely outperform the evenly-spaced horizontal cuts they tested while remaining practical for home cooks.
glitchc 4 hours ago [-]
The most uniform pieces come from this onion dicer: https://latacocarts.com/products/onion-dicer

I used to work in fast food and this bad boy has a rate of 0.5 onions/sec and all of the resulting pieces are perfectly uniform squares. If you've ever wondered where the perfectly diced onions garnishing your burger came from, this is it.

It was a pain to clean though, as the blades were exceedingly sharp. Someone would cut their fingers about once a week on those things.

0xDEAFBEAD 6 minutes ago [-]
Not dishwasher safe?
tetha 14 hours ago [-]
But is uniformitiy the goal?

If you want diced onions, the cook generally wants onion chunks below a certain cubic mass, so they cook and dissolve easily and uniformly. It does not matter if some pieces are 50% of that size, some are 20% and some are 80%.

With that, 1-2 horizontal slices and a bunch of straight downward slices are the safest and easiest way to achieve that.

That technique also expands to onion rings, sauteed onions and such.

jmrm 35 minutes ago [-]
IMHO yes. Sometimes if the deviation is too big yo can get coocked, overcooked, and mostly raw pieces in the same pan, and that's heavily undesirable.
sdwr 14 hours ago [-]
Yeah, measuring standard deviation from the average isn't an accurate way of scoring - "too big" pieces are worse than "too small"
9 hours ago [-]
throwawayffffas 11 hours ago [-]
Uniformity matters for even cooking.

If some pieces are twice the size of your average size, these pieces will be raw, when the others are done.

And if you have some pieces that are half the size of the average they will burn by the time the rest are done.

shakna 9 hours ago [-]
But you don't want an even flavour profile. You do want things cooked, but not perfectly the same as each other.
zdragnar 7 hours ago [-]
That depends entirely on what you're using them for. In most cases, consistency and control go hand in hand.
feoren 17 hours ago [-]
This ignores the obvious solution of not cutting all the way through. If every other radial cut is only through half the layers, you avoid making the inner pieces too small. It's funny how common it is for people to claim some sort of optimality with lots of math and analysis while completely failing to consider a better possibility. Never take seriously claims that someone found a "mathematically optimal" way of doing something. They didn't.
dcrazy 14 hours ago [-]
I’m not going to try to make consistent partial cuts down through an onion. I’m going through to the cutting board every time.
zeroonetwothree 16 hours ago [-]
Standard deviation is a poor measure because you care more about avoiding big pieces than small ones. Penalizing for having a few tiny pieces doesn’t make sense.
yunwal 13 hours ago [-]
You probably don’t even care about the “standard” deviation at all. You care about the deviation from some desired size. Probably the more accurate problem is “what is the fewest number of straight cuts I can make such that all pieces are below some target size”.
crazygringo 15 hours ago [-]
Thank you, this exactly! Seems like you want to reduce the standard deviation only considering pieces that are larger than the mean, but still relative to the mean. Would be very curious to see the results redone using that approach.
DamnInteresting 4 hours ago [-]
It's a fun intellectual puzzle, but I find it questionable that onion dice uniformity is always a worthwhile goal. Sure, it ensures more even cooking, but in most dishes, is that desirable? Texture and contrast are nice.
tptacek 14 hours ago [-]
It's funny seeing people dunking on taking this much effort to analyze onion cuts. The rewards for improving your onion dice are indeed probably low. But in mainstream western cooking, you need to do it almost every meal, and the analysis/learning is a one-time cost rather than a cost applied at every prep. Seems like an extremely reasonable thing to noodle on!
dfxm12 13 hours ago [-]
People are dunking on the fact that "mathematically optimal" is meaningless in this situation.

Even Lopez-Alt suggests, "It matters far more for winning internet debates and solving interesting math problems than it does for cooking."

tptacek 12 hours ago [-]
The mathematical verification doesn't matter, but:

* Radial is more convenient than the classic horizontal cut.

* Radial with an origin below the cutting board is a better outcome than naive radial with almost zero extra effort.

All this to say: it was worth figuring that out!

2 hours ago [-]
altairprime 17 hours ago [-]
To translate the final answer from math to human (as I’m going to be explaining this to my mother when I chat with her next!):

Imagine the half onion is a half rainbow. You know there’s another half rainbow lurking below the surface, the onion’s ghost of the sphere it once was. Place your knife as usual for each of your ten dice cuts, but instead of cutting straight down towards the cutting board, angle it slightly inward towards the end of the onion’s ghostly half-rainbow sphere below the board. Check your fingers for safety and then make your cut. Assuming your knife isn’t a plasma cutter, you’ll be stopped at the cutting board without ever reaching the onion at the end of the rainbow, and that’s cool. Set your knife at the next dice point and try again :)

(This still improves on the other dicing cases and only costs 1% uniformity by using 100% radius as the target.)

fnord77 17 hours ago [-]
> Place your knife as usual for each of your ten dice cuts,

what does this mean, exactly? I don't cut onions. Also I assume there is some pre-step where you cut the onion in half on some axis, but I don't know which.

altairprime 16 hours ago [-]
If you inspect the onion diagrams in the article carefully, they show various ways to cut an onion, as if origami diagrams but with knives. Still, I think you’ll want to learn the traditional methods of dicing an onion independently first, and then with that knowledge revisit this article and my description; this is last-10% optimization work that hinges on knowing that first-90% of how to dice an onion at all.
zeroonetwothree 16 hours ago [-]
If you don’t cut onions you probably shouldn’t bother with this thread. Or at least watch a video
fnord77 2 hours ago [-]
gate keeping onion cutting? really?
1970-01-01 16 hours ago [-]
Someone, somewhere, will now spend time growing square onions to fix the problem. Probably someone in Japan.

https://en.wikipedia.org/wiki/Square_watermelon

ginko 16 hours ago [-]
Better yet onions that grow in large flat sheets.
NKosmatos 15 hours ago [-]
For sure this research can be nominated for an Ig Nobel Prize :-)

On a more serious note, thanks for posting this and letting me (us?) know about "The Pudding".

buildsjets 13 hours ago [-]
I make fresh Pico de Gallo twice a week so I chop a lot of onions. Besides an even dice, I’m interested in not dicing my fingertips. Radial slicing a 180 segment or adding horizontal slices is too unstable.

My method is to cut in quarters, give a quarter a vertical dice, rotate 90, do another vertical dice, then go longitudinal.

motbus3 13 hours ago [-]
This remembers I have a challenge to figure out with some friends.

How to split a round cheese in in 5 perfectly without using any tools except the knife.

Assume you have the ability to cut in half perfectly always

Assume that if you can slice it in 10 equals pieces it is also a valid solution because you can just give two pieces for each

mtklein 12 hours ago [-]
Okay, I'll bite: 2 and 5 are prime, this is the perfect fifth problem, only approximate solutions are possible. Make me wrong!
bravesoul2 11 hours ago [-]
Cut into 8. Give 1 piece each.

For the remaining 3, repeat this method.

Let epsilon be a number as small as you like...

aidenn0 11 hours ago [-]
Measure how many widths of the knife divide the circumference of the cheese. Divide by 5 and make a radial cut at each division.
saagarjha 11 hours ago [-]
What I want is a cutting technique that’s good enough while still being practical for people to do. I am not sure I’m dexterous enough to slightly and consistently tilt the knife as I go through the onion.
uncletaco 11 hours ago [-]
Sure.

First its feet, then its head then split its belly 'til its dead.

wahern 4 hours ago [-]
Is that a regional adage?
hashmap 17 hours ago [-]
I dislike easily 90%+ of the images I recognize as AI-generated, but the ones on this internet web site I think are a good use of the tech.
russsamora 16 hours ago [-]
There was no AI used on this website!
15 hours ago [-]
ctenb 13 hours ago [-]
Source?
masfuerte 13 hours ago [-]
He's one of the three named authors on the article. I'd be interested to know how the onion text was made.
re 13 hours ago [-]
Looks like the font predates this article:

https://handmadefont.com/shop/oniotype-font/

https://kottke.org/25/08/the-red-onion-font

bowsamic 4 hours ago [-]
The M in that font is not really suitable for professional use
jader201 17 hours ago [-]
Why limit it to just two horizontal cuts?

I’ve always just made equal horizontal and vertical cuts, then slice the onion crosswise.

This results in pretty much no large pieces, and only some smaller pieces (which I prefer over larger ones, anyway).

I don’t care about standard deviation — I only care about minimizing the maximum size (but still without turning them to mush).

(Also, I know this was more of a fun mathematical look at chopping onions vs. practical. But still the “two horizontal cuts” thing seemed to be practical guidance, when it seemed like just equal horizontal and vertical cuts is far superior. But, granted, it’s a little trickier to do.)

EDIT: looking at Youtube, looks like the 2-cut thing is normal. But adding a few more cuts isn’t that much harder, and eliminates the larger pieces from the 2-cut method. I’ll stick to my method, even if it’s a little more work.

otherme123 16 hours ago [-]
Horizontal cuts does next to nothing, the onion is already "cut" horizontally.

In my experience it does worse, as the onion gets unstable to do the vertical cuts.

jader201 12 hours ago [-]
I mean, it’s also cut vertically — except for the adjacent edges (true for both horizontal and vertical, since it’s a sphere).
pinko 17 hours ago [-]
The post's dataviz in fact allows you vary the # of horizontal cuts and compare the results. Take a look.
jader201 17 hours ago [-]
Right, but horizontal is limited to two, best I can tell. No?
fumeux_fume 11 hours ago [-]
So using some complicated angle gets you 4% less std dev than just doing it the easy way that everone already does it. Ok.
gndp 15 hours ago [-]
Lol love the extent of clarity of the experiment, findings and interface. I think that for practical purposes, it would be better if the std-dev of pieces with size above a certain threshold is observed. From my experience, pieces above a certain size cause inconsistency in cooked onions. But maybe it depends on the recipe.
mafuku 13 hours ago [-]
The authors rightly point out how the pieces near the bottom get elongated in a vertical cut, but don't realize that the whole point of the horizontal cut is to cut those elongated pieces in half. It's not meant to be a cut halfway up the onion.
thunderbong 17 hours ago [-]
Posted less than a day ago (8 points, 2 comments) -

https://news.ycombinator.com/item?id=44894302

locallost 3 hours ago [-]
I agree with the conclusion - it doesn't matter.
criley2 17 hours ago [-]
Enjoyed reading this. I've followed J Kenji Lopez-alt for a while and I've practiced the "aim below" method for a few years now.

I also like that the article ends with the perfect Kenji-ism. "Yes, technically my method is statistically ideal, but like, it's home cooking and it doesn't matter, heterogenity isn't the enemy". Reminds me of Adam Ragusea (https://www.youtube.com/watch?v=5cWRCldqrxM), we're not making fancy french cuisine, we don't need a perfect brunoise!

burnt-resistor 8 hours ago [-]
While math may offer "optimal" theoretical options, reality is messier. Likely the most efficient for humans and simpler technique to dice onions is the street food vendor way:

https://youtu.be/qDFc-5Zc3HU

https://youtu.be/LOqwl2KTzd4

fuzzfactor 14 hours ago [-]
I figure since it's only an onion I'm glad that that mathematical optimization is not really necessary.

After all there are many more approaches that can be more mathematically rewarding, might as well enjoy it when you can ;)

16 hours ago [-]
Theodores 17 hours ago [-]
Once upon a time, my father, who could not cook, harshly criticised my onion chopping technique. This knocked my confidence in the kitchen quite a bit. I refused to learn the fancy techniques of the TV gameshow celebrity chef that my dad was enamoured with.

In my opinion, so long as you are chopping onions, all is well. Sure it could be dangerous, with fingers and egos at stake, but far worse is to not be chopping onions as that means ready meals, take out meals and having a poorer diet.

fnord77 17 hours ago [-]
From their 2-d diagram, I'm having a hard time understanding what they mean by "vertical cuts" and "radial cuts"
immibis 17 hours ago [-]
Vertical cuts go up and down. Radial cuts go towards a point. But you make a valid point that this 2D diagram doesn't tell the full story, unless your onions are cylindrical, which they're not.
pfdietz 19 hours ago [-]
Throws it in the food processor.
webstrand 16 hours ago [-]
Now you have to clean the food processor. Which is enough of a trouble to prevent me from using it very frequently.
pfdietz 16 hours ago [-]
Remove from the motor/base, separate parts, spray with water and toss in the dishwasher. And wouldn't you have to clean the cutting board and knife anyway?

The most important part: much less eye watering.

crazygringo 15 hours ago [-]
> Remove from the motor/base, separate parts, spray with water

And then do in reverse once it's clean. And you're wondering why it seems like too much trouble...?

Plus you still need the knife and cutting board anyways to chop off the ends of the onion before peeling it. So it's not even instead of, it's in addition to.

Much less time to dice it yourself for one or two onions. Ten or twenty onions, OK it's food processor time.

pfdietz 15 hours ago [-]
Reassembling a food processor takes mere seconds.

Overall, doing all this is much more convenient than manually chopping onions. It's not even close. This is one of the ideal use cases for a food processor.

crazygringo 12 hours ago [-]
Maybe you're really slow at chopping onions? It takes like 15 seconds to dice an onion once it's peeled. Taking out, disassembling, rinsing, racking, unracking, reassembling, and putting away a food processor takes much much longer, any way you slice it. You're right, it's not even close -- manual dicing is always going to win for just a couple onions, unless you're already using the food processor for something else.
pfdietz 12 hours ago [-]
Maybe you're a masochist and like the sulfuric acid in your eyes?

https://en.wikipedia.org/wiki/Syn-Propanethial-S-oxide

crazygringo 12 hours ago [-]
Or maybe it's not a big deal for just a couple of onions?

If it's really bothering you, make sure your knife is sharp enough. A dull knife makes dicing much slower and releases many, many more compounds.

goopypoop 7 hours ago [-]
Let it spit in your eye, for it is doomed. Soon you will consume its essence and that is Good.
webstrand 12 hours ago [-]
That works for the housing, but not for the blade which usually gets food jammed up in every little crevasse. You can't stick those in the dishwasher because it'll dull the cutting edges. Washing the knife and board is trivial by comparison.

But I don't really have trouble with my eyes with onions, that may be the deciding factor.

bigstrat2003 10 hours ago [-]
> You can't stick those in the dishwasher

I stick my food processor blades in the dishwasher all the time; never hurt them any.

pfdietz 12 hours ago [-]
Of course you can stick the blade in the dishwasher. It works fine. What do think the dishwasher is doing, sandblasting?
kazinator 12 hours ago [-]
Some substances in the dishwasher detergent are bad for steel, like sodium silicate.
dcrazy 11 hours ago [-]
Throw your knives in the dishwasher and they’ll dull right quick.
maxerickson 10 hours ago [-]
Food processor blades are usually stainless steel, which is a lot less sensitive to the dishwasher.
SoftTalker 17 hours ago [-]
Nice if you want onion mush.
criley2 17 hours ago [-]
A few quick pulses doesn't make mush and is fine for a lot of applications. Otherwise, food processors have dicing kits https://i.imgur.com/cXbZ9aC.png

I enjoy the art of prep with my beautiful wa gyuto, I truly do. But if you put a 5 pound bag of large onion on front of me to dice, I will prefer the machine...

dcrazy 11 hours ago [-]
Yes, there is an inconvenience threshold that must be reached before bringing out the food processor. We also have a mandolin that can make cross-cuts for intermediate jobs: https://a.co/d/da8OxnE
tptacek 15 hours ago [-]
The metric being optimized here is uniformity of cut.
footlong2 10 hours ago [-]
[dead]
footlong2 17 hours ago [-]
[dead]
sram1337 17 hours ago [-]
In my opinion there is no such thing as too much dork time. This post is fun, just like cooking. The onion-inspired font for the section titles is fun. The interactive graphs are fun. Also vibe coding is fun.

What was the point of this judgmental comment?

russsamora 16 hours ago [-]
No vibes were coded in the making of this website