Live data from Hacker News

Software Mise En Place

buttondown.email

51–60 of 85 posts

Re: Software Mise En Place

#51
post #37

Earlier quoted context omitted.

"There's no downtime in cooking" is different from "cooking onions is not downtime". Though you'd still need to clarify "even if stuff is already chopped", I guess.

“Cooking onions is not down time” directly follows from “there’s no downtime in cooking.” If there is no downtime in cooking is true, then *cooking* onions cannot be downtime.

Indeed, and if the GP has said "there's no downtime in cooking", it would have been apt.

"Cooking onions is not downtime" isn't an effective rebuttal of the general point of "I chop things during downtime, for example when cooking onions".

Re: Software Mise En Place

#52

There's one place where the analogy breaks down IMO: In cooking, you usually know the recipe and have experience before preparing it for many people. In programming, you often explore and create, trying out new things that you didn't know before. Mise en place suggests that you know exactly what ingredients and tools you'll need and what to do with them. Perhaps a woodworking workshop is a better analogy for the crea…

I have been cooking for my family for over a decade now, and I can count the number of times I've followed a recipe line for line on one hand, but I always start by setting up my mise en place (onions chopped, garlic smashed, meat/fish marinating, veggies chopped and salted, water boiling).

Mise en place has nothing to do with rigidity, it's the concept of everything in its right place before you start preparing the final assembly of the dish. You can and should practice mise en place when you cook, even if you have no idea what you are making. Preparing food is all about timing and mise en place allows you to focus on the preparation without getting distracted or caught up in chopping onions when your steak is already too done.

Re: Software Mise En Place

#53

Earlier quoted context omitted.

This is the difference between a commercial kitchen and your own kitchen on a normal day. Strict mise en place applies to the former. In a commercial kitchen, you'd better have the peppers (say) chopped and ready so you can use them. Not only for a single serving of one dish, but for all plates you expect to make of any dish with chopped pepper in it. You cannot pipeline chopping the peppers with frying the onions wh…

I would suggest that it's never a good idea to be cooking several dishes at the same time in the world of software. Software and cooking are completely different in terms of the cost of making a mistake. A single bug in production can take more time to find and fix than the work in the first place. I can see that in a commercial kitchen that it makes sense to prepare all the ingredients before because you can do this…

Isn't a bug in production more like food poisoning your customers in this analogy? Both take more work to fix than the effort put in. Where a bug caught by automated tests is more akin to noticing you overcooked the steak before sending it out?

Re: Software Mise En Place

#54
post #13

There's one place where the analogy breaks down IMO: In cooking, you usually know the recipe and have experience before preparing it for many people. In programming, you often explore and create, trying out new things that you didn't know before. Mise en place suggests that you know exactly what ingredients and tools you'll need and what to do with them. Perhaps a woodworking workshop is a better analogy for the crea…

>In cooking, you usually know the recipe and have experience before preparing it for many people. In programming, you often explore and create, trying out new things that you didn't know before. Im pretty sure that experimentation equally well to cooking.

There is experimentation in cooking, but not usually in restaurants while serving actual customers. That is the time for just making the recipes you practiced.

There is very little reason to write out (say) the same algorithm a hundred times because you have a hundred different users who need it, but a cook can't just ctrl-C ctrl-V a dish.

Re: Software Mise En Place

#55
post #38

Is there a French term for "clean as you go" which is IMHO also an essential part of cooking (and baking)? I like to have the kitchen already clean by the time the food is ready. "Clean as you go" is apparently much harder with software. :)

Usually by the time I've finished making a meal, the sink is full of technical debt

I’m the same but thankfully my house has a rule of whoever doesn’t cook cleans. So tech debt isn’t too bad!

Re: Software Mise En Place

#56
post #39

I use the term "muse em place" for software development too. My version involves research, which I perform in GitHub issue comments. Any time I'm developing a feature there's usually a bunch of supporting research: how does the existing code work and where is it located? Are there any supporting open source packages I need to add? How do those work, and where is their documentation? Any good examples out there? I gat…

Do you have any example issues of more complex problems you’ve worked on, to show it in more detail? I like the premise of the idea - especially in remote-first teams it’s a great way to share information, just wondering what it ends up looking like :)

Re: Software Mise En Place

#57
This is how (and at least partly, why) I often work in a TDD style.

The test environment is the isolated place where I can quickly stand up individual parts and then later, assemble them into larger chunks of value.

Re: Software Mise En Place

#58
post #9

I kind of like to think code itself could use this analogy. If a piece of code combines data from three systems, then maybe first fetch it from each one (maybe in parallel), then "wash" it (check preconditions, normalize, etc.) Then you hopefully have data which is ready for doing the core work without the code being muddled with fetching missing stuff and cleaning it. I can obviously find counterexamples when it is…

I tend to prefer the approach of fetch A wash A fetch B wash B in terms of being easier to read. Of course sometimes there are performance benefits to firing off all the requests right at the start. Anyway I definitely agree that not separating the core logic out from the data fetching/cleaning is a bad idea.

The issue is if you need A, B, and C to do a task and your function fails if it doesn’t retrieve it, won’t it waste time cleaning ingredients for a dish you can’t make? I don’t think it’s less readable than

carrot = fetch carrot

onion = fetch onion

celery = fetch celery

clean(carrot)

clean(onion)

clean(celery)

cook(carrot, onion, celery)

Re: Software Mise En Place

#59

For me, "Mise en place", has nothing to do with chopping everything beforehand and in fact that is completely different from how I cook and develop software. Chopping everything at the start seems like it takes longer. I think Mise en place can mean different things to different people. The way I was taught it was to have everything "in place" before you start. Literally you gather all the ingredients in one place (o…

Yeah, I understand the term via Anthony Bourdain and his book Kitchen Confidential. I think his description of it also leads to some good software analogies:

Mise-en-place is the religion of all good line cooks. Do not fuck with a line cook’s ‘meez’ — meaning his setup, his carefully arranged supplies of sea salt, rough-cracked pepper, softened butter, cooking oil, wine, backups, and so on. As a cook, your station, and its condition, its state of readiness, is an extension of your nervous system... The universe is in order when your station is set up the way you like it: you know where to find everything with your eyes closed, everything you need during the course of the shift is at the ready at arm’s reach, your defenses are deployed. If you let your mise-en-place run down, get dirty and disorganized, you’ll quickly find yourself spinning in place and calling for backup. I worked with a chef who used to step behind the line to a dirty cook’s station in the middle of a rush to explain why the offending cook was falling behind. He’d press his palm down on the cutting board, which was littered with peppercorns, spattered sauce, bits of parsley, bread crumbs and the usual flotsam and jetsam that accumulates quickly on a station if not constantly wiped away with a moist side towel. “You see this?” he’d inquire, raising his palm so that the cook could see the bits of dirt and scraps sticking to his chef’s palm. “That’s what the inside of your head looks like now.”

One thing that makes software different than other jobs is that most of the space in which we work is what we ourselves have built in previous days. A messy codebase makes it hard to have a calm, clear presence. Which in turn leads to a messier codebase. There are whole projects, probably whole companies, where the inside of everybody's head looks like that.

So for me, a key part of developing is creating and projecting the sorts of work that over the long term enable that feeling of "the universe is in order". Indeed, you could write a history of software development in terms of how much progress we're making in that.

Re: Software Mise En Place

#60

For me, "Mise en place", has nothing to do with chopping everything beforehand and in fact that is completely different from how I cook and develop software. Chopping everything at the start seems like it takes longer. I think Mise en place can mean different things to different people. The way I was taught it was to have everything "in place" before you start. Literally you gather all the ingredients in one place (o…

This all depends how much product are you expected to produce. Your "don't chop things beforehand" works if you're cooking for 1 or 2, but if you need to cook for 4+ you absolutely need to plan your steps and prepare your ingredients so that you merely combine them. This is evermore important if you want to have some sufficiently consistent level of quality, which I suppose is implied.
Post reply on HN