|
Re: Coding / Style Standards for sharing C code
I also am a "free software" proponent. I like a community produced final product.
I don't mind producing a draft coding standard for community review.
In my experience however, only a dedicated few will actually spend the time to read through such a thing. Unless maybe it fits on a single page. At work coding standards get enforced because they have teeth and are verified through peer or QA code reviews. Only after a while does it become habit or second-nature. I don't believe that's a model that will take root in FIRST, although, it would give students a nice exposure to "standard" business practices. It's more a Team enforceable thing because the Teams changeover so much every year. I don't know who would reject a really sweet piece of code because it didn't comply with the coding standard.
-The easiest document to agree on will probably be generic coding conventions.
-A second standard could address FIRST robotic specific standards. For example, one of the most common issues this past season was the pwm definition dichotomy of (0 to 254) or (-127 to 127). My Teams switched to standard math (-127 to 127), but whenever I helped students with questions on CD I'd have to convert the code back (0 to 254) and I introduced silly mistakes sometimes.
However, both these "standards" are defined and demonstrated by the default code released by Innovation FIRST. The IFI default code will always define the de facto coding standard.
The active CD community is somewhat smaller since the season has ended, so if we decide to do something like this we will have to contact the most active experienced programmers directly for their input.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Last edited by Mark McLeod : 29-04-2004 at 12:52.
|