Quote:
Originally Posted by gixxy
Well I talked to our Programming Mentor about using C++ for both. (He actually knows C++ more than Java). He was afraid that with something so much more complex as the Competition Bot that we would have a lot more problems with Memory Management and the other lower level pitfalls on C++.
|
Even with Java, when you start getting into the more involved methods, you begin to run into memory management considerations, especially because a lot of them are just wrappers of their respective C++ methods (if that's the right term for it). We actually hit a stack overflow error, if I recall correctly, when running camera code...
I can't speak for how to teach the differences as I'm not nearly familiar with both to offer a good perspective on both, but I will say that learning about, understanding, and seeing the OO nature of these languages is incredibly useful to understanding their structure and implementation. For me, I just learned the fundamentals then went through examples of existing code to learn the language.
One thing I will say is that you want to make sure that you not only teach new members the programming language, but that you also teach the implementation of the language in FRC. There are so many abstract concepts and so many more details about them that aren't related to FRC that it's easy to get lost in them and be completely bewildered going into build season. Our software engineering team taught our newbies this year by developing Java on Finches using Netbeans (a small minibot-esque platform) and neglected to give them a taste of how robot code is structured. As a result, one of the most consistent responses from their newbies this year was that they found acquainting themselves with the structure of robot code an incredible challenge because they had never seen it before build season, so when the veterans began preliminary code structuring many of them rapidly lost track of what was going on.