Monday, June 10, 2013

Bug of the Month Ends

For the last ten years Gimpel Software has posted a short stand alone program with an obscure C bug in it, with the challenge to the reader to figure out the bug.

Gimpel does this to show off their static analyzer Lint, the nitpickyest of all programs, something that I use almost daily. Lint exposes bugs by looking at a project as a whole, with multi-pass value tracking, rather than just as a file at a time as most humans would. Lint also can test for compliance with various guidelines such as MISRA or The Barr Group's Embedded C Coding Standard.

You can even input your own bugs to test short snippets of code that you might come across. For example the abysmal "if( A==B==C )" found in some of Freescale's USB stack code (I'll save the rant on poor manufacture example code for an other time).

I always looked forward to the challenge of the Bug of the Month, sadly it has be discontinued in favor of a new blog (May not be operational until late summer). I really don't like how everyone thinks replacing something useful with something akin to 'Social Media' is a good thing, how about you?

Colleagues over the years have complained that Lint puts out to many warnings. That is usually the case of Linting legacy code. Error messages may be turned off in layers. Get rid of the ones that will crash the system first, followed by the ones that might, until you get down to none or the ones you are willing to live with. Also with people trying to turn serious development in to some kind of game, see Development has become the game. Whats your Potty Mouth Score today?, make Lint a game. Can you write code that will give no Lint errors today?


The Cyborg Era Begins

Looks like I'm up for a trip to the library, just came across an intriguingly titled paper: The Cyborg Era Begins by Robert F. Service in Science in the area of Bioelectronics.

Abstract: Electronic components are invading the body. In the lab, cling wrap–like circuitry draped over the hearts of test animals can track the activity of each of the heart's four chambers and kill tissue that initiate potentially deadly arrhythmias. Other arrays penetrate brain tissue to monitor the abnormal nerve firing patterns in epilepsy or induce gene expression in the brain tissue of mice. One team has even made a 3D printed bionic ear able to pick up ultrasonic bleats that humans cannot hear. These early prototypes can't produce science-fiction cyborgs; most are used in medicine. But over time, expect devices that will make us better athletes and soldiers, or even improve our complexions.

Science 7 June 2013:
Vol. 340 no. 6137 pp. 1162-1165
DOI: 10.1126/science.340.6137.1162
Robert F. Service

M. Scott Veach and I have been discussing the ethics of replacing our organs so that we can live forever, or until the batteries run down at least, in the comments of my Brain Boost Button one step closer article from last year. Ahead of the curve again it seems...