views:

494

answers:

15

Hi,

I always thought that to be a "real" software developer or to work for serious companies on serious software projects, C/C++ knowledge is a requirement. A mandatory one.

I also thought that building software with C# is just as building a website with ASP.NET controls: it is still possible to do for some small products, but trying to build a huge, highly scalable website with ASP.NET controls or trying to build a huge software product with C# is a bad idea. It will not scale well. It will have poor performance. Nobody will use it.

Now, I heard that a part of Visual Studio 2010 was built with C#. Is it true? If so, does it mean that my assumptions were wrong, and that in a few years, it would be possible to build large-scale applications as Visual Studio or Microsoft Office or Adobe Photoshop entirely with C#?

+12  A: 

Yes, you can become a highly skilled developer without C/C++, and yes, it's entirely possible to build some amazing things using strictly C#. Even games. Good games. The performance issue rumors you've heard of are garbage.

But I highly recommend you do learn C and C++, simply because they're useful in certain circumstances, and you might find yourself in those circumstances some day.

Randolpho
Cogwheel - Matthew Orlando
Performance issues aren't "garbage" - read about Visual Studio 2010 - .NET / WPF wasn't quick enough so large parts had to be re-written in C/C++.
Mark Ingram
@Mark Ingram: Do you mind providing some links that support your statement about large parts being re-written in C/C++? I would be interested in reading them.
R0MANARMY
@Mark: I think that is actually exactly the opposite of what they did with VS2010. The IDE was originally written, over a decade ago, in C++ with a considerable amount of COM objects. VS2010 brought .NET/WPF into the mix because WPF **IS** faster, since it is GPU accelerated and considerably more flexible. C++/COM code is still a core component of VS2010, but Microsoft is moving away from that towards a .NET/WPF IDE.
jrista
@Mark Ingram Do you have something more recent than Rico Mariani's blog where he says WPF was improved to support VS2010 ? http://blogs.msdn.com/b/ricom/archive/2009/10/19/my-history-of-visual-studio-part-10-final.aspx
Pete Kirkham
@Mark Ingram: shouldn't you be breaking tackles and running for the endzone?
Marc
@Mark Ingram: I agree with @R0MANARMY. You made the claim; back it up. Links or it didn't happen.
Randolpho
+3  A: 

Yes, you can. But no, you shouldn't. :)


Most of the best developers I know are fluent in several languages, almost always including C/C++. It's also a sign of "seriousness" on a resume.

Of course, real world scale applications on all platforms can be built with .NET/Java. Don't let nobody tell you otherwise.

quixoto
Depends on your definition of *serious* and *most*. Quite a bit of AI work is done in Lisp.
R0MANARMY
"Most" means "more than half" (of the best developers that *I know*). Serious means serious. I didn't say that Lisp didn't count. OP asked about C.
quixoto
+3  A: 

Yes, your assumption is at least partly wrong. It's certainly possible to use C# for substantial projects. Quite a few people go through entire careers without learning a thing about C or C++, so learning them clearly isn't an absolute necessity. There's no real question (at least in my mind) that you could write something like Office or Photoshop entirely in C# -- though that doesn't mean doing so would necessarily be a good idea.

Some would even argue that learning C and/or C++ is a handicap. Personally, I disagree with the latter -- I don't think it hurts to learn anything; more importantly, even if you don't use either one, I think knowing C or C++ (or both) at least reasonably well is worthwhile in any case.

Jerry Coffin
I think the people who think C/C++ is a handicap are thinking you might become a bit-freak, and start doing too much optimization before its even necessary.
Nate Bross
@Nate the good is the enemy of the best. You can do almost anything in C++ with sufficient effort, so a lot of C++ devs don't learn anything else, even though it's often not the best language for a given system.
Pete Kirkham
+3  A: 

If you look around, there is an enormous amount of .NET, Java, developers around the world who do development professionally, generally all highly skilled. Being a highly-skilled developer doesn't mean that you need C/C++, it isn't just about what languages you know, but how you solve problems, how you find solutions, how you work with others.

The whole performance argument of .NET and Java over something like C/C++ is becoming moot these days anyway. Sure, they run on virtual machines and benefit from JIT compilation, but with the speeds of modern day computers, its really not an issue. And yes, they'll never be as quick as C/C++ applications because those applications are compiled very efficiently against specific instruction sets, but i don't really see an issue with it. In fact, thousands of businesses around the world rely on technologies like .NET and Java for business critical tools. And the developers who create those tools are most likely very skilled developers.

Matthew Abbott
A: 

There are a lot of great, old-school, Lisp programmers who I doubt have done much C/C++ programming. (I have Greenblatt and Gosper in mind here.)

So, I would say the answer is yes.

Paul Reiners
+2  A: 

I actually received feedback from the IT manager at Texas Instruments in Richardson Texas regarding my resume and C# background very similar to what you just said. The manager at TI apparently does not understand the difference between embedded systems development and .NET development. So, I think this is a great question.

Further, there are things that C#/.NET doesn't do like real time operations and device drivers. I could go on all day about this, but Josh Stodola's "bumbling idiot comment" sums it up.

P.Brian.Mackey
You're right, C# doesn't do device drivers, and I can probably count the number of C++ web development frameworks on one hand. Chose right tool for the job and all.
R0MANARMY
<sarcasm>Every problem in the world can be simplified to a nail_t. Let me hit it with my pneumatic_hammer++.</sarcasm> ;-)
James Schek
A: 

Over the last decade, the difference in performance between managed languages (such as Java and C#) and traditional languages (such as C or C++) has drastically reduced that many people prefer high-level languages for most applications. If your application is absolutely time-critical, then C or even assembly might still be the way to go, though managed alternatives are popping up for real-time applications too.

To answer with your own examples, yes, Microsoft Office could be written entirely in C# and you probably won't notice any difference. Photoshop, on the other hand, can written in C#, but at the moment, you probably don't want to because you would indeed notice loss of performance.

casablanca
On a reasonably powered machine I don't think you would notice a loss in performance if Photoshop was written in XNA and/or WPF. Paint.NET has some performance hits, because as far as I know it uses GDI+ for almost all of its drawing? (I could be wrong though)
Nate Bross
Leaving GDI+ alone, the major problem with managed languages is garbage collection. In an app like Photoshop, you allocate tons of objects on the heap and you often don't have a choice to manually free them. Then, when you're doing some complex image processing, the GC kicks in and halts you for sometime.
casablanca
@casablanca: I don't recall the function at the moment but I am certain there is a "force GC to run now" command in both Java and C#. So to manage object lifetime and avoid badly timed hangs you unref a bunch of objects then force a GC.
Zan Lynx
Sure, but that's still a crude way to solve the problem. Of course, there are also other things such as being able to use inline assembly in C/C++ (which Photoshop/GIMP and many others do). It all comes down to more control and performance vs. code that is easier to write and manage.
casablanca
The GC argument is somewhat of a red-herring. New innovations in GC implementations such as concurrent garbage collection fix a lot of the old complaints. Also, GC's today are highly optimized for programs that GC'ing lots of small objects in what amounts to a single operation. They can even be more memory efficient by rearranging memory and eliminating memory fragmentation, which can be non-trivial to do in C++.
James Schek
@James: concurrent GC has been around for around 20 years now, so it's hardly a "new innovation". Empirically, GC can about match the speed of manual memory management, but only when given a *lot* more memory (e.g., 6x) to play with.
Jerry Coffin
A: 

Visual Studio 2010 was the first application with a GUI fully implemented with the WPF (Windows Presentation Framework). In the alpha stages it was a bit slow, but all important issues were solved until launch to market and I use it daily and it is even more reactive than the good old VS 2008. This WPF thing is just one part of .NET the other parts have always been quite performant. Maybe the rumors you heard came from this.

C# is just the language, it targets the .NET environment and is highly performant so people telling you that it is not possible to build large scale apps are wrong, that is bullshit. I would go further and say it is even better to use the WCF to build large scale applications in an easy and performant way. I prefer it over any other technology I used before.

jdehaan
+7  A: 

Ok, I'll be the dissenting voice : I think that C is great to know, but, unless you have a specific purpose in mind, I think you can safely skip C++.

It takes a serious commitment to become good in C++ as it is a big ball of confusing paradigms thrown together without enough structure to guide their usage.

Java and C# were created as a reaction to C++ and offer much cleaner paradigms and a lot less confusion.

The performance issues are a great point : although C++ can be made to run faster than Java or C# it takes considerably more expertise to do so in non trivial applications.

Now, if you want to learn C++ or want to work in a domain which is particularly suited to C++ due to available frameworks/libraries, by all means.

Peter Tillemans
I agree with this for the most part... I love C++ but learning C will get you the low level knowledge that you need... C++ would probably just make that learning process more difficult.
Polaris878
Exactly, and the time it takes to become really proficient can be spent on other marketable skills. Functional languages like F#, haskell, erlang, clojure, scala are particularly hot nowadays as they attempt to deal with the multicore reality of today and tomorrow.
Peter Tillemans
I don't think it takes much expertise at all to make C++ run significantly faster then C# or Java in even non-trivial applications. Whether or not that increase matters when compared to the many strengths of C# and Java is an entirely different story.
mfperzel
+1  A: 

Have you used Visual Studio 2010?? It's so slow it's unreal. At work we've just reverted from 2010 back to 2008 because it's just so poor. There are plenty of blogs detailing the building of 2010, but one of the telling things is that the tree control on the left (your solution) was originally written with .NET / WPF, however it performed so badly that they had to rewrite it in c++ just so it would cope.

For performance critical applications you should always be thinking C/C++.

Mark Ingram
Strange, Visual Studio 2010 seems pretty fast, if not faster than his predecessor. Aren't you using it on a Windows XP machine? If so, it's not C# which is slow, but WPF.
MainMa
One more example: MS Office 2010. It's also built on WPF and it's unbelievably slow :/
Adi
Still waiting on those links Mark. You still Googling? Can't find them, can you? I sure can't, at least not with the keywords I've thought of, which are primarily "visual", "studio", "2010", "rewritten", "c", "c++", "performance", and "issue" in various combinations. Closest I've come is a 2-month delay of the release due to performance issues, but no mention of a rewrite in C++.
Randolpho
Hey, hey, here's an interesting article: http://blogs.msdn.com/b/visualstudio/archive/2010/02/16/wpf-in-visual-studio-2010-part-1.aspx In it Paul Harrington admits on the official VS 2010 blog that all of the tree view controls are Win32. His claim however, is that they simply didn't have the time to rewrite it in WPF before go-live. Not that they wrote it in WPF and then had to go back to the drawing board as you claim. I'll admit that surprised me; but it's certainly not a mark against WPF.
Randolpho
@MainMa, our whole development team (of 15 people) is using it on Windows7. 2 weeks ago we took a vote, and nearly everyone voted to move back to VS2008 as it is just unuseable in it's current fashion.We have several support tickets open with Microsoft and they've told us they will be fixed in an upcoming service pack, so we're holding off until that point.As your searching shows, the whole project is dogged with performance issues right from the start - due to the insistance that they use WPF.
Mark Ingram
A: 

Depending on the problem you are trying to solve; the domain you are working on. You can solve most of the day to day problems - like fibonacci series to a very usable user interface to manage some business to Code webservies for hard-core business logic with good knowledge of C# - You can be a very skilled professional at that.

If you are trying to solve OS level issues or rather if you are doing some "kernel hacks", that requires super C/C++ skills to be called a "skilled professional"

ring bearer
Ok, so it rather depends on the context: doing a CD emulator in C# would probably be a very bad idea, but doing a web browser or a work processor can be done as well with C# as with C/C++.
MainMa
A: 

Highly skilled is a bit of a fuzzy word.

In my opinion, a world-class developer needs to know the entire stack, from ASM to SQL. C can be put in that stack in the "right above ASM" band. So can D, Fortran and Pascal. But I don't think you need to have world-class expertise in 100% of the abstraction stack to do well.

Another facet is that C++ is a Serious Language. It's not really feasible to pick up quickly for the non-programmer, unlike other languages which make it easy to get rolling. So skills in C++ denote a certain level of focus.

All in all, this is a remarkably fuzzy question, and a somewhat fuzzy answer.

Paul Nathan
+1  A: 

The interesting thing about Visual Studio being written in C# is that Microsoft chose their performance guru Rico Mariani as the chief architect. Two possible reasons might be that you have to be a guru level to write well performing C# code, or that by putting a performance guru on a flagship .net project issues with the CLR would get reported and sorted.

A lot of programmers know C rather than C++; being a simple, low-level language it gives you performance (up until the complexity of the problem lends itself to metaprogramming). Having worked mainly in C++ shops, most of the good programmers I've known have known C++, but I also know some good Haskell and Erlang programmers who know C (as the runtimes the use are implemented in C) and wouldn't touch C++ with a bargepole.

Pete Kirkham
+1  A: 

C and C++ are not the same thing and to imply otherwise is foolish. Sure, C++ can compile a lot of C code, but they should be used in very different ways.

But as far as C, C++ or both being a prerequisite of being a highly skilled or talented software developer, that varies from developer to developer. I think some will benefit greatly from learning those new paradigms. Others only learn bad habits and should focus on just a handful of languages/paradigms they are capable of using.

I think the more important aspect of becoming a highly skilled developer is gaining depth in the languages you know before breadth in languages. C++ can net a significant improvement in software development skills if a person takes the time to learn it, in some depth. There are a lot of concepts in C++ that don't map cleanly to other languages (or vice versa) and learning those new concepts can change how a person uses other languages such as Java or C#.

The prime example is learning about the STL and how to build/use non-OO libraries. Should you do this all the time? No... but there are many places were functional/composition/etc is a better solution than inheritance. Learning new paradigms in depth will teach these things and make a person a better developer in their primary language(s).

James Schek
A: 

One of the reasons large scale applications (Photoshop, Microsoft Office) are written in C/C++ is because that's what was available at the time. A lot of these applications are very old, and were written when a realistic alternative was either nonexistent or in its infancy. The codebase is huge, and it just isn't feasible to spend time porting the code over. Keep in mind that this is ONE of the reasons, not the ONLY reason.

I was in an organization where we debated rewriting the codebase w/ object oriented design principles in C++ instead of continuing with C, but the higher ups quickly realized that time doing this would take time away from feature development. This is in spite of the fact that our product (digital video production switchers) completely lent itself to OO design principles.

To answer your question... yes, it is possible, but you should probably learn a little bit anyways. A "highly skilled" developer tends to be fairly well versed in many languages, but may only be a specialist in a handful of them. At the bare minimum I would recommend learning some basic C and C++ syntax to the point where you could read, write, and modify code.

I found that I started doing a lot better in interviews once I learned C. Regardless of what I'm asked, I think of the problem in a C mindset then expand from there. This is especially useful when you're asked questions about data structures and strings... because if you say "just use the STL" or "just use the String class" you will technically be right, but you won't be demonstrating the knowledge the interviewer is looking to find.

baultista