Hey all, i would like to say that i did some projects in vb.net and c# but i like c# more because it is just more capable from my point of view, maybe it is just me because i am doing some game programming but i still don’t like vb.net.
This is more for anybody else who happens to stumble on this blog…but I feel compelled to address why C# developers paid more.
I think it’s guilt by association and a perceived learning curve.
Many seasoned Visual C++ developers made the jump to C# simply because it offers them most of what they need and are used to (from a language viewpoint), but with an added productivity boost. As horrible as C++ is, with its jumble of syntax and features, anyone who could design quality code there would have little trouble with C#.
It also doesn’t hurt that the syntax and programming styles are very similar. So it goes without saying that developers who’ve made their bones on C++ would do well with C#.
On the otherhand, many classic-VB developers jumped to VB.NET, but without the same depth of experience. VB was verbose and syntax rich (or cluttered), but it was lacking in other ways:
- Everything was interface inheritance and you couldn’t even enforce Events as part of the interface.
- Static methods items? Had to fake it with modules back then.
- Threads? Microsoft for trying to dumb down VB with apartment threading, and then explaining a million times what it actually is.
- VB’s error handling was quirky at best. Horrible, when abused. Try/Catch/Finally is a godsend, though bad developers can screw even that up (see Java).
- Programming flow: You couldn’t escape using GOTOs, which has a bad rep. Though arguably, it’s more powerful than the C-family’s break/continue/return (etc.).
etc.
Furthermore, many VB developers were picked up by firms companies who do NOT enforce any sort of coding rigor design so there was a glut of people who knew the syntax, but not proper design.
Basically (pardon the pun), many VB to VB.NET converts had a lot of catching up to do in the early days. Unfortunately, rather than looking at the individual developer–anyone who believes the average QUALITY C# developer is better than Dan Appleman is fooling themselves–that VB its developers suck assumption persists to this day…
I grew up in VB development and I am pretty much self taught. So I never had anyone taint my view of language from the start. When .NET beta’s saw the light of day, I immediately jumped in and wanted part of the action.
I started of on VB.Net as I was a VB developer and I did some good coding. Then I had to do a project in C#, it took me about 2 weeks to learn the quirks but it’s been about 8 years and I have not looked back.
Moving to C# vastly improved my coding skill. Because VB and VB.NET were quite forgiving and made for sloppy coding. I still do some VB.NET projects today, but I use my C# coding approach.
I don’t think one language is better than another, I just prefer C# and I have seen that quite often those who have come from a VB background tend to write sloppy code.
I’ve learned VB.NET at school (for two years), since I’m 19 I have no experience at ‘older’ languages. So I was looking for info about any possible differences between VB.NET and C# (besides the syntax) when I found this page.
After reading every single comment (wanting to make sure I didn’t miss any valuable information), I’m now convinced that the only reason to learn C# is so I can understand the code of programmers who use C# (which I will do!).
Anyone claiming a skilled C# programmer is better than a skilled VB.NET programmer is talking BS. Yes, there are alot more less skilled VB.NET programmers than C# programmers (VB - VB.NET and C++ - C#), but that’s no reason to rank skilled VB.NET programmers as ‘less competent’.
– Language is a personal choice. Companies shouldn’t force programming languages on programmers. If a money-grubbing boss told me how to program, then I might have to tell him to _____ something up his _____. –
Anyway, C# is slightly preferable to VB.NET, and here’s why.
First, C is my favorite language. It’s beautiful, so raw and simple. You control everything. You can write super low-level code or high-level code. The choice is all yours.
For desktop applications, I find C++ easier than C. It saves time when I don’t want to worry as much about memory allocation/deallocation.
I find VB6 and VB.NET easier than C++. They save time when I want to access a COM/OLE late bound object and when I really really don’t care about memory allocation/deallocation.
I find C# easier than VB6 and VB.NET. It can import late bound COM/OLE interfaces, and it looks more like the C languages I’m used to, which means I don’t have to waste time learning a new syntax to express the same language concepts that all access the same object model. Also, I love curly braces. Matching braces in a text editor is really useful when moving code around. I’m sure there’s some text editor that will jump from If to End If or Sub to End Sub, but I see no reason to find such an editor of learn a new language, when I already have C#.
In any situation in which either would be useful, C# wins over VB.NET for me.
I know both VB.NET and C#. I come from a VB6/VBA background and basically taught myself C# after learning C++ OOP in school. There are advantages and disadvantages to almost every language and as mentioned previously, it comes down to preference.
Personally, I found my code writing to be cleaner and simplified within C#. The big reason that makes me lean toward C# is ‘compile-time’ vs. ‘run-time’. Granted, the user doesn’t care what language it’s in…as long as it works. As a programmer, however, a program is never complete and is constantly begin debugged. I prefer to step through and debug C#. It’s more logically concise. VB.NET always appears ‘spaghetti’ to me. C# is the flagship language in the .net platform (according to Microsoft) and was specifically designed for .net.
To me, VB/VBA/VB.NET always felt amaturish. C# feels more like an enterprise level language. When my boss tells me to write something in VB.NET, I do it. But when not told, I always use C#. Again…this is my personal opinion.
Steve
How can we explain that most C#/C++/java programmers understand VB code when they read it but VB programmers aren’t able to understand C# code. By experience, I find that C# programmers have a better understanding of what they are doing
http://moyalodka.ru
I come from a C++/Java background and prefer VB.Net just because Visual Studio seems to work better with it. Everything else is pretty much the same to me. Honestly, it usually takes me a minute or two to realize that I’m looking at C# code and not VB.net.
This was a fun read, a little disturbing at times but fun in the end. I’d point out that most of these arguments come down to personal preference and there really is no such thing as a best language. Perhaps there is a best language for the task at hand, but even that is questionable.
Which is easiest to read/debug? Most likely the language you’e used the most, or perhaps the one you learned first.
Why case sensitivity? Because its more flexable and gives you more variable names than you could possibly need. I liked the concept used earlier where you could differentiate between like data items using case (using “bro”, “Bro”, or “BRO” for example). That’s something I guess you couldn’t do in VB, but it also isn’t a show stopper. I tend to like longer variable names for the same reasons mentioned above–they are more readable. There is a place for short names though and there are plenty of reasons to use case to differentiate between like data items. It would probably take a C programmer to see the world that way though.
Why do VB programmers seem to have problems reading C? Because they are use to a more verbose language. The inverse of that is true as well. I have a hard time debugging VB.NET (I haven’t learned it yet but may be forced to) because I am not familiar with it so I feel the verbosity slows me down.
On and on this argument will go because it is human nature to feel like your favorite language is the best. It probably wouldn’t be your favorite otherwise. IMHO you should all learn to question your own opinion before calling anothers into question.
Due to C#'s immense popularity, VB.NET feels like the underdog, and I always root for the underdog! Also, I’ve always had somewhat rebellious streak and preferred going against what’s considered “mainstream”. And, to me, C# feels mainstream now, so I am preferring VB.NET at this point. Actually, if I could find a good Delphi gig, I’d probably ditch .NET altogether. Or, maybe I’d like to do Python/Ruby. But, of course, being the contrarian I am, if I were in a Python/Ruby shop, I’d start advocating .NET again, lol!
After nearly 5 years the debate goes on about slight syntax differences and a few things you have in one you don’t in the other.
C# is based on the C/C++ syntax to make the language easier to transition to for C++ programmers.
VB.Net is closer to the old VB syntax than it is to the C/C++ syntax and was probably introduced due to pressure from the huge numbers of programmers disappointed when VB6 was canned. It isnt really a new version of VB6.
From an objective standpoint, VB is a more ‘modern’ language with less obscure notation and lower count of non alphanumeric symobl use. C is nearly 40 years old and its syntax was designed when displays had 80x25 characters if you were lucky. With that sort of display it made sense to cram as much into as little space as possible. It mattered less if it was difficult to interpret at the time. After all, if you have 1KB of space how difficult could it be.
With limited resources for your compiler it made sense to have ‘=’ and ‘==’ and similar but does it really make sense these days? These sort of mixups have cause expensive space program failures.
Advances in available program space etc made programs larger and larger and we started to need code to be written as simply as possible to minimise bugs and make maintenance easier. As someone else may now be working on the same code as you, it doesn’t matter if you know that your function called IPT() stands for InsertPastedText because the next guy won’t without perusing more code than needed.
C is very flexible but this flexibility makes it easy for less disciplined programmers to make mistakes. It was made overly flexible because they didn’t know any better at the time. It is also designed to allow easy translation into machine code on different processors, which also gives portability. Luckily the IDE stops many of these errors with C# etc. Even so, many C compilers still choke on this code because of omitted white space ‘a = *p/*q;’
The guys that say “programmers that don’t easily understand my complex code are thick” are actually the worst sort of programmers. Unfortunately, excellent IDE’s and high level ‘languages’ like .Net allow lesser people like these to call themselves programmers.
I guess Java was designed as a modern replacement for C but for now and the forseeable future, for footprint, speed and exact timing C still rules. Luckily for you PC only programmers these things don’t really matter. No prizes for guessing what .Net is based on…
In case you are wondering, 75% of my programming is in C (not C++) on embedded systems for high reliability critical systems (vehicles, weapons, machines etc). On the PC part of my projects I use VB.Net where possible because I prefer it even though C# feels more natural.
Remeber people, be verbose, comment where necessary and most of all ‘KISS’. If you have a list of }}}}}}}}}} or EndIfs somewhere or your function spans more than a few hundred lines then rethink your design. Program for reliability first and speed up what you have to later.
Well, in my short (under 1 year) experience with both, I’m sure I can’t make any daring assertions, but I must say: VB.NET and C# are mirror opposites.
Each is used primarley for a completely different purpose. You can’t compare the two, its like comparing… two unlike things. Even though they’re both based upon the .NET framework, they are still different languages at their cores, and, despite progress to mesh the two, they will always be in that situation.
If you morphed C# into a VB type syntax, you would lose all purpose of their being a C#. Ditto with the vice-versa. The reason that we have both languages is because some people want a strict syntax that won’t let you screw up, and some want a syntax that is flexible.
I could just say pick your favorite, but instead I’ll say:
Pick your poision.
Both have fundamental problems at their core, and more seasoned developers than myself could attribute to that. Its true for every language: VB vs. C# is just a small crumb of the programming cake. What about Java vs. VBScript, or ASP vs. [insert language here]. We’re wasting our time fighting this out. Pick a language, get a book, and make an app.
Peace,
Adam
Well, I’ve been VB since 1991 and I’m working on learning C#. Much of it is just different ways to do the same thing. Also, as a UI developer, I am once again struck and different people like to do things differently, and how everyone has their own idea of what is ‘easy’ or ‘hard.’
Thus, all I can offer here are some humble observations and entirely subjective opinions about the differences in syntax between BASIC and C.
For starters, C requires too much punctuation. Parentheses around boolean checks, a semicolon at the end of every line, and braces everywhere - curly and square. The standard QWERTY keyboard is best suited towards typing letters (and so are my fingers) and the human brain is best suited towards reading words. I find it HARD and disruptive to stop my touch typing of words and input ENTER curly brace number close curly brace enter.
Add to that the fact that a closing curly brace does not tell you what it’s the end of. End Function does.
Proper and clean formatting of C code requires you to put opening and closing curly braces on their own line, alone. In my opinion this can take up too much vertical space. In BASIC you at least have a choice of how much white space to put in your code. Sometimes I want space between sections, other times I like to put all code for a bit of logic very tightly together to reflect it’s cohesiveness. You could do the same in C but at a tremendous expense in readability. Again, all that pesky weird punctuation gets in the way.
Regarding Case Sensitivity: We are not case sensitive in our minds – If we say bill, we mean Bill. Computers are far more literal than we are, though. I prefer it if the IDE enforces consistency while permitting case insensitivity. If I define a var as strFirstName and later type strfirstname the IDE fixes it for me, and the issue is done. That to me is cleanest.
I certainly dislike “car car as new car”. It’s unclear from that line of code which is the class and which is the instantiation. BASIC prohibits this, treating object names as keywords. It makes them sacrosanct, which I prefer.
There’s an old joke that says “If they devise a language that lets programmers write in English they’ll discover that programmers don’t know how to write in English.” Certainly this helps explain the many complaints about sloppily written BASIC code, but at least in the VS IDE things are consistent.
There are some who say one is being ‘lazy’ if one likes VB and / or the automatic corrections and line-by-line compilation it provides. I consider that hypocrisy. If our job is to write computer programs that make it possible for people to work faster and more efficiently, why should we not expect our own IDE to provide us with that same benefit?
BASIC is much closer to English than C which is why I — very subjectively and humbly - prefer it.
VB.NET vs C#?
I have a question?
Between the 2, which is much simpler to use? Kinda, my programming or life will be less miserable and will deliver acceptable result in the end.
just passing by.
I was laid off from my job in March where I made in the mid eighties writing VB.NET code…I worked up to a Senior Programmer level. Now that I’m looking again for another developer position, I’m finding that all jobs require C# and they act like my 9+ years of VB.NET is worthless…I am looking at having to take a 13k+ cut in salary and enter the market as a junior programmer if that is even possible.
Companies have bought the C# preference promoted by Microsoft and it’s killing VB.NETers out here during this recession.
I started using Delphi in 1996 with v1.0. I’ve since used every version to some degree or another. I’m Borland Certified on Delphi 7. So, yes, I’m a huge Delphi fan, both the IDE and the language.
There are some projects that I’ve written and/or maintain in VB6. But I hate it. As a MSDN Premier member, I have access to all of Microsoft’s newest development toys. So I’ve dallied in VB.NET and C# and I’m confident that if my survival depended upon it, I could feed the family using either VB.NET or C#.
Having said all that, I ask you, Esteban, how does Delphi have Edit and Continue? Spreading FUD doesn’t help our cause…
Over the past 27 years, I have programmed in about a dozen languages, including several BASICs, PL/I, FORTRAN, SNOBOL, LISP, Assembler, C, C++ and a language so bizarre that it required its own character set to program in - APL.
I started playing with VB3 in the early 90’s, and as I was not a device driver developer, and as CPUs started getting faster, by '96 I completely abandoned C - syntax languages and have been full-time VB (VB, VBScript, VBA, VB.NET).
Why? Because I find that it is incredibly easy to write code that is utterly incomprehensible to you and anyone else, using the cacophony of symbols that C-styled languages support, while even with poorly written VB, it is harder to write code that is hard to decipher.
IMO code that is easy to read and debug is more maintainable, and less prone to bugs, and therefore more efficient from a TCO perspective.
I appreciate not having to worry about making obscure mistakes like using ‘=’ when I need to use ‘==’ or accidentally defining a different variable because I accidentally capitalized a letter, or looking at parentheses inside parentheses and trying to figure out whether these parnes are delimiting ‘if’ statements, defining a cast, or something else.
While it is cool if you need to save lines of code to be able to write things like ‘row(++i)’ or to do in-line assignments like ‘if (i = 2 y)’, constructs like that make it very easy to obscure what you are really trying to do and create confusion.
I like to think and code at a high level, not 2 layers above the CPU - that’s why we buy powerful compilers! I say make it easy for humans to read, and compile it so that it is easy for CPUs to execute.
My value comes from getting things done, quickly and well, and can be read by other people six months from now, not from impressing people by writing code that is hard to read.
I prefer to use my brain’s CPU cycles to think thru the problems, not for real-time translation of machine-oriented syntactical constructs.
This is why I use C++/CLI.
Speed
C++ Syntax
.NET Framework
Native
If the intellisense wasn’t so bad, this arguement may be between different languages.