PDA

View Full Version : studying c++ programing ... concern



azsquall
05-02-2008, 09:58 AM
hi guys!

i have 1 year off school (grad school transition, hopefully :) ) and my company actually prefer individual with c++/c# programing skill which a person, studying physics like me, doesn't have much.
So, I decided to go on my own by self-studying.

1. Reading 2 books abot C++: deitel&deitel and another one from D.S Malik "C++ program"
2. Try to do as much as exercise programs as possible.

But, i'm only at control structures (if, while, do, for, switch) and I encounter a program of separating digits from an integer number in order to add them.

I found this hard (without using string and array) and I ended up google the algorithm.

Aren't you supposed to come up with the solution by yourself?
I'm just worried about the quality of self-studying like that.

thanks for any insight! ;)

CornedBee
05-02-2008, 10:28 AM
I found this hard (without using string and array) and I ended up google the algorithm.
Strange, because this is a purely numeric puzzle and should be well within the realm of something a physics student should be able to do. Programming is all about problem solving. You need to break your problems apart into pieces small enough that the computer understands them.

For example, in this case your thought process should have been something like:
1) The problem is adding up the digits of a number.
2) So I need to break up the number into digits, and I need to add them together. Make that two sub-problems.
3) Adding numbers together is simple. Start with 0. Add every new number to it as it comes up.
4) Now how to split a number into digits?


And yes, you're supposed to come up with the solutions to these puzzles yourself. Being able to implement an algorithm using the programming language is language basics, but not really programming.

However, I don't feel that this is really any different in self-studying and in classes. Problem solving is something that's generally expected to be picked up along the way, instead of being the focus (as it should be, IMO.)


So, what I'm saying is, continue with the self-studying. Most programmers start this way, I think. But focus on training your problem-solving skills.

azsquall
05-03-2008, 04:18 PM
thanks big time!
quite uneasy to get used to programming, i.e. think like a computer :D

Elysia
05-03-2008, 04:22 PM
But then again, a good programmer must also know how to use google, etc, to find solutions to their problems!
So don't feel bad :D

azsquall
05-03-2008, 04:30 PM
good point :D
couldn't agree more!