Peter Principle Programming

I seem to have the ability to write programs that are just that bit more complicated than I can get to work. I think this is an extension of “The Peter Principle”, which states that in an organisation any given person will be promoted to their “level of incompetence”. In other words, you stop being promoted when you get to the level where you can’t do the job.

I’m working on the code for the Air Quality sensor and I’m running up against the worst ever kind of fault. The one that occurs so rarely that you can’t easily cause it to happen. And if you add code to find out what is going on the problem vanishes. There are usually two possible reasons for this:

  • it is a timing bug, which occurs when a given set of events occur in a particular sequence

  • it is a memory corruption bug, where a process damages the contents of a value in memory which is picked up subsequently and causes the program to fail

I’ve done all the sensible things to try and isolate the problem. I’ve moved things around in memory to see if the fault changes. I’ve changed the order of code elements to see if that causes different things to happen. As of now, I can’t find out what is going on. Oh well, there’s always tomorrow.