Peter Moreton wrote: > Don't you have to have a hypothesis before you start to search for a > bug? I mean you have to look at the evidence and come up with > hypothetical explanations for the behavior of the code, which you then > test in a debug session. > > I agree that 'voodoo programming' does not help, and I have no time for > the folk who when faced with a plain simple programming error resort to > debug techniques such as "lets try booting from my lucky disk", but > nevertheless, you have to come up with some theories before you debug, > otherwise it is pure guesswork! No, it isn't. Not knowing what's wrong does not imply guesswork. Often once a system is basically working, you can look at a symptom and be quite sure what's wrong. Those are usually the "Oh, yeah, I forgot about that" bugs. However when you first try to get something to work the "system doesn't respond" symptom isn't very useful in narrowing down on the problem. Aside from checking a few obvious things (power on?, MCLR released?, oscillator running? ect) it is better to keep an open mind and *not* assume you know why it's doing what it's doing. That allows you the mindset to methodically check everything instead of jumping around spot checking one hairbrain guess after another. I've also noticed, especially with inexperienced programmers, that their guesses are usually wrong and far fetched. Just check the archives of this list for lots of incredibly stupid guesses as to why someone's program doesn't work. It seems we had several in just the last few days. First some bozo was trying to tell us the EEPROM read back randomly (turned out to be bank switching, big surprise), then someone tried to blame a hardware reset problem on software, and now we've got some rocket scientist trying to tell us that two INCF FSR don't produce the expected result. In all these cases it would have been much more productive NOT to waste time on wildass guesses and instead spend the effort carefully and methodically figuring out what IS wrong instead. ***************************************************************** Embed Inc, embedded system specialists in Littleton Massachusetts (978) 742-9014, http://www.embedinc.com -- http://www.piclist.com hint: The PICList is archived three different ways. See http://www.piclist.com/#archives for details.