As someone who spends time programming, I of course find myself in conversations with people who aren’t as familiar with it. It doesn’t happen all the time, but these discussions can lead to people coming up with some pretty wild misconceptions about what programming is and what programmers do.

  • I’m sure many of you have had similar experiences. So, I thought it would be interesting to ask.
  • lemmyvore
    link
    English
    273 months ago

    I found it useful when explaining programming to lay people to try to put various programming paradigms in everyday terms.

    Imperative programming is like a cooking recipe. You need specific ingredients in certain amounts and you need to perform actions in a very specific order, or the recipe won’t turn out right.

    OOP is like a bicycle. Lots of pieces interconnected and working together, hopefully interchangeable and standardized. It can also be used to explain unit testing to juniors. Clock mechanisms or engines can also work but people tend to relate better to bicycles.

    Declarative programming (SQL) works like ordering at the restaurant. You still need to know how restaurants work and about meal courses and how to read the menu etc. but you don’t need to know how the sausage was made, only if it’s good or not.