Teaching coding paradigms and concepts with specific context Teaching programming is a great part of mentoring FRC (FIRST Robotics Competition) teams. For teaching how to program a robot (Specifically, a RoboRIO), I first (unintended pun: FIRST) need to teach various paradigms (OOP, Generics etc.). There is a need to find ways to teach necessary but general concepts before diving into programming the robot itself (e.g. motor controls and such). 

Teaching Java paradigms in the classical and rather abstract sense usually confuses the students because they don't see any connection to robotics. As a result, students have difficulty understanding the subject (they aren't exactly at a level to learn that, so older team members try to teach it in a way that would make it easier). If they saw how these concepts integrated into programming the robot, then they would hopefully understand the subjects and their applications better.

So my question is this: how can I teach those programming concepts in the specific context of FIRST Robotics? 

The students have a bit of experience with loops and types, but nothing more complex.
Based on my two years of involvement with FIRST, I have a few suggestions:


Teach students to read the documentation. This site covers Java programming for the 2017 FRC Control System. FIRST programming, while requiring general programming skills, is specialized for the roboRIO and for the competition as a whole. We ran into a couple issues this year whose solutions were found by methodically reading through these documents. There can be a rush to jump right to coding, but it is essential to understand the WPI library and its API fully. This also serves the purpose of seeing which programmers have the discipline to follow documentation to the letter. Having the patience and thought to do so is a necessary condition for being a successful programmer.
Use a simple chassis for coding/driving practice. Each year's game has its unique twists and challenges. However, underneath the superstructure  is a drive base that in many cases can be used from year to year with slight modifications. Treat this as essentially a learning robot. Give it working code, let students drive it, then teach the code itself. Make changes from one run to the next. Since the code has immediate, real-world consequences, show the results of minor changes in action. This way you can then go back to the classroom/IDE knowing that students have a context in which to operate. Have them observe and reflect on what happens from run to run when one variable, say, is changed.
Research other teams' code. Most, maybe all, strong FRC programs have well-developed websites and numerous GitHub repositories. Look at best practices from these teams. Reach out to them. Have students try to read and understand their code.


Ultimately, students need to know Java, and understanding classes and objects, inheritance and polymorphism, will be as needed with FRC as anywhere else. However, to help them see how Java applies specifically to FRC, start with something that drives and work backward from there. Maybe start with #2, move back to #1, and lead them to #3, maybe even with examples you have found of how teams use the WPI library in different ways.