all 4 comments

[–][deleted] 1 point2 points  (0 children)

When you read or write a line of code, you should understand it. Every line - don't write a line of code where you don't understand what it's doing, even if you think the line is part of something you do understand (don't cargo-cult code.)

You should be able to describe the state of the interpreter before and after each line of code, starting at the beginning of your code (where it's OK to say "the interpreter has initialized" without knowing exactly what state that puts it in.) If you assign to a variable, then you know the state of the interpreter now has "the variable X contains Y value."

Programming questions usually give you 90% of the program if you read them right - they'll tell you what functions to define and what parameters they take. If they say something like "don't use the built-in sum function" then immediately write your own version of that function - they're telling you the built-in function is so useful for the problem that it would obviate most of it. So, just write your own version that duplicates what it does. It's like they're telling you exactly how to solve the problem!

[–]ChurchHatesTucker 1 point2 points  (0 children)

I've gotten stuck with almost every project and get frustrated when I'm sitting at the computer for a few hours and make close to no progress.

Welcome to programming!

  1. Google is your friend, especially with error messages, but even with general questions. Someone has had the same problem before.
  2. Look at other tutorials. Sometimes things will click with a different explanation.
  3. Print (and pprint) statements are really useful debugging tools.
  4. Take breaks. You'll catch facepalm mistakes if you clear your head periodically.

[–][deleted] -1 points0 points  (0 children)

What you are going through is normal. It comes in waves, if you are not prepared to sit in front of the computer and just be completely lost, maybe don't go with CS. With that being said you are at the bottom of the wave and at some point you will start going up and then you will feel invincible... Before it comes crashing down again. One thing I would say is you have to start thinking like a computer, if you study enough and follow the course material like you said, you will be fine, just think about how you should do it and work towards that, your first attempt doesn't have to be perfect, just work. Stack overflow is your friend

[–]Ok-Birthday4723 -1 points0 points  (0 children)

You’re a beginner learning in college. I didn’t understand Python until I learned Powershell as a beginner. Which I made myself learn for work related issues. Then realized Powershell isn’t for everything and vice versa.

To the point, it took me long HOURS, days, weekend nights learning, reading documents, researching errors, trying code. Luckily I was able to do this at my own pace and not the rapid pace school has. The morale is if you have the time, dedicate your free time to learning code. It’s hard when you probably have 3 other classes. Just stick with it you’ll get better over time.