View Single Post
  #23   Spotlight this post!  
Unread 29-04-2004, 20:00
Mark McLeod's Avatar
Mark McLeod Mark McLeod is online now
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,918
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Coding / Style Standards for sharing C code

We probably should address repository, software licenses, the rating system, and other side-issues in either the original thread or in new threads and keep this one focused purely on coding standards. Since the original thread was co-opted we might want to start a new thread with a title like "Code Repository."

Okay, let's think about this.
  • Indian Hill C Style Guide as a basis
  • Bring up and discuss any dissentions or alternative styles
  • Associated assembly code standards
Additions/extentions to the above:

-Utilities like "Artistic Style" and lint.

-Design standards (now some of these might be overkill for FIRST) like:
  • Information Hiding - e.g., keep variable definitions visible only to the lowest level that requires it. Within a single routine, within a Project file, or available as a Project wide global variable.
    • Context-based Control - e.g., functions capable of being executed independent of any previous or subsequent executions. Use context structures to maintain information that must be remembered from loop to loop.
    • Object Oriented approach - not true inheritance or anything like that, but for example if you have a widely used data structure you might want to develop a defined set of methods to manipulate data within the structure.
    • Modular functions loosely coupled to the "outside" world.
  • Error Handling - do we want some standardization here since people will be using the repository functions as drop-ins?
  • Function interface standards
What else should we be collectively looking at?



If we can get through some initial brainstorming we can start to divide and conquer the problem.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle

Last edited by Mark McLeod : 29-04-2004 at 20:05.