I would like to learn C++ on my own...

Discussion in 'OT Technology' started by CKGuY914, Jun 25, 2007.

  1. CKGuY914

    CKGuY914 simplicity vs complexity

    Joined:
    Dec 31, 2001
    Messages:
    3,647
    Likes Received:
    0
    Location:
    Tempe, AZ
    is there a book of recommendation to help me get started?

    I am about to graduate with an EE degree and I realized that knowing how to program is an important skill to have.

    My gf is working on her Masters in CSE so she can help me walk through some things but I would like a book that I can read and learn on my own.

    If there's another language that you'd recommend me learning instead, please recommend a book as well.

    Thanks in advance. :bowdown:
     
  2. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    pshoo...

    You're not going to learn C++ from a book. First you need to have something that you need a computer program for, preferably a task for which a program does not already exist, and then you need a decent code dictionary and a bunch of friends to show you examples of how to write code blocks.
     
  3. CKGuY914

    CKGuY914 simplicity vs complexity

    Joined:
    Dec 31, 2001
    Messages:
    3,647
    Likes Received:
    0
    Location:
    Tempe, AZ
  4. CKGuY914

    CKGuY914 simplicity vs complexity

    Joined:
    Dec 31, 2001
    Messages:
    3,647
    Likes Received:
    0
    Location:
    Tempe, AZ
    I think my gf can help me out with that, she's working on her MS in CSE

    She's the one that suggested me learning how to program and offered to help
     
  5. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    I can endorse the aforementioned book

    Funny thing, I actually read that book while camping, obviously not near a computer, so I couldn't try any code or anything heh.

    You don't need to have a program you want to write, or friends to help you. Just learn programming fundamentals and C++, learn from the examples and keep it simple for now.

    C++ is very hard though in comparison to a lot of the other languages; I'd suggest something like C# instead, as it's also more current and you're more likely to be using C# than C++ nowadays.
     
  6. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Yes, you do need to have a program you want to write. Why do you think programming classes give programs as assignments? Concepts are useless unless applied, except if you're going to just turn around and teach those concepts to other people.
     
  7. Ractoon

    Ractoon Shibumi in progress...

    Joined:
    Apr 30, 2001
    Messages:
    256
    Likes Received:
    0
  8. kronik85

    kronik85 New Member

    Joined:
    Feb 8, 2005
    Messages:
    34,837
    Likes Received:
    0
    Location:
    Deutschland
    i think what he was saying was you dont need some elaborate program that is going to predict weather patterns or solve the meaning of life. you don't need a focus for your programming, however having programming assignments is very helpful. many/most books offer small code assignments in the back of each chapter with which to practice the content of the chapter.
     
  9. Coottie

    Coottie BOOMER......SOONER OT Supporter

    Joined:
    Jun 6, 2006
    Messages:
    32,407
    Likes Received:
    0
    Location:
    OKC
    I never used the primer books but I've heard good things about them. I found that there can be huge differences in programming books and what works for some people, doesn't work for me, for whatever reason. So if I get a book and I'm just not getting it, I'll move onto another book.

    I've found my tastes have changed as I've become more knowledgeable in the language and I tend to like very concise references now. I used to like books that were very wordy.

    Oh and don't be discouraged if it takes you a lot of effort to learn this language. I've known other engies that had a very hard time with programming....they just hated it and couldn't understand why we CS guys liked it so much.
     
  10. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Let's not go to extremes, shall we? A weather simulator is ridiculously complex, and textbook assignments are mind-numbingly dull. A good self-learning program (or programs) will be one (or many) that do something useful to you, so you care about finishing them and making them work well, while falling somewhere in between Hello World and SimEarth in terms of difficulty.
     
  11. samm

    samm Next in Line

    Joined:
    Dec 22, 2000
    Messages:
    2,630
    Likes Received:
    0
    Location:
    San Jose, CA
    Read Scott Meyers' books on effective C++ and effective STL. For more advanced topics read Andrei Alexandrescu's Modern C++ Design and David Abraham's books on the Boost library.
     
  12. deezil

    deezil New Member

    Joined:
    Sep 7, 2004
    Messages:
    1,968
    Likes Received:
    0
    Location:
    Murray, KY
    The Deitel & Deitel books are really great to keep on the shelf for reference.

    The motherlode of them all: Linky
     
  13. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    You're saying don't go to extremes, but that's what you're suggesting. You're saying he should pick out a program he should make that hasn't been done before. This is ridiculously ambitious, and it's going to complicate things immensely.

    People coming into programming starting off with projects beyond scope of their initial abilities are going to get quickly overwhelmed and discouraged.

    Textbook assignments are mind-numbingly dull because they're specifically geared towards making you learn and apply a concept or technique in isolation to the dozens of other aspects of programming. They're not there to get you excited about programming them, because they have to be kept extremely simple and meaningless.

    It's like saying, hey buddy, we can't let you learn beginner's Physics until you can detail what you want to do for your Physic's Doctorate and be ready to start on that straight away.
     
  14. Pospodo

    Pospodo came for the pron but stayed for teh lulz

    Joined:
    Oct 29, 2001
    Messages:
    10,147
    Likes Received:
    0
    Location:
    'merica
    I'm taking "Programming Logic & Design" here at a local CC... Maybe you should consider an option like that. You should learn proper structure before you start worrying about language specifics IMO.
     
  15. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    I have to admit I'm usually the reactionary who blows other people's posts totally out of proportion, but this time you get that distinction. Now stop it.

    The first program I ever wrote was a little Magic-8-Ball program that did a little math on the ASCII values of the letters in the user's question that they typed in, then multiplied it by a random number, then gave an answer using a switch block based on the final value (0 < x < .1, .1 < x < .2, etc).

    I came up with the idea for that program after copying a couple of programs out of the Basic Training sections of old 3-2-1 Contact magazines. It took me six hours to write, but the one program taught me how to accept input, how convert strings to characters and vice versa, how to use If/Then/Else statements and Select Case blocks, how to use multiple types of variables, and how to print results to the screen. The rest is history.

    So yes, my method does work, and it works better than assignments from a textbook, because at age 12 there wasn't a chance in hell I would have spent six hours trying to solve a textbook coding problem. Older people have more discipline (one would hope), but giving a damn about the program you're trying to write nonetheless does a lot to keep you motivated to make it work, and staying motivated is really important when trying something for the first time without really having any pressing need to do it.

    - - -

    On a more general note, I hope you realize how ridiculous your example of learning beginner's physics is. If you're just learning physics because you need to know basic physics, then no, you don't need to know what you're going to do with it, but if you want to be a guy who runs a particle accelerator at CERN in Switzerland, you'd better damn well have a passion for it before you even start your formal education.
     
  16. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    :werd:
     
  17. whup

    whup I wish you had children and.. so that I could step

    Joined:
    Feb 12, 2007
    Messages:
    1,603
    Likes Received:
    0
    I'm not blowing your posts out of proportion. You said that you NEED to have a program in mind to make, and that it should be something that hasn't done before.

    Whoopty doo. That sounds pretty god damned boring to me. Wow a Magic 8 Ball program using a simple question / answer program format.. that's amazingly original and has never been done before!

    6 hours to learn all that? You should write a book called How To Program BASIC in 6 Hours and sell it for millions.

    It worked for you - that doesn't mean it's going to work for everyone else. If you're starting programming of your own volition, it's because you're interested and possibly passionate about it. Therefore even just getting the simple examples going can be an exciting thing. I taught myself from age 11 this way too, and while I preferred to play around with my own stuff too rather than do the exercises (I often skipped the exercises), I'm not about to be a douche and tell everyone they have to do it the way I did it.

    It's a crude analogy and doesn't have to be taken literally. It's a pity you can't grasp that or the point I'm trying to make.

    You consistently give terrible advice on this forum, often diving into topics where you yourself even state you have little or no knowledge of. This could be forgiven if you weren't conversely negative and critical of others at other times too.

    I'm pretty new to this forum, so I'm not sure if this is the sort of reputation you have. I usually try to be helpful and constructive when others won't, and I tend to let many things fly. But I've read enough from you to have made my own judgement now.
     
  18. bovine

    bovine New Member

    Joined:
    Jan 3, 2006
    Messages:
    2,883
    Likes Received:
    0
    Location:
    Austin, TX
    Regarding needing actual programming assignments to learn a language, I'm taking an EE introductory C++ class this summer at UTexas. I can post our programming assignments to this thread if you'd like. In the meantime, a good site to visit would be http://acm.uva.es/problemset/

    The aforementioned site has volumes and volumes of programming assignments that you can code and then submit to their site for "grading."

    edit: I would recommend C++ Primer Plus as well, I use it and C++ in a Nutshell (a reference, not a good book to learn from) in lieu of the required course textbook.
     
    Last edited: Jun 26, 2007
  19. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    I guess there's nothing left to say. Does anybody know of a fire I can go die in, now that the noob hath passed his judgement on me?
     
  20. P07r0457

    P07r0457 New Member

    Joined:
    Sep 20, 2004
    Messages:
    28,491
    Likes Received:
    0
    Location:
    Southern Oregon
    how the fuck did you get a EE degree and not take basic OOD classes?
     
  21. CKGuY914

    CKGuY914 simplicity vs complexity

    Joined:
    Dec 31, 2001
    Messages:
    3,647
    Likes Received:
    0
    Location:
    Tempe, AZ
    There's an intro to C++ class that I took about 4 years ago as part of the curriculum and I never continued learning after that.

    I'd like to have programming as a skill, not an intro class that I once took.
     
  22. CKGuY914

    CKGuY914 simplicity vs complexity

    Joined:
    Dec 31, 2001
    Messages:
    3,647
    Likes Received:
    0
    Location:
    Tempe, AZ
    That would be great, I would appreciate it very much. :bowdown:
     
  23. bovine

    bovine New Member

    Joined:
    Jan 3, 2006
    Messages:
    2,883
    Likes Received:
    0
    Location:
    Austin, TX
  24. Bruticus

    Bruticus half dead OT Supporter

    Joined:
    Apr 10, 2004
    Messages:
    4,608
    Likes Received:
    0
    Location:
    Melbourne
    I can't be bothered getting into the argument between you two, but you mentioned in your post that what you did was good for you. Just like most things, programming is learnt in different ways by different people. While writing a program for a task works well for you (and most people more than likely) it won't necessarily be the best method for everyone.

    Obviously you need to program to some degree (rather than just read about code) to get good at it, but doing examples in a well written textbook/reference guide can be enough for some people.
     
  25. deusexaethera

    deusexaethera OT Supporter

    Joined:
    Jan 27, 2005
    Messages:
    19,712
    Likes Received:
    0
    Whatever, it's not even worth arguing the point anymore. All I'll say is that it's psychologically impossible for someone to do a poorer job doing something they have a vested interest in, as opposed to something they're told to do by someone else.
     

Share This Page