I'm currently taking the Harvard CS50 online course, and while I can grasp the code I see and the examples presented in the lessons, I'm having a tough time writing code from scratch. It's similar to understanding a spoken language but struggling to compose sentences myself. I believe practice will help, but I'd love to hear any tips to help me get past this hurdle more quickly!
5 Answers
You might be stuck in what's called 'tutorial hell.' It feels good to complete guided lessons, but true understanding comes from struggle and failure. It’s crucial to manage your expectations and analyze problems deeply before typing any code. Just remember, it might take time, but it’s all part of the journey. Keep at it!
Start small and gradually increase the complexity of your projects. Can you write a simple 'Hello, World!' program without looking up examples? If not, try copying one and then practice recreating it from memory. From there, move on to taking user input and printing it. Breaking down larger problems into manageable tasks will make things more approachable over time.
It sounds like you might need to focus on problem-solving skills. Understanding code is the last step; first, you need to figure out how to approach and solve problems before you can write code for them. Consider working through exercises and really analyzing how you can break down problems into smaller parts. It's all about learning which commands achieve your goals. Good luck!
Consider exploring open source projects related to your interests. Dig into them to understand their structure, and then try to recreate a similar project from scratch. This hands-on approach gives you practical experience and context, which really helped me in my learning!
The best way to learn is just to dive in and start coding! At first, it might be overwhelming, and you’ll make lots of mistakes, but that’s part of the process. I suggest getting a good physical book on your chosen language. There’s something about flipping through pages and marking them up that makes it easier to find information quickly when you need it.
I've been working on this by writing out my plan in pseudocode first. I list all necessary actions and values before coding. I've found it helps translate my thoughts into syntax! I've also been repeating assignments—doing them once, then again the next day. Feels productive!