re: What is an analogy or visualization of a coding concept that really helped you understand it better? VIEW POST


First things first, Julia Evans is IMO great at this. jvns.ca is her website. She writes "zines" with illustrated technical concepts, and they're great.

Anyway, the most helpful analogy I encountered as I was learning was to think of an interface like a light switch.

  • Hides complexity from the user
  • Exposes methods to the user (e.g. lightswitch.turn_on()
  • Is extensible
  • Is intuitive

Credit: I first came across this description in Data Structures and Algorithms in Python by Goodrich, Tamassia, and Goldwasser

Code of Conduct Report abuse