I am a straight A student with the exception of this c++ class. I would like to resolve this. I only have to take this one class in computer science however I would like to improve. What are some ways that you experts out there learned this craft? I am putting in a considerable amount of time but barely keeping my head above water. Is this something that either you get or don't? Just like I will never play in the NBA. I now have immense respect for this profession. I never knew what it entailed! I feel like there must be some secrets to studying as this is so different than other disiplines. Any advice?
Stop thinking about syntax and start by thinking about solving the problem. Too many beginners get hung up on the syntax, which is not what programming is. It's thinking about the problem in a way that lends itself to a programmatical solution.
ne555- Why? I have no idea I'm a second year civil engineering student and this is a emphasis requirement. It's to improve logical problem solving I assume.
Moschops- Should I focus more on the pseudocode then?
Moschops- Should I focus more on the pseudocode then?
Once you've worked out how to actually solve the problem, slotting in the syntax is easy, particularly at the level I expect you're working at. Definitely work out how to solve the problem first, and then turn it into code. However you choose to do that - pseudocode, drawings, lists of steps in plain English, buttons and seashells on a chalk grid - is up to you.
More experienced coders do often start slapping down code straight away, but it gets changed around and altered and fiddled with and moved and deleted and iterated; they're not writing the actual code, they're thinking about the problem in a convenient form - pseudocode, drawings, lists of steps in plain English, buttons and seashells on a chalk grid ... or code on the screen if you're so familiar with the syntax that you can think in code.
I took one as an elective, now I've changed majors :)
To add to Moschops, break your problem into manageable pieces. I've seen many people fail because they were trying to write an entire program at the same time. Get a handle of one thing at a time.
LowestOne- Good for you, seriously! I will not be changing majors just hoping to pass, but I can see the appeal, and again I've gained alot of respect.
Moschops- Thanks! You are exactly correct I have been pretty much just starting with syntax. I'm going to get a white board to start developing the initial problem solving.
Get a good book and start reading it, (as it will help you think like programmers!) Then practice some programming...but before coding it, understand the problem and solve it on a paper by making ur 'logic diagram' about that problem, then code it....