- Say "Let me just make sure I understand"
- Describe the problem in your own words
- Walk through an example, including diagrams
- Think about edge cases
- Read and try to understand error messages
- Compare syntax with sample code known to work
- Comment out code until it compiles, then slowly add code until you encounter an error
- Google it, then try to understand the stack overflow answer. Read the best answer, read the official documenation for method calls, etc.
- Print debugging (or with proper IDE debugger).
- Try different way to write the same logic. For example, use standard function instead of anonymous closure (you will encounter this problem when trying to sort in reverse order)
- Write a simple app which demonstrates the problem, then post a question on StackOverflow with code for the sample app. (If you cannot demonstrate the problem with a sample app, compare it to your full app which contains the error)
- Object diagrams
- Sequence diagram
- Algorithm sketches with example