Hacker News new | ask | show | jobs
by brootstrap 2721 days ago
i often try to explain programming to a layperson with a cooking analogy. Programming is like cooking with a recipe. You've got your ingredients at the top (input data, variables etc). Then you've got the processing (slicing, cooking, stirring etc). Eventually you pull all the ingredients together for some final output (a dish).

INGREDIENTS onion, whole tomato, whole jalapeno

GOAL: make salsa

    prepped_onion = chop(onion)
    prepped_tomato = roast(whole_tomato)
    prepped_jalapeno = roast(whole_jalapeno)
    
    salsa = blend(prepped_onion, prepped_tomato, prepped_jalapeno)