February 24th, 2008, 1:43 pm
QuoteOriginally posted by: ZmeiGorynychWell sure, for a bit of Excel automation VBA can't be beat, and that can be useful occasionally both in interviews and in real life (and rudiments of that are well worth picking up over another weekend). I would still very strongly discourage anyone who has a choice in the matter from using Excel and/or VBA for anything that might be called 'quant work', as I believe it scales very badly - as soon as your projects get to be of nontrivial size (and they nealry always do), you're either stuck with a spaghetti salad of a spreadsheet, or have to go and re-implement the code in a more suitable language (meaning matlab/python/mathematica/R or some such, with C++ inlays where speed really is essential or you need to call it from Excel). I'm not sure what one would ever want to learn VB for (as opposed to VBA) - can someone name a couple of reasons? I've done a couple of VB6 courses once, and thought the language was an abomination - and as for VB.NET, why not learn C# instead?Also, I believe VBA is like perl in that a job where either one is a vital requirement is likely to be a not very pretty one.All of this lays no claim to final wisdom of course, just my opinion.My 2 cents: There's nothing wrong with VB and VBA... You just have to use it in the right context. Everything has advantages/disadvantages. Also, I believe in some kind of "Darwinian" evolutionary process for programming languages; and as you know VB is out there for a while now... and I don't think it will disappear soon, it is surviving... Strengths:VB syntax is easier (It's a high-level language)You can code a program/prototype very fast.A lot of stuff is already done, so you don't loose time with stuff that doesn't matter for small projects/prototypes. It's "Visual" Basic you know... With a lot of objects already ready to use within a mouse clickIt's very very useful when using database projects. (ADO)Weaknesses:It's inefficient. It uses a lot of memory for variables (I never understood why, by the way) Maybe to force people to upgrade PC's So it is slower processing algorithms. It's not the kind of language for large scale projects!! (you need low-level languages for this stuff)You can't manage the consumption of resources in the machine------------------------------------That said, ZmeiGorynych:"you're either stuck with a spaghetti salad of a spreadsheet"I'm sorry to disappoint you, but this is not a problem of VB language, it is a problem with the "programmer (!?)".Don't mix good programming vs. bad programming with VB vs. C++ or other language...You can do nice pieces of code with VB. The problem is that many people using VBA doesn't know a thing about programming and code stuff in a mess. Don't mix people using "record macros" with people that can program in VB OK?"or have to go and re-implement the code in a more suitable language"Man, you can re-use code in VB What the heck... You have probably came across bad VB "programmers (!?)" VB.Net is fully OOP; and VB6, when used appropriately, can also be transformed in OOP.You can code classes, DLL's to re-use your code... you know...?Regarding VB.net vs C#.Net: Man, this is almost the same!!! Just a different syntax and some small differences. The code is compiled in the same way (Microsoft IL). Everything is almost the same here... It is these kind of nonsenses that brings down the reputation of VB Please, don't mix a bad programmer with the VB language.Also note that VB/VB.Net (or C#.net if you prefer) is very strong for database projects. Nonetheless, VB is poor for very large-scale projects due to its memory resources consumption!The question is: you need to know when to use each language!!