View Single Post
  #14   Spotlight this post!  
Unread 08-01-2006, 22:31
DonRotolo's Avatar
DonRotolo DonRotolo is offline
Back to humble
FRC #0832
Team Role: Mentor
 
Join Date: Jan 2005
Rookie Year: 2005
Location: Atlanta GA
Posts: 6,979
DonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond reputeDonRotolo has a reputation beyond repute
Re: R71: Can't re-use code that you've written before?

Quote:
Originally Posted by geeknerd99
But what if copying and pasting produces the only code that will work or is satisfactory? For example, the dead zones on our joysticks were customized to my driving preferences, and there is a large possibility that I'll be driving again this year. Our design looks like it'll drive much like last year's, and I was anticipating using our modified 2-stick code again. Does this rule mean that I can't have the sticks set the way I had them set last year, even if I'm perfectly happy with it?
If you use the entire 2-stick code, verbatim, again then you've violated the rule. But, using the parameters you've determined, along with a line here and there, in a new piece of code (that may perform the same function), then, well, it;s a new piece of code, isn't it? Face it, this year's bot will not be exactly the same as last year's.

It comes down to this: You may certainly use components of previous code, but not a mechanism (which is a collection of components that perform a larger function) of code. A component might be joystick deadzone settings, or a compressor control routine - a line here or there. A mechanism would be a whole subroutine, or maybe even more.

I think Ken's point above is probably the best spirit of the rule.

Don
__________________

I am N2IRZ - What's your callsign?