Follow Slashdot blog updates by subscribing to our blog RSS feed


Forgot your password?

Making an Argument Against Using Visual-Basic? 690

ethan_clark asks: "I work for a small company (< 10 employees) as a software engineer. The company got its start with a software product written by the owner in VisualBasic. He hired me to assist in rewriting the software – only catch is, he's stuck on having it re-written in VisualBasic. This scares me, but I honestly can't make a good argument against VB because I'm not familiar enough with it. So my question is twofold: I am looking for some confirmation to my suspicion that VB isn't the greatest language for large projects; and If VB isn't good, arguments against using it. If it is good, what arguments would you use to argue for it (for my sake)?" If you are going to argue against a language, it is best if you do so after you become familiar with it so that you can argue fairly on its merits and deficiencies. VisualBasic, like just about every other language, has its place. For the sake of discussion however, what tasks would VisualBasic not be suited for?
This discussion has been archived. No new comments can be posted.

Making an Argument Against Using Visual-Basic?

Comments Filter:
  • by MurrayTodd ( 92102 ) * on Wednesday May 31, 2006 @11:22PM (#15441593) Homepage
    Forgive my overall ignorance--I'm a Mac and Linux and Java person, although I've written a bit of VB in a job years ago--but does anyone know if moving to VB.Net allows a phased-in approach to introducing at least some C# programming down the road?

    Do the .Net languages allow a decent functional "Mix 'n Match" capability? If so, I'd make sure the VB rewrite was in VB.Net (or are there VB.Net idiosyncrasies that would justify sticking with the old VB6?) and then I'd learn C# really well. At some point in the project some component might fall under the "this will really suck under VB, and we can tackle it much better by writing this piece in C#" which will let you get a toe-hold on the idea of using a better language.

    That's the way I helped a Fortune 500 company start adopting Linux back in 1998... the friendly and subversive way!

    As for the tasks VB are not suited for (again, I only know VB6, not VB.Net) the biggest glaring omission in my experience was the lack of decent Regular Expressions, or Hash Tables / "Dictionaries"--unless you link to the VBScript/IE6 library like everyone used to. On the other hand, there are IMOHO problems with languages like Perl that make them bad for a number of solutions, but that hasn't stopped nutty fanatics from treating them like "golden hammers".

    While I'm writing disclaimers, there are a number of commercial applications out there written entirely in VB. In all cases I've observed, they "evolved" out of a simple and useful app and fell into being examples of the most counter-intuitive user interfaces and over all "kludginess".
    • by Edward Teach ( 11577 ) on Wednesday May 31, 2006 @11:33PM (#15441650)
      The good thing about the .NET languages is that they compile to the same "bytecode". In Microsoft's case, this is the MSIL that runs on the CLR. You can mix and match all you want. Just create a library of C# classes and you can use them in any of the .NET languages. The reverse is true, that you can write code in VB.NET and use that library in any of the other .NET languages.

      .NET simply provides the programmer with the ability to program in the language they either know better or in a language that seems better suited to the job, without taking a performance hit, since they all compile to the same intermediate language.

      .NET 2.0 takes this to even more extremes, in that, more toolbox items are available and virtually all of the components are data aware. Also, Visual Studio 2005 Pro includes a development IIS instance and SQL Server 2005 Express is included.

      Check out the Visual Studio Website [] for more information.

      • Which means, you can write a thin .net layer that has a entire Java backend! W00T!
      • The good thing about the .NET languages is that they compile to the same "bytecode". In Microsoft's case, this is the MSIL that runs on the CLR.

        That is not always true. Unless you put the following line in your AssemblyInfo file your class library, it is likely the resulting byte code can not be used by other .NET languages:

        [assembly: System.CLSCompliant(true)]

        Visual Studio 2005 Pro includes a development IIS instance

        It's actually Cassini. The only real nice thing about this is that Cassini is much lighte
    • by Osty ( 16825 ) on Wednesday May 31, 2006 @11:41PM (#15441704)

      Do the .Net languages allow a decent functional "Mix 'n Match" capability? If so, I'd make sure the VB rewrite was in VB.Net (or are there VB.Net idiosyncrasies that would justify sticking with the old VB6?) and then I'd learn C# really well. At some point in the project some component might fall under the "this will really suck under VB, and we can tackle it much better by writing this piece in C#" which will let you get a toe-hold on the idea of using a better language.

      .NET languages are all pretty much interoperable, so long as you make sure to build your assembly as CLSCompliant [] (which may limit usage of some language features). The main problem is that VB.NET is quite a bit different from VB6. For someone who's only ever done VB code, it's easier to learn VB.NET than C#, but for everybody else you may as well start directly with C#. In the past, I'd have advocated building your UI with VB and calling C++ COM objects for any heavy lifting. Now, I'd recommend you go C# and do everything there.

      As for the tasks VB are not suited for (again, I only know VB6, not VB.Net) the biggest glaring omission in my experience was the lack of decent Regular Expressions, or Hash Tables / "Dictionaries"--unless you link to the VBScript/IE6 library like everyone used to. On the other hand, there are IMOHO problems with languages like Perl that make them bad for a number of solutions, but that hasn't stopped nutty fanatics from treating them like "golden hammers".

      You get regular expressions and collections with .NET (though not as many different collections as in Java, unless you bring in the J# assemblies for your project). You also get generics, anonymous methods (anonymous delegates, lambda functions, closures, whatever you want to call them), and quite a bit more cool stuff, though I have no idea how well that's exposed through the VB.NET language. Even cooler than that, you could subversively write modules in a functional language like F# [] (a dialect of ML) and nobody'd know the difference from their VB.NET or C# environments. (yeah, you can do that with Java as well.)

    • Any app can devolve into kludginess unless there's a strong approach to coding shared by every single one of the maintainers. VB6 isn't magic that attracts crud any more than C++ or Java (other than increasing the number of potential idiots who think they know how to program in VB.)

      Any user interface, regardless of language, should be usability tested at every major release. A lot of developers are horrible at adding interface widgets because they're too wrapped up in the solution rather than the proble

    • See, he should just convince his boss to do it in LISP. I mean, the syntax isn't that bad, really, once you get around it, and GUI's are EASY in LISP. You just do paren-based dot-matrix representation.
    • by Jugalator ( 259273 ) on Thursday June 01, 2006 @02:28AM (#15442482) Journal
      As for the tasks VB are not suited for (again, I only know VB6, not VB.Net) the biggest glaring omission in my experience was the lack of decent Regular Expressions, or Hash Tables / "Dictionaries"--unless you link to the VBScript/IE6 library like everyone used to.

      Just FYI about .NET:

      VB.NET directly supports dictionaries, even by using generics.

      It also suports reasonably powerful regular expressions via the System.Text.RegularExpressions namespace.
    • VB's not that bad (Score:5, Informative)

      by HangingChad ( 677530 ) on Thursday June 01, 2006 @07:05AM (#15443299) Homepage
      At some point in the project some component might fall under the "this will really suck under VB, and we can tackle it much better by writing this piece in C#" which will let you get a toe-hold on the idea of using a better language.

      I have one customer that specs VB.NET for all their apps. After getting comfortable with it there's just no reason for some of the comments here. VB isn't "easier" than C#, just different. If you're a bad VB programmer, switching to C# isn't going to make you a better one.

      My opinion is that a lot of bias against VB stretches back to the day when it was not considered a "real" programming language. But it's grown up and turned into a capable language and if that's what the customer wants, there's no need to try to sell them on C#.

    • How can you say C# is better than VB.NET? If you set your compile options correctly they compile the same in most cases. What matters more is the quality of the programmer and you will get better code. If I could get a good VB.NET programmer I would take him over 4 bad C# programmers and vice versa. The languages are basically the same.

      I've written in both, the main advantage C# has is that it is less verbose but that doesn't make it better, it probably makes it more difficult for inexpierenced programm
  • by blincoln ( 592401 ) on Wednesday May 31, 2006 @11:22PM (#15441594) Homepage Journal
    VB = 6 is unadulterated crap. VB.NET isn't half bad, although I much prefer C#.
    • by km790816 ( 78280 ) <> on Thursday June 01, 2006 @01:00AM (#15442104)
      Mod the parent up.

      This is the *huge* issue, that will make or break your decision.

      If it's VB6, run for the hills. It's end-of-lifed.

      VB.NET is a great place.
      You'll be able to leverage all of the .NET platform pieces (ASP.NET, SQL integration, WinForms, Avalon, etc).
      You'll be able to mix-n-match C# code.
      There is continuing investment in the language and tools. There's already a page dedicated to VB9 [] with some awesome features I wish were going to be in C#.

      If you're betting on a Windows environment, VB.NET is a great place to be.

      Your first choice should be "Are we going to bet on .NET?".

      If the answer is yes, VB.NET vs. C# vs. Managed C++ is a secondary call.
      • You'll be able to mix-n-match C# code.

        That has to be somewhere in the manual of permanent employment as one of the tricks of the trade... "introduce technology that no one else understands so that you're the only person who can maintain it". If the original poster's boss has any brain cells, he'll refuse to have any C# lying about unless he has more than 1 programmer capable of working with it.

      • by binkzz ( 779594 ) on Thursday June 01, 2006 @07:14AM (#15443325) Journal
        "If it's VB6, run for the hills. It's end-of-lifed."

        It's not entirely useless; I'm using my three VB6 MS books as a stand for my monitor to get to the right height. The only downside is that I continuously have 'VB 666' staring at me in the face.
      • by hey! ( 33014 ) on Thursday June 01, 2006 @07:20AM (#15443347) Homepage Journal
        If it's VB6, run for the hills. It's end-of-lifed.

        This is a critical point, and bears on the way the boss is making the decision. Professional programmers don't like VB because, as a language, it is not very good. But that doesn't mean the boss is being stupid. No. He's actually making the decision using a fairly reliable algorithm: repeat what has worked in the past.

        The problem with this algorithm is that it can fail when the future is sufficiently different from the past. As in the platform being not supported anymore.

        VB is not so much a bad language as an obsolete (and mediocre) one. But it isn't just a language -- it's an IDE and an operating environment with widgets and libraries and so forth. And in the other aspects that VB is relatively strong for some kinds of tasks. Visual Basic is Visual -- it really encourages you to think and work in terms of concrete visual objects. For a professional programmer, this is higly limiting, because a lot of problems you deal with aren't visual. Limiting isn't necessarily bad if the problem you're working on falls squarely in the middle of them.

        You just don't do complex programming in VB. It's perfectly adequate for simple form based clients to a client/server style database backed applications that lack demanding scalability or support requirements. Most VB programs consist mostly of short event handler scripts around form components. The tight coupling of business logic to UI code is anethema to systems programmers. Clearly it is bad architecture, but the purpose of architecture is to reduce the cost of development and maintenance. In these kinds of applications, being able to get the application working quick enough outweighs any architectural drawbacks.

        I think the sweet spot for you would be C# and Visual Studio. The way you lay out forms and such is the same as in VB 6, and these days learning how the bits is the real work on the learning curve, not the language. Forms in C# hava a Java/Swingish kind of MVC pattern, but it's really only one new design pattern you need to deal with. Once he's got the hang of it the boss can pretty much see a one to one correspondence between bits in the old VB app and a new C# app. You could go with VB.NET, but really for the kind of cmdbtn_click scripts of a typical VB app, there is no reason a VB6 programmer couldn't look at, understand, and maintain the same script in C# without having to swallow the whole C# enchilada.

        And C# is a modern, well designed language. This means that if you have a piece of work that is sufficiently complex to worry about reuse, maintainability, scalability or other advanced requirements, you can address them properly. Many of the best practices and frameworks from Java have their counterparts in C#, such as O-R mapping, unit testing and so forth.

        IN any case, you're in for tough sledding Dealing with a guy who has built a business where he does everything is difficult. These guys seldom can make the leap to creating a company that is bigger than they can handle personally. Even if they understand change is necessary, and that they can't do it themselves; even if they hire people to create change, they usually end up fighting change tooth and nail. Often they undermine the efforts of anybody to do anthing independently, such as book keeping or filing. Everybody is running a three legged race with the boss, and since he only has two legs, there's a lot of waiting around for him to catch up so he can toss all your recent work into the crapper.

        Underneath this behavior is fear and beneath fear is insecurity and ego protection. Probably against all expectations, this guy has made a reasonable success so far; he has customers who send him enough money that there's more work than he can do himself. And since he didn't get where he is by saying no, he hired more people. But he'd probably be happier if it was just him. He may not know how to supervise people or even run a bu
        • I have issues with the idea that the boss dude is a stick-in-the-mud and needs educatin' on how to run his business.

          For the boss dude, the company and its product is his life and he is stuck with what happens to it. He hired you because, well, you could be off doing your own business and your own software package in whatever language you desire, but you decided to work for The Man, and for all you know and all the boss dude knows, you could be a life-long partner in the business or you could be here toda

      • If the answer is yes, VB.NET vs. C# vs. Managed C++ is a secondary call.

        Stay the hell away from managed C++ if you can avoid it. There is precious little reason to use C++ unless you intend to do something unsafe such as call Win32 or other unmanaged code so managed C++ is something of a misnomer. The only reason to use it in my opinion is if you have some legacy C++ that you need to abstract behind an object and expose into .NET land.

        It's also worth pointing out that if ever the day arrives where Mono

  • Give us a bone! (Score:5, Informative)

    by morcheeba ( 260908 ) * on Wednesday May 31, 2006 @11:22PM (#15441599) Journal
    What kind of project are you working on? The only description you provided is "Large". That could mean 3D FPS, relational database, mission-critical embedded vision system for an interstellar satellite, a cross-platform OS... all very different projects, and probably not suitable for VB.

    Picking the right tool really requires a better understanding of your project.

    Beyond the general problem, what are your expectations for reliability/testability, schedule, maintainability, expandability, performance?

    If the owner is the only one qualified to improve the product, Visual Basic might be a good choice.

    I once worked for a company that had an extremely accurate satellite propagation program. The problem was it was written in GWBASIC and did not run in a text-only mode (EGA graphics required!). For fun, I tried to convert it to C, but gave up - pure spaghetti code. The author became the head of a 200-person engineering department -- best leave it in GWBASIC and let him support it.
  • by pilot1 ( 610480 ) on Wednesday May 31, 2006 @11:24PM (#15441604)
    VisualBasic, like just about every other language, has its place.

    And it's called hell.
  • by plover ( 150551 ) * on Wednesday May 31, 2006 @11:27PM (#15441617) Homepage Journal
    A fair argument against VB6 is that it's at end-of-life. Microsoft has dropped support. You find a bug in it and it's all yours. But honestly, there just aren't that many bugs left in VB6 that aren't already known.

    There's a different point of view you need to seriously consider: who's signing your paycheck? It's not Microsoft, is it? I thought not.

    Consider meeting your boss in the middle. It's possible your boss is set on VB6 because he can read it fluently. Perhaps you could convince him to port it to might not be so different that it would scare him. The GUI isn't all that different. And the .net framework would allow you to gradually expose him to other languages (C# or C++/CLI.) And it would allow you the opportunity to use a language with better libraries than VB6.

    Have you dug a bit to find out why he's so pro-VB6? Maybe he's biased against .net because it's an interpreted language (like Java)? Perhaps half of his client base is all still running Windows 95 on 90 MHz pentiums, and .net is not an option for them. Maybe he'd be OK with C or C++ compiled to native executables, as long as there are no .net requirements. Microsoft's latest version of C/C++ has a strong push towards safer coding with bounds-checked versions of all the standard library functions. That might be good enough for him.

    Or maybe he just has only two or three long-term clients that are stuck on Windows 3.1, but they've been with him for 25 years so he feels he has to support them into the far future. Consider buying them a few cheapo PCs to run your software: $400 each for a few bottom-feeder Dells would go a long way with customer goodwill, and would allow the rest of you to move into the 21st century of tools. And a $1200 hardware investment is much less money than your time spent struggling with old tools.

    If he built a successful business around a piece of software, the chances are good he's smart enough to listen to rational arguments. So don't be irrational by kicking in your heels and saying "no! no! no!" unless you really enjoy job hunting.

    • I'd mod the parent up if I had any points. I couldn't agree more. The most compelling reason to gradually (if not immediately) move away is that VB6 has reached end-of-life. Your boss would do well to listen to you that you ought to at least _begin_ to move away.

      Just ignore most of the ad hominem remarks against VB6 here. I hate Microsoft as much as the next /.er but I made a living off VB6 for several years. Sure, VB6 won't make Doom 4 or Linux kernel 2.8, but it did and still has its merits. Its just that
    • by Otter ( 3800 ) on Thursday June 01, 2006 @12:04AM (#15441853) Journal
      If he built a successful business around a piece of software, the chances are good he's smart enough to listen to rational arguments.

      Better yet, given that he's built a succesful business by writing version 1 in VB and that you don't actually have any rational arguments, why not defer to his judgment? The worst that can happen is that the next time this question comes up, you'll have a useful opinion instead of just vague concern that VB isn't 1337 enough.

      • by Sycraft-fu ( 314770 ) on Thursday June 01, 2006 @02:27AM (#15442476)
        I remember back in 2000 my roomate had a job with a small firm that was kind of a "coders for hire" place. They didn't have a product, but if you came to them with something you wanted made they made it. Mostly a bunch of CS grads that didn't know anytihng but Java, however a few like my roomate were more diverse. He knew a few languages but PERL was his thing. Guy was a complete PERL badass wrote amazingly fast PERL code. PERL + MySQL development under Linux was his thing. Not at all a fan of MS development environments.

        So General Motors, or at least some small division of it, hired their company to do a project and my roomate was assigned to it. He was kinda miffed though, because GM insisted it had to be done in VB. He talked to them and they acceded that the backend could be in PERL, but the client side UI had to be VB. Well he didn't really know anything about VB, he just disdained it as a "toy language"... That all changed on that project. He was amazed by it's flexability in doing Is and speed of development. He said that every time they totally changed the requirements of the client interface he could get a new one done in a couple hours.

        In the end, he was certianly no VB-all-the-time convert, but he had a respect for the situations it was useful in.

        Not knowing anyting about this project I can't say, but there are projects out there that something like VB is the best answer for.
    • by Spacejock ( 727523 ) on Thursday June 01, 2006 @02:08AM (#15442394) Homepage
      Agreed. I wrote (and still maintain) a very powerful stock market charting app almost entirely in VB6. Yes, I use a couple of DLLs for intensive calculations but the GUI and 99% of the code is VB. It works, it's stable, and the users love it. Wish I could say the same about a number of other apps sitting on my computer.
      In summary: don't blame VB for shitty programs, blame the programmer. And if you'd rather write in something else, why should I care? I'll judge you on the results, not the language used to write it.
    • by adrianmonk ( 890071 ) on Thursday June 01, 2006 @02:47AM (#15442572)
      Have you dug a bit to find out why he's so pro-VB6? Maybe he's biased against .net because it's an interpreted language (like Java)?

      Aiiighghghghhhhh!!!! Why, why, why do people keep saying this?!

      Java is a compiled language. The Java source you write gets turned into native machine code. It's just that the compilation happens at runtime, unlike with many other languages where it happens earlier. Same process, different time.

      It's not like this is a new concept. For one thing, the documentation describing it has been up on the Java web site for years. For another thing, people on Slashdot have been saying it for years. And for another thing, LISP environments that do incremental compilation to machine code at runtime have been around for at least, what, 15 years? Some quick googling indicates that language environments that compile stuff to native machine code at runtime have been around since 1968.

      And heck, it's not as if it's even all that high tech or complicated in certain ways. You don't need something as esoteric as the internals of a JVM to see machine code being generated at runtime. If you want to see it happen on something simple, go to your nearest Unix or Linux machine and type "tcpdump -d not port 53". Notice that it spits out machine code? Now try some different filter expressions like "not host" or "host and tcp and port 25" and watch how the assembly code changes. Yes, that's right -- even tcpdump compiles code at runtime, at least it does so with the packet-matching code, which is where the speed is really needed.

      So hopefully it's not too hard to comprehend now that modern JVMs do the same thing, and as far as I know, so does the .NET virtual machine.

      • go to your nearest Unix or Linux machine and type "tcpdump -d not port 53". Notice that it spits out machine code?

        That's actually some sort of bytecode. I've been hacking x86 assembly for 10 years now, and there's no way x86 has a "ldxb" instruction.
      • Yes, that's right—even tcpdump compiles code at runtime,

        While I agree with most of your post, that's not actually true—tcpdump compiles to bytecode, which it then interprets much like a non-optimised JVM. To see this, run the same commands on the same version of tcpdump on different CPU architectures (I tried SPARC and i386): you’ll see the same instructions being generated (you can even check that the compiled bytes are the same, if you use the -dd option).

    • by something_wicked_thi ( 918168 ) on Thursday June 01, 2006 @05:13AM (#15443027)
      Aside from it being at end-of-life, there are plenty of other, more technical, reasons why VB6 is a bad choice for many projects, especially large ones. I say this coming from a long history of writing and maintaining VB6 code, not because I have a bias against the language.

      VB was my second language and VB6 does vastly improve the VB experience, but there are several large problems: it doesn't support inheritance (only polymorphism); it is very difficult to use advanced features of the Windows API, it is very hard to debug and profile, and finally, it can lead to extremely unstable code.

      The VB6 language supports a feature where you can implement an interface, similar to Java or C# interfaces, or C++ pure virtual functions. It does not, however, support a method to inherit methods from another class. Thus, you often find yourself writing reams of code to delegate to another class that has a common implementation of various functions. Furthermore, if an interface changes, all the classes that inherit that interface must also be changed. That can lead to a rather large maintenance headache. Furthermore, changing the interface often plays havoc with the IDE's parser, so it can no longer tell which methods on the class are inherited in the Intellisense functions.

      More advanced features of the Windows API require you to copy and paste large bits of function and constant declarations into your code, and you have to jump through all kinds of hoops just to properly use the registry, system tray, or message handlers. I.e. if you want to catch a certain message sent to a window, you have to use SetWindowLong to override the message procedure of the window (you pass in the address of another procedure, which you acquire by calling "Address Of"). There is also all kinds of problems with passing pointers to structs, since you can't get a pointer in VB6. I.e. often, many window procedures require a struct with a pointer to another struct. There are hacks to get that, such as allocating a new memory buffer (using the LocalAlloc API), using CopyMemory to copy the VB struct into the memory location, then passing the pointer you got from the LocalAlloc call in as a struct member, and then using CopyMemory after the call to put the data into the VB6 struct. There are also undocumented functions to retrieve the address of variables, but there is, of course, no way to dereference a pointer, short of copying the data into a VB struct, or doing some fancy copying to change what an object points to (but that plays havoc with the reference counting).

      Next, you've got the instability issues. Using *any* of these features leads to instability. Under normal circumstances, things work alright, but if you try to run the application in the IDE while you've got a custom message handler set up for a window, then the moment you hit "Stop" to end execution, the whole IDE crashes. The reason for this is that the VB6 IDE runs the app inside the IDE's process, so if your app causes a GPF or similar, the whole IDE goes with it. It also makes it a real pain for debugging, since setting breakpoints inside the window procedure often causes crashes.

      Finally, it's very difficult to debug a VB application. If you've ever looked at the assembly output of the compiler, it's absolutely horrendous. Trying to step through it in WinDebug or something similar is just about impossible. The only way to debug it is with source code and full symbols, but even that is rather difficult sometimes. For example, most of the magic happens within the VB6 runtime (just about every VB statement is implemented as a call to the runtime; even assignment), so it's very difficult to follow what is really going on underneath the hood.

      Those are my main problems with it. I also don't like many other things. For example, VB is really slow. Slower than .NET, in my experience. Every benchmark I've ever run has VB losing by at least an order of magnitude. For example, I wrote an MD5 algorithm in VB (no small feat since VB has no unsign
  • by Telastyn ( 206146 ) on Wednesday May 31, 2006 @11:29PM (#15441625)
    Modern VB (VB.NET) is pretty full featured and un-crappy. It, like other .NET languages compiles down to MSIL so should behave identically to anything else. The only real arguement is based around that; if say... VB.NET and C# perform identically, why not use C#? It (arguably) has more of a following, (arguably) has a cleaner syntax, and (arguably) has a more java/C-like syntax incase you happen across people with that background. Not terribly compelling in the face of momentum...
    • The only real arguement is based around that; if say... VB.NET and C# perform identically, why not use C#? It (arguably) has more of a following...

      Actually, I'm fairly sure you can find more VB programmers than C# programmers, and probably will be able to for the forseeable future. The problem is, a significant portion of them aren't real computer scientists, and they'll tend to write crappy stuff.

      I'm not sure that line of attack would work well with the boss, though, who's a VB guy, probably not a computer
  • by JanusFury ( 452699 ) <kevin,gadd&gmail,com> on Wednesday May 31, 2006 @11:30PM (#15441634) Homepage Journal
    VB6, with all its flaws, is still hard to compete with when you want a native Win32 app that has a lot of UI and doesn't take a long time to build. If you use it properly, it'll usually do what you want without having any major issues.

    On the other hand, it has trouble coping with large complex projects (One of my larger projects regularly crashes the VB IDE when I load it, for no particular reason, and sometimes the VB compiler spits out mysterious build failure errors for no particular reason), and it lacks a lot of important features you get out of better languages and tools. If performance is a concern, you'll also find that it has trouble scaling there (though it's at least tolerable, and if you're careful you can get pretty efficient code out of it). There are also some data models and algorithms that simply don't work well in VB due to the overhead and inefficiency of using COM IDispatch and reference counting for every object.

    If you need to make a transition from VB, you might be able to manage to convert it over to, but I've never been able to do that successfully. I personally use C# for any project these days that I would have used VB6 for in the past. And if you don't really need to do much in the way of UI, C++ is a pretty solid option for almost anything else, even if it's tough for some VB coders to grasp.

    One middle-ground option would be to rewrite chunks of the application using C++ or C# and wrap them in COM so that you can drop them into the existing VB application. I had pretty good success doing this with performance-critical parts of a few of my larger VB applications and didn't lose any of the benefits of doing my UI in VB in the process.
  • what? (Score:5, Insightful)

    by larry bagina ( 561269 ) on Wednesday May 31, 2006 @11:31PM (#15441637) Journal
    You were hired to rewrite some VB software, but you're not familiar with VB? The problem isn't VB, it's you.
  • ... the scroll wheel won't work in the IDE.
  • Wha? (Score:3, Insightful)

    by 19thNervousBreakdown ( 768619 ) * <> on Wednesday May 31, 2006 @11:34PM (#15441657) Homepage

    OK, just to get this out of the way, the owner of the company hired you to re-write his program in Visual Basic, and you don't know Visual Basic? I mean, it's not like he hired you to simply re-write it in any language, he wanted you to re-write it in VB. And he obviously knows VB since he wrote the software in the first place. So, uh, WTF?

    First, I have to assume you mean VB 6, since bears more resemblance to C# than anything else. If you're talking, don't worry about it. The syntax might be annoying, but it's a decent language. Anyway, as for the merits of VB, well, it's appearantly good enough for a large project, since you're looking at one right now that was good enough to start a company that can support 5-9 people. This company's appearantly been around a while; I hope nobody's writing new stuff in VB. So don't worry about whether it's good enough or not, it is.

    The issue I would have with it is, it's being killed by Microsoft. There's nothing you can do about it. It may not work on new versions of Windows. Old versions of Windows won't be supported anymore. You'll run into security holes that won't be fixed, or try to interoperate with software that needs a newer version of Windows. Basically, you're going to get screwed, it's just a question of when. If your company has the time and money to do a rewrite, do it in a language that's going to be around for a while.

    Normally of course, I'd call you nuts for doing a complete rewrite unless it's a pile of crap that's falling apart at the seams and the basic architecture is shit, but it's written in VB. Which has its merits, and maybe I'm wrong here, but I consider it more of a prototyping language than anything else. Just don't rewrite it in VB 6. Seriously, quit first, it won't do shit for your resume to have VB 6 on there, and it'll just cost the company a crapload of money for no good reason.

  • I'm not saying that I've never taken a job just because the job was there. I have.

    But, in fairness, if you have serious doubts about the platform the owner insists upon using, then this isn't the place for you to be working.

    You're either onboard, or you owe it to your boss to leave the company.

  • by petard ( 117521 ) * on Wednesday May 31, 2006 @11:38PM (#15441682) Homepage
    Joel Spolsky explained why CityDesk, written by a shop populated entirely by highly qualified C++ coders, is 95% VB []. He has a frank discussion of VB's pros and cons as a development tool, and you may find that many points he discusses will resonate with you as you develop your reasoning. Even if you don't come to the same conclusion he does, it's an excellent discussion of just the topic you propose.

    Really, reading his argument in the context of having a bunch of C++ coders build a nice Windows app in 2006, I think I'd probably conclude that C# was the way to go, as opposed to VB. But keep in mind that C#.NET and VB.NET are more alike than they are different. For most apps, the arguments for managed code (VB or other) are very potent.

    My take: If you and every single developer on your team can't instantly see and explain the differences between the 4 arguments to this function:

    void foo(std::string a, std::string * b, std::string & c, std::string *& d)

    stop now and use managed code of some kind.

    If you all can, think really hard about why you want to spend your talent managing memory instead of doing things that'll really make your application shine. (There are reasons. They don't apply to most apps.)
    • Using C# is a far call from using VB, even if it is VB.NET.

      • Using C# is a far call from using VB, even if it is VB.NET.

        I'll give you that it's a far call from VB 6. But what makes it a far call from VB.NET in your opinion? I like C# much better because the syntax is much more familiar to me, but the appropriate uses for each as well as the capabilities of each seem largely similar to me. Performance is identical. So what does C# buy someone whose mind hasn't been molded by 15 years of C/C++, apart from mono's c# implementation being more mature than its VB.NET imple
  • by Naikrovek ( 667 ) <<jjohnson> <at> <>> on Wednesday May 31, 2006 @11:38PM (#15441683)
    Visual Basic (especially VB6) have no place in the enterprise.

    C# and VB.NET are very similar, and C# has a much more standardized syntax style. It will take little time to teach someone C# that is familiar with Java or even C++, but it could take some time to acclimate that same programmer to VB's retarded syntax style. Any language with constructs like "If Not foo Is Nothing Then ... End If" rather than "if (foo) {...}" has no place in my brain.

    JavaScript, C, C++, C#, Java, and even Perl have the same curly-brace blocks, statements end with a semicolon syntax style.

    If your boss gives you the often used "anyone can learn visual basic in a day" line, give him the "anyone can learn Java or C# in a day also, and the talent pool for those languages is much larger" response.
  • As far as I know, common sense is to use VB for small and medium non-critical apps that need speed of development over anything else.
    I'm not sure what type of app you're aiming at, but C++ and Java come to mind as solid choices.
  • Tell them that Real Men (TM) don't use VB, but instead write Perl scripts in ed.
  • Cross Platform? (Score:5, Insightful)

    by spirality ( 188417 ) on Wednesday May 31, 2006 @11:46PM (#15441733) Homepage
    I would argue not using VB on the basis that it is not cross platform. Yes, Microsoft is not going anywhere, but there is some possibility that OS X or Linux could be big enough markets to consider. Especially if you are writing from scratch, why not consider a cross platform solution? It's a little more work, but it pays off in several ways. Larger audience, but more importantly different OSes catch different bugs. You wouldn't even have to target multiple platforms at the get go, but it would make porting it a hell of a lot easier down the road. However, it is VERY easy to write unportable code, especially with a compiled language, for example C++.

    To that end: Python and C++ are generally good choices. They each have their place. I really like my C++, but rapid development is somewhat of a joke. It takes years and years to master and even after using it for close to 8 years on a daily basis I'm still amazed at what I don't know sometimes. However, you can do anything with C++. If you can think of something, there is already probably a library out there to do it. I don't recommend it to novices or people who want rapid development, however if you want a rock solid well performing system it really can't be beat.

    If you're doing GUI stuff, you would have to take a VERY serious look at the combination of Python and Qt. Qt is the de facto cross platform toolkit. It has everything from GUI libraries to network libraries to regular expressions, xml parsers, you name it. It's very good. It's also very good with C++.

    I don't know much about C#, but with Mono you at least have the possibility of it being cross platform. I'm not a big Java fan. After being a C++ guy for so many years it just seems like crap. It lacks the good things from C++ with all of the syntax overhead, and it lacks the flexibility of Python.

    If you didn't guess I write almost everything it Python or C++. They are my dual golden hammers. :) I say that partly in jest, they complement each other very well.

    I do a lot of Scheme too, but I'd be an idiot to recommend that to you!

    Perl is glorified shell. I wouldn't touch it except for the smallest most throw away programs, if even for that anymore. Still I know people who swear by it, mostly sysadmin types.

    I've played with Ruby a bit. It has some definite strengths, but the library support, or lack thereof is a big minus. Syntactically it reeks of Perl and IMHO lacks the elegance of Python. Still it's got some really cool unique stuff.

    Overall I would recommend Python, but like another post mentioned, what are you trying to accomplish? You should fit the tool to the task not the task to the tool.

    • Back before it turned into a steaming turd, RealSoftware's RealBasic Professional [] would have been an ideal solution to the cross-platform authoring problem that VisualBasic presents. (It supports Mac OS, Windows and Linux.) In fact, they even went so far as to provide tools needed to port VB projects to RB.

      However, the folks at RealSoftware got greedy and let the quality of their past products go to their heads. All current versions of the software are written and compiled using RB itself... a move that has
  • basicNES [] is written in VB5/6. I helped a lot with the optimization to make it run at full speed on as little as 350mhz with no frame skipping.

    VB.Net is fine too. The biggest problem is that simple languages attract simple people.
  • Visual Basic is not too bad for creating a large project. The trick is to be a decent Windows programmer. You would get almost all the knowledge you need to create good programs in Visual Basic by reading and applying the stuff in the Deitel books (Pick one according to your level of skill) 75871-4590326?v=glance&n=283155 []
    and then learning the essential stuff from Charles Petzold 75871-4590326?v=glance []
  • by rifftide ( 679288 ) on Wednesday May 31, 2006 @11:57PM (#15441815)
    1. Chicks won't be impressed because it's so nerdy

    2. Geeks won't be impressed because it's so VB

    3. Microsofties will explain how your language is "deprecated" unless it's VB.NET. Trust me, it's bad to be deprecated on.

    4. Enterprise programmers will explain how C# (or Java) is better than VB.NET, has more constructs, etc.

    5. (An elaboration of point #2.) To a programmer, "dim employees() as integer" just looks goofy.

    6. You and your company will be a one-man profit center for Microsoft (their tools are priced so that they don't come cheap when you need to do real work). Here it's not so much big bad Microsoft that's a problem, but I hate being someone else's one-man profit center.

    7. If it's Visual Basic 6, try to get a hold of Ted Pattison's (out of print) book on how to use Visual Basic with DCOM. It's a great book, but my takeaway was that it's easier and wiser just to say no. (I suspect this may have been Pattison's POV too).

  • Dont tell someone whats wrong with VB. Tell them what is BETTER. VB is the best language, until there is something better for your project.
  • For one thing, Basic is on the way out in favour of C#. It won't disappear soon, but in a few years it might be harder to find people who want to work on it.

    In my opinion, if you are re-writing, I would say do it in Java - then it will work on Mac and Linux and everything. But if you are determined to be Gates' whipping boy, at least do it in C#.

  • VB6 has its place... (Score:5, Informative)

    by Nevyn522 ( 309931 ) on Thursday June 01, 2006 @12:46AM (#15442042)
    First company I worked for produced a series of ActiveX controls written in VB, shipped and sold with the source. It supported 3 full time devs, 2 support/sales people, one HR person, and an intern (me).

    They vanished after they tried to compete in the .COM world and got absorbed by ZDNet, but their components are still for sale on Programmer's Paradise, last I checked.

    I got an internship with Microsoft after spending most of my interview defending VB as a language choice -- this was pre-C#/.Net.

    Some "facts" from above annoyed me, so I'm responding:
    1) VB is only interpreted.
    VB6 can be compiled to P-code, and will run interpreted. However, by default it's compiled to executable code. The only "penalty" for using VB6 when it comes to speed is really the memory footprint of the VB6 runtime DLLs.

    2) VB6 is not suited to large products.
    I'm aware of at least one company that based an entire website off VB6 apps. I'm sure they would be ASP.Net now, but at the time (VB4), that wasn't yet an option. So the web engine was actually a series of VB apps that were invoked to process the web request as ReadLine and Print commands.

    3) VB6 -> VB.Net
    (The person in question did only propose this as an idea.)
    I would argue against this. There are certain elements only possible in VB6, and the switch to managed code is unfortunately not as seamless as MS would have liked. Hence the uproar when MS EOL'd VB6. VB.Net is great for managed code, and even has some features that C# lacks. I personally prefer C#, but I come from enough of a mixed background that I can handle what VB.Net code comes my way. While rewriting the application in VB.Net may be the proper thing to do, it certainly does not provide much in the line of benefits above and beyond rewriting the application in C#.

    VB does have certain benefits to use. As a RAD environment, it is (or was :) ) without peer. As to the inavailability of new APIs: a) Pretty much anything in COM can be used -- although some trickery may be necessary for custom structures. b) Anything done in a "straight" Win32 API can be directly invoked -- akin to P/Invoke in the managed world. For database work, VB was unparalleled. The ease of data connections has now come in some degree to the managed code word, but in unmanaged code only VBA comes close. C++ just can't compete. VB is no longer entirely late-bound -- if a dual interface is available, and the code is written to expect that type rather than just Object, VB6 operates as an early bound client. VB6 is also capable of being used in a late-bound fashion with almost identical code to the early bound scenarios.

    While I can't know why your manager wants to use VB, it's not such a terrible order.

    If your manager only wants to preserve the look-and-feel of previous versions, the previous proposal of writing COM components in C++ for the high-performance portions and using VB for the front-end is certainly a very viable option, and one that I've used previously. In this manner, the weaknesses of VB6 can be circumvented while still leveraging existing components and possibly even code. At the far end of the advancement spectrum, even managed components can be exposed to COM clients -- Adam Nathan's wonderful ".Net and COM: The Complete Interoperability Guide" is probably the most complete book on the subject. If appropriate, you can write new code in C#, and expose it back to VB6.

    If your manager wants to preserve the code base in VB6, you might want to determine why he wants to rewrite the application -- it's possible a better solution is just to rewrite portions of the code, depending on the scope of the changes he desires. The right tool for the right job -- VB is the right tool for some jobs, but shouldn't be presupposed to be the right tool for every job.

    That being said, there are few things you can't do in VB -- although some of the solutions are probably not as simple as they may be in other languages. Keep in mind, however, that it is even possible to get assembly code linked into a VB6 application, if necessary. It just takes a little bit of creativity.
    • The only "penalty" for using VB6 when it comes to speed is really the memory footprint of the VB6 runtime DLLs.

      Try this:
      - Write a very simply object in VB with just a few properties that can be set.
      - Write the same object interface in C++.
      - Write a test harness which instantiates and then releases 1 million of each type
      - Compare the results.

      C++ allocates and deallocates COM objects an order of magnitude faster. If you're working with lots of insta
  • Depends! (Score:4, Informative)

    by bryanporter ( 847667 ) on Thursday June 01, 2006 @12:50AM (#15442059) Homepage
    I've done a great deal of VB programming over the years, and I've seen all manner of projects written in VB that never should have been. Now, the poster did not specify if they were talking about VB ala VB 6, or VB.NET - the two are completely different in so many respects an argument for/against one doesn't translate very well to the other.

    Here's my two-cents, by language/environment:

    If you're writing business applications, VB6 will get you through. Manipulating very large datasets can be a bit of a challenge, and you're always going to have problems with user experience (due in large part to a complete lack of multithreading). Applications can be made that are *functional*, although your resultant UI will always seem dated.

    This is an entirely different beast. You've got a much more powerful langauge on your hands, with as much power and expressivity as Java - it is quite straightforward to produce a modern, performant application with little muss or fuss.

    My suggestion, if VB is an absolute must, would be to insist (as best you can) on VB.NET. Now, that being said, VB is not a magic bullet - VB/VB.NET/C#/Java, they are all languages designed to allow a programmer to express their thoughts, and it's quite easy to produce unworkable software with any of them. Do not allow yourself to fall into the 'C# is better than VB.NET' arguments, simply because they are completely non-sensical; the power of any .NET language lies in the .NET Framework, and the language chosen should be the one you are most syntactically comfortable with. That being said, I abhor the syntax of VB.NET; C# is more my cup of tea, but in the end they are (with minor exceptions) functionally equivalent. It takes about the same amount of work to do one thing in either.

    I've worked professionally in VB, VB.NET, Java, Perl (alot of Perl, in fact), C#, and C/C++, and I must say IMO the most expressive langauge is C++, hands down. I love Perl, and you can do an amazing amount of things with it, but the power and flexibility of C++ is unmatched in the list above. VB.NET/C#, however, can be excellent choices for presentation-centric applications (Windows Forms applications or Web Forms). In the past, I've worked on projects that combined the two; a C# GUI that interfaced with a C++ server component. It worked great.

    Any .NET language can interoperate with libraries written in any other .NET language (assuming the library conforms to the CTS), but the same goes for VB applications; in VB, you're dealing strictly with COM, a technology designed to allow components written in disparate languages to interoperate.

    Short Story: If you're writing a business-focused application with limited or no multithreading needs, VB works; If you need a modern GUI with all the latest bells and whistled VB.NET/C# should be examined; If you need high-performance, minimal runtime requirements, and low-level system interaction, look somewhere else. Real-time equipment monitoring, for instance, is a task best left to C++. The rest can be done in VB or a .NET language.

    Have fun!

  • Myriad of problems (Score:3, Informative)

    by jasonditz ( 597385 ) on Thursday June 01, 2006 @12:59AM (#15442095) Homepage
    Without knowing what the nature of the app is, it's really hard to make a serious case for or against VB.

    Some good things to point out though:

    VB is not an open standard,

    VB is platform specific

    VB is generally quite time consuming to maintain for large apps

    VB is much slower than C++ for certain CPU intensive apps.

    Possibly: The people expected to maintain the code are less well-versed in VB

    If this is a small-enough, simple-enough, Windows-centric enough application, there's probably no good reason to do a total rewrite in a different language.

    If, on the other hand, this app might have a customer base on a non-Windows platform, and if the program is likely to dramatically increase in size in the future, it might be worthwhile to think about changing it to a different language.
  • by stephanruby ( 542433 ) on Thursday June 01, 2006 @01:02AM (#15442114)
    This original poster scares me. He wants arguments against VB, but doesn't explain the scope of his project, nor does he say what language he wishes to replace VB with. Most likely, he doesn't have much experience in the working world and would just prefer to use a language he's already used to from school.

    The crucial ingredient in any project is the people you end up working with, not the language. I'm not a fan of VB, but if this kid doesn't have the experience of successfully completing a project in the real world, he should consider following the owner's experience -- and only worry about changing the underlying language once he has a couple of releases under his belt.
  • by Z00L00K ( 682162 ) on Thursday June 01, 2006 @02:25AM (#15442471) Homepage
    since VB isn't type-safe. It may be easy to write in VB, but you lack a lot of the safety offered by C# or Java.

    And if you really have to stick with VB, you have to impose strict coding rules, like requiring "OPTION EXPLICIT" on ALL code, be strict about variable naming and so on.

    Better be so strict about the rules that you actually end up with C#.

  • by 91degrees ( 207121 ) on Thursday June 01, 2006 @03:37AM (#15442760) Journal
    Isn't this one of those bad ideas? Joel Spolsky [] seems to think so, and while he isn't an oracle, his opinion is worth something.

    Suggest not rewriting the software and simply going through and improving where needed.
  • by MadFarmAnimalz ( 460972 ) on Thursday June 01, 2006 @03:37AM (#15442762) Homepage
    I work providing MIS technical assistance in microfinance (used to be an open source consultant). I've seen a lot of Visual Basic applications in service of microfinance institutions and I've seen the consequences.

    What I've seen has been mainly Access being used as a RAD to develop portfolio management systems, with VBA constituting the language the logic is developed in. Some observations:

    1. Such applications when used over the medium to long run invariably become unmaintainable. The business changes, loan products change, organizational structure changes, new needs arise, servers are upgraded, etc. This we all know; there is no such thing as finished software. A VB application has the advantage of getting up and running fast, but as the code changes accumulate over the years, the code becomes unmaintainable; a change here b0rks fifteen things elsewhere and the developer (often one person) eventually gets to the stage where he just says "no, we can't do this". IF you're lucky, he tells you that it's because he needs to reqrite the app. If you're not, he attributes the limitation to the abstract god of technology.

    2. The Access/VB development environment is indeed a VRAD (very RAD). You can go from zero to information system in almost no time with almost no resources (the typical scenario of one developer mentioned previously). TH downside is that when you have this few people working on the system, it can be underdocumented. Which means that when your magical one-man development team jets, it's going to be easier to rewrite the application from scratch (and when that crisis comes, it's often rewritten in Access/VBA again, since a system is needed, FAST). Oh my aching bones...

    3. Mentioned elsewhere, but these MS products are EOL'ed periodically. No support. No bug fixes. No security fixes. One often overlooked consequence of this is that MS drives the techie labor market towards its current offerings; what this means is that you are not going to expect a VB-based product to last, since a few years down the road the Microsoft marketing machine has changed the paradigm and driven developers towards other technologies, limiting the availability of engineers to feed your monster.

    4. When you're developing a system for business usage, you're going to want to have several things which more proefessional toolchains make more readily expose; things which, more likely than not you can accomplish nominally in VB albeit with a lot of workaounds and in many cases not very reliably and sub-optimally. Audit trails, transaction atomicity, multi-user functionality, etc.

    I'll post more if I canthink of them. Good to have a reference of VB drawbacks, especially since I see it so often.
  • Problems with VB6 (Score:5, Informative)

    by Fat Cow ( 13247 ) on Thursday June 01, 2006 @04:12AM (#15442866)
    1) VB doesn't work well with source code control - it has unnecessary binary files (*.frx, *.ctx) and it's text files create bad diffs because the IDE flips lines around and changes case of identifiers

    2) COM components in VB don't keep the same GUID from time to time (depending on what changes you're making). This causes build problems because when the component's GUIDs change, you have to change all the other projects that reference them. This can be a huge timesink in development.

    3) VB6 is unsupported and is a black box, which means no one else can support it either
  • by ThePhilips ( 752041 ) on Thursday June 01, 2006 @04:13AM (#15442871) Homepage Journal
    > This scares me, but I honestly can't make a good argument
    > against VB because I'm not familiar enough with it.

    I, as system programmer, for three years did ported number of VB applications to C/C++. Funny job for system programmer, don't you think? ;-)

    The list of problems of my employer was:

    1. Run-time libraries conflicts. VB applications affected worse of all by "DLL-Hell" probles of Windows: lots of functionality resides in ActiveX components developped by third parties. People usually quote ActiveX support as VB first advantage, but from POV of deployment and support it is hell.

    2. Run-time libraries dependencies. Since VB is all into ActiveX, you might start using some component you haven't explicitely installed. Then when you ship the application to your customers you might find yourself in silly situation: half of them report everything is Ok, half - scream that nothing is working. Apparently, first half have the similar set of applications installed - and VB application finds the library missing from its own installation.

    3. Internationalization. That was huge problem for my employer. We have had quite number of customers in Japan. M$ did internationalizion of VB in straight way: it didn't. In other words, VB as we have it in Europe/US and VB in Asia are two different VBs. Absolutely different. Since Japanese love VB, most of our customers had it installed. The situation looked so: if customer installs our application - other and her/his own applications stop working; if s/he reinstalls VB anew - our application stop working. Interpreter is the same, but run time libraries are very very different.

    4. Upgradability. VB applications are one hell to maintain. We have had lots of reports that installation of our application made with VB4 was breaking VB5/VB6 installations. According to M$, the cure was to upgrade everyone to VB6. But VB6 introduced some problems so our custormers were split - half used VB5 and other half VB6.

    To conclude. One can write good application in VB. But M$ doesn't make that very easy. The whole ActiveX thing is one hell to deploy and maintain. .Net at moment has only two versions - 1.x and 2.0 - and all components of next "XXX-Hell" are there: M$ doesn't do excplicit versioning of libraries nor APIs.
  • problems with VB (Score:4, Insightful)

    by Anonymous Coward on Thursday June 01, 2006 @04:16AM (#15442880)
    I've written/maintained large programs (.5 megalines) in Java. At some time I had to write a simple program in VB.NET 1.1 (with about 10, 15 k lines). The things I noticed:

    -to me, the syntax is OK
    -the API, compared to Java, is really bad (no jdbc, no generics, ..., keep yourself busy-coding)
    -the GUI is easy
    -writing maintainable code is difficult. VB(.NET) is hard to style because of its IDE. Eclipse is magnitudes better.
  • by TheLogster ( 617383 ) on Thursday June 01, 2006 @04:36AM (#15442934) Homepage Journal
    I couldn't resist :)

    Good Points about VB:

    1. It's a fast development environment. You can get a decent sized program from idea to final build in hours and not days
    2. It's an easy language to master. It is based on BASIC after all.
    3. It has a large number of extra controls that can be used to do things like display webpages, upload/download from FTP sites, talk over IP, etc
    4. It understands COM, so you use automation objects with it.
    5. Now that PCs are so fast the execution time of the interpret is not an issue any more. However, VB is a slow language
    6. It's Database objects are easy to use, and supports Access, SQL server, ODBC...

    Bad Points of VB

    1. It's BASIC, so the language has its limitations
    2. It's OOP implementation is backwards. Parent class members cannot be called directly by their child descendants
    3. It's UI design elements haven't really changed that much, so building a nice looking interface takes some time
    4. The Right Way, The Wrong Way, and The VB Way
    5. It is interpreted and not compiled, so you can have difficulty giving an exe from VB to a customer and get it to run. The easiest way to get a program onto a customer's machine is to create an installer. The installation system that comes with VB hasn't changed since VB3 and doesn't look processional at all. Use Visual Installer instead.
    6. You have to declare your User Defined Types in an ActiveX DLL with a class that is never used, in order to use your UDTs as parameters to your classes in your main project

    Overall Thoughts

    I have been programming in VB since Version 2, and right up to Version 6. I cut my teeth on programming Windows Applications using VB, and I have to admit it is one of my favorite development systems. I also program in C++. I use VB to prototype an application, the other guys and customers can comment of the look and feel of the software, and modifications are easy to make. Once everyone is happy with the App, it is then ported to C++.

    VB.NET is not VB (google for Visual Fred) VB.Net is a completely different language to VB and it is not code compatible. Time will have to be taken to rewrite the parts of a VB app that don't work under VB.Net

    VB is a fine system and well suited to RAD projects, DB projects, and client/server projects. However, if you are looking for a system that creates faster code, is more secure, and easier to maintain, then you'll need to start working with things like C/C++/Java/etc

  • by ccallis ( 978434 ) on Thursday June 01, 2006 @04:42AM (#15442948)

    First, VB.NET is everybit the language that C# and/or Java are (that is there is NOTHING that can be done in those languages that can not be done in VB.NET (Regular Expressions, Hashtables etc. and much more is available to programmers in VB.NET)

    Second, if the original application was done in VB (6 or earlier) then there is no reason to believe that the language is no longer suited to the task, the only real question is "is the programmer up to the task?" Since VB and C# compile to MSIL (if both the VB code and the C# Code are "well written" then they will compile to the SAME MSIL (or near enough as to not matter...) the ONLY argument for one over the other is comfort/skill level of the programmer. This is not a trivial matter. I am far more productive in VB.NET because that is where I am comfortable, not because it is a better or worse language I can read/write VB much as I can [in my native language of] english. Where as I can read/write C# or Java about like my French, in which I am reasonably fluent, but I have to concentrate more on the translation. And thus we reach the ONLY real argument for you to make against VB, will you be more productive (and therefore cost your employer less) if you work in another language? If you believe this to be so, then you should already be able to quantify this.

    Admittedly, There are far more "less skilled" programmers in the VB world than there are in the C#/Java realm. This is simply because people can learn to do "useful things" in VB (or VB.NET) far more easily than they can in C-based languages. The "entry threshold" to "being a VB 'programmer'" is lower. Still the high end abilities of the language are there, even if a number of programmers don't know how to use them, or use them correctly.

    Anybody out there proclaiming that any language (other than C or assembler) is "better" then VB.NET is simply demonstrating their own ignorance of VB.

  • Coding defensively (Score:3, Insightful)

    by rcw-home ( 122017 ) on Thursday June 01, 2006 @07:00AM (#15443280)
    This isn't a critique of VB per se, but more of the culture that surrounds it.

    A quality program must be coded defensively, in other words it must assume that anything can fail at any time and that it must sensically deal with it. It must not make assumptions about external inputs. Unfortunately, few programs are coded to this level of quality, but they are the ones that you won't see security advisories about. Programs that are not coded defensively will, upon hitting a problem, exit with an error message that does not help you find out what that problem is, or continue doing something where it does not make sense to continue. Troubleshooting and maintaining defensively coded applications is simple - whereas with other applications a developer often just leaves the bug for eternity.

    There is extremely little example code for VB that is coded defensively. If you disagree, please post a link to an example where code to open a file has a code path that is run specifically when the file can't be opened. In the meantime, google has 748000 hits for "80004005".

    However, for your particular situation, this is largely moot. If you're already working with a specific developer, they will either code defensively or they won't, regardless of language.

  • Book recommendation (Score:3, Interesting)

    by tetranz ( 446973 ) on Thursday June 01, 2006 @07:01AM (#15443281)
    If you're using VB.NET then I highly recommend Rocky Lhotka's Expert VB 2005 Business Objects [] and the CSLA framework that the book describes. It has plenty of useful information even if you don't use the framework. There is an equivalent C# book.

    IMHO, the new .NET 2 and Visual Studio 2005 stuff is pretty cool. Databinding was a bit of a joke in previous versions that no "real programmer" would use but now it really works and can save you a lot of time. Separate your UI and business layers properly and you'll be able to use the same business code from both Windows and ASP.NET if it ever needs to be web enabled.

    Your question is a bit meaningless without saying if its VB6 or VB.NET. Although I've written lots of VB6 stuff in the past, I'd be reluctant to start something new with it. I jumped from VB6 to C# just because I knew C from long ago and prefer the { } syntax but, as others have said, the difference between VB.NET and C# is pretty much just syntax.
  • by jonadab ( 583620 ) on Thursday June 01, 2006 @07:12AM (#15443319) Homepage Journal
    He hired you to rewrite this thing in VB, even though you aren't familiar enough with VB to effectively argue (one way or the other) its merits? So he's smart enough to have written the software that got the company started, but he's not smart enough to realize he should hire somebody who *knows* the language he wants them to work in? Does he seriously think it's a good idea to have somebody who's new to the language writing production code in that language?

    I don't.

    If you're going to be working on rewriting it, it needs to be rewritten in a language you have significant experience writing in. Period. For instance, if *I* were going to be rewriting it, the logical languages to choose would be Perl or maybe lisp, because those are the languages I know well enough to write good code. If he wanted it rewritten in VB, he needed to hire someone with VB experience.

    VB *is* reasonably good for certain things (mostly, pure GUI work, e.g., an application that facilitates data entry), but only if the programmer doing the work is familiar with VB. I've seen applications written in VB by someone who didn't know the language well, and they were universally terrible in every respect (_including_ the UI). This is true in any language. When somebody is just learning the language, they aren't going to be comfortable with the language's features or conventions, and so they're going to write execrable code for several months until they learn those things. During that time, you don't want them writing something mission-critical in that language. It's bad juju.
  • by maillemaker ( 924053 ) on Thursday June 01, 2006 @08:36AM (#15443686)
    >He hired me to assist in rewriting the software - only catch is, he's stuck on having it re-written
    >in VisualBasic. This scares me, but I honestly can't make a good argument against VB because I'm
    >not familiar enough with it.

    So if you were hired to do this job, wasn't it made plain up front that it was to be done in VB? If this scares you now, didn't it scare you then? Why did you take the job? If you're not very familiar with VB, why would someone hire you to re-write a program using VB?

  • by Maury Markowitz ( 452832 ) on Thursday June 01, 2006 @09:50AM (#15444240) Homepage
    Or, to be more accurate:

    VB, as a language, is the worst language I have used in the last 20 years.

    VB as a development platform is the most productive system I have used in the last 20 years.

    Hate the language, love the system. You will too.
  • 1)VB is dead, use

    2) VB is no good for low level work

    3) It is good at getting the job done

    4) Why the hell does a programming language scare you? the day a language scares me is the day I look for a new line of work.

    5) It is easier to maintain. This assumes that the programmer who wrote it wasn't a complete idiot...but that applies to any language.

    6) compiles to byte code. Just like any .net language. So the language doesn't matter in .net.

    7) VB handles the memory for you. For business applications that need to be done, this is a good thing.

Adding manpower to a late software project makes it later. -- F. Brooks, "The Mythical Man-Month"