Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I disagree with that - as an EE you almost certainly regularly attack a problem with multiple independent state machines. For example - 3 devices hanging off an I2C bus. Each of those devices will be implementing the I2C state-machine to interpret SCK/SDA.

It's a question of what abstraction level you are looking at. In a complex system you need multiple components abstracted from each other and high levels of the system. In those cases, the building blocks will have their own state machine.

The same is true in software, although in software it's much easier to reach a high level of complexity. Your average protocol stack (be it IP, LTE, or Bluetooth) is composed of a number of separate layers. These communicate between themselves with messages, and update their internal state-machine. This is a great way to model a system.

The same is true in 'closer to hardware' land. An FPGA implementation will often include many explicit state machines, and even more implicit ones.



Yeah, from that angle, yes, you'd do that. But within any one of those devices, would you carve the insides into independent FSMs? Probably a 'yes' qualifed with 'if they were very independent problems anyway'.

I did say I needed to think about it more. Guess if there were to eventually be a point I'd try to make, it would be that s/w seems to have a tendency to be structured more like an entire complex system, than like nice tight clean self contained state machines.

Idk if this has to be so or not, but in recent years with the rise of multicore processing, I've seen a huge gravitation toward splintering s/w into threads, without, seemingly, well planned combination of those threads. It's sort of like if, as an EE you were going to build a whole computer, declared "I'm going to need counters and adders and registers (etc)", and then set about designing great counters and adders etc, but then just lashed them together somewhat haphazardly and kind of just hoped to get the system you wanted.


Modern software development is about management of complexity. That's why you have abstraction, that's why you have CI, that's why you have automated tests.

Having multiple independent state machines isn't necessarily a failure of system thinking. To extend your processor argument, do you think there is only one state machine in (each core of) an x86 processor?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: