Making an Argument Against Using Visual-Basic?
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?
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?
.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.
Do the
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".
Murray Todd Williams
VB = 6 is unadulterated crap. VB.NET isn't half bad, although I much prefer C#.
"...always new atoms but always doing the same dance, remembering what the dance was yesterday." -Richard Feynman
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 VB.net. VB.net 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.
John
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...
You were hired to rewrite some VB software, but you're not familiar with VB? The problem isn't VB, it's you.
Do you even lift?
These aren't the 'roids you're looking for.
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 VB.net bears more resemblance to C# than anything else. If you're talking VB.net, 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.
<xml><I><am><so><damn>Web 2.0</damn></so></am></I></xml>
1. VB is not portable. You'll be supporting windows based servers forever if you increase your investment in VB. The company I work for switched from VB to Java and we've been able to move our java server app to 3 different OS/HW architectures with zero code changes. 2. You cannot get insight into what VB is doing. Where is the server spending time? Can you see a thread dump? How much time is lost to collecting garbage. VB is a black box. That's death for debugging a large server system. 3. You cannot attract great new engineers to work on a VB application. Great engineers will avoid working on VB apps and you'll be stuck hiring low grade talent. That will perpetuate a downward spiral where any good people will leave to avoid VB and the bozos that like VB.
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++.
:) I say that partly in jest, they complement each other very well.
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 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.
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.
So they're identical - but VB.Net programmers can't learn the new (identical) language? Presumably you're not familiar with one or the other of these languages. VB6 developers that transferred to VB.Net had to learn the majority of their chosen language again. C# is more like Java/C++ than VB - the language and syntax is entirely different to VB.NET. The reason VB developers wouldn't learn C# is probably a productivity issue, rather than not being able to learn the language. Why waste time learning a new language, and rewriting (rather than converting) your existing projects when all that does it puts you in jeopardy of missing deadlines (you know deadlines don't you - that's what real programmers have). But heck - perhaps I'm missing the point - perhaps you are talking from personal experience.
dnuof eruc rof aixelsid
this is seriously one of the funniest things I've read on slashdot in the last week. For the canonical car analogy, it's like saying sheet metal has no place in modern automobiles.
there is no need to sign your posts. this isn't usenet. your username is right there above your post. stop it.
Disclaimer: I code in VB, Java and Python.
:: Its VB section is the most active section and enen this month if you see its hall of Fame., the winner is an NT master class., where one can control most of the Aspects of an NT based computer (2000/2k3).., which clearly defines the Fact that mnay things can be achieved EASILY in VB.
.NET apps need .NET framework and python app needs its python Interpreter. [ even files compiled with MS VC++ need MSVCRT.dll ;) ]
.NET.., also I'd like to say about the poor multithreading performance in Python.., not very effecient. Though VB6 natively doesnt supoprt Muthithreading., using VB5 one can achieve multithreading or some thrid party COM servers will help.
.NET..,
VB is one language., from where many ppl. AFAIK started out their programming career.
Many "Others" argue that VB is suitable for only desktop database applications and and mid-level applications and cannot be used to make Enterprise Apps., but with proper planning and knowledge of VB's known bugs one can make a decently performing Enterprise Apps that runs for say atleast 3 years. (I have seen no application perform correctly for more than 3 years)
"Others" argue., VB is not well defined in many aspects right from Socket Programming, GDI etc.., I'd like to say.., if tahts the case., try using alternatives., I remember I have used created an Prformance Effiecient Server handling about multiple connections suing "CSocket" in VB..,
I dunno if you ppl. are aware of PlanetSourceCode.com
If anyone speaks about dependcies.., a clearly well written Vb app has at the most its VM MSVBVM60.dll and its COM servers if reqd [where MSVBVM60.dll is included right from win2000]., perhaps to be reminded
If anyone says VB is an interpreted., so is python and
This I conclude Each Programming language has its own PROs and CONs and nothing in this world is PERFECT.., VB is no exception and so are other langauges.., and I finally say., M$ killed VB6 for their
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#.
If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
There used to be several good reasons not to choose Java. They disappeared a long time ago. If you want to be able to say to your customers "Yes" to (almost) every can I deploy on/with/or against then Java is the logic choice. Everything else is an also-ran.
We are selling bucket loads of java applications and deploy anywhere, anytime with (almost) no code rewrites. Even on windows (which is a rare choice).
Stu
Because C++ sucks when you put it in the hands of the VB crowd. It not only gives you enough rope to hang yourself with, it then proceeds to give you another mile. The language allows programming in about twenty different paradigms, the base support of which are usually per-project custom-implemented (own framework) or crappy (MFC), and because of this and the lack of a large standard library (I mean, one that the VB crowd can grasp), abilities that you gained on one C++ project do _not_ transfer well to other C++ projects.
Now don't get me wrong, I work with C++ every day and I love it because of the sheer power it gives me. You can basically abstract away any management chores using smart pointers and other objects. And you can write the most obscenely decoupled functionality using traits classes and such. But put this same stuff in the hands of a VB coder, and you'll get C++ code using VB idiom. And that's NOT GOOD. VB coding idiom is not exception safe AND does not deal with memory management, so you'll have memory leaks all over the place, and even if they bother to put in the deletes in the proper places, you're one exception away from leaking a whole bunch of stuff. Teach them to use smart pointers to fix this? In an average C++ project "done right", you'll have to write a lot of smart pointers/auto objects yourself, and people who are used to VB are _not_ capable of writing proper smart pointers in C++. That requires reading and understanding all of Scott Meyers' books, and they won't do that. They'll think they grasp the language when they have their first MFC-generated dialog on-screen. It'll only get worse from there.
Good arguments against C++
manual memory management, obfuscated syntax, to many ways to shoot yourself in the foot.
Good arguments against Java
performance is bad, requires a JRE to be installed to run, which can be a pain. Can be hard to do simple things (eg all primitives are signed)
Good arguments for C++
good performance, as good as you can get. Many platforms have compilers for it. Open and well known. Lots of preexisting libraries for it.
Good arguments for Java I'm going totake some liberty and assume by java you meant he language and the JVM together. (no c++ equivlent)
Compile once, run anyway (via shell scripts or similiar mechanisms) compile on windows, run on z/OS.. cannot say that about much (anything? else). Vast library, no memory management, very clean language that's simple to understand and adapt. Easy to plug 3rd party libraries in and use.
How good is each one in terms of:
* Purely Object Oriented
Java very good, almost pure OO language.
C++ not pure at all
* Multi-threaded
java this is as simple as i've seen
C++ a pain and somewhat platform dependant
* Dynamic
I'm not sure what you mean by this really.
* Portablity
Java wins in that you compile once, run many places
C++ wins in that the same code can be compiled virtually anywhere
* Robust
Java provides mechanisms that make the code much more robust
C++ wins in that it's more deterministic, no relying on wierd VM things
* Secure
I don't think i'm experienced enough to really comment on this one
* High Performance
I'm no thte biggest of fans of the idea that java is slow because it runs on a VM. For most apps, this difference is trivial. For some apps, such as games, this difference is critical.
Overall, I'm a big fan of java and the idea of byte code that runs on a VM, as opposed to native code that runs directly. That said, there are areas where you ahve to use native code (eg: making system calls) or it's better to use native code (games). I think C and java will outlast C++ though.
It seems that the previous replies discuss the pros and cons of VB per se. In a more general sense, they're discussing whether one programming language is better than another.
Does the choice of the programming language really matter that much? From my humble experience, I've noticed that programmers' output depends on other things entirely, such as their development methodology, and correct use of design patterns (not going too far in either direction).
I've actually seen different programmers write projects in different languages, and it seemed their output was relatively uniform (the good ones did well in each language, and produced code that had a 1-1 correspondence with what they would have done in a different language). Stuff like test-driven design (and other XP methodology), for example, has a more dramatic impact than the debugger of the IDE of the language that your using (which I avoid anyway). You can encapsulate stuff (to some degree) in any language, as is the same for abstracting things that may vary.
In some rare cases, some things can't be done in some languages (and I'm not talking about Turing completeness): there are deffinitely programs that you _cannot_ write to execute as efficiently in Python as in C. Given that you already have a prior version in VB, is this really your case?
So overall, I think that if your project is large, then amortized over time, you will produce the same results anyway (because getting used to the language will be averaged over time), and if the project is small, what's the difference anyway?
BTW, mod me down to your heart's content, but I'd appreciate some reply with content if you disagree (perhaps I'm wrong, who knows?).
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:
..., keep yourself busy-coding)
-to me, the syntax is OK
-the API, compared to Java, is really bad (no jdbc, no generics,
-the GUI is easy
-writing maintainable code is difficult. VB(.NET) is hard to style because of its IDE. Eclipse is magnitudes better.
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.
I have been programming in VB since Version 2, and right up to Version 6
Yet you don't know that VB *is* compiled by default?
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.
Cut that out, or I will ship you to Norilsk in a box.
And my X2 4400+ with 2GB of RAM cares why?
Because it's not handheld. A lot of people demand client programs for PDAs or "open market" smartphones.
Or, if it's on a server, because it's limited in the number of clients it can serve. More efficient code can serve more clients per second on your "X2 4400+ with 2GB of RAM".
You were hired to rewrite some VB software, but you're not familiar with VB? The problem isn't VB, it's you.
Actually, the problem is whoever hires people who are qualified for task A to do task B.
This is a perfect example of the difference between a university-educated computer scientist, and a graduate of a 6-month "tech college" program. The community college drone has only been taught how to use one or two tools to perform common tasks, whereas the computer scientist is taught to truly understand the tools, as well as the thinking that went into them, how to use them to solve multiple abstract classes of problems (instead of just a few common, specific problems), and how to apply that knowledge to use tools they haven't seen yet.
A real computer scientist doesn't care what language they work in. A good employer should know that when they hire the 6-month grad at $18/hr, they're getting a code monkey that can do only what is explictly listed on their resume. They know that when they spend the extra money for a computer scientist with an actual degree, they expect that programmer to be much more capable, flexible, and adaptable. The fact that they've never programmed in VB before is nothing more than a minor roadblock. Send them to Borders/Indigo/Chapters with $50, tell them to pick up an O'Reilly or Knox book on VB, leave them alone for a couple days, and they should then be able to apply all their learning in the new language.
Like woodworking? Build your own picture frames.
>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?
Steve
A work that expires before its copyright never enters the public domain and thus enjoys eternal copyright protection.
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 today and have taken off for greener pastures tomorrow. He is the captain of that submarine (small boat, small crew, great level of autonomy from Navy HQ), and for all I know you are the XO, but that boat has to have only one captain. So folks to start calling this guy Captain Queeg is a little premature.
Another side of the coin is the software engineering version of the Hippocratic oath of do no harm -- the engineering version is first get a lay of the land, how the customer operates, what the system is supposed to do before you go rip-roaring making changes. The customer could be an accounting department using an app developed by you in information systems -- you first see how the accountants are used to doing their work and what the automated system is supposed to replace. The customer in your case is the boss dude.
The story you are telling about the micro-managing boss and the reluctant employee could be the overbearing professor and the meek graduate student. One professor asked that the project be done using unStallman-worthy Java/Swing for the data graphics front end with a JNI link to C++ to do the heavy numeric lifting. The student goes off and codes stuff in C++/Qt. Another professor has the graphical front end done in Java/Swing but with a hand-coded GUI and a student comes along insisting that the thing be redone in the NetBeans GUI designer and sets the project back an entire semester while he is dinking around with the thing.
The point is not to debate the merits of Swing vs SWT, pure FOSS vs Java, VB vs everything else. The point is that the boss dude is ultimately responsible while you are the hired hand, and if the boss dude wasn't overbearing for insisting on VB, he would be overbearing for insisting on Swing, or overbearing for insisting on anything.