Andrey (azangru) wrote,

Via HN, a beautiful illustration of the difference between imperative and functional programming style, pastiched through an example of a cake recipe:

1. Preheat oven to 175 degrees C. Grease and flour 2 – 8 inch round pans. In a small bowl, whisk together flour, baking soda and salt; set aside.
2. In a large bowl, cream butter, white sugar and brown sugar until light and fluffy. Beat in eggs, one at a time. Mix in the bananas. Add flour mixture alternately with the buttermilk to the creamed mixture. Stir in chopped walnuts. Pour batter into the prepared pans.
3. Bake in the preheated oven for 30 minutes. Remove from oven, and place on a damp tea towel to cool.

1. A cake is a hot cake that has been cooled on a damp tea towel, where a hot cake is a prepared cake that has been baked in a preheated oven for 30 minutes.
2. A preheated oven is an oven that has been heated to 175 degrees C.
3, A prepared cake is batter that has been poured into prepared pans, where batter is mixture that has chopped walnuts stirred in. Where mixture is butter, white sugar and brown sugar that has been creamed in a large bowl until light and fluffy…


Also via HN, an impressively long and outrageously funny commit message in mpv-player.

  • (no subject)

    Thought of this phrase today for some reason, then thought whether it exists in English (putting toothpaste back into the tube came to mind), then…

  • (no subject)

    I think many (perhaps most) people are totally fine with being a free-rider, a bludger, or a sponge (remember Trump who said that he pays little…

  • (no subject)

    Someone who self-identifies as a technical writer, among other things, begins her article How To Build An E-Commerce Site With Angular 11, Commerce…

  • Post a new comment


    default userpic
    When you submit the form an invisible reCAPTCHA check will be performed.
    You must follow the Privacy Policy and Google Terms of use.