Hacker News new | ask | show | jobs
by lloeki 918 days ago
When I worked in an industrial context, some coding tasks would seem trivial to today's Joe Random software dev, but we had to be constantly thinking about failure modes: from degraded modes that would keep a plant 100% operative 100% of the time in spite of some component being down, to driving a 10m high oven has the opportunity to break airborne water molecules from mere ambient humidity into hydrogen whose buildups could be dangerously explosive if some parameters were not kept in check, implying that the code/system has to have a number of contingency plans. "Sane default" suddenly has a very tangible meaning.
2 comments

> we had to be constantly thinking about failure modes

This to me is the biggest difference between writing code for the software industry vs. an industrial industry.

Software is all about the happy path ("move fast and break things") because the consequences typically range from a minor inconvenience to a major financial loss.

Industrial control is all about sad paths ("what happens if someone drives a forklift into your favorite junction box during the most critical, exothermic phase of some reaction") because the consequences usually start at a major financial loss and top out in "Modern Marvels - Engineering Disasters" territory.

You do /not/ want to make it on the USCSB YouTube channel.
Yeah, I work as a Functional Safety Engineer in the process and machinery sector and 90%+ of effort is in planning, considering all the possibilities outside of intended operation and traceability.

I have worked on projects where in retrospect the LOC generated per day, if spread out across the whole project, were between 1 and 3.

But typically, writing of the code does not even commence in the first year, sometimes two.

Then there is the test cases and test coverage etc etc.

This is the difference between engineering code and just producing it - all the effort that goes into understanding all the unwanted code behaviour that may occur and how to detect, manage and/or avoid it.

Implicit state is the enemy, therefore the best code has all states explicitly defined.