View Single Post
  #8   Spotlight this post!  
Unread 30-01-2013, 12:39
omalleyj omalleyj is offline
Registered User
AKA: Jim O'Malley
FRC #1279 (Cold Fusion)
Team Role: Mentor
 
Join Date: Jan 2008
Rookie Year: 2008
Location: New Jersey
Posts: 132
omalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to beholdomalleyj is a splendid one to behold
Re: Command Based vs Simple Robot

Quote:
Originally Posted by jesusrambo View Post
I'd recommend using commandbase. Simple is a lot less flexible, and has much less compartmentalization of all your code. Command based gives you the benefit of the structure, some more flexibility with commands/subsystems, and the biggest benefit -- you can reuse your code the next year with command based, since it's all so compartmentalized you can just keep and tweak the parts you're reusing.
I feel the command based approach is helpful for teams that do not have seasoned Java help, but most of the comments above are incorrect or misleading.

Flexible means you can do something in one that you can't do in the other. I am hard put to think of anything you cannot do in both.

Command enforces (or at least coerces) good object oriented practices, and if you were to throw all your code into the SimpleRobot class it (Command) would be more compartmentalized, but you should not do that. If you break up each subsystem to be its own class (as you should) everything is nicely encapsulated and modular.

This year we have classes for the drivetrain, shooter, climber, camera, utilities, and an interface for constants. Last year we had the same except for climber, and could have reused nearly everything. We don't because different students code different classes and do it from scratch, for the learning experience.

So by all means use command based programming, but not for the reasons above. It is helpful for those with limited resources, but for those who can afford it, it is probably more helpful to learn the techniques that underly it by coding it themselves.

Last edited by omalleyj : 30-01-2013 at 12:49. Reason: clarify pronoun use
Reply With Quote