Thread: General programming

  1. #1
    Hmm...? gin's Avatar
    Join Date
    Jun 2008
    Location
    Glasgow, Scotland
    Posts
    51

    General programming

    Is there any good books and/or tutorials to learn programming in general (non-programming language specific if you get me). Currently my goal is to learn C++ and programming in general.

    Thanks.

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Books on the subject of programming in a particular language are generally good for learning to program. By doing the exercises that a good book has, you will experience problem solving.

    You may also want to study the subject of "Algorithms" or "Algorithms and data structures" to learn how to work with different algorithms and how those are related to the data in your application.

    But simply put, learning to program will be part of learning a language. You will then find that the solutions you use for solving a problem in C++ also works when you use Java, Haskel or Lisp - at least to a large extent.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Hmm...? gin's Avatar
    Join Date
    Jun 2008
    Location
    Glasgow, Scotland
    Posts
    51
    Thanks matsp, I usually do most of the excercises in a book but there are no answers at the end or anything so I can't check how efficient (or correct) my answers are. At the moment I have two books: "Accelerated C++" and "C++ Primer, 4th Edition". I'll just work my way through those.

  4. #4
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by gin View Post
    Thanks matsp, I usually do most of the excercises in a book but there are no answers at the end or anything so I can't check how efficient (or correct) my answers are. At the moment I have two books: "Accelerated C++" and "C++ Primer, 4th Edition". I'll just work my way through those.
    Most exercises are such that the correct result is obvious. If the code does the job, then it's correct.

    Learning algorithms will teach you different ways to solve certain problems in a way that is efficient, which is exactly why I suggested that side of things. Most algorithms are relatively language neutral, although the exact implementation may vary a bit between different languages.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  5. #5
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by gin View Post
    At the moment I have two books: "Accelerated C++" and "C++ Primer, 4th Edition".
    You have in my opinion the two finest books on C++ tutoring. They have however completely different teaching models. My suggestion is use C++ primer as the main book and refer to Accelerated C++ to practice the concepts you are learning from C++ Primer.

    C++ Primer offers a traditional teaching method in which you start with the basics and build your knowledge as you go. Accelerated C++ is more concerned with the practical aspects of the language and teaches by example (which means you get to work with code that means something). As such the former makes an excellent learning tool, and the latter an excellent practice tool.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  6. #6
    Hmm...? gin's Avatar
    Join Date
    Jun 2008
    Location
    Glasgow, Scotland
    Posts
    51
    Quote Originally Posted by Mario F. View Post
    You have in my opinion the two finest books on C++ tutoring. They have however completely different teaching models. My suggestion is use C++ primer as the main book and refer to Accelerated C++ to practice the concepts you are learning from C++ Primer.

    C++ Primer offers a traditional teaching method in which you start with the basics and build your knowledge as you go. Accelerated C++ is more concerned with the practical aspects of the language and teaches by example (which means you get to work with code that means something). As such the former makes an excellent learning tool, and the latter an excellent practice tool.
    Never thought about that, thanks. Because I was wondering which one I should read first and since C++ Primer has about 900 pages vs Accelerated with about 400, I went with C++ Primer. I'm going to start from scratch and work my way up, do all the excercises and perhaps write down notes while I'm at it?

    Also, how much time should I spend each night on learning C++?

  7. #7
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    There's no right or wrong with how much time you spend on learning. Everyone has their own pace.
    Read the book. Do the exercises until you feel comfortable with them and move on. It's as simple as that. No timetable needed.
    Good luck.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  8. #8
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    You shouldn't worry about that. Spend the time learning it you feel most comfortable with. If you are tired, or want to do something else instead (like sleeping, for instance, or going out with friends) stop.

    You won't learn much if your mind is somewhere else, anyways.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  9. #9
    Hmm...? gin's Avatar
    Join Date
    Jun 2008
    Location
    Glasgow, Scotland
    Posts
    51
    Thing is, there is so many distractions in my house because my house is getting done up, so it's quite hard to concentrate. TV's blaring, people talking, hammers hammering, saws sawing, screwdrivers screwing... you know.

    Thanks for the advice. Will start soon.

  10. #10
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    I have always found ti easier to pick a target project, then learn what I needed to in order to complete that project. With a specific goal in mind, it helps to focus your mind and also makes use of your subconcious problem solving skills even when youa re doing something else.

    For example, I am currently writing an application to rip a DVD to an ASF. Not because I need such a program, but becuase it will use the knowledge I have ( DirectShow) and expand it into an area I want to learn (DVD control through DirectShow). And of course it wont hurt to have said program in my portfolio.

  11. #11
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by abachler View Post
    I have always found ti easier to pick a target project, then learn what I needed to in order to complete that project. With a specific goal in mind, it helps to focus your mind and also makes use of your subconcious problem solving skills even when youa re doing something else.
    I completely agree with this. Learning something "for the sake of learning" is much less likely to teach you something, than learning something that "means something to you".

    Of course, when it comes to learning a programming language, you need to have sufficient base-knowledge to be able to do something useuful with the language.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  12. #12
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    Well, he needs to start with a language at least. He'll get swamped if he tries to learn a language AND an API and hard-ware driver programming AND general programming.

  13. #13
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by indigo0086 View Post
    Well, he needs to start with a language at least. He'll get swamped if he tries to learn a language AND an API and hard-ware driver programming AND general programming.
    Yes, of course. Writing hard-ware drivers is not something you should even try until you have a good mastering of the language itself. Similarly, programming GUI applications will require a certainly level of knowledge of the language itself - if you don't know C or C++ to at least 70% level, then you are probably not at the level where you can do anything useful.

    My point was to have an application as a target, rather than SIMPLY doing exercises in the books.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  14. #14
    Ethernal Noob
    Join Date
    Nov 2001
    Posts
    1,901
    True. I find the toughest part of C++ is finding and implementing the libraries needed to do stuff. Often they are hard to find in the first place and when you do, the documentation is nebulous if you need to compile or use it. Boost has gotten much easier in that regard than when I first used it a while back, but i can't say the same for other libraries.

  15. #15
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    I try to minimize my use fo non-static libraries. Ive never used boost, nor do I see any reason why i ever would, it simply does not add any funtionality that I cant get from either the API or the standard libraries. What little it may add is simply of no use to me whatsoever. I'm not saying that it doesnt help some people, just that for me, it is worthless.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. General Guidelines on Preventing Header File collision
    By stanlvw in forum C++ Programming
    Replies: 12
    Last Post: 07-05-2008, 04:02 AM
  2. Password program / general programming questions
    By plr112387 in forum C++ Programming
    Replies: 13
    Last Post: 11-04-2007, 10:10 PM
  3. Splitting BST General
    By cpp_is_fun in forum C++ Programming
    Replies: 1
    Last Post: 11-25-2005, 02:02 AM
  4. General Trees, calculating height
    By neandrake in forum C++ Programming
    Replies: 3
    Last Post: 04-08-2005, 08:59 AM
  5. General Protection Exception
    By s9uare in forum C++ Programming
    Replies: 1
    Last Post: 11-02-2002, 10:46 AM