Getting Help
There is a lot going on in this class, and we move fast. I am here to help. This little guide is to help you to help me answer questions.
Before you reach out
I’m happy to help, but you will learn faster if you can help yourself. So here are some tips on how to help yourself (and if you have gone through them before reaching out, we can be more efficient too).
If something isn’t working
Make sure that you run all of the tests and the linter.
Read the error messages fully. Sometimes the name of the test is misleading. I might write a test that is called something like “Order of values is reversed”. You can see on the page that your code reverses the order, but my test fails. It could be that the test is failing because my tests expects something to be named differently, or it is expecting the display to have some format that you didn’t follow. Look at all of the tests your code fails. If they are all for the same unit or component, there is probably something fundamentally wrong (like formatting or not returning a value, etc.) Look carefully at what the expected versus the received values on the tests.
If the code runs in the browser, open up the development tools and watch the console for errors.
This process will kickstart the “scientific” approach to debugging - Figure out what you expect to happen (as specifically as possible) - Look at what actually happens - Develop a hypothesis to explain the discrepancy - Test the hypothesis (console.log
, the debugger, or write a new test)
Many times you can identify your own error this way.
I also suggest trying to make the simplest possible example that displays the problem. This can help focus in on where the problem is (and sometimes the process of stripping back reveals the problem).
There is a concept or approach you don’t understand
Avail yourself of the course resources.
- Look back over the slides
- Read the posted lecture notes
- Read your own notes
Online documentation is okay too!
Experiment! Our hot re-load server makes it very easy to just make little tweaks and see the outcome. Again, you can make use of a simplified scientific method here as well.
- Make a hypothesis about what the code should do
- Try it
- Examine the outcome to see if it matches the hypothesis
- If it doesn’t, form a new hypothesis to explain the discrepancy and repeat
Reaching out
Outside of office hours
If you want to ask a question about your code, make sure that a current version is pushed to GitHub (unless the problem is that it isn’t pushing to GitHub).
All questions should go to Campuswire.
Consider if it is better to post to the class or DM me.
If you have a general question, someone else in the class may be able to help you. It is also possible that others would benefit from the solution as well.
If it is a specific question (such as a line or two of code that you need help debugging), then that is probably more appropriate to send to me directly.