Goals
The following is a list of goals the software team tries to meet each
year. They inform decisions regarding our curriculum design and operating
procedures.
- Produce an effective product
- Employ industry best practices
- Expand our knowledge and capabilities
- Involve less experienced team members
-
- Find tasks requiring less experience
- Create an autonomous software team / encourage learning
-
- Provide access to resources for motivated students
Curriculum design guidelines
-
Teach incoming members enough C++ to be useful
Integrate modern C++ development paradigms, tools, and practices.
The C++ language has improved a lot since 2003; we don't need to
program in the dark ages anymore.
-
Teach a set of skills motivated by industry best practices
By industry best practices, we don't mean extremely conservative,
waterfall model practices. We're more focused on breaking down and
solving problems using industry standard tools. We emphasize
reliability, but reliability and innovation aren't mutually
exclusive.
Software shall meet embedded and real-time
requirements.
-
Prepare students for Computer Science at university
The focus should be on "Design before build". That is, developing a
specification for behavior before implementing it. Teach common
development practices like Git and code review.
-
Teach an introduction to control theory for those interested
This is also needed for a reliable / maximally efficient robot and
includes state machines, motion profiles, filters, and
feedback/feedforward controllers.
Lab design guidelines
-
Provide implementations for things unrelated to the lab's learning
outcomes
The student shouldn't get bogged down in setting up infrastructure
for their solution if the lab is intended to teach something specific.
For example, the state machine lab here provides a template
with all the subsystems necessary to implement a robot's state machine.
The comments tell the student where to insert their state machine
logic, as practicing writing state machine logic is the purpose of the
lab.
-
Assuming a few prerequisites is acceptable to enable showcasing a
topic's utility
By showcasing advanced topics in an approachable, introductory way,
students can appreciate the breadth of knowledge they can and will
learn. If prerequisites are skipped, the lab should provide requisite
knowledge as it is needed to understand or implement dependent
concepts.
-
Labs should encourage students to develop practical methods for
solving problems
Labs exist to provide hands-on experience with a topic. They should
supplement the theoretical material covered in lecture to foster
practical or intuitive understanding. After finishing a module and its
labs, students should be capable of applying topics initially
introduced in lecture.
-
Use graphical tools to gain insight
Basically, a picture or movie is worth a thousand words. The
following are good examples of visualization tools.
-
LiveGrapher
allows visualizing physical phenomena in real time.
- rltool from MATLAB aids in students' intuitive
understanding of how root locus plots represent a system's response
and how the pole and zero locations affect the plot.
- GRIP facilitates experimentation with complex image processing
operations via an easy-to-use package.
-
Common wisdom imparted through lectures should be motivated in labs
with data
For example, it is understood that mutexes are preferred over
lock-free data structures unless there are scalability requirements for
distributed, concurrent accesses. A lab requiring the implementation of
an atomic data structure may motivate the exercise by making a mutex
implementation first, then benchmarking both. (This would be a good
opportunity to show the utility of and best practices for benchmarking
software, by the way.)
-
Use industry standard tools to handle auxiliary tasks
Students should be able to leverage existing tools to make their
jobs as software developers easier. Labs are encouraged to use tooling
if it doesn't automate what the student is intended to learn through
practice.
In the previous example, Clang's thread sanitizer tool may be used
to verify correctness of the data structures' synchronization.
Learning outcomes
This is a list of topics we hope to teach software team members
throughout their membership. These may not all be accomplished in one
season. They are mainly structured in a way for which we can test
competence.
They include programming-specific topics such as C++, program planning
and implementation, testing and debugging, version control, and
robot-specific topics including control theory. Inter-team communication is
important for most of these.
C++ programming language
The list of topics below is largely based on part 1 of Programming:
Principles and Practice Using C++ (2nd edition).
- Can build and run programs
- "Hello World!"
- Understands the building/linking process
- Can declare, initialize, and assign variables
- Can perform input/output operations (std::cin, std::cout)
- Understands the various commonly used types
- Signed and unsigned integer
- float and double
- std::string
- Understands expressions and statements
- Are "i++", "3 + 2", and "int i = 0;" each an expression or
statement?
- Understands implicit/explicit (casting) conventions
- Understands loops/iteration (counters, range-based, iterators)
- Can prototype, define, and call a function
- With a return type of void
- With a return type of int
- Can return a value which is used by the caller
- Can instantiate a std::vector
- Add elements
- Index into vector
- Understand different kinds of errors and how to deal with them
- Compile time errors
- Run time errors (extremely important to handle properly)
- Exceptions thrown by standard containers, etc.
- Knows when to utilize functions to deduplicate behavior and manage
complexity
- Can define a class
- Contains member variables and functions
- Contains a constructor and destructor
- Uses the default constructor or "= default" for empty
implementations
- Includes static member functions
- Understands the significance of static member functions
- Creates appropriate files (ClassName.hpp, ClassName.cpp)
- Defines class in header with include guards
- Includes header in source file
- Writes implementation in source file
- Understands the uses of public, protected, and private class
membership
Constructing a Program
- Makes effective use of language features
- Follows commonly accepted best practices
- Uses proper format/style
- Follows an appropriate problem solving process
- Understand the problem
- Formulate a design
- Implement the design
- Test the design
Testing and Debugging
- Can effectively debug a program through analysis of its behavior via
a debugger or print statements
- Knows how to thoroughly test one's code to ensure a quality
product
- Consistently delivers well-tested software
- Can use Google as an aid in solving one's problem
Git
- Can create a new Git repository
- Can make commits in separate branches
- Gerrit
- Can push branches to Gerrit for review and provide feedback to
others
- Knows how to rebase patches to push them for review
- Can fetch changes from Gerrit
- Can resolve conflicts when merging or rebasing
- Understands the value of code review in quality assurance
Robot
- WPILib
- Can write code to control a simple two-wheeled robot
- Two joysticks: one for forward speed; one for turning
- DifferentialDrive
- Can interface with various sensors (encoders, limit switches,
gyroscopes) and perform actions based on their outputs
- Embedded systems
- Understands the tenets of event-driven design
- What is an event?
- How are they used in state machines?
- Can design a state machine to model the desired actions of a
robot when completing a task
- Control Theory
- Knows the dynamics of a PID controller, its limitations, and how
to tune one
- Knows how to use motion profiles with feedback controllers and
the importance of feedforwards
- Can apply filters when necessary to obtain better estimates of
system outputs
- If students have time, they can learn feedback controller design
(more feedback controllers exist besides PID)
Slack
- Is a member of frc3512.slack.com
- Can effectively explain one's problem when asking for help
- Can use Google first
-
How to Ask Questions the Smart Way
Veterans
Us mentors assume you already know how to write software. Software
engineering is what we really want to teach you. If you can explain this
year's robot code and why you designed it that way versus the other
possible designs, you have succeeded and have likely earned a varsity letter. It shows you contributed in the design
phase and know the trade-offs (engineering is essentially the process of
choosing the least bad design based on some criteria and justifying that
choice). Our role as mentors is to show you what tools are available in the
C++ language so you can make an informed design decision.