简体   繁体   English

如果我在学习和工作上的时间有限,首先要学习什么-C ++ / STL / QT或.NET / C#?

[英]What to learn first - C++/STL/QT or .NET/C# - if I have limited time while learning and working?

I am currently a CS student at a 4th year(of total 5). 我目前是4年级(共5年级)的CS学生。 I`m studying and working. 我正在学习和工作。 At work I use ASP.NET. 在工作中,我使用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? 您建议先学习什么-C ++ / STL / QT或C#/ LINQ / WPF? I mean, C++ and its libraries are stable and do not change as fast as .NET technologies do. 我的意思是,C ++及其库是稳定的,并且变化不如.NET技术那么快。 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. 因此,如果我选择首先学习C ++,则可能是由于当我决定结束对C ++的学习时,.NET技术距离如此遥远,以至于我实际上无法抓住它们。
And finally, at the end of June I received 6 books on WPF, WF, Astoria, EF and LINQ from Amazon. 最后,6月底,我从亚马逊收到了6本关于WPF,WF,Astoria,EF和LINQ的书。 So, if C++ goes first, these books will become dated when I decide to switch on them. 因此,如果首先使用C ++,则当我决定打开它们时,这些书将过时。
EDIT 编辑
It seems to me that I will do .NET development for living and C++ for myself. 在我看来,我将自己进行.NET开发,而自己进行C ++。 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. 这是棘手的部分-我学习.NET / C#已经快一年了,而C ++的学习时间更长了。 So, the question is what is the best order to learn these things? 那么,问题是学习这些东西的最佳顺序是什么?

C++ is the cadillac of tools. C ++是工具的卡迪拉克。 Harder to learn and use but more powerful. 难以学习和使用,但功能更强大。 C# does a lot of hand holding and is easier to learn but more limiting. C#可以完成很多工作,而且更易于学习,但限制更大。 Do you want to be the best of the best? 您想成为最好的最好的吗? Choose C++. 选择C ++。 Do you just want a job? 你只想要工作吗? Choose C# 选择C#

I would make sure I knew C++ first. 我会确保我首先了解C ++。 If you're a CS student you will be well served knowing this as the base for everything else you will learn later. 如果您是CS学生,那么这将是您以后学习其他所有知识的基础。 You will get mix of lower level abilities (vanilla C), pointers, memory management, and later OOP. 您将混合使用较低级别的功能(普通C语言),指针,内存管理和更高版本的OOP。 Learn some of the programming fundamentals that are available in C++ that are abstracted away in languages like java and C#. 了解C ++中可用的一些编程基础知识,这些基础知识已用Java和C#等语言抽象化。

IMHO, this as a base will better prepare you. 恕我直言,这将为您提供更好的基础。

I started with unix & C. Learned C++ later. 我从unix&C开始。后来学习了C ++。 I now work with java and I can't believe how easy it was to learn java from that base. 我现在使用Java,但我不敢相信从该基础学习Java是多么容易。

JMHO. JMHO。

Since you're already working with ASP.NET, you should be somewhat familar with the .Net framework. 由于您已经在使用ASP.NET,因此您应该对.Net框架有些熟悉。 Many of ASP.NETs (and declaretive UI design) ideas are carried over into WPF, which would help you quite a bit. 许多ASP.NET(以及声明性的UI设计)构想都被延续到WPF中,这将对您有很大帮助。

I'd say go for WPF/C#. 我会说去使用WPF / C#。 It will probably make you able to do more in less time than with C++/STL/QT(/Boost?). 与使用C ++ / STL / QT(/ Boost?)相比,它可能使您能够在更短的时间内完成更多工作。

With C# you can get a lot of interesting things running relatively quickly, without having to worry too much about memory management. 使用C#,您可以相对快速地运行很多有趣的事情,而不必担心内存管理。

C++ on the other hand, while it is a very valuable skill to have, is hard . 另一方面,尽管C ++是一项非常有价值的技能,但却很难 It will take a very long time to code in C++ well . 这将需要很长的时间在C ++编写

I'd tackle C# and related technologies first - put your design patterns and data structures to use, and come back to C++ later on. 我将首先讨论C#和相关技术-使用您的设计模式和数据结构,然后再返回C ++。 As you said, C++ is not going to change all that much. 就像您说的那样,C ++并不会改变太多。

The choice between C# and C++ depends a bit on your personality: 在C#和C ++之间进行选择取决于您的个性:

  • if you like to get things done quickly and (more or less) smoothly, then choose C# 如果您希望快速(或多或少)顺利地完成工作,则选择C#
  • if you feel more like mastering a craft, then learn C++ 如果您更想精通手艺,请学习C ++

It is my impression that C# jobs are also better paid (I'm a C++ developer). 我的印象是C#职位的薪水也更高(我是C ++开发人员)。

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++. 如果您想同时学习两者,那么我建议您首先学习C#,因为它更容易掌握,并且可以作为通向C ++的垫脚石。

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++. 在加利福尼亚的奥兰治县,C#的需求似乎比C ++更大。

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. 如果您认为将来会做更多.NET开发,并且这对您很有趣,那么我将继续学习。 But if your goal is to just gain more breadth of exposure, then pick up a new language. 但是,如果您的目标是获得更多的了解,请选择一种新的语言。

While I personally favor C++, it isn't for everyone. 虽然我个人更喜欢C ++,但它并不适合所有人。 I say if you want to be marketable, and since you already do ASP.Net, then go the .Net route. 我说如果您想上市,并且既然您已经做过ASP.Net,那就走.Net路线。 Learning it will stand out more on today's resume than C++ will, unless your looking to specialize in "systems" development. 除非您打算专门研究“系统”开发,否则学习它在当今的简历中将比C ++更加突出。

My $0.02. 我的$ 0.02。

What is important is to learn and understand what really goes on in the machine. 重要的是要学习和理解机器中真正发生的事情。 Memory, CPU, I/O, devices. 内存,CPU,I / O,设备。 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. C和C ++更接近金属,您将被迫理解这些概念。 CLR is at a higher abstraction level and hides usually is hidden behind the courtain. CLR处于较高的抽象级别,并且通常将皮革隐藏在小后方。 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. 但想法是,一旦您知道机器的工作原理,就很容易在CLR的烟雾和镜子后面看到,并了解发生了什么。 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. 如果您只是学习高级托管堆栈,它将总是看起来像是VooDoo,并且您会陷入错误的假设和错误的决定中。 That's why I believe that is you are passionate about this field you should learn and use some C/C++. 这就是为什么我认为您对这个领域充满热情的原因,因此您应该学习和使用一些C / C ++。

A similar reasoning, but a weaker case, goes for the native OS API (ie. Win32 on Windows) vs. the managed equivalent. 对于本机OS API(即Windows上的Win32)与托管等效API进行类似的推理,但情况较差。 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. 最初.Net框架是Win32 API上的薄薄垫片,在需要从托管对象中获取Handle并进行一些p调用以利用托管库中保留的某些API的地方,这都是可见的。 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. 但是思想已经演变,现在有整个框架在托管(例如WCF)下公开,并且即使知道GetQueuedCompletionStatus的存在,您也可以在使用Stream.BeginRead时走很长一段路。

Other than that, learning C++ vs. learning C# is largely a matter of learning the standard libraries vs. the managed framework. 除此之外,学习C ++与学习C#在很大程度上是学习标准库与托管框架的问题。 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). 您可以换用理解STL算法的经验,以及将您的第一个mem_fun_p稍后用于托管代码(lambda表达式,linq)的乐趣。

So to cut on the ramblings, I belive one should understand C/C++ before going to C#. 因此,减少麻烦,我相信在使用C#之前应该了解C / C ++。 Lerning C# and to start using the managed framework is easy . 学习C#并开始使用托管框架很容易 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/oa sound grip on what goes on underneath, you may not have the time to catch up later. 如果您第一次对下面的情况没有声音,那么您可能没有时间追赶。

从C ++的背景来讲,.NET框架和C#的垃圾回收使业务逻辑的入门相对于编写支持类更容易。

C++ requires you to know a lot of stuff, I suggest C# because it has relatively small learning curve. C ++要求您了解很多知识,我建议使用C#,因为它的学习曲线相对较小。

C# C#

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. 我认为您真的需要更新问题以告诉我们您的目标是什么,然后我们才能真正给出任何建议。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM