For novel ideas about building embedded systems (both hardware and firmware), join the 40,000+ engineers who subscribe to The Embedded Muse, a free biweekly newsletter. The Muse has no hype and no vendor PR. Click here to subscribe.

By Jack Ganssle

The Dearth of C Training

Published 3/31/2008

Is C dead? I don't think so. Surveys continue to show that C is by far the dominant language in the embedded space. But an increasing number of program leads complain that new grads know Java and maybe C++, but have no experience with C, the true lingua franca of firmware. Dave Smart corresponded about this recently: "Are embedded programs experiencing a reduction in quality?

"We see a number of factors that might be contributing to this. I'll generalize a lot to make my point - knowing there are numerous exceptions -

"New grads have to go way out of their way to learn C programming. Depending on the university, the core is Java, C++, or C#. Rarely C and even more rare to get assembly. But since colleges don't seem to teach C anymore, one might theorize that the market for grads has gone "big", or at least the money trail has gone big so they see no value in this little stuff.

"Last I thought I knew, there were practically billions of 8 and 16-bit micros shipping annually, and I suspect most are programmed in C. But we "experienced" C programmers are moving rapidly into management (or retirement), and the new folks just don't seem well prepared for what we're leaving behind.

"They grew up on 2 GHz computers with a gig of RAM, so the thought of writing efficient code really never occurs to them. So what if the function call has 14 or more parameters... Or brute force loops search for the solution...

"Perhaps you and I are dinosaurs - having started with the 8008 and followed the industry forth. We did a lot with 8048's and 1 K of ROM. We rode the curve from then to now. My last big project was 1.5 M LOC in mostly C++ and it was too big and too complicated and maturity took a long time. I don't mind saying that these 100 KLOC C programs are almost welcome by comparison.

"And even if my sight is no longer clear, and the new grads really are learning this on the same basic complexity curve that you and I did, they are coming into the development cycle where the established program is 80,000 - 200,000 lines of code, not 2,000 - 10,000, so the entry level complexity is much higher.

"But we develop 16-bit hard real-time control systems and we forbid runtime memory "free" in C. And we do it quite well. And it serves our needs extremely well, on a rather mature set of software.

"So, now to my main point - how and where can they learn what we know? Places like Learning Tree and Object Mentor don't list C classes anymore. Where are the backfills for them and where is our quality headed?"

I agree with Dave. The relentless growth of resources in the PC world have largely not been matched in embedded systems, where in some cases developers can merely dream of 8KB of flash. Where will developers of resource-constrained systems come from?