Wednesday, September 08, 2010

  • Print
  • |
  • |
  • Reprints
  • |
  • RSS
  • |
 

Embedded systems programmers worldwide earn failing grades in C

Why are embedded systems software developers getting a D- in C?

Michael Barr

Page 1 of 3

Author's note: The January publication of the Embedded C Quiz results initiated a surge in interest in taking the quiz. The original article studied about 4,000 quiz results that we gathered over a 25-month period. But in the approximately two months since this article was posted in January 2010, another almost 4,000 people took the quiz.

I've now updated all of the numerical values, tables, and graphs in the original article (and you may read the update below). There is no material change in the conclusion--and no new content in the article, other than the updated numbers. India's average score came up slightly while Western Europe's average score came down slightly (that is, more results has meant more convergence to the world average). As you would expect, the overall average increased slightly (about 0.4%). Many of these new quiz takers were likely self selected as those who read Embedded.com regularly, those who thought they could beat the overall average, and so forth.

--Michael Barr, 3/20/10

In industry surveys, more than 80% of embedded systems software developers report using either C or C++ as their primary programming language. Yet as a group, they earned a failing grade on a multiple-choice evaluation of their firmware-related C knowledge.

In December of 2007, an Embedded C Quiz was launched online as part of a redesigned Netrino website. In the 27 months since, over 8,000 data points have been collected regarding the C language skills of embedded systems programmers. The aggregate quiz results, as well as those from specific countries and regions, tell an interesting tale.

In a nutshell, the world's embedded systems programmers merit only a failing grade of D- in the C language. A rather scary result, considering that embedded software inside the medical devices, industrial controls, anti-lock brakes, and cockpits they design risks human lives every day. In an earlier column I discussed converging trends that suggest this problem will only get worse.

Methodology
The Embedded C Quiz consists of 10 questions. Each question has four multiple-choice answers, including an occasional "None of the above"-styled choice.1 The whole process takes just a few minutes, but no time limit is enforced. Each question is entirely independent of the others. The order of the questions is the same for all quiz takers.

The set of 10 questions was developed by a small team of firmware experts, including myself, to test knowledge of the C language features that are most specific to work in embedded software development. Examples of covered topics include proper use of C's 'const', 'volatile', and 'static' keywords; writing portable C code using ANSI/ISO-compatible compilers and preprocessors; and the use of bitwise operators.

For example, one question asks that the type of 'x' in the declaration "int * const x;" be properly chosen from a list of descriptions. Another asks that the one line of C code out of four options that will "reset the least significant bit of x" be identified. No individual code snippet is longer than one line. Most of the tested concepts and techniques are well explained in free technical articles on the same website.

The quiz may only be taken by a registered user of the website and each user may only take the quiz once.2 His or her final score, as well as their answers and the correct answer to each question, is presented only upon completion; these remain available for them to review again later. Individual answers and scores are kept in a private database and not displayed to anyone other than the registered user.

From time to time, we have offered incentives (such as a drawing for free books or training courses) to encourage participation. But these offers have only been made within the online community of embedded systems software developers and all prizes but a few MP3 players would be of interest only within that community. Still, I suppose, it is likely that some quiz takers have come from other software development communities who happened upon our website; that said, I have every reason to believe that the vast majority of quiz-takers are employed as firmware engineers.

All of that is to say that we've worked hard to make the results of our embedded C quiz as meaningful as possible. However, it should be understood that this was not a scientific survey, in which embedded systems programmers should have been randomly chosen by us not themselves. But with more than half a million website visitors offered a link to the quiz over more than two years and fewer than 1% actually taking the quiz, we hope that the law of large numbers has brought us a mostly representative sample.

Upon a review of the aggregate results, we noted that some quiz takers (about 2%) started the quiz but didn't answer all 10 questions. The following analysis of the results is based only upon the 7,949 completed quizzes.

Page 2: Embedded systems programmers worldwide earn failing grades in C
Page 3: Embedded systems programmers worldwide earn failing grades in C

Page 1 2 3
Intel Embedded Design Center