Page 1 of 1 [ 11 posts ] 

Googolplexed
Butterfly
Butterfly

User avatar

Joined: 21 Apr 2007
Gender: Male
Posts: 10

12 Dec 2007, 12:35 am

How many people here know how to program in c++.
How hard was it and how long did it take

I'm 14 and have been trying to learn c++ since i was 10
it failed most of the time but i feel that i can grasp most of the basic concepts now of c and c++
(i can't believe that i didn't understand why i should use loops :oops: )

Anyway how should i progress towards my goal of being able to program in C++
any books or anything.

how should i go about becoming a better programmer



psychedelic
Sea Gull
Sea Gull

User avatar

Joined: 27 Nov 2007
Gender: Male
Posts: 245
Location: Somewhere over the rainbow

12 Dec 2007, 12:45 am

I learned C++ when I was an undergrad. I only took and passed two classes, though.

I would buy a textbook and study it religiously. I recommend the one written by Savitch (or something like that). He writes several textbooks so make sure you buy the one for beginners. He's from UC San Diego.

I heard C++ is more powerful than Java or Basic but that both Java and Basic are easier to pick up. In fact, I think that was the original purpose for the creation of Basic.


_________________
If there's such a thing as god, he's a sick bastard.


iceb
Veteran
Veteran

User avatar

Joined: 26 Apr 2007
Age: 67
Gender: Female
Posts: 1,562
Location: London UK

12 Dec 2007, 12:58 am

C is my favourite programming language.
Open Watcom can be downloaded fro free. http://www.openwatcom.org/
I would say some programming knowledge is more than a bit useful (I already used BASIC and had experience of assembler (TI9900) before I learnt C and C++)

there are lots of good books on C++
Good programming practice is essential, writing clear and meaningful comments throughout your code so when you come back to it you (or anyone else) can figure out what your doing.

I was taught whilst studying AI at university.
Book I have "Program Development and Design Using C++" Gary J Bronson
Was for whole year double module.


_________________
Wisdom must be gathered, it cannot be given.


Last edited by iceb on 12 Dec 2007, 1:23 am, edited 1 time in total.

twosheds
Raven
Raven

User avatar

Joined: 23 Feb 2007
Age: 44
Gender: Male
Posts: 108

12 Dec 2007, 1:06 am

Learn C first. It's a much smaller and more elegant language.

If you really want the object-oriented sugar that C++ offers, you can easily pick it up once you're comfortable with C. (Don't be fooled into thinking C++ is "more powerful" than C, though. It's entirely possible to express an object-oriented design in pure C, and IMNSHO learning how to do that should be a prerequisite to learning C++'s OO features. I've seen lots of really awful code written by people who used C++'s OO features without actually understanding what they were doing.)

Actually, if you like playing with really low-level stuff, think about learning a little bit of assembly before (or in parallel to) diving into C or C++. Once you're used to dealing with memory addresses in CPU registers, concepts like pointers will be second nature. 8)



Stewie
Blue Jay
Blue Jay

User avatar

Joined: 26 Nov 2007
Age: 46
Gender: Male
Posts: 76
Location: Fedoraland, USA

12 Dec 2007, 1:19 am

It's awesome that you want learn programming at your age!

I'm quite experienced with C++, but I don't know what books to recommend to you for beginners learning. You may want to see if Cay Horstmann, Professor at San Jose State, did any C++ books. His Java book was great for beginners. He had good explainations, writing style, examples, and overall flow of information. What I'm afraid of in your case is that many C++ books tend to jump into advanced topics quickly. Not to say you won't someday read them with ease, but you don't want to get to bogged down early on.

A good beginners book should have program problems at the end of the chapter. You should do a few to make sure you really understand what's going on. If you've done basic variables types and loops, I assume you can print output to the screen and have written some code and got it to display the results you wanted?

I would guess that after variables and loops, you may want to move on to either:
1. arrays
2. functions: calling, passing parameters by value and reference, and returning values. This will also introduce you to variable scope.

I would recommend that you cover the basics in an intro to C++ book, code some of the programming problems at the end of the chapters, and then write you own program. Think of something you would like to write for yourself. Something that would require effort.

If you want to be a better programmer, write code! After you go through a beginners book, write a good sized program for yourself. Then move up to a higher level C++ book. If you can grasp advanced topics, then you can pretty much do whatever you want. In my opinion, writing code to display windows and things like basic graphics is easy, so I wouldn't spend alot of time of it. Once you get past the beginners material, there is no limit to what you can do.

Write code. Read more. Think about how you can apply new ideas to old code to make it better. Post what topics you know, and that will give people a better idea where you are at.



Stewie
Blue Jay
Blue Jay

User avatar

Joined: 26 Nov 2007
Age: 46
Gender: Male
Posts: 76
Location: Fedoraland, USA

12 Dec 2007, 1:23 am

Personally, I would hold off assembly language until you have a good grasp of C++, since you started with C++ stick with it. I think it's more fun to start with a high-level language, then go down to assembly and such. You have plenty of time for that later. First prove you can do it at a higher level.



jonk
Deinonychus
Deinonychus

User avatar

Joined: 17 Nov 2007
Age: 69
Gender: Male
Posts: 329

14 Dec 2007, 10:51 pm

Stewie wrote:
Personally, I would hold off assembly language until you have a good grasp of C++, since you started with C++ stick with it. I think it's more fun to start with a high-level language, then go down to assembly and such. You have plenty of time for that later. First prove you can do it at a higher level.
I think I agree with a lot of what you said here but I actually disgree about the "hold off" part about assembly. I think learning assembly should be the FIRST thing one learns, in programming. Not something towards the tail end. The 'unconscious paradigms' that develop in your head from using high level languages can be very difficult to break, later on. Just my opinion on it. But in 35 years I've never known a case where someone started with assembly and later had trouble with OO concepts or with exception handling or templates and so on. But I've had to teach university level students who learned on BASIC or C++ first (100 level), for example, and then had to take a course (200 level) I was teaching on computer architecture and had very hard times breaking out of their mental paradigms to "get it." While in the same class students who had learned assembly first had exactly ZERO trouble. This was a required course for a degree, not an optional one, by the way.

Jon



Stewie
Blue Jay
Blue Jay

User avatar

Joined: 26 Nov 2007
Age: 46
Gender: Male
Posts: 76
Location: Fedoraland, USA

15 Dec 2007, 1:21 pm

jonk wrote:
Stewie wrote:
Personally, I would hold off assembly language until you have a good grasp of C++, since you started with C++ stick with it. I think it's more fun to start with a high-level language, then go down to assembly and such. You have plenty of time for that later. First prove you can do it at a higher level.
I think I agree with a lot of what you said here but I actually disgree about the "hold off" part about assembly. I think learning assembly should be the FIRST thing one learns, in programming. Not something towards the tail end. The 'unconscious paradigms' that develop in your head from using high level languages can be very difficult to break, later on. Just my opinion on it. But in 35 years I've never known a case where someone started with assembly and later had trouble with OO concepts or with exception handling or templates and so on. But I've had to teach university level students who learned on BASIC or C++ first (100 level), for example, and then had to take a course (200 level) I was teaching on computer architecture and had very hard times breaking out of their mental paradigms to "get it." While in the same class students who had learned assembly first had exactly ZERO trouble. This was a required course for a degree, not an optional one, by the way.
Jon


That's an interesting point. But at the same time, I've known assembly and C programmers who just can't seem to fully grasp true OO. They always want to revert back to the straightforward design techniques that they know best. But, you may be right, maybe it is better to start with assembly. I don't think so, but I could certainly be wrong!

It probably has more to do with the student than the language they first used. I started with C++, but really enjoyed my assembly classes. It taught me to think how my C++ code was actually being implemented at the low-level. My opinion is that if I learned in reverse order, it would have made absolutely no difference in my programming ablility, as long as I learned both. Either without the other is no good. Then it comes down to which is more fun. For a teenager, in general, I would encourage a high-level language to maintain their interest. Then, if they are still interested and want the nuts and bolts they can have them.



kicken18
Yellow-bellied Woodpecker
Yellow-bellied Woodpecker

User avatar

Joined: 27 Dec 2007
Age: 38
Gender: Male
Posts: 50
Location: Kent, England

28 Dec 2007, 4:42 pm

I tried c++, failed, learnt PHP was good at it, saw it was simular it was to C++, went back to C++, found it much easier, you might have a simular experiance



jonk
Deinonychus
Deinonychus

User avatar

Joined: 17 Nov 2007
Age: 69
Gender: Male
Posts: 329

06 Jan 2008, 12:54 am

Stewie wrote:
jonk wrote:
Stewie wrote:
Personally, I would hold off assembly language until you have a good grasp of C++, since you started with C++ stick with it. I think it's more fun to start with a high-level language, then go down to assembly and such. You have plenty of time for that later. First prove you can do it at a higher level.
I think I agree with a lot of what you said here but I actually disgree about the "hold off" part about assembly. I think learning assembly should be the FIRST thing one learns, in programming. Not something towards the tail end. The 'unconscious paradigms' that develop in your head from using high level languages can be very difficult to break, later on. Just my opinion on it. But in 35 years I've never known a case where someone started with assembly and later had trouble with OO concepts or with exception handling or templates and so on. But I've had to teach university level students who learned on BASIC or C++ first (100 level), for example, and then had to take a course (200 level) I was teaching on computer architecture and had very hard times breaking out of their mental paradigms to "get it." While in the same class students who had learned assembly first had exactly ZERO trouble. This was a required course for a degree, not an optional one, by the way.
Jon


That's an interesting point. But at the same time, I've known assembly and C programmers who just can't seem to fully grasp true OO. They always want to revert back to the straightforward design techniques that they know best. But, you may be right, maybe it is better to start with assembly. I don't think so, but I could certainly be wrong!

It probably has more to do with the student than the language they first used. I started with C++, but really enjoyed my assembly classes. It taught me to think how my C++ code was actually being implemented at the low-level. My opinion is that if I learned in reverse order, it would have made absolutely no difference in my programming ablility, as long as I learned both. Either without the other is no good. Then it comes down to which is more fun. For a teenager, in general, I would encourage a high-level language to maintain their interest. Then, if they are still interested and want the nuts and bolts they can have them.

Sorry, I've been kind of busy and just got back to write more. Forgot about this, but remembered again.

The fact that you've known assembly and c programmers who don't "fully grasp true OO" doesn't convince me that my experiences teaching undergrad classes in computer science to large classrooms of students is anything other than what it was. Those students with almost any level of assembly experience were almost to a person far better in more rapidly pursuing the established curriculums required to achieve a degree. And where most of my experience is at, in developing various nationally sold applications and commercial and scientific instrumentation, those I worked with with the least trouble and to the greater effect in getting the job done was with those having such experiences in their backgrounds.

However, I also don't mean to discount your own life and experience in this area. If you really feel that it hinders, instead of helps, based upon your own background and experience here then you are certainly entitled to your perspective on it. I just can't set aside all my own experience in this area. Perhaps we are like the blind men and the elephant, seeing different parts of the same thing.

Jon



Tilkor
Blue Jay
Blue Jay

User avatar

Joined: 21 Nov 2007
Age: 51
Gender: Male
Posts: 82

13 Jan 2008, 7:43 pm

If it helps any, I'd suggest writing programs in ANY form of structured programming language. My brother started programming professionally in RPG-IV and just switched to programming in Java just recently. As for Assembly specifically, I would stay away from that language unless if you REALLY know what you're doing (although helpful to help with the learning, it's a language that requires a more indepth knowledge of computer hardware than most other languages).

As for particular books, try "Thinking in C++, Volume 1 and 2". I'm not sure, but I think it's downloadable from www.MindView.net.