News for hackers. Stuff that matters.
Re:How can C Programs be so Reliable? by VinzO on Wednesday November 12, 2008 @04:10AM (#361630)
You seem to forget that in embedded systems, C is still the most used language. So most of the new systems developed these days have new C code. And embedded systems are everywhere.

Also a big part of embedded systems have to be reliable for years in hostile environement without external interventions. so I wouldn't say that this is easily predictable subsystems.

Re:How can C Programs be so Reliable? by demallien on Wednesday November 12, 2008 @06:19AM (#361701)
Hmmm, I've worked in the embedded world for the last 10 years, and I can tell you that the bulk of embedded code is far from hardened. It appalls me the number of times that mobile phones, set top boxes, etc crash. Typically, reliability is low because it is hard to run decent unit tests in an embedded environment. You're obliged to write a type of simulator that you can run on a PC, but the simulator never has the exact same behaviour as the target system, so you can never truly verify correct code behaviour.
Re:How can C Programs be so Reliable? by janm on Wednesday November 12, 2008 @07:03AM (#361728)
Yes, this is true: A lot of embedded code is poorly tested. Even more is poorly designed and written by poor programmers (like most software.)

Some people have to deal with the machine, and C is a good model of the machine. Even reliable systems have some core in C (or an equivalent) that provides an abstraction where higher level abstractions can be expressed.

Testing isn't the ultimate solution; some people are just able to use the machine better and produce better code. Testing crappy code doesn't really help. A subset of developers produce tools where others can produce systems with less risk by providing appropriate abstractions.

Re:How can C Programs be so Reliable? by wheels on Wednesday November 12, 2008 @05:25AM (#361668)
I'll qualify this with the fact that I've never done any embedded programming, but my feeling is, that relative to a GUI application, that things are still fairly predictable.

Unpredictability seems to arise mostly from interuptability. GUI applications have the ability to jump from a large bank of states to another large bank of states with almost endless permutations and maintain several, not one state simultaneously.

At least in systems programming and I'd assume embedded programming (and like I said, I'm guessing -- I'd be interested in your take there) the chain of interruptability is much more structured and the logic flow inside of components is much more atomic.

Re:How can C Programs be so Reliable? by tjr on Wednesday November 12, 2008 @11:17AM (#361933)
Can depend on what the code is embedded in.

C has been gaining traction in embedded avionics software, which is purposefully very simple, understandable, maintainable code, and tested & verified beyond nearly any other type of software.

C is also used on mobile phones, where it's more hit & miss, as I'm sure many of us have experienced first-hand...