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.
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.
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.
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.
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.
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++?
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.
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.
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.
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.
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.
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.
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.