View Single Post
  #5   Spotlight this post!  
Unread 19-12-2016, 16:40
MamaSpoldi's Avatar
MamaSpoldi MamaSpoldi is offline
Programming Mentor
AKA: Laura Spoldi
FRC #0230 (Gaelhawks)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 2007
Location: Shelton, CT
Posts: 304
MamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant futureMamaSpoldi has a brilliant future
Re: Seeking advice for rookie programming

Disclaimer/Background: I'm a software engineer with 30+ years experience programming in C and C++, but I know a fair amount of Java as well. I have been working with our FRC team doing C++ code for 11 years. I have no experience with FTC code.

I'm not going to tell you what you should choose, but here are are few points to consider:
  • The syntax of C++ and Java is VERY similar. So if you are familiar with Java, then C++ is not a huge leap.
  • All the points mentioned above by Erik comparing C++ and Java are pretty valid. I would especially emphasize his points that:
  1. Java is interpreted and therefore does not run as fast as C++. This can be a significant issue depending on what you hope to do.
  2. Some of the error messages are pretty poor but if you have local support (or CD support) it is not usually a big issue.
  3. The C++ STL is clunky, but we don't use that in our robot code so this is kind of irrelevant (at least for us).
  • If you already know Java, C++ is the next step in your learning process. I think the biggest mindset change is that C++ is pass by value and Java is pass by reference. This is related to pointers (indirectly) and it basically means that you cannot modify a parameter to a C++ routine unless you pass a pointer to the value.
  • Whatever language you choose, you will have lots of resources available including the ScreenStepsLive mentioned before and mentors of local teams and here on CD.
  • I personally am not a fan of the CommandBasedRobot base class, it requires a lot of infrastructure and relies a lot on tools like the robotBuilder instead of using more common coding principles. Our team uses SampleRobot (formerly SimpleRobot). The architecture that we use makes it very simple to use the same mechanism classes and functionality for teleop and autonomous. If you are interested, here is a link to our code from last year (https://sourceforge.net/projects/frc-team230-2016/). We would be happy to answer any questions you have. In addition I would be happy to send you a copy of the slides I use for the C++ programming "class" that I teach for our students who are interested in programming. I provides a fair overview of into our code architecture.
  • Regardless of your choice there will be times you think it might have been easier if you had made a different choice. Resist the urge to second guess yourself... BOTH ARE GOOD CHOICES.
Good luck! Remember to reach out if you need help. We are all in this together.

Save
Save
Save
Save
__________________

Last edited by MamaSpoldi : 20-12-2016 at 09:53. Reason: typos
Reply With Quote