Tonight I was watching the Food Network, and had a revelation about Perl. I was thinking about how cooking (especially fine "cuisine") is related to math and programming (being the young geek-monk I am). It seems to me that cooking food is like a programming language...You put all these seemingly unrelated operations and values together in just the most perfect, precise way to create something truely amazing and wonderful -

All the while, I was thinking about C/C++ (my primary language).

And then it occured to me...there's a distinct difference between whipping up something after work/school and creating a "dish"." Then I thought of Perl. There's more than one way to do it. In cooking, I thought, a meal you make in 20 minutes at home tastes just as good (if you do it right) as a $50/plate meal at a fine restraunt. In Perl, you can code in a Engilsh-esque syntax, easily understandable and done, BUT you can also get crazy, inventing and experimenting -- creating something amazing and awe-inspiring, tweaked and tweaked and tweaked ad infinitum. Although both (to me) methods (can) produce the same results, and both are enjoyable, they are VASTLY different techniques. Yet they are one. Just like cooking.

hope this made sense -- i'm new to perl...only two months deep (1.5 deep into this site -- this is my first post)...yet i am absolutely infatuated with it (perl)...perhaps even on the verge of love.

reap me if you see fit.

Replies are listed 'Best First'.
(jeffa) Re: perl && cooking
by jeffa (Bishop) on Sep 10, 2001 at 00:39 UTC
    Barring the obvious reference to Iron Monks, imagine having to design and code an application in less than 30 minutes, just like a cooking show. Imagine being allowed only a few minutes to implement that critical operation, like turning egg whites.

    The good news is, just before you add something like, say security, you could just reach under the counter and pull out the 'already baked ham'. :D

    jeffa

        A flute with no holes is not a flute . . .
    a doughnut with no holes is a danish.
                                    - Basho,
                                      famous philosopher
    
Re: perl && cooking
by John M. Dlugosz (Monsignor) on Sep 09, 2001 at 19:40 UTC
    I was taught "Cooking is an art, but baking is a science."

Re: perl && cooking
by Fool on the Hill (Acolyte) on Sep 10, 2001 at 20:09 UTC

    Food and Programming are similar on lots of levels. One of these is the cookbook. There are probably two types of cooks/programmers those who learnt how to cook from their mother or a professional (chef/teacher) and those who have learnt from books. For myself, when I started to cook I really relied on a cookbook to teach me how (Delia Smith is a cookbook goddess). As I progressed I grew to rely less on cookbooks and would often knock up a meal without reference to a cookbook with a restricted set of ingredients. Much in the same way that I have found my programming changing ...

    From time to time it is good to go back to the books or back to your mentor so that you can learnt a new technique that then enriches your cooking. However the real skill comes in having a broad tool box of skills and ingredients, and the knowledge of these ingredients so that you can combine then to produce particularly pleasing solutions to problems.

    One obvious difference is that a badly cooked meal rarely comes back to haunt you months later. Well, I suppose if it is a particularly badly cooked meal it can be fatal whereas hopefully your Perl never is that serious....

    Thanks for a good thought provoking post and making me think about how I can progress my programming further.