>>Actually, then I heard from someone, in a discussion on the subject, that the most complicated and largest contraption in use, an ocean liner, didn't go deeper than ten levels.
>
>Last statement is interesting. Of course, once you go beyond one level the only approach that makes sense is a self-referencing/recursive one.
>
>The one I worked on was basically for recipes (i.e. food). There were ~1000 ingredients from which recipes were built. More than five levels were quite common. Also fractions of a recipe as well as multiples were allowed. e.g based on Bread:
Amazing... same happened to me. I ported that assembly line app to serve a restaurant :). The same principle, with proportional costing if a subrecipe was included in quantity different from 1 - if, say, a standard salad was served on the main dish, it would go as half, whereas as a whole if served as a side dish, etc.
As a curiosity, I also had to write the bar side of the restaurant app, with daily inventory by the bottle and how much should remain in a started bottle. If one bottle of vinjak (Yugoslav variant of cognac) holds 1l, that is 20 shots per 0,05 l - so if they served 12, there should be 0,4l left in the bottle. Goes (somewhere) to show how much the owner trusted his waiters :).