On Sun, 20 Jun 2010, Olin Lathrop wrote: > sergio masci wrote: > > You are right it was trying to do an ABS and it was broken and you > > helped show how a reader was able to find the bug WITHOUT a comment > > :-) > > It would have been easier and quicker with a good comment. I would have > spent less time deciding it was a bug if there was a comment clearly stating > this macro is supposed to do a twos complement negate on a memory location. > Without the comment I had to look around more before deciding it was > probably a bug. With the comment I would have know quickly it was > definitely a bug. Yes I agree, in the state it was in it could probably have done with a comment. However you would have probably spent less time guessing if I had formally defined a convention for the macro names I used rather than just presenting them (as I did). This would normally be something that would evolve to fulfill the needs of the code being developed (no point defining a convention that includes 64 bit floating point variables if the system doesn't need to use them). Also, one of the things I am trying to highlight is that the code should be MADE EASIER TO FOLLOW and the reader should be engouraged to ACTUALLY READ THE CODE and have the comments indicate where there are obscure things happening. I'm pretty sure I achived that otherwise I can't see you of all people wasting time working through something that was an uncommented mess :-) Friendly Regards Sergio Masci -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist