tags:

views:

629

answers:

9

On another programming related website, I saw this line in someone's signature. This is NOT the first time I've seen such sentiments, although this is the harshest:

"People who work in VB or any variant thereof are not programmers, they are circus chimps throwing feces into an IDE..."

VBA is my bread and butter and I can automate quite a bit of stuff with it. Yes, I know it lacks polish and some functionality, but why so much negativity toward it? On the flip side, what do other languages have that VB doesn't?

+14  A: 

Read some of Joel Spolsky's articles and you'll feel better about yourself. From his article Working on CityDesk, Part Three:

Visual Basic is an extremely productive way to write code, especially GUI code. Want bold text on a dialog box? It's one click in VB. Now try doing it in MFC. You have to create a subclassed control, it's a big mess, you have to know all about LOGFONTS and Windows window subclassing and a bunch of other things and you need about three lines of code once you have the magic class.

But many VB programs are spaghetti, either because they're done as quick and dirty one-offs, or because they're written by hack programmers without training in object oriented programming, or even structured programming.

What I wondered was, what happens if you take top-notch C++ programmers who dream in pointers, and let them code in VB. What I discovered at Fog Creek was that they become super-efficient coding machines. The code looks pretty good, it's object-oriented and robust, but you don't waste time using tools that are at a level lower than you need. I've spent years writing code for C++/MFC and years writing code in Visual Basic, and let me tell you, VB is just much, much more productive.

This simplicity attracts a lot of new programmers. Saying there are a lot of bad programmers using Visual Basic does not mean Visual Basic is a bad language; it simply means that Visual Basic is accessible to bad programmers (AKA new programmers).

Andrew Keeton
There's an old quote that (sometimes) applies to VB... "if you make it simple enough that any idiot can use it, only idiots will use it". VB isn't a great language, but the real pitfall is that it's too easy to learn, and too many idiots calling themselves "professional" VB developers.
STW
A: 

Most every developer I know has worked at one point or another with a VB developer, or a developer with a heavy VB background that just didn't have a clue. Unfortunately, as with most things, all we remember are the bad things about something. So we relate VB to bad programming.

It is certainly not true that all VB programmers are poor developers. But when everybody has stories about "This one old VB guy I used to work with." The stereotype is spread.

Matthew Vines
+1  A: 

I'm visiting SO in between writing VBScript code and that statement really rings true to me -- I am currently a circus chimp. If you don't know anything else, VB and its variants seem like great languages.

In my opinion, the reason for the negativity is one basic statement -- On Error Resume Next. This makes bad code a feature of the language. If it didn't have this, it wouldn't have near the bad publicity...

Austin Salonen
PowerUser
Right now VBScript is mine... and the fact that *On Error Resume Next* is in the code I'm supporting is just mind-boggling. I hear "it works most of the time" a lot and they can't figure why it fails when it does -- I wonder why... you're intentionally skipping any error!!
Austin Salonen
+3  A: 

Meh, these are just religious bigots.

There is no one true language, and most experienced folks not only know that, but instantly recognize these statements as a glaring sign of inexperience.

Brian MacKay
Amen, yet I still love my VB.NET. BUT, more importantly, I ABSOLUTELY LOVE the .NET Framework!
AMissico
+4  A: 

Also just to note that VB, VBA, and VB.NET are all three different languages even though they might share some similar syntax. There's no real difference between VB.NET and C# (besides the keywords/syntax), so we shouldn't lump VB (6 and before) and VBA in with VB.NET.

The real problem that many programmers have with "VB" (just say all 3 of the languages) is really more about the people using it. Most of the time "VB" programmers have less formal education and write sloppier code. That's not true for all "VB" programmers (and that doesn't mean there's not sloppy code written in C++, Java, C#, etc.). It's just the typical expectation that someone who doesn't use VB has when they hear about VB programs.

Jim W
There are some important difference between VB.Net and C#, but +1 because VB.Net is definitely a cut above vb6 or vba.
Joel Coehoorn
VB .NET is definitely different from VB and VBA. But the differences between VB and VBA are extremely minor.
Kyralessa
Joel, please expand on your statement that VB.Net is a cut above VB6 and VBA.
Tony Toews
I think Joel means that VB.NET is a fully OOP language. VBA is just a scripting language. VB6 is not a real OOP language. VB.NET has all of the same features as C# (or any other .NET language).
Jim W
VBA is not "a scripting language". *VBScript* is a scripting language. VBA is essentially the same language as VB6, but it's tied to Excel, Word, Access, etc. instead of stand-alone like VB6. It's true that VBA and VB6 are not true OO languages, but they do have some OO features (such as interfaces).
Kyralessa
+1  A: 

Average developer quality seems to be inversely proportional to popularity of language * ease of use of language. VB is very easy, and is/was widely used.

This is because A) there's a demand for coders in popular languages, so every employer has to either lower their standards, raise their pay or go without developers. B) people without a clue can still appear moderately productive in easy to use languages. There are enough libraries and GUI tools that they can slap together something that looks useful, even if it's complete garbage under the hood.

There's nothing inherently wrong with VB when used in the domains it was intended for, by people who know what they're doing. The same is true for almost any tool/language.

patros
+14  A: 

VB6, VBScript, and VBA have the reputation because they just aren't industrial strength languages. Notably:

  • No OOP. Sure, you have classes and modules, but no inheritance. VB isn't a low-level language, it needs real objects.
  • No first-class functions, so you can't even simulate OOP or polymorphism.
  • Lack of a well-developed class library. VB6 has a small library of built-in functions, and almost all other functionality is delegated to Windows calls or (usually pricey) third-party components.
  • Lousy error-handling. ON ERROR RESUME NEXT is a pox on the planet.
  • Although its not the fault of the language, VBA earned a bad reputation by association with MSAccess.

Of course, VB wasn't really intended to be an industrial strength language, so maybe nothing mentioned above is really proper criticism of the language at all. Fortunately VB.NET and the latest versions of VBA fix everything above, so VB.NET is on par with any other "serious" language in the marketplace.


[anecdote]

In defense of VB, I find most people criticize the language just to go along with the status quo, not because they've actually used it.

A few years ago, in a chatroom, I ran across young neophyte railing against a VB6 developer for using such a crappy language. I innocently asked "what's wrong with VB".

The first thing he said was "Because its a WINDOWS language!" So I pointed out that Borland Delphi is a Windows only language*, but I've never heard anyone malign it for that reason. (* There was a product called Kylix which cross-compiles to Linux, but its expensive, buggy, and discontinued. Its been a while since I've used Delphi, but last I'd heard, its still not ready for Linux.)

So, he said "It has a HORRIBLE SYNTAX!" Is that really the reason people hate this language? I'd say Perl, Lisp, and C++ are worse on the eyes than VB.

Next, he says "Its too easy to learn!" Well, I'd consider that a point in favor of the language. I'll never write a GUI by hand if I have a drag-and-drop designer at my disposal. What else you got?

So finally, grasping at straws, he comments "It has... no string manipulation functions". Left, Right, Mid, Replace, InStr and Trim. QED noob.

Interestingly, VB has features found some "hacker" languages, namely variant datatypes and duck typing. Compiled code performed reasonably well, interop between COM and native windows DLLs was easy, and the GUI editor basically set the bar for all future RAD development.

[/anecdote]

Juliet
Unless otherwise noted, all instances of VB refer to VB6.
Juliet
Spot on about the intent of VB
Austin Salonen
If I remember correctly, Microsoft Access was the last of the "big four" Office applications to get VBA. I seem to remember that Word, Excel, and Outlook had VBA 5.x and Access was still using AccessBasic. It wasn't until Office 2000 that all had VBA 6.x. (Someone correct me on this.)
AMissico
+8  A: 

I work in a place where all the code is C#, not VB .NET. One developer wrote most of the code. You know how he achieved this feat? Easy: He copied-and-pasted all over the place. A given method might have anywhere from a few to hundreds of copies throughout the system.

Good developers can be good in any language. Crappy developers can be crappy in any language.

Kyralessa
I worked in a shop in Lincoln where the best programmer in the company used VB.NET exclusively -- he even managed to work in some high-level functional programming concepts in his code. The worst application was a C# app written by some very inexperienced (or possibly malicious) offshore developers.
Juliet
A: 

I dislike the language, but that's mostly because I worked with a vb-like language which stripped out absolutely anything that might be considered an advantage and forced "best practices" that really didn't make sense.

The biggest problem I have with VB is that there is an almost direct track from clueless non-programmer -> part time Excel/Access scripter -> VBA "guru" -> VB "programmer" -> lead programmer on the most important project in the company.

Honestly I wouldn't have believed it if I didn't see someone follow that path right in front of my eyes. I even tried to mentor the guy so that he would be familiar with OOP, exception based error handling, etc. but he just dug his head in the sand and wrote everything procedurally because that had always worked for him.

I have had a chance to work with VB.Net and as long as I treated it like an object oriended .Net langauge first and VB second it wasn't so bad. It would never be my first choice for a new project, though.

greg