4 ms·
I am working with computer science students and I see Lamport's point. Even for simpler programming exercises the students start coding away, writing dozens of
by maweki 10y ago
I am working with computer science students and I see Lamport's point.
Even for simpler programming exercises the students start coding away, writing dozens of nested function calls with different global and local states, when a simple state machine models the problem quite well and building one would lead to much cleaner code.
The problem I see (and what we're trying to repair in our basic courses) is that students learn their basics in CS and then they write java or c and the primitives they know from theory (sets, tuples) aren't very accessible and they can't just use the definitions they've learned (imperative vs. Functional), so they just hack away without thinking.
We're trying to start with Haskell as early as possible to be close to the definitions from the first semesters.
- pron 10y agoThis is not quite what Lamport is saying. Lamport is not talking about the process of writing programs, but about reasoning about programs. You build an analog circuit by composing components (that would be programming), but you reason about what it does and how it does it using ordinary differential equations. Lamport notes that state machines are a universal model for discrete dynamical system, and they can be manipulated mathematically using notation analogous to ODEs for continuous dynamical systems. Lamport does not suggest that you should program using a state machine abstraction, nor does he offer any notation for doing so.
- RossBencina 10y ago> Lamport does not suggest that you should program using a state machine abstraction, nor does he offer any notation for doing so. On the other hand, David Harel, also a mathematician, did both of these things. https://news.ycombinator.com/item?id=13157153 https://news.ycombinator.com/item?id=13157153
- pron 10y agoYes, and both rely on Pnueli's temporal logic. But Harel and Lamport apply a similar theory to different domains, neither suggesting the exclusion of the application to the other domain. Lamport offers abstract state machines as a universal mathematical formalism for reasoning about discrete dynamical systems regardless of how they're constructed, while Harel offers concrete state machines for programming safety-critical, hard-realtime embedded systems that are easy for both humans and machines to analyze.