Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I bought "Beginning C++ Through Game Programming" yesterday to start learning about C++ and programming. I'm going on hour 33, and I can't seem to put this book down. I was talking to a friend who's more experienced, and he suggested that I should now spend my time learning about algorithm design and data structures because languages come and go but in depth knowledge of theory (as in not just knowing about all the different types of algorithms, but being able to create my own) will be everlasting and more beneficial.

I guess what I'm asking is this: Should I focus more on learning more C++ and buying more books or should I instead buy a book on algorithms and focus more on that? (Yes, I know I can do both and I plan to, but I'm asking which should receive more attention)

P.S. - I've been looking into Financial Engineering for college and apparently C++ is the dominant language, but as my friend said, "languages come and go" so would I be wasting my time by trying to master C++?

share|improve this question

closed as off topic by gnat, Matthieu, Thomas Owens Aug 25 '12 at 13:35

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
You don't out-and-out say this, but I gather that this learning of C++ is your first serious step into programming? If so, well, even if languages come and go, you need to learn some language - "languages come and go" is no reason not to learn C++! –  Carson63000 Aug 3 '12 at 23:38
1  
You must put the book down to do the exercises! If you do not do the exercises you do not learn as much as you would if you did. –  user1249 Aug 3 '12 at 23:51
    
C++ is >30 years old and has been one of the most-used languages for the last 20 years, so "languages come and go" doesn't really seem to apply to it. –  sbi Aug 6 '12 at 21:22

10 Answers 10

Really, the two areas need to go hand in hand.

Learning the language well won't help much if you don't know enough about algorithms and data structures to do anything useful with it.

And learning about algorithms and data structures won't help much if you don't know enough about C++ (or whatever language you focus on) to implement that knowledge.

Now, I'm not familiar with "Beginning C++ Through Game Programming", but I had a quick look at the description on Amazon and it certainly sounds like it is intended to teach the C++ language through the medium of teaching you techniques and algorithms for a specific domain - in this case, game programming. So I'd say you're probably on a pretty good track there.

If you were learning from a book which was 100% focused on the C++ language and nothing else, then you might have grounds for some worries about not getting a well-balanced education. Such a book would be more appropriate for someone who already has programming experience in other languages.

share|improve this answer
1  
This, by far. Unlike what some of the other answers seem to imply, all the theory in the world cannot help you if you're unable to apply it in one of the languages you know. –  Izkata Aug 4 '12 at 3:36

If you can't put down the c++ book then continue studying c++. Someone who is deeply interested in a subject will learn it well. Its not as if you are limited to 48 hours. Algorithms are something you can learn later.

share|improve this answer
    
+1 I could not agree more –  Anthony Aug 4 '12 at 0:32

I find myself agreeing with your friend.

While learning more about C++ will give you a head start in your college career, algorithms are the backbone of programming in any language. The knowledge you gain from learning algorithms is transferable to any language and is useful in any type of programming you care to dabble in.

While going through school I found that learning algorithms did more than just teach me patterns to certain types of solutions, it changed the way I approached and thought of problems and since programming is basically a bunch of problem solving, I found it to be invaluable.

Of course the best idea, like you have mentioned, is to continue learning both but spending time on algorithms is definitely advised.

share|improve this answer

There is only so much to learn about C++ itself besides its dark and damp corners. Once you have a grasp of the language including the STL, and templates then you need to focus on outside concepts like algorithms, data structures, concurrency, network and GUI programming. Programming is a process that goes beyond the language the program is being written in.

share|improve this answer

Languages come and go but C & C++ stay the same.

There will always (well for the next 20 years anyway) be work for C or C++ programmers. Whether you want it or not is another matter.

share|improve this answer

Well what I did in your position was learn algorithms (via the Algorithm Design Manual) and implement algorithms and datastructures I found fun or cool in whatever language I thought was as cool as sliced bread myself. Id try to combine them and modify them. In the end you end up with a better understanding of the algorithm and you become comfortable with translating your thoughts into a language, in this case C++.

share|improve this answer

Two things:

  1. "Financial engineering" is an oxymoron.
  2. Stop reading books, start programming. (Stop observing, start creating.)

When you start doing 2, you will realize what you need to learn next.

share|improve this answer
    
You probably already know that Financial Engineering is a term in common use with an international association and universities offering degrees. If you want to say it's potentially dangerous, often used irresponsibly or can be distasteful, I agree. But as a software engineer with a lot of experience building financial software, I find the term software engineering no less oxymoronic! In spite of this quasi-serious response, your comment did make me laugh. So +1. –  joshp Aug 4 '12 at 0:15
    
:) then vote up! –  knocte Aug 4 '12 at 18:02
    
I did. Someone else must have voted down. –  joshp Aug 4 '12 at 19:17

I totally agree with your friend! Have a look at

These sites highlight some of the algorithms every competent programmer should beable to implement, such as arrays, linked lists, binary trees, stacks, queues etc (as well as a wide range of other topics). Also check out

Coursera offers free online classes in many computer science (and non computer science related) courses, including algorithms, and algorithm design just to name a few.

But most importantly, if you like C++, by all means go ahead and master it because it will be a lot easier for you to stick with learning a language that you love, as well as easier for you to learn other languages once you've mastered one.

share|improve this answer

Learning algorithms and data structures is like learning the theory in an engineering field. Learning C++ is like learning to use the tools to create whatever you need. I think you need both. It seems useless to design algorithms and not being able to apply them or knowing the use of the tool and having nothing to do with it. Unless you work for a big company where you can be a member of a specialised team you will have to do both tasks.

share|improve this answer

Your friend is right. An awesome developer is who understand at perfection algorithms design, data structures and objects.

When I began to write code (circa 1996) in Turbo Pascal, I thought it was the perfect programming language. ASM (Assembler) was the programming lang of lowest level by default, and C/C++ a prog lang of high level. And Visual Basic 4 was emerging like the future of prog langs.

In these days, almost nobody use ASM and C/C++ is consider a lang of low level which would be use when speed is a requirement and totally necessary. Visual Basic wasn't the prog lang of the future, and Turbo Pascal is a forgotten lang.

These days, based on my 16 years of experience, you should focus first in the basics, like your friend told you. And when you choose to learn a prog lang, I would recommend you to define first where do you want to work: on desktop or web environment?

For desktop environment (based on my experience and current job market): Python, Java and after C or C++. A lot of job posts in big companies ask you to know Python. Java is great because has Swing framework to make a windowed application, is cross-platform (like python and C/C++), furthermore, Java is used by default in Big Data issues like Cassandra, Hadoop, Lucene, (and there is a lot of money here) has great integration with Oracle products (more money), and is ask a lot by big companies like Python. And C/C++ is used for very specific projects and not much companies use it, except big companies of course.

Note: if you choose to work for desktop environment, the last recommendations are for Windows and No-Windows operating system. If you want to be a Microsoft geek, forget Python, Java and C, and learn Visual Basic and maybe C#, and a lot of SQL Server internals (aka SQL Server database administration).

For web environment, I recommend you to learn PHP first of all, Python and Ruby. Today there is a wave for Python programming, but PHP rocks and is used by big companies like Facebook, Tumblr and Wikimedia Foundation. Python is used by Google mainly, and Twitter uses Ruby. Furthermore PHP is easy to install, documentation is very user-friendly (I love it) and is installed in almost each hosting service that exist in the world, so you can earn more money being a web developer.

Like you're studying Financial Engineering (I'm Public Accountant and Computer Sci professional), I recommend you to focus on C++ and after in Java. Why? Well, C++ is fast to calculate things and is used extensively in Machine Learning (a branch of Artificial Intelligence sometimes used in financial issues), but in the real world, the tasks you'll face daily will be solve better with Java and the tools that use this language.

If you have any questions, feel free to contact me!

share|improve this answer
    
+1 @Luis I really enjoyed reading your answer, it was very insightful. Personally, in my spare time, I am currently focused on learning the basics as expressed by What Every CS Major Should Know and Programmer's Competency Matrix as well as building personal projects. Although a few of the items are outdated (e.g. learning CVS for instance), I find these guides hugely beneficial to me. What are your thoughts on these sites? –  Anthony Aug 4 '12 at 0:47
1  
@01010011 I read both links and think that they're a very good list to have an engineer/professional mind. Although today mid and big size companies are requiring Git like a "Plus" skill. And like a personal comment more that professional, I study a lot of maths like any student of computer science in any university, but in the real world, it isn't used too much. Else you want to start studying Machine Learning. –  Luis Arriojas Aug 4 '12 at 1:20
    
I've already signed up for Machine Learning which starts on 20th August. Regarding the math, although you may not be asked to work out the solution to a math problem in the real world, I believe the more math you learn, the more it trains you to think rigorously and critically, gives you the ability to analyze and synthesize your way through any problem, whether or not its related to math. So essentially, we do use math on a daily basis, indirectly at least –  Anthony Aug 4 '12 at 1:51
    
Please don't advise new programmers to learn PHP. –  Carson63000 Aug 4 '12 at 4:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.