tags:

views:

398

answers:

12

I am currently a CS student at a 4th year(of total 5). I`m studying and working. At work I use ASP.NET. So, while working and studying, I have not so much time to learn new languages and techniques.
What do you suggest to learn first - C++/STL/QT or C#/LINQ/WPF? I mean, C++ and its libraries are stable and do not change as fast as .NET technologies do. So, if I choose to learn C++ first, it might be that by the time I decide to finish my learning of it, .NET technologies are so far away that I can not actually catch them.
And finally, at the end of June I received 6 books on WPF, WF, Astoria, EF and LINQ from Amazon. So, if C++ goes first, these books will become dated when I decide to switch on them.
EDIT
It seems to me that I will do .NET development for living and C++ for myself. But, nonetheless, I want to learn BOTH these directions.
This is the tricky part - I am learning .NET/C# for almost a year, and C++ a little bit longer. So, the question is what is the best order to learn these things?

+2  A: 

Since you're already working with ASP.NET, you should be somewhat familar with the .Net framework. Many of ASP.NETs (and declaretive UI design) ideas are carried over into WPF, which would help you quite a bit.

I'd say go for WPF/C#. It will probably make you able to do more in less time than with C++/STL/QT(/Boost?).

cwap
+1  A: 

With C# you can get a lot of interesting things running relatively quickly, without having to worry too much about memory management.

C++ on the other hand, while it is a very valuable skill to have, is hard. It will take a very long time to code in C++ well.

I'd tackle C# and related technologies first - put your design patterns and data structures to use, and come back to C++ later on. As you said, C++ is not going to change all that much.

Charlie Salts
+1  A: 

The best answer to that depends on your local labor market (look at online job boards to see what's in demand) and on your personal interests (don't underestimate that... you'll be good and things that interest you).

In Orange County, California, C# seems to be much more in demand than C++.

Eric J.
+1  A: 

If you think you're going to be doing .NET development more in the future and it is interesting to you, I would keep learning about that. But if your goal is to just gain more breadth of exposure, then pick up a new language.

jayrdub
+12  A: 

C++ is the cadillac of tools. Harder to learn and use but more powerful. C# does a lot of hand holding and is easier to learn but more limiting. Do you want to be the best of the best? Choose C++. Do you just want a job? Choose C#

Jay
great answer, thanks!
chester89
The only thing I can add to Jay's excellent advice is that, if you stick with C#, you should make a point of mastering unsafe mode, including pointers. These are essentially C++ features available in C#, and knowing them is part of your professional toolkit. Programmers who can't handle pointers (and recursion) are at a disadvantage. See http://www.joelonsoftware.com/articles/ThePerilsofJavaSchools.html (which applies as much to C# as Java).
Steven Sudit
I'm not sure I agree with the analogy hehe. When I think of C++ I don't think of luxury, its more like driving standard vs driving automatic. Harder to learn stick but once you get it you love the control it gives you.
DeusAduro
Mmm .. I don't really agree :) Since the OP mentioned WPF and QT my guess is that he's into GUI design. A lot of the stuff WPF does will be insanely hard to do in QT and C++ (And I mean, really hard :) ). However, with QT you get cross-platform support out-of-the-box..
cwap
Learning how to efficiently write clean C++ is a challenging but greatly rewarding task. If you only know .NET/C#, you could certainly become a proficient commercial developer. If you know C++, then you could certainly become an artist in the trade, plus learning .NET/C# is pretty straightforward when you have the CS-ey stuff down from C++.
280Z28
@Meeh - no, I don`t particularly targeting GUI design. From where I am, I believe WPF is much more than smart-looking controls and great visual effects.
chester89
It's a good answer. Given your time constraints, C# would probably be a better choice. However, keep in mind that whichever one you pick, you will eventually want to learn the other as well. For C++ developer, learning C# (or any other higher-level language) lets one avoid wasting time on mundane things where there's no point in doing so; for a C# developer, learning C++ allows to optimize pieces of code that are slow when written in C# by rewriting them in C++ (for example, I once sped up a piece of C# code that did lots of COM calls in a loop by rewriting it as a single native C++ function).
Pavel Minaev
I think Cadillac is a perfect choice for comparison, given the state of GM and all...
Remus Rusanu
Urgh, this answer is nonsense. Can you give an example of something that can be done in C++ but not C# to back up your claim that C# is "more limiting"? I like C++ as much as the next man, but I'm really getting tired of people automatically assuming that "because C++ is hard, it must be more powerful".If you're going to say that C++ is "the best of the best", at least give an example of how it is better, rather than just cliches like "It doesn't hold your hand".
jalf
@jalf: C# is written in C++, not the other way around.
Steven Sudit
A: 

Speaking from a C++ background, the .NET framework and the garbage collection of C# make it easier to get started on business logic as opposed to writing support classes.

Jherico
A: 

C++ requires you to know a lot of stuff, I suggest C# because it has relatively small learning curve.

C#

Mahin
+1  A: 

While I personally favor C++, it isn't for everyone. I say if you want to be marketable, and since you already do ASP.Net, then go the .Net route. Learning it will stand out more on today's resume than C++ will, unless your looking to specialize in "systems" development.

My $0.02.

Shaun
A: 

As Jay alluded to ... depends what you want. I think you really need to update the question to tell us what your goals are before we can really give any advice.

the empirical programmer
+3  A: 

I would make sure I knew C++ first. If you're a CS student you will be well served knowing this as the base for everything else you will learn later. You will get mix of lower level abilities (vanilla C), pointers, memory management, and later OOP. Learn some of the programming fundamentals that are available in C++ that are abstracted away in languages like java and C#.

IMHO, this as a base will better prepare you.

I started with unix & C. Learned C++ later. I now work with java and I can't believe how easy it was to learn java from that base.

JMHO.

jinxx0r
I agree, unforuntately he said, "I have not so much time to learn new languages" and C++ takes quite a while to learn.
ChrisW
I saw that too, but if you're going to be a good CS you (collective you) should make the time for it. Anything worth doing...
jinxx0r
+1  A: 

What is important is to learn and understand what really goes on in the machine. Memory, CPU, I/O, devices. To understand the stack, the allocation heaps, structure layout in memory, virtual method calls, threads, cache, this kind of stuff. C and C++ are much closer to the metal and you will be forced to understand these concepts. CLR is at a higher abstraction level and hides usually is hidden behind the courtain. But the idea is that once you know how the machine works is pretty easy to see behind the smoke and mirrors of CLR and udnerstand what's going on. This helps tremedously when you debug an issue, or when you design an application, as you get to understand the system and use it to your advantage. If you just learn the high level managed stack it will always appear to be some sort of VooDoo and you'll be trapped into making wrong assumptions and bad decissions. That's why I believe that is you are passionate about this field you should learn and use some C/C++.

A similar reasoning, but a weaker case, goes for the native OS API (ie. Win32 on Windows) vs. the managed equivalent. Originally the .Net framwork was a thin shim atop the Win32 API and this was visible all over the place where you needed to take the Handle from your managed object and do some p-Invoke to leverage some API that was left our in the managed libraries. But thinks have evolved, now there are entire frameworks that are exposed only as managed (eg. WCF) and you can go a long way on using Stream.BeginRead w/o ever even knowing GetQueuedCompletionStatus exists.

Other than that, learning C++ vs. learning C# is largely a matter of learning the standard libraries vs. the managed framework. The standard libraries are way more fun imho and they will expose you faster to advanced concepts. You can transpose the experience of understanding the STL algorithms and the fun of getting your first mem_fun_p to work into managed code later (lambda expressions, linq).

So to cut on the ramblings, I belive one should understand C/C++ before going to C#. Lerning C# and to start using the managed framework is easy. Will take years to master it and looks like for some years now it will be one step ahead of you with new releases that make old part of the library obsolete. If you engage at this first w/o a sound grip on what goes on underneath, you may not have the time to catch up later.

Remus Rusanu
+1  A: 

The choice between C# and C++ depends a bit on your personality:

  • if you like to get things done quickly and (more or less) smoothly, then choose C#
  • if you feel more like mastering a craft, then learn C++

It is my impression that C# jobs are also better paid (I'm a C++ developer).

If you want to learn both, then I recommend that you learn C# first because it is easier to master and it can serve as a stepping stone towards C++.

And as a side note: unless you are rich, I recommend you to avoid buying books unless you really need them. You'll save a lot of money that way.

StackedCrooked