DEV Community

Discussion on: Do You Know Mental Models in IT?

Collapse
 
joshcheek profile image
Josh Cheek

I don't think there is a model that works in all situations. Computation is too abstract for that. I do think there are a number of candidates that will get you really far, eg I think having a model of the machine is incredibly enlightening and simplifying (CPU, registers, alu, memory, devices), but note that there are other types of machines, as well (eg stack based). I also definitely create mental models for languages I use. You can get really far with something like an ER diagram, but at some point you're going to care about implementation nuances, and they'll totally violate the mental model. Crazier still, some ideas must be considered independently from implementation details. Eg llvm allows a language to Target many very different backends, and it may have completely transformed your code along the way. Another argument that there aren't: the definition of computation is "anything that a Turing machine can do (aka Turing complete)", but there are infinitely many different models which can do this, and they can be very very different. Eg the lambda calculus, which is completely immutable, yet a Turing machine makes heavy use of mutability. Or combinatorial logic, which is the lambda calculus, but you're given a fixed set of predefined lambdas and can't make new ones. Heck, even CSS and Conway's Game of Life have been shown to be Turing Complete at this point. Oh, and we're on the brink of quantum computers, which violate ideas like determinism, correctness, and discrete states. So, no, I don't think programming has a single holistic mental model, but yeah, thinking about entities and relationships will get you really far.