Struggling on the first week of CS50, need advice.
Posted by funeralfursuit@reddit | learnprogramming | View on Reddit | 5 comments
I just started taking CS50, a free course from Harvard a few weeks ago. I’m relatively new to coding itself however, I’ve been stuck on week one for about three weeks now (luckily it’s go at your own pace ie no set deadlines) and I feel as if I wasn’t learning anything. I completed the introductory “Hello World”, and other starter programs that they suggested however, I started doing extra exercises to attempt to help myself. I know with coding, like any hobby, you need experience and just working out new problems helps.
When I’d ask for help or an explanation it feels as if the programmer mentors are frustrated with me because they cannot dumb down the material enough. Luckily I have a friend that’s been helping me explain code verbally and it’s helping more than sitting on scratch for 5 hours ever has but I still feel like I’m missing something. Basic functions are hard to write and I know memorization isn’t really your friend in this subject so how exactly do you know what to code?
I feel like I’m constantly copying-pasting and trying new things to get certain examples to work correctly. Is this wrong? Should I be approaching this another way?
aqua_regis@reddit
Trying, experimenting, breaking, fixing, failing, struggling, and finally succeeding are the exact ways to learn.
Keep going. You're on the right track. Just take your time.
Also, do thought experiments - think about how you would solve your tasks. Don't even think about writing any program at that stage. Only focus on developing your steps to solve the task. Track the steps down. And then, test your steps. Refine them. Break them down further. The smaller, the better.
Once you have working steps, start thinking about converting them into programs.
Scratch is a great tool for that. It lets you focus on the algorithm, on the steps to solve problems instead of on having to also battle a programming language with its keywords, syntax, and peculiarities.
funeralfursuit@reddit (OP)
I’m going to be honest I’ve worked with scratch and I know people state it’s helpful to see things the way scratch displays it but it’s something that has never helped me understand programming easier. It’s great for understand structure I suppose but other than that it feels too simplistic.
I’m going to really look into basically what you’ve stated, asking myself how I would solve it myself and looking up that function to see if I can do it. I feel bad asking for advice for this but I was attempting to get help from a Harvard mentor this morning and he was so frustrated with me he was rude. It’s discouraging but now I have to learn how to do this out of spite.
NationalOperations@reddit
So I remember using some kind of visualization programming in the early 2000's and I HATED it. I learned so much more just sitting down with a book and doing Java.
Scratch is cool, and I'm sure it's the best first step for a lot of people. But I get having the visual abstraction making things feel more complicated.
So I recommend this as an alternative. Find a online compiler/ide for C (I believe that course does that week 2) and just try and make a hello world. Play with adding numbers. Just spend time making and breaking simple things so you have that internal experience to use. This way may not be for everybody, but it really helped me
EntrepreneurHuge5008@reddit
You first learn how to solve the problem by hand. The bottom line is learning to tell your computer to do something, but to do that, you have to talk to it like it's dumb. This means laying out each step without skipping any "intermediate" steps.
Don't know which CS50 you're doing (x, p, w, ai, etc), so I can't pinpoint exactly what you're learning, but the thought process is the same.
Don't think of it as "How do I solve this with XYZ programming language?"
Think of it as "How would I solve it without XYZ programming language?" and THEN ask "Is there a function that does this step, do I have to write the function myself, or do I have to break it down even further?"
funeralfursuit@reddit (OP)
I’m doing CS50x and I keep going over the Mario and Cash examples. The class lectures and note videos aren’t particularly helpful; it’s actually more helpful to do research and read up on the different functions but I’m trying to stick to the coarse material so I don’t do anything wrong.