DEV Community

Discussion on: What are your favorite analogies to explain programming?

Collapse
 
yansern profile image
Yan Sern

For beginners:
Making websites is like building a house, HTML is like the concrete walls, CSS is like the interior design, and JavaScript is the electricity that make things turn on and off when you flip a switch.

For someone learning Redux:
Reducers in redux is just like making caramel, you boil (action) the sugar (payload) until the sugar is fully dissolved into golden color (state). That's why the process of making caramel is also called reduction.

Explaining GraphQL vs REST API:
GraphQL is like going to a bespoke tailor and have your clothes made to measure (use exactly all the data you need). REST APIs is like going to the department store and buy a pair pants with excess lengths so you'll have to cut & make it shorter (use only the data you need).

I always wanted to blog but I couldn’t find the time. So I recently started writing short programming analogy once a day on my Twitter @yansernio just to help me get into the writing mood again.

Collapse
 
jmfayard profile image
Jean-Michel πŸ•΅πŸ»β€β™‚οΈ Fayard • Edited

@yansern Now folling you on Twitter :)

In my workshop on sunday, I want to show how to launch a website using GitHub, netlify and a static website generator.

  • HTML/CSS/JavaScript? I will definitely use your analogy :P
  • Git/GitHub? It's like Wikipedia.
  • DNS? It's like the Internet's phonebook.
  • Continuous Integration? (with Netlify) ... not sure
  • Static website generator vs something like Wordpress? ... not sure
Collapse
 
andresdandrea profile image
andresdandrea

Continuous integration is like having a team of mechanics working on rebuilding the whole engine of my car, pistons, rings, valves, etc... with the crankshaft not even stopping for a second, and me, still driving the car on the road.