Amiga.org

The "Not Quite Amiga but still computer related category" => Alternative Operating Systems => Topic started by: Ni72ous on September 29, 2004, 06:43:24 PM

Title: two beginners programming book, which to learn?
Post by: Ni72ous on September 29, 2004, 06:43:24 PM
Right i have a biginners c book and a biginners c++ book, what do you think i should use, i only want to stick with one language at the moment.
Title: Re: two beginners programming book, which to learn?
Post by: adolescent on September 29, 2004, 06:48:37 PM
Read the C book first, then you'll be in love with C++ because of it's improvements.  (and it'll be a breeze because there isn't a whole lot of differences).
Title: Re: two beginners programming book, which to learn?
Post by: BigBenAussie on September 29, 2004, 07:18:43 PM
Based on your question, I just wanted to make sure you realise that knowing how to program in either of those languages does not mean you'll immediately be able to program something for the Amiga platform. But its a good start.

If you haven't realised, there's more to it than the programming language. You'll need to learn about the Amiga Application Programming Interface(API) and there are different flavours to consider as well. Not to mention details about the Amiga OS architecture.
Title: Re: two beginners programming book, which to learn?
Post by: Jose on September 29, 2004, 07:23:41 PM
I have a pretty good C++ book that says that every good C++ programmer should be a good C programmer first.
Title: Re: two beginners programming book, which to learn?
Post by: Ni72ous on September 29, 2004, 10:03:43 PM
@BigBenAussie

yup i got that, i understand there are many differences, i have both Amiga NDK and Windows SDK for the different platforms etc, its just the C++ book say no need to bother with C, should i do C or just go with C++?.
Title: Re: two beginners programming book, which to learn?
Post by: Ni72ous on September 29, 2004, 10:06:16 PM
@Jose

My book contradicts (Think thats how you spell it oO) that, it say no need to bother with C  :-x
Title: Re: two beginners programming book, which to learn?
Post by: Cyberus on September 29, 2004, 10:22:18 PM
When I learned C/C++ at university, we started with C and then moved onto C++ pretty quickly. This gave us a pretty good grounding in both.
Title: Re: two beginners programming book, which to learn?
Post by: Cymric 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.
Title: Re: two beginners programming book, which to learn?
Post by: iamaboringperson on September 30, 2004, 12:29:33 AM
Quote

NitrousB wrote:
Right i have a biginners c book and a biginners c++ book, what do you think i should use, i only want to stick with one language at the moment.

If you plan on doing something professional, or getting a job from programming, start with C++.

If your not sure that you want to be serious, try C. 'C' if you like it (Sorry, couldn't resist!), if so, then you might start in C++ later.

Title: Re: two beginners programming book, which to learn?
Post by: Waccoon on September 30, 2004, 02:21:26 AM
Quote
I have a pretty good C++ book that says that every good C++ programmer should be a good C programmer first.

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.

I'd recommend learning a bit about OS architecture, too.  C is about processing data, but if you know how the OS works, you may find there's already tools out there that do the job so you don't end up re-inventing everything.  I recommend this book for budding programmers, especially those that don't really know why Linux is so popular for servers:  UNIX Programming (http://www.amazon.com/exec/obidos/tg/detail/-/0131429019/qid=1096506680).  I just wish he didn't dump on Microsoft so much.  It's unprofessional.  He also mentions the Amiga in the book, but compares it more to OS/2, which I find a bit strange.  I used OS/2 for a few years, and while I liked it, I didn't find it Amiga-like at all.

Quote
While learning C++, you are faced with the aditional problem that almost no book teaches you how to properly design an OO-program.

Indeed, documentation is pretty poor.  I have the same problem with Perl books.  Why people still parse their own CGI data manually and use fully exposed regex statements instead of subroutines is beyond me.

That's one nice thing about Java.  The docuentation is excellent.  Too bad Java just works so poorly in practice.
Title: Re: two beginners programming book, which to learn?
Post by: Cymric 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?
Title: Re: two beginners programming book, which to learn?
Post by: nex4060 on September 30, 2004, 10:21:05 AM
I would learn C++ first! because then the object oriented part of the programming language will be a natural part for you.
If you can program C++ then C will be very easy.
That's the way I have learned C/C++ :-)

Title: Re: two beginners programming book, which to learn?
Post by: Ni72ous on September 30, 2004, 11:35:42 AM
Thanks for all your input, i think i will start with C++.
One thing before i start, someone suggested i read a book about Jackson structured programming if i learnt C, would this book be of any use whilst learning C++ or is it only useful for C programming?

Title: Re: two beginners programming book, which to learn?
Post by: nex4060 on September 30, 2004, 11:54:25 AM
I would start with a C++ book. Because the syntax is a bit different in C. If you want to get started fast then find a book called "C++ in 21days".