Page 1 of 2 12 LastLast
Results 1 to 15 of 26

Thread: RFI - C++ information or "Where do I begin?" for the new programmer.

  1. #1
    Developer Ratt's Avatar
    Join Date
    Dec 2001
    Posts
    533

    RFI - C++ information or "Where do I begin?" for the new programmer.

    I get questions in my PM box and email a lot asking me where people can start for C++, what books are good to buy, etc... You've all seen the posts.

    I honestly don't even know where to begin with this sort of question half the time.

    I'd like to compile a list of books that people think are helpful, from FIRST HAND EXPERIENCE. Both for reference and for learning.

    If any of you say the Deitel and Deitel UML w/ C++ book, I'm going to strangle you. Those of you who've read it, know what I'm talking about. Those of you who haven't, be thankful.

    I can say, though, and if anyone has anything to add -> if you are just starting out and know nothing about C++, go to your local community college.

    Take a beginning programming course, any language.

    After that, your class progression, IMHO, should look something like this:

    Basic C++ course (200 level)
    OOP with C++ (230 level)
    C++ Data Structures (250 level)
    GUI programming with C++ (300 level)

    After you have those 4 "required" courses, you can start diverging into the specific area you are interested in. You'll probably have reached the limit of what your local community college has to offer in that area, and will have to go to a 4 year or specialty school for further classes, but it will give you a solid foundation to either continue your formal education, or possibly strike out on your own and learn what you want to learn by yourself.
    The problem with defending the purity of the English language is that English is about as pure as a cribhouse whore. We don't just borrow words; on occasion, English has pursued other languages down alleyways to beat them unconscious and riffle their pockets for new vocabulary.

  2. #2
    Registered User brinx's Avatar
    Join Date
    Jul 2002
    Posts
    6
    When I first began programming in C++ I started with misc tutorials off of the web.

    Some can be found here:

    Cprogramming.com

    About 4 or 5 years ago (when I found it) this was a very good tutorial for graphics programming written by Denthor of Asphyxia, aka Grant Smith (which I haven't been able to find in a while until it was recently added to this site).

    I also recommend before starting any type of programming (especially graphics), that you should start with a solid foundation of english and mathematics.

    Arrays, algorithms, and the like, make much more sense with a solid math background. It is also harder to read documentation about programming, in general, if you can't decipher what half of the words mean.

    Hope this helps someone.

    Edit :: Rifled through some books that I had and posted the good ones.

    Practical C++ Programming, published by O'Reilly & Associates. Written by Steve Oualline.

    C Pocket Reference, published by O'Reilly & Associates. Written by Peter Prinz & Ulla Kirch-Prinz.
    Last edited by brinx; 03-07-2003 at 08:08 AM.

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    85

    A few good Books

    To add a little to this thread, I will mention a couple of books i've used myself.

    First, if you are new to programming in general, start with a course or book in "basic". Yes, this is an old, outdated language, but there really is no easier to understand language that is more forgiving than basic. I use it as a prototyping and flow layout language all the time. It's easier to learn programming constructs like functions and recursion when you're reading a language that is readable and understandable.

    For the very beginner in the C/C++ language the book "Structuring Techniques: An Introduction Using C++" Published By Prentice Hall, written by Andrew C. Staugaard, Jr. is a good book to start with. It's a few years old so I don't know if its still published or not, but it does give a good general layout for C/C++ programs, and gets into advanced data structures, memory management, and all that happy stuff that makes c/c++ the behemoth it is today. If you already know C/C++ this probably isn't for you as it's ment as a C++ Primer book so to speak (starts you with hello world and cout, and goes into data type discussions on the differences between int and char, etc.).

    Another book I find helpful is not a C++ book at all, but a C book. "The Waite Group's C Primer Plus" Sams publishing, Written by Stephen Prata is a good refference book. I'm not sure how it reads as an introduction to C itself, but It's rare I can't find a function in there and a discussion on how to use it.

    I also have at home (sorry, not with me) almost a master refference to the "Ansi" C++ language (though it was written prior to the ANSI standard being formalized for C++)...the book is arranged as a useage/command quick refference to both the C and C++ languages. This is by far the most helpful book I own when it comes to C/C++ Coding as if I have a question on useage of any function (or need to see an example of use) it is right there in an easy to find way. If I remember to look for it, i'll try to edit the post to include it.
    - Raistlin

  4. #4
    Registered User
    Join Date
    Aug 2002
    Posts
    143
    First, if you are new to programming in general, start with a course or book in "basic"
    Don't do this. For the love of God don't do this. If you have BASIC on your computer for any other reason than supporting code written by VB monkeys then learn how to uninstall it.

    BASIC (at least any incantation prior to VB.NET) is a hideous malformed beast that will teach you exactly the wrong way to programming. Prototyping in BASIC will lead to horrible code. Mimicing BASIC's flow control and structure handling is the best method of obfuscation known to man. BASIC is pretty much the bane of efficient and elegant programming.

    VB.NET is mererly a malformed beast that you can hammer into submission if you already know how to program nicely, but learning or starting with it will screw up any chance of your ever becoming a decent developer.

    BASIC, especially VB, will lull you into the sense of security that your project is going well right up to the point where you hit the wall and the complete lack of decency inherent in the language smacks you in the face making you take all sorts of horrid shortcuts, introduce non-deterministic behaviors and generally turn your project into one large aborted mess. If a VB programmer ever tells you they are 90% done and are just sorting out one last little glitch then run away. Scream occasionally too - it will help.

    This is not a prejudiced statement. This is an observation of fact after 10 years in the industry.

    [Ratt/casey: delete this or move it to R6 if you don't want it here - I'm not fussy and I know it's a rant]

  5. #5
    Registered User
    Join Date
    Apr 2002
    Posts
    151
    I would agree that BASIC is a bad idea.

    I also would reiterate the Waite Group's C Primer endorsement I had that little gem myself and it's very well-written.

    Another good way to learn is to look at sample code. There are literally millions of lines of sample code available online.

    That's how I became self-taught in C, Perl, and PHP, as well as MySQL. Just looking at sample code, then doing Google searches or manual checks for things I needed more information on.

    C++, Perl, Python, shell scripting, Ruby, etc. etc.

    Personally, I love Perl as a robust way to do things in a shell environment. Manipulating text and files is easy with Perl. Perl is for when your bash scripts just can't do exactly what you want.

    PHP is great for web programming. The syntax is very similar to Perl.

    C++ is what you want for writing something that you need performance for. Graphics, multi-user apps, etc.

    Prorgramming can be a creative outlet instead of writing poetry, short stories, novels, or drawing or painting.

  6. #6
    Registered User
    Join Date
    Nov 2002
    Posts
    55
    I have never done C++ or C++ GUI programming, only paralell number crunching using C and small stuff in Java. However there is one advice I got in my programming courses that I would like to pass on:
    Think before you type anything.

    As stupid as this sounds but this is the fundamental weakness introduced by BASIC.

    Once your project exceeds 1000 lines you are damned if you got no "big plan".
    As a rule of thumb, I spend usually about two third of my time on doing scetches on paper, a small fraction on actually coding and unfortunately still a lot on debuging.

    So before starting to learn advanced C++, learn some OO software engineering.

  7. #7
    Registered User baelang's Avatar
    Join Date
    May 2002
    Posts
    252
    I think that perl is a very good language to learn the basics of programming and OOP. form there you only need to learn to be a bit more strict to fit right in to C and C++.

    I am quite fond of the O'Reilly "zoo" books, although they are more a reference and less of a tutorial.

    http://www.oreilly.com/
    BaeLang
    ---
    "seek and ye shall find." <-- god's way of saying use the damn search button. (or grep)

  8. #8
    Registered User
    Join Date
    Feb 2003
    Posts
    9

    VB Monkeys

    written by VB monkeys
    hehe...I play with both...and to be honest for businesses around here I make more money of VB then C++ heh...reason being is you can make a small business app for their needs in a fraction of the time that it takes in C++...Would a C++ version run better, faster? NO...because the small apps these people need wouldn't make a difference what I coded it in heh
    One day computers will rule the earth...They make better decisions then we do 8)

  9. #9
    Registered User
    Join Date
    Apr 2002
    Posts
    20

    Python not Basic

    From my limited programming experience so far;

    To learn programming basics, Python is an excellent place to start. The development environment is great and it is extremely easy to follow. I knew I had programming classes coming up, so I figured I'd get a head start and found Python. You can learn GUI programming quicker in VB, but I don't know enough C++ or VB to form any other opinions.

    One more point I'd like to make is the syntax is only half of the equation. You also need to learn good programming practices. Once you know those, New languages are easy to learn, they just have different words to do the same thing.

    -----------------------------------------------------------------------------------
    End thread hijack

    To learn C++, we used An Introduction to Programming with C++, Second Edition by Diane Zak. It is repetetive (ex. "you can take a break or continue with the next lesson" at the end of every lesson) but well written and understandable. It starts with the basics and in general teaches how to program as well as the syntax.

  10. #10
    Registered User
    Join Date
    Feb 2003
    Posts
    126
    One more point I'd like to make is the syntax is only half of the equation. You also need to learn good programming practices. Once you know those, New languages are easy to learn, they just have different words to do the same thing.
    AMEN.

    If there is one thing you do before you write a single line of code, please make it learning the "Best Pratices" for programing, and for the language your using. Your whole programing life will be easier.

  11. #11
    Registered User
    Join Date
    Mar 2003
    Posts
    10
    When I went to college they started us off in C++ from day one. It's not a bad place to start IMHO if you want to be serious about programming. My advice, when you start writing your first newbie cin/cout newbie programs and start learning the syntax, take a look at the iostream library files. Try to see how those functions work and also look at the style the programmers use. Always make your code orderly and well documented. Trust me, it will make you a lot better later on. As for a first book, I can't really say as my instructor taught only from lecture and just gave us handouts of source code (the way it should be). Mabye some others might be able to help in that.

    For God's sake, DO NOT GET "Learn C++ in 24 hours" or "C++ for Dummies" type books. They will ruin you forever. (I've seen it happen )

    And always remember, no book can ever replace studying well written, well documented source code.

  12. #12
    Registered User
    Join Date
    May 2002
    Posts
    15

    Languages and Stuff

    At my school, the current computer teacher (this is a high school) and I are trying to figure out how to implement a less brain damaged (my term, not his) way to teach programming to the kiddos that want to learn it. He's doing an "Intro to Programming" kinda class that he does in VB. Why? I suspect it's because he's afraid of pointers... I haven't come right out and asked him, but that's my sneaking suspicion.

    I'm thinking a neat programming curriculum might:
    1. Teach kids how to make algorithms (doesn't really matter what language you're writing in, as long as you don't develop any bad habits..) Heck. Write it in LOGO for all I care (hehe... stick THAT in your flow control pipe and smoke it!) PASCAL! (eeech) Fortran..
    2. Teach 'em how to implement that algorithm in at least 2 different languages -- their choice.. (Key here is showing 'em that it isn't the language, it's the algorithm behind it.)

    My guess is that for quite a few programs, something like VB or (my personal favorite for something where I don't need to define a whole new class) QuickBasic (actually, not a bad little language... minus ANY kind of dynamic allocation support, it's not bad...) For other projects, a "healthier" language might be a better place to implement the algorithm. Heck... I've written Display Postscript and hooked it into Objective C >shudder<.
    I'd LOVE to teach a VAX assembly class, but I'll probably end up doing a 2 semester C / C++ class.

    What y'all think? Do you NEED to learn C (be happy and comfortable with, say, pointers to functions returning pointers to functions) before you can be happy and comfortable with C++ ? Or is all that horrid stuff we had to do before objects got invented useless now? (I still use pointers to functions all the time... old dog, new tricks, etc.)

    Of course, where I've strayed from Ratt's prescription is the GUI bit... I still program (primarily) in a console. I'll go fullscreen and blit happily, but Windows gives me the willies.

    Anyway, if my evil plan is successful, in a couple of years, I'll be teaching an A+ course, an intro to C(++), and an advanced (shudder) GUI based C++ class. Who knows what the future brings?
    (Hopefully, a message from Ratt in Announcements that says, "CVS is up. Update like the wind, you crazy whiners.")

  13. #13
    Registered User
    Join Date
    Nov 2002
    Posts
    11

    A weee bit off topic

    I can't speak for the actual "real" beginner, but I know there are a lot of people out there who actually feel they have a pretty solid grasp of basic programmatical logic that just don't understand C++.

    For them I would recommend a dear and trusted friend of mine I picked up many, many years ago called:

    C++ nuts and bolts for experienced programmers

    It is a no-nonsense, we're going to teach you C++, not how to program, we assume you already know logic book. It talks just enough about objects and pointers if your previous language experience didn't have those that you aren't completely lost on those either.

    Secondly, and I'm suprised it hasn't been mentioned here:

    The C++ Programming Language

    Written by Bjarne Stroustrup. This is byno means a beginners book. However, I hear a LOT of people on this forum who program casually, as a hobby. Many of the people who hack out little programs in their free time are fairly capable, but don't have the understanding of actual work experience behind them to really create diverse reusable code that's efficient. (Although almost all of them think they do, of course, but that's one of my primary sources of entertainment...anyway). This book will take someone with 2-3 years of casual experience to the "next level". Anyone without that probablly won't understand much of it.

    *quack*

  14. #14
    Registered User
    Join Date
    Nov 2002
    Posts
    48
    For those of you that say you can code a small business app in VB faster than C++ I have two words for you:

    Borland Builder.

    There is nothing in VB that can not be done in CBuilder just as fast and with good programming behind it.
    Quothe the raven, "Nevermore!" - Poe

  15. #15
    Registered User
    Join Date
    Mar 2003
    Posts
    10
    Possibly a little off topic. When I was in college getting my CS degree, some professors said it's perfectly OK to mix C and C++. Others would give an automatic "F" grade if stdio.h or any standard C library was included in a C++ program. I side with the camp that says it is OK to mix C and C++ (Especially now that I work primarily on the Unix platform). I'm wondering what you guys think.

Thread Information

Users Browsing this Thread

There are currently 4 users browsing this thread. (0 members and 4 guests)

Posting Permissions

You may post new threads
You may post replies
You may post attachments
You may edit your posts
HTML code is Off
vB code is On
Smilies are On
[IMG] code is On