Works well when explaining open source too. Proprietary is when the restaurants don't disclose the recipe, you just hope that they'll do a good job like last time, or that your allergies don't trigger. Government is forcing food products to disclose at least parts of their recipe, making it partially open. GPL needs you to include the recipe along with the food you serve to people, but not when you cook at home. And so on
Yes, that's how I usually explain programming to someone unexperienced with it. A computer programming language is usually more strictly defined, but depending on compiler and architecture results can differ in computer progamming as well.