May 18, 2020
Programming is hard. Whether you're just beginning to learn or you've been programming for years, you're going to run into roadblocks and get stuck. Our Data Science Instructor, Ryan Orsinger, has seen 36 cohorts of students come through Codeup and helped build their problem-solving skills through live, audience-centered lectures. Check out his recipe for success below:
You're learning to code, learning the syntax for a programming language, and working on thinking programmatically. The lesson or lecture is completed and now you're now facing a programming problem that is expecting you to understand and apply the new content.
1. With intent, read the curriculum and the code examples.2. Go back and deliberately read the example code very closely and slowly.3. Copy any example code into your editor.
4. Run the example code5. Observe results. Think about each piece of code. What is it doing, what did you expect it to do?6. Try modifying the example code so that you change variables to see different results (one at a time...)If the example code demonstrates how to make a loop from 0 to 9:- Modify the code to make a loop that starts at 1 and ends at 10.- Modify the code to make a loop that starts at 10 and counts down to 0.7. Try removing as many moving pieces from the code for the new concept as possible... try to isolate a unit of work that uses the new concept and test it in isolation8. Read the first exercise problem. Read it slowly, with attention to detail.9. Ask yourself questions about the exercise:
10. Work to write code for a smaller problem than the exercise asks.If the exercise says:- Prompt the user for a number between 1 and 50- If the input is not numeric or out of that range, ask them again for a number. Repeat until they give a number between 1 and 50.- Start by making sure you're able to prompt a user, then store the result of prompt to a variable for later.- Go after the low-hanging fruit first. Momentum begets momentum.11. If you're still having problems and stuck, go to step 1.12. If friction, confusion, and "writer's block" persist, then ask for help from another human being. Explain the steps you've already taken, and attempt to ask your question as clearly as possible. Here's a good resource on how to ask effective questions!
Ryan Orsinger is a proud instructor here at Codeup. Check out his personal blog for more insightful information here!
If you were inspired by this article and have any questions about our programs, give us a call. We'd love to chat.