Dear VB Developer…
Whenever someone coming from a VB6 background asks me which language they should adopt to learn .NET, I recommend them C#. I know that, intuitively, I should tell them to embark the journey with Visual Basic.NET (VB.NET) since that language should already be familiar to them. However, the familiarity of the language is mostly a costume on its own, since underneath it lives a totally different beast. The VB.NET compiler now speaks a very different language than its VB6 cousin did: the language of the object-oriented paradigm. Though the first release version of Visual Basic for the .NET platform was an increment of VB6’s, Visual Basic v7.0, I consider it to be more of a v1.0, because it’s much more than a major revision. Yes, the language is very much the same, but not the compiler. According to Microsoft,
“Visual Basic .NET is not Visual Basic 6 with inheritance tacked onto it. Rather, Visual Basic .NET has been entirely rewritten to be fully object-oriented.” For a programming language to be a true OOP language, the language must meet the following criteria:
- Abstraction: Abstraction manages the complexities of a business problem by allowing you to identify a set of objects involved with that business problem.
- Encapsulation: Encapsulation hides the internal implementation of an abstraction within the particular object.
- Polymorphism: Polymorphism provides for multiple implementations of the same method. For example, different objects can have a Save method, each of which perform different processing.
- Inheritance: The excitement of Visual Basic .NET lies in inheritance. Visual Basic 5 introduced the concept of interface inheritance, which allows you to reuse the interface of a class, but not its implementation. Visual Basic .NET provides for true implementation inheritance whereby you can reuse the implementation of a class. [Source: MSDN]
Chances are that a VB6 veteran, that has been programming with VB since its earliest versions, will tend to write VB.NET code in a more traditional “procedural” way, instead of an “object-oriented” way. This is sad because .NET itself is not only built around, but also provides a rich object-oriented model for programming. However, that doesn’t rattle my cage too much, because with enough practice and mentorship, they could learn to embrace the OO way of analysis, design and programming, as well as to appreciate its benefits. What rather tends to rattle my cage is that I said could (in italic in case you haven’t noticed) because there’s not much out there that benefit Visual Basic (VB6 and VB.NET) programmers to really appreciate the OO paradigm to its fullest.
C++ and Java programmers coming to .NET via C# tend to reap more of the benefits from the platform than VB6 developers do when jumping on the .NET wagon with VB.NET, because they are already minded to the OO way of doing things. I think the main reason that makes this balance shift more on one side than the other is because there is just SO MUCH MORE resources (open-source projects, books, blog posts, articles, training, etc.) that focus on the C-family languages, such as C++, JavaScript and C# (for the sake of this post, I will also include Java in this family). OO concepts such as inheritance, encapsulation, polymorphism, and constructs such as interfaces or abstract classes, tends to be very hard subjects to grasp for VB6 and VB.NET developers (on a professional level, I can only support this fact through those same comments I get from VB developers taking my VB.NET courses and from fellow developers at user groups). The VB development community will be in a much better position to take advantage of the OO model, the same way that C++, Java and C# developers did, if for every OO book, article or blog posts, there would be the equivalent counterpart code samples in VB. Last time I checked on Amazon, there wasn’t many books focused on design patterns for Visual Basic developers. However, there is a ton available for C++, Java, C# and even Ruby developers. It’s hard for VB developers to grasp the essence of design patterns if they struggle to understand the concept of inheritance and polymorphism.
You know what? Let’s dig a little deeper on the programming books case. Table 1 shows the total number of books found in Amazon for Visual Basic, C#, C++ and Java:
Table 1. Books results for various programming languages at Amazon.com (search made on March 10th, 2009)
|
Visual Basic |
C# |
C++ |
Java (not JavaScript) |
|
12,788 books |
16,527 books |
22,248 books |
64,158 books |
This is very shocking, because if my memory serves me well, Visual Basic is much older than C# and Java! I’m going to spare you the proportions for each of these books, because I think the numbers speak for themselves. However, I do want you to notice something important: if we consider C# and Java being almost equivalent (putting the CLR and JVM aside), that means that VB developers have close to 68,000 books less to read from. There’s a little “gotcha” in this study though: just for the programming related books for all these languages, Java comes first with 12,241 books, C++ comes at second place with 10,465 books, Visual Basic comes at third position with 6,351 books and C# comes last with 3,884 books. However, most of the VB books are for VB6 and older versions (and maybe VBA or VBScript). Joking aside, there’s not even a Head First series on Visual Basic!!! There is though a Head First C#, Head First JavaScript, Head First Design Patterns (Java), Head First Object-Oriented Analysis and Design (Java), even a Head First Rails and Head First SQL! Here’s my point: some of the most influential books on software development and programming such as Design Patterns (by the GoF), Patterns of Enterprise Application Architecture (Fowler), Refactoring to Patterns (Keriesky), Implementation Patterns (Beck), Domain-Driven Design (Evans), even hardcore .NET books like CLR via C# (Richter) and the Effective C# series (Wagner), without forgetting the books from the Robert C. Martin series (Agile Principles, Patterns, and Practices; Clean Code and Working Effectively with Legacy Code) hold a vast, deep and rich knowledge of the craft of software development that VB/VB.NET developers are mostly ignorant of. No wonder that I also tend to see more jobs offering for C# developers than VB.NET when it comes to .NET positions. I don’t know about you, but that’s very unfortunate. However, this paragraph was mostly about books. What about tools and open-source projects?
When I teach the intermediate and advanced VB.NET courses, I tell the students that they should take a look at Enterprise Library from the Patterns and Practices Group at Microsoft (watch a video of it here) for it can save them time, cost and effort in common development situations. I even tell them that it is open source, which means they have access to the code. However, I don’t get much excitement from their part, mostly because the code is written in C#. Code reading aside, I haven’t even heard of one VB developer simply using Enterprise Library in his projects. The same goes for projects like nHibernate, the Castle project, NUnit, even mocking tools like Rhino.Mocks and Moq. That’s very sad, because by not using some of these tools, VB developers tend to stay far behind common practices such as TDD and technologies like ORM tools. What doesn’t help also, is that most of the screencasts where you see someone showing a piece of code or an utility, such as TDD with NUnit and Rhino.Mocks for example, the language is more often than not…wait for it…C#. The only screencasts that I see a couple of developers programming in VB is in DNRtv. Furthermore, I don’t recall ever seeing a VB example from the guys at CodeBetter. Worse, I don’t even have one example written in VB in any of my posts!
One H U G E advantage that VB6 (or even VB.NET) developers tend to have when learning C# to program with .NET is that they can also be more comfortable in reading C# and Java books and source code (which the latter being as most important as reading books IMHO). By doing this, for example, a VB developer having trouble understanding the implementation of a design pattern in VB, can easily learn it from another example written in C# or Java (and perhaps C++ if the VB developer understand the notion of pointers). The last remark I said in parenthesis is important, because of all the .NET constructs, it seems to me that the one that causes much headaches to VB/VB.NET developers are delegates, which are essentially lists of method references. It’s one of those concepts that I tend to spend more time on explaining to VB developers jumping to VB.NET, than C++ or Java developers learning C#.
Though there isn’t a simple and easy solution for VB developers in this situation, I can only encourage them to take a look at C#. By doing that, they will also be more comfortable in exploring the world of Java, and perhaps even play around the JVM and see how it compares to .NET. As Benjamin Franklin once said,
“An investment in knowledge always pays the best interest”, and
“The only thing more expensive than education is ignorance”.
In his article, “What VB Dev Should Know About C#”, Bill Wagner actually encourages VB developers to learn about C# (and C# developers to learn about VB) by saying that,
“Our discussion also covered the need for developers to get out of their comfort zones and learn something new. Yes, the two languages are similar in features, but there are idiomatic differences between the languages, and some tasks are significantly easier in one language than the other. In fact, you’ll find yourself much more skilled and much more in demand if you know the best features in both languages, as well as how to build applications that rely on both languages.”
And if what I’m writing about isn’t encouraging you enough to learn a new language, then maybe President Barack Obama can persuade you to learn more than “one language”.
I personally speak three languages (Spanish, French and English) and I’m very grateful that I can speak and write in those languages as it gives me a lot of opportunity to learn and embrace foreign cultures, philosophies, relationships and literature. On the more technical side, I’m also fluent in C++ (not as much as the other languages though), PHP, Java, C# and Visual Basic. The same benefits apply here, as I can read code written in those languages and books using examples also written in any of those languages. I can also more easily conduct code reviews with other developers as I’m in a better position to understand their intent, disregard the programming language that was used.
So next time you’re thinking about starting a new personal project, see to it that you write it in C# (if you’re targeting the .NET framework), or even in Java for a change. If you struggle, don’t quit. There are many online language conversion tools out there to translate C# code to VB and vice-versa. The Pragmatic Programmers once advised developers that they should learn at least one new language every year. This year, Dear VB developer, make a commitment to learn a new language (I’d recommend C#) as it will make you more valuable and employable, and also more comfortable in learning about new ideas emerging in the world of software development.
Similar posts you might be interested in reading:
- Book Review #3: "Head First Design Patterns"
- How I spent an easy earned $250
- This Week’s Geek Links (Jan. 25th, 2008)
- Avoid calling a virtual or abstract method from a constructor in C#…especially in VB!
- Book Review #5: "Head First Software Development"
- What Test-Driven Development Has Taught Me So Far
- SE-Radio interviews Anders Hejlsberg






JW:
“I haven’t even heard of one VB developer simply using Enterprise Library in his projects”
…Now you have…
“VB developers tend to stay far behind common practices such as TDD and technologies like ORM tools.”
…I don’t. I’m all over nHibernate…
FYI. You could develop OO code in VB6 (http://www.amazon.com/Visual-Basic-6-0-Business-Objects/dp/186100107X).
March 11, 2009, 9:05 amBrian Di Croce:
@JW: Is VB your primary programming language? If so, are you also comfortable in reading code in C# and Java (or other languages) too? For example, you’re okay with understanding and perhaps even modifying nHibernate’s code if needed to?
Another point I forgot to mention in the post is the lack of tool support for VB. In my opinion, ReSharper is a must for .NET developers, but it is primarily focused for C# programmers. I’m currently using ReSharper v4.5 beta, and I can already see a few more features built for VB developers in it. But it took a few release versions to add that extra support on the tool for VB developers…
March 11, 2009, 9:31 amJW:
@Brian: VB is my primary programming language. I am very comfortable reading/modifying C# or Java. I generally feel that people can develop or they can copy/paste/hack. Sadly, I would agree that the majority of VB developers fall in the latter category.
March 11, 2009, 9:48 amDarrel Miller:
I’ve been doing VB6 for the last ten years. When I started doing .Net I moved to C#, mainly for political reasons. Now I can’t stand reading VB.Net code, it hurts my eyes.
C# and VB6 are different enough that I can switch between them without getting confused, the syntax of VB.Net is just different enough to VB6 that it is annoying.
March 11, 2009, 10:00 amBrian Di Croce:
@JW: Good stuff! I’m glad that you have commented. VB used to be my primary programming language too when I was working on projects using COM, up until the .NET community started to embrace C# in their blog posts, books, open-source projects (ASP.NET MVC for example), articles, etc.
Though my working language is mostly C# nowadays, I haven’t forgotten VB at all because I’m teaching a couple of courses in VB, so it’s a must. And I’m glad not to have forsaken that language because it makes appreciate the differences with the rest of the languages. For example, C# 4.0 will support named parameters, which VB had for many years (known as optional parameters).
I wish their were more resources for VB developers, especially in the tool space. It seems to me that the refactoring tool CodeRush strongly supports VB after watching a couple of DNRtv shows.
March 11, 2009, 10:10 amBrian Di Croce:
@Darrel: When sometimes reviewing VB.NET code, often written by VB6 developers coming to .NET, the one thing that constantly comes up is that the code is written in a procedural way instead of an OO way. That makes the codebase larger than it needs to be and also more complex. Even after many years of programming, I’m still having a hard time to follow what a 200-line method written in a procedural way is actually doing (I’ve actually seen this on many occasions).
I think that students who have learned OO in programming courses (polymorphism, encapsulation, design by contract, inheritance, stuff that Barbara Liskov and David L. Parnas have written about, etc.) are better suited to use VB.NET for programming in .NET, because the language itself is built around and supports the OO spirit. The language itself is just a tool. The OO concepts are more fundamentals. Using the proper tool for the right job makes it easier to produce something with higher quality.
March 11, 2009, 10:42 amMathias:
In all honesty, when I saw the title, I expected the usual C# rant dissing on VB.NET; luckily, your post is smarter than that.
I transitioned from VB6/VBA to VB.NET for a short stint, to C# which is now my preferred language, and most of my knowledge of OO design did come from Java. What I actually found shocking in your stats was not that C# had 50% more books than VB.NET, but rather that Java had 400% more books than C#…
March 11, 2009, 6:22 pmI agree with the argument that choosing C# helps because of the larger literature available. It’s kind of an odd argument, though, because really, you are selecting C# because of… the abundance of Java texts, not because of C#
And… are you also going to write a post explaining to C# people why they should learn VB.NET?
Cheers,
Mathias
Matt:
This blog entry is rather condescending. It pretty much assumes VB6 developers are retarded or something, and need proper mentoring to come out of the procedural closet. It’s quite possible VB6 developers are just as smart as anyone else, and are just using VB6 because they are maintaining legacy code.
Not to mention, VB.NET and C# have more in common than they do differences. They both generate MSIL and both expose the CLS in very similar ways. Maybe C# 4.0 will change that, but up until now they’ve practically been the same language with different syntax.
March 11, 2009, 6:24 pmBrian Di Croce:
@Mathias: Good catch on that 400% statistic; I haven’t noticed it. And that’s just for books alone. Think about open-source projects in .NET. I’m curious to know how many projects on CodePlex, Google Code or SourceForge are written in C# and how many are written in VB.NET. As per your question on inviting C# developers to learn VB.NET, that’s something I suggest to my C# students. On a personal level, I’m also committed on learning one of the DLR languages this year (either IronRuby or IronPython). I don’t see any advantage on holding to one language alone. But no, I won’t write a post on that.
@Matt: “It pretty much assumes VB6 developers are retarded or something”…uh? I’ve never downgraded VB6 developers, nor the language itself, in this post. In case you skipped some lines, my point was that given the shortage of resources in programming (books, open-source projects, articles, blog posts, etc.), written for VB developers, it’ll be in their advantage to also learn C#, especially if .NET is their mainstream development platform. On another note, learning to use .NET isn’t just about knowing the variants of the ‘using’ statement or LINQ itself, it’s also knowing how to build solid OO code, and sadly, the resources available for VB developers on that subject is pretty low. If the number of such resources were proportionally distributed amongst languages, then I wouldn’t have bothered writing this post.
March 11, 2009, 6:48 pmChris Deweese:
I work in a VB.Net shop. The reasons for going VB.Net were due to the base of ASP and VB 6 experience. You are correct in your assertion that a lot of VB developers who go from 6 to VB.NET do not make the leap into true object oriented programming. I don’t really fault the language here, I fault those developers. VB 6 is basically COBOL for windows. It was very procedural and produced people who thought in procedures and not in objects or events, etc.
Ideally, any purist would say that you program into the language and not in it. So add me to the category of VB.Net programmers using the enterprise library, dependency injection (via unity), unit testing (with mocking), etc. I came from an ASP/VB6 background and dropped it like a bad case of the runs to move on to the greener pastures of OO (which has it’s own problems to learn how to handle).
I’ve spent a lot of time lately just refamiliarizing people with why we use interfaces, base classes, etc. A few a-ha moments later and I’ve got several junior developers up and running making good decisions using the SOLID principles and just having an awareness of some of the more “advanced” techniques.
You have some good points and I think it is good to surface the discussion but I disagree that the language makes a difference. The people and their willingness to learn the new ways of OO is what matters. The language should be secondary and the vehicle to implement those concepts such as the SOLID principles.
Though I do a lot (a lot) of XML work so I must say I much appreciate XML literals no matter how much of a fit that throws the purists into.
Good thought provoking article!
March 11, 2009, 7:13 pmBrian Di Croce:
@Chris: Thanks! I was reminded of the VB6/ASP/VBScript era this afternoon too. Developers coming from that era to ASP.NET will also choose VB.NET, but rather to stick with the familiarity of the language (that would be my assumption), even though both ASP.NET and VB.NET are completely different than their previous counterparts. Not many C# developers know this, but since you mentioned that you mostly work with XML nowadays, the implementation of LINQ in VB.NET for XML literals is pretty powerful, because in C# it’s non-existent. So if I’m a C# developer and I need to do some XML manipulation or transformation, chances are that I’ll create my class in a VB.NET assembly and use the power of LINQ and its support for XML literals in the language. Thank you for mentioning the SOLID principles and sharing your story. Perhaps Uncle Bob should ask someone to write Agile Practices, Patterns and Principles in Visual Basic.NET.
March 11, 2009, 7:48 pmDan Crowell:
I have programmed in VB since version 3.0. When I started with the .net framework I used VB.net primarily. It was a bit confusing and I didn’t understand why things worked the way they did.
I switched to C# because most of the thought leaders seemed to use C#. I still program with VB when a project calls for it.
One of the most helpful books for learing what object oriented development is “Object-Oriented Thought Process” by Matt Weisfeld. That book helps you understand why and how to thing in an OO way. It is a short book that doesn’t beat you down with needless details and a bunch of unnecessary filler. I like concise writing.
March 11, 2009, 8:12 pmBrian Di Croce:
@Dan: Good stuff. Thanks for the reference on “Object-Oriented Thought Process”. Another OO book that I recommend is “Object Thinking” (Microsoft Press) which is language-agnostic (though it focuses a little on C-family languages for some examples) and will challenge a reader’s philosophy on OO as well.
March 11, 2009, 8:16 pmValamas:
I am exVB3 throught to exVB6. I am exASP(Classic). Started .net with VB. Mentor said, forget VB, learn C#, open every new project in C# from now on. Never looked back since.
Now when i read VB, it is like reading italian, so long to read, less clear with the logic. I dislike VB very much. I like strongly typed, I like “null” rather than “nothing”.
You want to stay in the VB boat, thats fine, not in my dev team, you will not be hired.
March 11, 2009, 8:42 pmDarrel Miller:
I can’t really relate to non-OO VB6. I started doing OO in Turbo Pascal 5.5, then did it in Visual Foxpro and the lack of inheritance in VB was actually a blessing in disguise. Implementation inheritance can really make a mess if you are not careful. Aggregation and delegation FTW!
March 11, 2009, 9:17 pmI’ve even done MVC and MVP in VB6. The language is really far less important than people like to think. Having said that, I think lambda expressions have the potential to significantly change the way code can be written.
Bill:
Disappointing post with a large measure of arrogance. The only thing new was I did not find one mention of C#s “elegance”.
I would like your thoughts on what to do with the millions of lines of VB code in businesses around the world. Just dump it? Change is coming!
March 11, 2009, 9:46 pmBrian Di Croce:
@Bill: “Change is coming!”…uh?? Are you talking about .NET 4.0?
March 11, 2009, 9:49 pmRoberto Hernandez:
Wow didn’t we have this conversation 8 years ago! I do recommmend C# but I am not fighting the crazy VB6 dudes to a shouting match.
Roberto.
March 11, 2009, 9:54 pmJohn Cunningham:
As a successful VB.NET developer, who has used Enterprise Library extensively in his projects, as well as adopting TDD, DDD, and SOLID principles, I am thoroughly disappointed every time I see a post like this. Instead of encouraging developers to abandon VB, how about we encourage Microsoft to stop treating VB developers as second class citizens. I have been working with ASP.NET MVC and WPF extensively now and can not believe the bias to C# in all of Microsoft’s official documentation and samples. Although I can read and convert C# almost as easily as I read VB code, I see no reason to switch. I have yet to come across a problem that I couldn’t solve using VB. As far as resharper, I use that as well, although I have to laugh when watching the screencasts where most Resharper disciples can’t seem to write a single line of C# code without it.
March 12, 2009, 1:50 amBrian Di Croce:
@John: “Disappointed”?, “encouraging developers to abandon VB”, “stop treating VB developers as second class citizens”…what? Dude, have you read the post? Feel free to email me where exactly I’m either encouraging developers to abandon VB or treating them as second class citizens. My intention was simply to invite VB developers to learn C# (if they don’t already know about it), because the majority of resources available (books, articles, blog posts, open-source projects, tools, etc.) are for the C-family language developers. That’s why I’ve included a statistic on books sold through Amazon.com about what I believe are the four most popular languages (VB, C+, C++ and Java).
John, have you checked the video I linked about Barack Obama inviting fellow Americans to learn a new language, such as Spanish or French, so that they can have more opportunities? It’s the same invitation I’m doing here. Point is that knowing and programming in simply one language shouldn’t be enough, because you might be missing on other useful things you didn’t know about.
March 12, 2009, 7:30 amChris Deweese:
You really do have to give Brian’s post a couple reads. My gut reactin was “Oh great, here’s another language war” and I instantly wanted to defend VB because I really do enjoy the language. That said I think the point of learning to read other languages is good. I reguarly look at C# or Java code to get ideas. Sometimes it’s hard to make the translation but it’s worth the effort.
I agree with John Cunningham though, VB is the language that got left behind. Thanks to people like Beth Massi (Sharing the Goodness that is VB) she is keeping a lot of people up-to-date on the fact that you can do whatever you need with VB. She does impart some decent principles but I wouldn’t expect her to demo SOLID code because she is really showing what can be done. Which is an important line to draw.
A lot of samples just show what’s possible and not the best way to do it or how to do it by applying SOLID. If I could start over I would have learned about SOLID and good OO before writing too much code. Unfortunately for most business programmers you have to learn by seeing. It doesn’t help when all we see is proof-of-concept code or stuff written for demos and not how you actually would for a bullet-proof, production application.
To anyone offended by this give Brian’s post a re-read before you flame him. I disagree with a few of his assumptions but in principle he highlightst one key point. VB brought with it a lot of people who just don’t have an OO foundation.
March 12, 2009, 8:42 amStacy Vicknair:
There are some major points I do agree with. There are very few books in the VB department, and even fewer GREAT books done in VB.NET. Also, the tool support is lacking, with Resharper now getting on the boat and StyleCop never being there. However, the people who are using VB.NET, not trying C#, not learning TDD or DDD or SOLID, not practicing or learning good OO skills, aren’t the people who will read this article.
They are busy reading fail blog, writing spaghetti code and taking power naps with their free time. Why do these types of articles cause flame wars? Because the people who need to read them don’t. The exceptions to the rule do.
That being said, I program in VB.NET and love to do so. If tomorrow the winds changed and I had to do C#, that’s fine. The framework is still chugging behind it all, it’s just a matter of syntax.
I am also equally dissappointed that there is no Head First VB.NET. I loved Head First Design Patterns, and I’ve got a copy of OOA&D too. I ported every example from Java to VB.NET, and learned more about both languages in the process.
Even McConnell suggested that by reading Code Complete, you’re ahead of the curve. Most developers never read a book on practices or to improve how they operate. The question is if you are okay with being a programmer who trudges through work and just waits for the day to end or if you are passionate about what you do and always want to learn more.
March 12, 2009, 9:08 amBrian Di Croce:
@Chris:
@Stacy: Right on! And who knows, perhaps O’Reilly might be working on a Head First VB.NET book (it’ll be a big plus if they do). By the way, I want to give a shout to your website. After seeing some of your posts, I was glad to see that you have done some pretty useful stuff for VB.NET developers, especially translating the Java examples of the Head First book in VB. This is great!
***** For the rest of us, I encourage you to visit Stacy’s website @ http://www.wtfnext.com/ *****
March 12, 2009, 9:23 amGeorge McCormick:
I disagree on your statement saying you can find more work if you know both langs. Companies are looking for current working experience in one particular lang. and it is very unlikely that someone will work in a shop with both languages.
March 12, 2009, 9:33 amStacy Vicknair:
@Brian Thanks for the comment, I started WTFNext because of the gaps in books and tutorials that I struggled against being mostly self taught. The site is on its way to becoming more open to other languages, especially F#, in the .NET family.
March 12, 2009, 9:38 amTerry:
This is a good post. I must say I’ve had the displeasure of maintaining some code from a developer with a VB6 background. Horrible long broken methods that didn’t work and that were difficult to understand, unused variables, poorly named variables,poorly reimplementing library functions that all ready exist, you name it, it all had to be rewritten from the ground up. Without hesitation, I would make the same recommendation that you have. However, despite the incompetent VB6 style developers who contribute DailyWTF code on a regular basis I’m still in love with VB.NET mainly because of the evils of case sensitivity.
March 12, 2009, 9:52 amhttp://www.codinghorror.com/blog/archives/000458.html
John Cunningham:
“Disappointed” – Absolutely, though not in your article; I am disappointed in the limited resources for VB developers, and that those new to .NET are steered away from VB. Your article does a great job in pointing that out, which raises it above the typical C# vs. VB street fight.
“encouraging developers to abandon VB” – You said “Whenever someone coming from a VB6 background asks me which language they should adopt to learn .NET, I recommend them C#.” Perhaps you can recommend that they focus on becoming better developers, regardless of the language. Although, I have a feeling you do that already.
“stop treating VB developers as second class citizens”…what? Dude, have you read the post? –
Yes, and I think I was clear in my comment, that I felt Microsoft was guilty of treating us as 3rd class citizens. Your in the clear Brian.
If this was the typical VB is crap, C# is great post, I wouldn’t have taken the time to comment. I think most of your points are dead on. Perhaps this is a call to action for myself and the VB community as a whole to step up, and follow Stacy’s (and others) lead and start sharing our knowledge.
As far as President Obama’s video, I think the only thing worse than a vb/c# debate would be to start talking politics on a programming blog. So let’s agree to not even go there.
Thanks for the posts on Subversion and CI with TeamCity however. It’s what brought me to your blog in the first place.
March 12, 2009, 12:18 pmJohn Cunningham:
Stacy has a new subscriber…vb.net code in a blog post, will wonders never cease!
March 12, 2009, 12:21 pmTim:
@Stacy,
“The framework is still chugging behind it all, it’s just a matter of syntax.”
I disagree. Unless you are removing *all* context and simply looking at two languages back-ended by the same framework. But two sentences in the *same* language can mean entirely two different things just by adding a hint of sarcasm or a different inflection in ones voice.
I think that the context of a developer moving from VB6 to the .Net framework is a great context for this post! It has been my experience to lead developers of all types, but my job is made much easier when I can talk the Management into embracing C# over VB.Net when it comes to a conversion of VB6 developers.
In that context – learning OO programming/methods/skills is easier as it is a “clean break” from the procedural VB6 and helps with providing a new mindset to learning. I liked VB6, and like VB.Net and given the choice without ever having used the former, I would have no druthers about which language “syntax” is used.
Having said that… I still like C# better.
Heck, I just like “saying” C# better.
March 12, 2009, 12:41 pmEinar G:
I came from VB6 to VB .net then to C#. The move was becose I changed job and they use C#.
There is one part I love more about VB than C# and that is Visual studio. Visual studio and everything around VB is aimed at quick devlopment. I rather often hear my self saying. ooo this is easyer in VB.
Wich one is better…. You pick the tool that fits that project. Language dont realy matter.
March 13, 2009, 3:28 pmHenrique Lobo Weissmann (Kico):
Actually, there’s another problem too: VB books usually are a piece of crap that only teach it’s readers how to drag and drop components in forms.
That’s the biggest problem on my opinion. Issues like design patterns and best practices are usually just ignored on these publications, wich is a shame.
March 15, 2009, 4:17 pmStacy Vicknair:
@Henrique
You’re right. There are some okay VB books, there are very few great VB books. There are plenty of great C# books, and even more great Java books. Limiting yourself to any single language is begging for disaster, especially with VB.NET. Learning to understand the syntax of C# or Java opens up a great list of literature that will take a developer and make them greater.
The question then becomes, should we be porting great books to VB, or should we be learning based on logic and form rather than language and syntax? I’d argue for the latter, but the former wouldn’t hurt either.
March 16, 2009, 11:37 amKathleen Dollard:
This could have been a post I agreed with, had you stuck with the idea of learning C# rather than switching to C#. It’s my experience in user groups and conferences that your behind the cure on that because currently a greater percentage of VB developers manage C# than the reverse.
What you failed to suggest is that C# coders learn VB. I wrote the paired article to Bill’s that was “What C# Coders Should Know About VB” and my earlier blog post on the subject inspired that VSM issue and is more complete on the differences. One of my INETA talks (available to any user group that would like me to come) is called Cross Coding.
I do both languages comfortably and my column overall splits between languages. There are many differences between the languages, but claiming people “should” go to one is hubris.
March 19, 2009, 9:14 amBrian Di Croce:
@Kathleen: Actually I was careful not to write, less to suggest, that VB developers should switch to C#, because I don’t believe it’s a sound strategy. What I am suggesting though, is for those VB developers that only focus on programming with VB to enlarge their horizons on the .NET platform and mainstream development (OOA/D, patterns, open source projects, frameworks, etc.), by taking a look at other languages such as C# (for all the reasons stated in the post and comments). If you (re)read the post, you will actually find nowhere that I’m suggesting that VB developers should abandon ship and jump to C#.
As for encouraging C# developers to learn about VB, I’ve actually mentioned it in the post (through Bill Wagner’s citation) and on my fourth comment, after one of the readers also suggested this tip. As some of the other readers have pointed out, this post is NOT to encourage VB developers to abandon VB and go with another language. The idea I had when writing this post was actually to encourage VB developers that are 100% focused on VB, to step out their “comfort zone” and learn another language too (like C#), again for the various points that were mentioned through the post and comments.
March 19, 2009, 9:31 amMatt:
So should a C# developer who is 100% focused on C# step out of their comfort zone and learn VB.NET? Most VB.NET developers I know can read C# just fine, but C# developers generally have a harder time reading VB.
Other than when some feature is being used that is not supported in the other language from a syntax standpoint, as a VB guy, I have no problem reading some concept article in C# and 100% understanding the info they are conveying, regardless of what language they put the examples in. It could be written in pseudocode for all I care…
March 19, 2009, 11:21 amBrian Di Croce:
@Matt: I would recommend C# developers to learn VB.NET so that they can embrace the differences and similarities of both of them, but that’s about it. On the other hand, I would definitively encourage C# developers to take a look at Ruby (or other dynamic languages) so that when IronRuby ships, they’ll also be curious enough to learn about the DLR. I wouldn’t stay focused on just one language, one tool or one technology. The more you learn about things, the better position you are in to see some gaps or missing links, and come up with a fresh, new and innovative solution to make our craft better.
March 19, 2009, 8:41 pmMathias:
One situation where a C# developer might (should?) consider looking more into VB.NET is to do some VSTO development, or anything interop/office related. The lack of support for optional arguments in C# makes for some pretty horrendous method calls, chock-full of Missing.Value. It’s less true since the release of the VSTO Power Tools, but still… had to play devil’s advocate
March 21, 2009, 2:10 amFreelance programmer:
Talk about thorough research – I dread to think how long it took you to get those stats on the books alone!
I’m wondering why JAVA has so many more words devoted to it (more than the other three combined) – it’s not that much more widespread – is it because it’s harder?!
April 1, 2009, 6:58 am