-
Notifications
You must be signed in to change notification settings - Fork 0
Find the Bug
The Find the Bug challenges are to get you more comfortable with getting rid of issues within your code and familiarize yourself with the VSCode debugger. These challenges are all under the find-the-bug folder within the training project. Please use the Problems tab next to the terminal or press Ctrl+Shift+M to help you. There will be a lot of bugs within this tab but you can collapse each class that you aren't working on at the moment and focus on the one you are on. Some of the messages you get you will have to google to understand, others will suggest a solution. The autofill solution isn't always the correct solution!
Remember to run your code press F5 or go to Run on the top bar and click on Start Debugging.
Go to the find-the-bug/.levels folder and start at level1.java. If you need a hint, the text file below the java file is the hint! Continue through these in order (they mostly get more difficult the further you go). If you get stuck and the hint isn't helping you can skip it and come back to it later.
Some of these are just typos that need to be fixed for the code to compile, others are logic issues that need to be fixed so the program works as expected.
If you get stuck or need help check with a returning student, captain, or mentor, but first try and search for a solution using online resources like StackOverflow. If you run into compiler or runtime errors sometimes even running a simple google search can be helpful in identifying bugs within your code. Great programmers are great problem solvers and sometimes one of the best tools for solving the problems we face is simply by googling it.
Next up is Buggy Bot! Go to find-the-bug/buggyBot/src/main/java/frc/robot. Within this, you are tasked to squash those bugs from the all subsystems, Constants.java, and RapidReactCommandBot.java. This is an example of what robot code looks like and you can see more of a real example of bugs that could happen. Some of them are just syntax errors, others are logic errors. Good luck!
If you get stuck or need help, you can always check with a returning student, captain, or mentor, but first try and search for a solution using online resources like StackOverflow. If you run into compiler or runtime errors sometimes even running a simple google search can be helpful in identifying bugs within your code.
Great programmers are great problem solvers. Sometimes one of the best ways to solve the problems we face is simply by googling it.