Welcome, Guest. Please login or register.

Author Topic: two beginners programming book, which to learn?  (Read 3822 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Cymric

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 1031
    • Show all replies
Re: two beginners programming book, which to learn?
« on: September 29, 2004, 11:04:27 PM »
My advice would be 'it depends'. If your main goal is to learn how to use object-oriented languages, spend as little time as you can in the C-book and then move on to C++, or begin with C++ straight away. The problem is that both languages force a certain, but different way of problem solving on you. Either language supports the method of the other, but the result is never pretty. Writing OO-programs in C involves a heck of a lot of pointer wizardry; writing procedural programs in C++ inevitably abuses the OO-ness of the language, making it very hard to properly OO-ify the program later on.

While learning C++, you are faced with the aditional problem that almost no book teaches you how to properly design an OO-program. The syntaxis of C++ is not very difficult, but understanding the semantics requires a surprising amount of effort, much more than just working through the book on C++ itself. To use C++ effectively without shooting yourself in the foot (not with a big gun, at least) you require specialised literature. Despite its not-so-young age I recommend Cay Horstmann's Practical Object-Oriented Development in C++ and Java (Wiley, ISBN 0-471-14767-2) for the finer points. Read that along with your Teach Yourself C++, and you'll become a proficient OO-coder.

However, I am of the opinion that every C and C++ programmer should have torn out their hair at least once over a frustrating and exceedingly subtle pointer problem. You won't really start to appreciate languages which don't have pointers until you have had your nose rubbed in it.
Some people say that cats are sneaky, evil and cruel. True, and they have many other fine qualities as well.
 

Offline Cymric

  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 1031
    • Show all replies
Re: two beginners programming book, which to learn?
« Reply #1 on: September 30, 2004, 09:41:56 AM »
Quote
Waccoon wrote:
C++ is an enhanced C. You really should be good at C before you move on to C++. That way, you also better understand when to use it, and when NOT to use it. OO programming has its drawbacks for many simple tasks, and OO programming only really shines with large, group projects. Learning how to make good, structured programs resusable is a major step towards understanding OOP.

Excellent point. Something was itching in the back of my mind when I wrote my first reply, and you put it to words.

@original poster:
So, what's it going to be? Which language are you going to learn first?
Some people say that cats are sneaky, evil and cruel. True, and they have many other fine qualities as well.