|
I've used VB for DOS (well not actually used, I loaded, the removed it), I felt it better to stick with QuickC for Windows.
I am that is
|
|
|
|
|
I quite liked Quick C (though I seem to remember it was called Visual C - this would be about 1991?). It was a big step up from MS C 2 (aka Lattice C) and Symdeb.
Ah, the good old days that seem good only in retrospect
I never used VB for DOS. Never even saw a copy for that matter though I did see one or two examples of the programs it produced. I did enjoy QuickBasic and I was assigned (in 1985 I think) to teach some graduates at HP Australia how to write assembly language interfaces to MS QB. This was my first introduction to Computer Science graduates. I was somewhat shocked that these people had degrees and yet no idea of hardware abstracted to software (ie, accumulators, index registers, carry flags, stacks etc). Even now, nearly 20 years later, I'm still undecided on that particular question.
I probably sound like that old fart who complains that young people these days don't have to trudge 20 miles through the snow to school I didn't have to do that either
Rob Manderson
http://www.mindprobes.net
Paul Watson wrote:What sense would you most dislike loosing?
Ian Darling replied.
Telepathy
Then I'd no longer be able to find out everyones dirty little secrets The Lounge, December 4 2003
|
|
|
|
|
It's the people that enforce the use of VB.
OK, an unfair generalization to be sure, but I have encountered a lot more ignorance of good coding practices among VB programmers than among C++ programmers. Probably because C++ weans out the bad practices a lot faster.
And really, any language that forced upon us by ignorant managers on the grounds that writing apps in it is cheaper, faster, and less buggy, is by its very nature highly suspect.
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
Can a language, that requires one to define your own kernel or system access prototypes yourself, really be called a language.
I know VB is used a lot, but where are "standard" includes for it.
I know it's fast to do something.
Only pity about VC++ is the lack of COM support as VB has.
Well that's my 10 cents worth.
AllenR
|
|
|
|
|
AllenR wrote:
Only pity about VC++ is the lack of COM support as VB has.
I don't know if that is really true anymore. Since Microsoft introduced the #import command, it is very easy to call COM object from C++.
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
If I remember correctly, the import command automatically creates a com class derived from the interface defination, then secretly puts it hidden .h files in your target build directory... that makes less work for the programmer... unless something goes wrong, or you are doing something slightly non standard - for instance if you want to re-use common code you won't be able to subclass, or superclass the generated class.
In general I hate things that generate code automatically, they normally only work for the simplest cases.
|
|
|
|
|
I agree, I have more problems with programmers who only know VB and never were exposed to the C language or C++. I guess I am a language biget because I no longer look at resumes where their primary language is VB. I find these people too hard to retrain and I don't have time.
There are a couple of things that bug me about VB aside from the programmer base.
1. It still supports "Variant" datatype which doesn't exist.
2. It still thinks true = -1
3. It still allows programmer to get away with not initializing their variables. Which returns us to item 1. and so it will guess what a datatype is and goof up the results.
4. It allows too much type casting with CType insteading enforcing the rules of conversion.
5. I hate the open construct of the syntax, I find it hard to figure out where things end and begin.
6. VB Subs do not enforce the return of either nothing or something and I find many problems with junior programmers calling a sub and forgetting that it has to come back to the caller so it can execute the next instruction.
7. VB "on Error resume next" drives me insane. I was glad to see the try catch added to the language; but I find that the VB programmers will put the try at the top of 14 instuctions and the catch at the end. You ask them where did the error actually occur and they say "what error" or "I don't want the user to see any errors so what do I do?" grrrrr.
Of the four things I rant about Number 2 is the one that makes my blood pressure rise to 187. When I have a VB programmer set up a DB Table they always set it up as an integer and allow -1 for true instead of a bit 0/1. This annoys me to no end and if it goes for too long I can't get rid of it that easily.
The next in line is the "on error resume next" nonsense it requires too much energy on my part to even discuss it.
I also find that VB programmers have no concept of an algorithm and are experts at wizards. They have no "under the hood" knowledge and when you try to explain it to them their eyes glaze over.
However, I do know many programmers who have managed to go between both languages and force VB to behave, I admire and respect those programmers and wish there were more.
Pamela Reinskou
Some Days the Dragon Wins!!
VersusLaw Inc.
|
|
|
|
|
Well said!
Pamela Reinskou wrote:
It still thinks true = -1
This is sort of a fun one, if only for purely academic reasons. I suspect that true=-1 because -1 sets all the bits, including the sign bit. Any bit test in assembly will therefore be true. A lot of CPU's automatically set the sign bit when loading a byte into a register, so it's really easy to test for "trueness".
This "problem" isn't just a VB artifact though. In fact, an argument can be made that C/C++ completely violates the concept of "trueness". In C, a "0" is considered false, but any non-zero value is considered true. Not quite pure logic there. I much prefer the C# form, which requires a bool, forcing the programmer to make a comparison of equality. Annoying sometimes, but more readable, and more correct, IMHO.
I think the thing that annoys me most about VB programmers is their propensity for "cut and paste" similar or identical code, rather than writing a function. I can tell C# programmers that come from a VB background for the same reason.
Marc
Latest AAL Article
My blog
Join my forum!
|
|
|
|
|
I think the thing that annoys me most about VB programmers is their propensity for "cut and paste" similar or identical code, rather than writing a function.
I truly understand this... because I am a victim.
I was assigned to maintain a VB coder's "applicaitons" few years ago; the coder just wrote a "working" module and copy-paste it to all other similar modules. As you expect, all module had same error and I must spent months to fix all modules.
VB coder never understand "design", algorithm, not even programming.
Coding != Programming
|
|
|
|
|
I agree that it is not the language, it is the accessibility of the language that has attracted a lot of non-disciplined programmers who give a good language a bad rap.
The issues you sited are issues that do not have to be used (except for true = -1, but that is easy to work around with a const). It is not hard for someone with the discipline to write clean, concise, well-written code that would pass most requirements for professional code. Unfortunately, if you puruse the VB code sites, you get a lot of guys who never heard of style, or error handling (other than "do not let theuser see any"). And so, too many aspiring programmers learn from these examples, and the problem is propogated.
In my line of work, I am often to be foudn supporting engineers who main job is something totally unrelated to VB, who are tasked to code in VB. It is painful. They treat VB like a shell or batch language, instead of the language it really is. Something that worked with a few objects back in '99 all of a sudden does not work when a few thousan objects are thrown at it. And they just do not get it. Or, they throw a hack to get by for the day, until the next issue.
But that does not mean that VB6 is a bad language, and that it cannot write good programs, if one understands how to make use of it. I have been writing C/C++ since '91, and VB only since '98, and I have seen more bad C/C++ than VB code. Complicated does not mean more advanced or better!
In the meantime, I have developed tools and classes to make VB6 coding a breeze. I will deliver a working program for (non-enterprise) apps faster than a C++ coder will, and time is money. In fact, it often works better than or just as well as the C++ code, in less than half the time. And for UIs for multi-tiered apps, it is hard to be more productive. It is hard argue those facts, with well-written code.
I can say that I owe my abilities to write good VB code to my background in C++. It is very frustrating to try to explain error handling concepts to newbies. they just do not think things through like a C++ coder would. And we are back to the crux of the issue. The lack of trainign in formal coding practices for VB users.
Anyway, I choose the 'snob' answer, because being a C/C++ AND a VB coder, I feel it is not the language, it is the reputation of the coders who have given it the bad rap. If people would give it a chance, a good coder can write good code in any language. But I see many responses here from people who want to try to give technical reasons why they would be unable to write good code with VB. And they just do not fly with me. YOU are the one who has control over whether you write good code, not the language. Choose your tools as appropriate for the job, but do not rule out tools due to your lack of experience with the tools. There are very few circumstances where I could not make VB fit (scalable server apps being one of them - and guess how many servers apps I write that have to scale to more than a few hundred, which I can handle very easily with VB, thank you very much!). Even if I had to write a small C DLL to get some functionality, it was still less time in the long run to do the majority in VB, and only dip into C when I needed. And I can't count the number of times I was able to show management the numbers on how cost effective off-the-shelf, proven, supported components were, compared to in-house code, especially when I showed them the badly-formatted, non-commented code that so many in-house C/C++ developers wrote. Do they not teach these things in school anymore? One guy never used new lines in his code, because 'it made it easier to read a lot of code at once'. Good for him, then he left, and we were stuck with it. And people think C coders are held to higher standards.
Again, productivity is time is money, and I get paid very well (higher than most from the replies in the salary surveys) to be productive, not to be tied to one language, not for elegance (although a good solution is elegant unto itself), or how complicated, or how many lines of code I write. So, as far as I am concerned, the more people who thumb their noses at VB, VB.NET, etc., the more room for me to shine by delivering good code, on time, and robustly, and make more money!
Noël Henderson
|
|
|
|
|
I understand your point about productivity and most likely you are very productive, we all must remember that not all VB programmers produce poor code.
However, Small businesses have to put up with programmers who dazzle with BS instead of shine with skill. While a BS artist can put something together in record time in the end the cost of maintenance and the possibility of a total rewrite far outway the initial savings. In my company we have actually lost revenue because I cannot implement a feature without a total rewrite. It takes me three times longer to troubleshoot the problem because of the extensive use of CType and Subs. In some cases to fix a problem with our changing business rules I have had to duplicate the existing function and rewrite it correctly; but I have to branch the code so that only the new business rules look at that function. It is absolutely crazy making and it is lost revenue as far as I am concerned not to mention the hours I don't get paid for because I am salaried.
VB was designed for the non-programmer to write simple productivity applications; but somehow it took on a life of it's own. Now we have social workers writing enterprise applications when they can barely figure out the algorithm for getting dressed in the morning.
Don't take me wrong there are very good programmers out there who can write in any language and adhere to best practices, know what an algorithm is and inplement it; but they are the minority and they have no interest in working in an 18 person company.
BTW - the orginal program I am now supporting was outsourced by my company. I have since rewritten the application in C# which is another story for another time.
Pamela Reinskou
Some Days the Dragon Wins!!
VersusLaw Inc.
|
|
|
|
|
Thanks for the reply. I still do not see anything that is a problem with VB. As the title of the thread says 'it's not the language...'
With pointers in C++, I can do much more damage. In fact, it is the poorly coded use of pointers in a lot of applications that had lead to some of the most famous and damaging code of our time - look at all the problems with IE and IIS and other programs that allowed someone to send input that allowed code to run when a pointer's contents were overrun. My company (the most respected in the world), does not allow IIS to be used internally for this reason.
Does this make C++/C a bad language? Because some coders were too lazy to do checking on input to make sure buffers were not overrun? Wasn't this one of the reasons Java does not implement pointers per se? no, when it is the language THEY use, everyone refocuses on a nice big target, like MS as being the culprit, not the fact that the language was sloppy enough to allow non-disciplined programmers to be lazy, and exhibit poor coding practices. It could not be the language that is not safe ... could it?
Why are there poorly rated submissions on this site, for code written in languages other than VB? Does that make the languages those poorly rated submissions were written in bad?
For that matter, I have seen some very 'hacked-together' code in C# in the past few years, that has crashed my machines a number of times.
I am not denying the fact that VB has attracted many more of the less disciplined variety of wannabe programers, and these programmers have given VB a bad rap. But it does not diminish the value of the language, nor the capabilities of the language. From what I have been reading, it only fuels the bias (which I read as snobbishness) of other programmers with formal training.
Poor hiring practices (can we say 'references'?) does not make a poor programming language. I can site numerous cases of the same thing happening as happened to your company with C/C++, and I anticipate that we will see more of it with .NET now.
Poor coding skills does not make a poor programming language. I have heard more urban legends of poor code written in VB, than have actually come across it in my professional career. Although, if the code on such sites as PSC is an indication, there is a lot of bad VB code out there. I guess companies that can afford my services are more discriminating.
Unsafe shortcuts does not make a poor programing language. How often have you read about a feature supported by a given compiler that is not recommended for general use? How safe are pointers when not used properly?
Someone mentioned 'On Error GoTo Next' as being evil. Only if the error number is not checked. A try...catch block can be just as dangerous, and used in the same way. Just because you catch an error does not mean that you handle it correctly, or make the best decision on where to go from there. How is this different from what VB allows you to do? What is the difference? It is not the language, it is the coder. I refer you to the title of this thread.
I think the conversations in these threads here solidify my feelings that it is snobbery that has fueled this bias. Anyone can find issue wih anything they are biased against. But all I see here are people saying that the possibility exists in VB to write bad code, and therefore it is a bad language. I have not seen anyone saying that it FORCES you to write bad code, that no matter what techniques or discipline you employ your code will end up bad. To me, that is the only definition of a poorly implemented language. People who think in one way, feel the rest of the world should think the way they do, and if not, then they are bad. Like MAC vs. WINTEL. Give me a break, get a life, and please, step out of the way so that I can get that money waiting to be had while others are pontificating about why their language preference defines your skills.
All I need is for the general admission that in the wrong hands ANY language is dangerous, and can deliver poor code. From there, we take the correllary that in the RIGHT hands, ANY language can produce robust, well thought-out code. At that point, we have successfully isolated the issue from being about the language, and about the nut loose on the end of the keyboard. A totally different issue. but one that identifies the only true ubjective answer to the poll is that VB has a bad rep due to the general awareness of the lack of discipline in many VB programers.
If more people would get beyond that way of thinking, and start worrying about delivering the best value, and which language can deliver that value (note that time is a factor in value), the market would be much tougher than I see it being. You can see that I am not to worried about this happening. This is not directed at anyone, as I know none of you here. But please, separate the language from the hacks.
Noël Henderson
|
|
|
|
|
So true,
and you'll find most VB programs lack concepts of OOP/OOD and User Interface Design.
Because it is so easy to learn, people with little or no programming experience find it easy way to move into the computer industry and wean themselves on VB projects only to produce what I call dogshit code.
I am that is
|
|
|
|
|
I have written many apps in VB. One of which is still running and handles over a £1,000,000 of data. Even with VB6 I was hooking into the windows API and making GUI do things that would make some C programmers blush!
It's true that people can pick VB up without a good understanding of programming, but thats not the languages fault. There are an awful lot of bad C, C++, C#, Java, COBOL programmers out there too!
|
|
|
|
|
Agreed I have seen bad COBOL in my day so I understand what you are saying. However notice that the only ones taking exception to this thread are decent or excellent programmers.
The problem is the language because if you do not control it, it will control you. If the programmer forgets to initialize a variable no sweat VB will just make it a variant and allow you to cast it any way you want. If the programmer creates a subroutine that returns no value at all no problem nothing happens. If an object has not been instatiated no problem if you test that it is "Nothing" instead of testing for the datatype; providing that you test at all. Oh I forgot VB doesn't know what a datatype is sorry.
The language is at fault because it was designed to be freindly and do the thinking for the programmer. Excuse me I will think for myself and you the programmer language will do as I say even if it is wrong. At least with ansi C based languages when I give it an instuction that makes no sense it has the ability to come back and say--"Are you sure(warning)" or "forget it I am not doing that it makes no sense (error)". VB on the other hand will just calmly make some assumption and go for it. This has nothing to do with the programmer, if he gets used to the language making the decisions he will never learn the correct way to do things.
Sorry, I tend to get a little excited, I do not mean harm to anyone.
Pamela Reinskou
Some Days the Dragon Wins!!
VersusLaw Inc.
|
|
|
|
|
VB = Pandora's Box...
I had to translate a lot app from VB to VC++ (No words)
I saw the problem is like you said:
The language control you
The most problems were sentences that doesn't that must to do.
Best Regards.
Carlos Antollini
Do you know piFive[^] ?
|
|
|
|
|
I do not understand the statement:
This has nothing to do with the programmer, if he gets used to the language making the decisions he will never learn the correct way to do things.
On one hand you say the coder has no conscious volition of his actions, and then you state that he makes a conscious discision to abdicate responsibility to the interpreter.
So, when a C/C++ coder writes code that allows a buffer overrun to execute code in the OS, it is the compiler's fault for not catching this error, right? It just blithly goes about it's business, nevers asks "don't you want to validate this input before passing to the buffer". Therefore, it is the compiler's fault, right?
But wait!, you say. It is the responsibility of the coder to check things like that. And hey, the language gives you a mechnism to do so! Woohoo, we are saved.
Too bad VB does not have a mechanism to inform you when using a variable that has not had a data type explicitly declared. Oh, I forgot, it does. Option Explicit.
Are you saying there is no such thing as an implicit cast in C/C++?
VB allows as much or as little control over your code as you wish. it is the decision of the coder as to the quality of the code they write. it is NOT dependent upon the language.
Noël Henderson
|
|
|
|
|
noelhx wrote:
VB allows as much or as little control over your code as you wish. it is the decision of the coder as to the quality of the code they write. it is NOT dependent upon the language.
But when it's run you can't see the difference between the codes....
Sometimes I see code written by No human been. But the app works.
If you say to coders how a correct code is, they say Why?
I saw very few coders that works seriously in VB...
Carlos Antollini
Do you know piFive[^] ?
|
|
|
|
|
My thoughts about learning the correct way to do things is targeted to junior programmers.
Yes, you are correct about Option Explicit, unfortunately junior programmers do not always turn it on (some seniors are guilty too). The language should not give them a choice, it should be mandatory.
Pamela Reinskou
Some Days the Dragon Wins!!
VersusLaw Inc.
|
|
|
|
|
...VB rocks, because it makes programming accessible to almost anyone...
...VB sucks, because it encourages the coding equivalent of house-building using 2x4s, duct tape, and string...
...VB rocks, because it doesn't require me to remember those horrid semicolons...
...VB sucks, because it lacks CListCtrl ...
But in the end, it's all just database access right? And that stuff is just plain boring.
|
|
|
|
|
Shog9 wrote:
...VB sucks, because it lacks CListCtrl...
You make a very good point. I hate having to use the ListView control in VB. It's such a pain in the ass compared to CListCtrl. I really miss SetItemData and pointers when I'm in VB!
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
Much like the control in .NET, the VB ListView control allows easier access to much of the WC_LISTVIEW functionality...
...Unfortunately, what they don't make easier, they make more difficult.
But in the end, it's all just database access right? And that stuff is just plain boring.
|
|
|
|
|
Shog9 wrote:
VB rocks, because it doesn't require me to remember those horrid semicolons
Double edged sword: You have to remember those horrid underscores if you're splitting a line of code into a new line of text.
--Colin Mackay--
EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
|
|
|
|
|
For the first time in my history of visiting CodeProject, I find I'm unable to find an option which reflects how I feel.
The poll options, seem a little childish and do nothing to address the real reasons why VB programmers have a bad name.
VB, got it's reputation because it allowed nearly anybody to pick it up and create an application. Now whether this is a good thing or a bad thing I don't know. A lot of poor code was written, poor code in the sense, hard to read and maintain. Badly structured and poorly documented.
Lots of good code has been written in VB, I know of big enterprise apps that were written by developers who had experience of coding; not hacked together by wanner be programmers, such as managers, tech support staff and journalists.
All languages allow you to write crap code, VB just makes it easier (IMO).
Of course, developers weren't helped by the dodgy UI which prevented you from seeing all the code. I've never been a fan of RAD development enviroments, point and click gives you too much of an opportunity to build reams of code, without design or forethough - I should know I've used VB in that way.
Like most things in this world, VB in itself wasn't a bad thing - it's just a minority of wannabe programmers spoilt it for the rest of us.
Michael
But you know when the truth is told,
That you can get what you want or you can just get old,
Your're going to kick off before you even get halfway through.
When will you realise... Vienna waits for you? - "The Stranger," Billy Joel
|
|
|
|
|
Changed my sig - SCNR
"All languages allow you to write crap code, VB just makes it easier (IMO)."
Michael P Butler
|
|
|
|
|