Hacker News new | past | comments | ask | show | jobs | submit login

Amen. I think the only reason state machines are popular in microcontroller work (not really "embedded" -- big SoC software looks like desktop software) is that they're a common hardware implementation choice. And most of those uC programmers are EE cast offs who look to hardware for their reference of taste and not "software engineering".

So they suck in a bad implementation choice because it looks pretty to them. Not so different than the way most Java development works, honestly.




Hoi! I am an EE "cast off" :)

But, yes, you are probably right. When I was taught embedded systems we did do software work, usually on small memory footprints, and state machines were what was taught.


So they suck in a bad implementation choice because it looks pretty to them

An implementation choice that looks pretty is often a good implementation choice.


Except, as I was careful to point out, when it's bad. I hoped my example was useful: people think the OO hell ("class Point", "class Length", ...) in Java is "pretty" too. Aesthetics are squishy. It's easy to point to great code and infer that it's beautiful to other great coders.

But that doesn't change the fact that most people have pretty awful taste. The affinity of uC hackers to state machines, IMHO, is a good example of this.




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

Search: