I think you are right... if the code is for you only, or for a one-time only problem and its not complex why waste time? But earlier you seemed to be saying that commenting is never worth it. That point is arguable. I will have to admit that I know of a company that only cares about getting the current program out the door ASAP and really has no intention of supporting it or modifying it in the future. They know that the next version will be in a different development language, different environment, have enough new features that it is better to just trash the old code and start over. When the program is first tested and released, the programmer(s) are involved enough in the code to be able to quickly fix any major bugs and after about 3 months, they are on to the next project and will never go back and update that code. They have even, on occasion, lost the source and haven't really gotten upset about it. What good is documentation in that company? One thing that they do, is to document what tricks they learned related to the project that have nothing to do with the programming language etc... in a separate "knowledge base" so that they will have them for the next time. The idea of keeping track of the lessons learned was an inspiration for my techref. The point is that while source code commenting is valuable, the real gems are the bits of information that allowed you to write the program / design the circuit / solve the problem in the first place and buried in the middle of the source is not the right place for these. It brings me back to my comment about URL links to algorithm descriptions in source code. The higher level recognition of what the code is trying to do is more valuable in most cases than the individual commenting of lines. James Newton mailto:jamesnewton@geocities.com phone:1-619-652-0593 http://techref.homepage.com NOW OPEN (R/O) TO NON-MEMBERS! Members can add private/public comments/pages ($0 TANSTAAFL web hosting) PIC/PICList FAQ: http://204.210.50.240/techref/default.asp?url=piclist.htm -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Mike M Sent: Friday, November 19, 1999 9:02 AM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [OT] Re: How to write bad code - was Re: C vs. ASM >Does that mean you have 5 years of experience now? If >you could write code as complicated No and lets not turn this into some kind of flame war im 22, still in school majoring in electronics engineering tech. I have majored in software engineering but changed my major after 2yrs. The point is as i have been saying for the past 5 emails is that everyone complainig about comments..and i say it depends on the situation. I dont know how this turned into a whole..abuse mike.. scenario. Again i will say it, you writing your code that is so complicated etc. you putting comments is up to you unless you are working with a team because then no one will have any idea what you are doing unless they sit an analyze it. If i am writing a program for myself who cares if i am putting comments or not? Why should anyone care..its like im telling you your an idiot for adding comments..im just saying that i personally do not comment unless i know its either a group project or my code is very long and complicated as you said. True i know very little about pic mcu's but enough of the 68hc11 to get what i need done; 68hc11 is much easier to use, just not cost effective in most cases. So now how did this turn to a big argument that i suddenly dont know anything about programming? On Fri, 19 Nov 1999 07:06:02 -0800 Tracy Smith wrote: >--- Mike M wrote: >> welp guess i got a photographic memory. Ive been >> programming since i was 12, like i said IF YOU ARE >> WORKING THEN ITS A DIFFERENT STORY..everyone is one > >Does that mean you have 5 years of experience now? If >you could write code as complicated as some of the >members on this list you'd see how important comments >really are. Without comments, absolutely no one can >possibly understand what I write. Without comments, I >often have a hard time understanding what I write. I >re-use the same tricks over and over, but the context >in which they're used is extremely important. > >BTW, for your basic clone thingy, read up on interrupt >programming and isochronous coding techniques - these >two subjects alone would go a long way to help you >implement a "background" servo controller. While >you're at it, you may wish to study state machines. > >Sorry for being so harsh, but I really don't believe >you know what you're saying. > >.lo >__________________________________________________ >Do You Yahoo!? >Bid and sell for free at http://auctions.yahoo.com > Send someone a cool Dynamitemail flashcard greeting!! And get rewarded. GO AHEAD! http://cards.dynamitemail.com/index.php3?rid=fc-41