Another survey and another set of interesting results. From the get go, I expected this survey to generate a lot of interest since the choice between VB and C# seems pseudo-religious. Mention you're a VB programmer in a room full of geeks and your liable to earn the scoffs, smirks- if not outright insults- of the crowd. Unfortunate, but true.
I got my start in .NET programming VB. "No!" you say. Actually, yes. My first real "programming" experience was as a web developer doing VBScript for ASP classic. Once I made the jump to ASP.NET, I had to choose a .NET language: VB.NET felt right at home, C# looked like geek speak. So VB.NET it was. I liked VB, too, even in the face of my younger brother (a much more talented programmer than I, now headed-off to work in Redmond) ribbing me with the fact that VB was created "to enable dumb people to program." He may not have got that exactly correct, but VB's naming roots (and little else these days) are in BASIC, which stands for...anyone?..."Beginner's All-purpose Symbolic Instruction Code."
Needless to say, I've since migrated to programming primarily in C#. Not because I'm ashamed of VB, but I finally realized how much syntactic overhead is involved in writing VB code. But enough about me, let's analyze you.
Over 60% of survey respondents indicate that C# is their primary programming language, about 34% VB, and a few people use J# or some other .NET language. This is absolutely consistent with other indicators I've recently seen- from O'Reilly book sales trends to Telerik customer requests- that suggest VB's usage is on the decline. The question is why?
I theorize that it may have to do with two primary factors:
- Visual Tool Support - For the legions of enterprise programmers out there (the group largely associated with defaulting to VB, thanks largely to the era of pre-.NET Windows dev tools), the visual tools that once only existed for VB now exist for C#. Using Visual Studio no longer means that you have to use VB. With more choices, enterprise developers (motivated by factor two) my be opting for C# with visual developer support.
- The VB Stigma - Good or bad, VB definitely carries a stigma in geek circles. Even "9 to 5" programmers know this and they would probably prefer to avoid the harassment. With the modern incarnations of Visual Studio, they can now use a C-like language with ease and "feel cool" when attending conferences and hanging out with other geeks. I'll toss a little personal experience at supporting this theory.
Watch for the next survey announcement soon.
17 comments:
I am able to code in both C# and VB.NET -- they all go through the same .NET processor, so it's really just a matter of personal preference. Some things are just "easier" (syntax) to do in VB.NET, and vice versa.
My coworkers are more familiar with VB.NET than C# so that's the direction I usually end up gravitating towards.
Personal projects are done in C#, just because I can.
I'm a C# guy, but if you write good code it doesn't matter if it's in vb, c#, or something else.
it is not the matter of preference, but the matter mindset. vb6 programmers naturally will carry the bad programming practices into vb.net.
in my workplace, most of the vb.net programmers don't have the serious attitude towards software modeling & design. they only care to complete the program in shortest time.
this is bad to the entire software industry.
I've been writing code in VB for 10 years. With .NET I switched to C#, for 5 years I write code in C#. I also wrote in VB.NET. No comparison, IMHO, C# is much better: fantastic flexibility in code syntax, much less words and textual garbage, case sensitive (much more variations for naming variables), and much more...
@Anons- Both good perspectives. It raises the question, is C# a better language or are C# developers usually just better trained developers (in the sense of using OO, design paterns, etc.)?
And as for VB's verbosity, it definitely is long winded, but it's also much easier to read if you're reviewing someone elses code. It can also be more compact that C# in certain scenarios thanks to its super late binding options.
Still comes down to right language for the right job. :)
-Todd
Right language for the job implies that there is a better language to build certain things in the .NET framework, which flies in the face of the personal preference perspective. If both have access to all the same capabilities, even if done in different ways, then it doesn't matter per job.
The choice between the two should be on things like desire for consistency, team knowledge, application maintainability, future skill growth and personal skill mutability and so forth.
Of course I've stacked my list of desirable attributes for a person, team and/or project on what I find important, which supports my preference.
Your mileage may vary... literally.
There is no "right" or "wrong" answer, of course. For a good example of "best language for the job," see this recent post:
http://www.hanselman.com/blog/BackToBasicsVarDim.aspx
-Todd
Don't know how you collected the survey but Visual Basic became the most popular .NET language with over twice as many users as C#
http://www.simple-talk.com/community/blogs/tony_davis/archive/2008/07/08/61911.aspx
and VB.NET syntax is certainly much better than the ugly c#, this is to many people.
Bassam
Bassam,
The verbose language of VB and the types of programmers it produces [sloppy] is the reason that C# programmers get paid more. Let's face facts.
C# by virtue of its language produces better programmers. Why is that? The strictness of C# makes programmers think in object oriented ways, while VB's loose and fancy not only allows programmers to do sloppy things, but to do regularly. I answer questions in forums all the time and it is the VB folks usually that have the most beginner type questions. And even some of the VB moderators demonstrate a lack of OO skills.
To me, the debate is over. It's that simple.
@Anon1- Your claims about VB's popularity are inconsistent with every other report I've seen (including my own survey). I respect Forrester, but these research findings fly in the face of what Microsoft, O'Reilly, and others are reporting.
@Anon2- Now, now. I don't want this to become a flame war against VB. VB and C# are both capable languages and I think it's high time we end this silly elitism that C#ers revel in. You can abuse OO principles in C# just as easily as you can in VB.
-Todd
"To me, the debate is over".
To me, there never was a debate. I started learning C# a little while ago, perhaps I was blessed to start off in this language in the first place, but I find it hard and frustrating when I try to help people in other languages, like VB or ...
Just one little comment, I see you did include J# in the survey, and although supported at the moment, Microsoft decided quite some while ago to stop development on J#.
Some people have stated in comments below that it really doesn't matter as all .NET code is equal. It has also been stated that the curly braces community is just being elitist. For those who aren't aware, all .NET code is not equal. VB.NET and C# do not compile into the same IL code. There are three things which distinguish a .NET language:
Adherence to the standard
Language features
Language extensions
C++/CLI, C#, and VB.NET all produce different IL code with different characteristics. ILDasm will show you this on even the most simplistic of code. VB.NET almost always produces the most inefficient IL code. This isn't because VB.NET is a bad language, it's so that VB.NET can be most productive given the constraints it has. C# is not as productive but more flexible. C++/CLI gives you the most peddle to the mettle.
It amazes me that in the 90's we were having the MS v. Java wars. Now the MS children are eating their own in this non-fight.
It's still an interesting debate and I think its worth having so everyone knows the pros/cons of the languges. Personally I dont think there much differences if in VB.NET you turn off the Microsoft.VisualBasic imports so you don't use the retro left() mid() methods etc and turn Option Explicit on. Its then pretty much which language you can then read and write the quickest / most accurately and IMHO thats whichever one you use everyday. I wrote VB.NET for 2 years and swore never to change. Now I use C# every day with no turning back. C# is especially nice if you do web dev and have to switch between C# and JavaScript as they are syntactically (spelling?) closer than VB.NET and JavaScript.
@Janneman- I included J# just to see if anyone was using it. Even though MS stops enhancing or supporting a language does not mean it's not widely used (case in point, VB6).
@David- Great points. I tend to agree that people should pick whichever they feel most comfortable with. If you are developing for the web, though, you definitely benefit from the C#/JavaScript syntax "overlap."
-Todd
I learned to program in VB6 back in high school, then I stopped for a while and erased all my programming knowledge with alcohol. When I started my current job I worked in AutoLISP, and now work primarily in C#, but all the tutorials on AutoCAD.Net interoperability are in VB.NET, as are a fair few others so for the moment you should at least understand both.
if you know vb.net and a little c++ yo can very easily understand c# code. If you know c# you can understand vb.net because it's user-friendly.
"O'Reilly book sales trends to Telerik customer requests- that suggest VB's usage is on the decline"
Would this be simply an indication of C# has a steeper learning curve than VB and thus the C# developers have to buy learning books but VBs don't?
If that's the case than I guess VB is in favor.
Post a Comment