Another VB.NET rant
-
Yeah, that one got me too early on. What idiot put things together that way ? Surely that's a sign of lack of optimisation in the language overall, as well as being plain dumb ? Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
It means you have to write way more nested control statements which are bad in any language. Anytime you have to match an else up with an if that is more then 10-15 lines away that is bad thing in my book. Back to VB. At least they got rid of the call and set keywords. Also, the whole function vs. subroutine distinction got under my skin in a major way.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-
We took a small job recently, fixing an existing website, via rent a coder. I forgot to ask what language it was, and, naturally, it was VB.NET. I'm getting more comfortable with the syntax now, and I'll admit to seeing a few things that I like compared with C# ( for example static ( or should I say 'shared' ) members are visible at the scope of a class instance ). However, I continue to maintain that it is a TERRIBLE language to have to use, the syntax is plain ugly, and it seems every step to assume that the developer is stupid. Which, in this case, was true. The code has a class, called 'GlobalClass', which contains some of the database calls. This calls a wrapper class which, as far as I can see, doesn't make it simpler to call database methods, it just means you need to learn the syntax of the wrapper. None of the methods were 'shared', so you needed to create this class in order to call a DB method. The class is stateless, except that it has a connection object ( also a custom class ) as a member. And each method calls new to recreate it, so even if you have more than one DB call to make, no saving is made. Did I say 'some' of the DB calls ? There is no seperate middle tier, although there are entity classes, most of the business logic and about half of the database calls are within the codebehind for the pages. Except for the handful of methods that have actually been made as stored procedures. so the database stuff is pretty much in every possible place. On top of that, the site uses redirects unnecessarily, as it stores everything on the URL, no ViewState was used. Nor were any properties used, and the controls have event handlers that are public, so that containing pages can call them. I'm gradually changing all of this to instead generate events that the containing page can subscribe to. I was worried at one point that there seems to be a flood of new developers, but I'm quickly coming to the conclusion that most of them are clueless. We're actually having success winning jobs on RAC where we are significantly higher in our bids than the competition. I know this because the buyers have written and asked us to drop our price, and we always drop slightly, but won't bother trying to get near the quoted prices. It seems there are still people interested in more than just the lowest possible price, which can only be a good thing. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
Well, in response to several comments I'll say that I really don't agree with alot of the comments. I originally learned Pascal, then C, C++ and then landed in MFC for several years. This eventually led to ATL COM as I was dragged kicking and screaming into web development work. When .NET came out it felt like a great weight had been removed (I've had my share of rants about hating ATL COM when used in scripting, VB, etc). So I took a new job at a startup company and I got to choose the tools and direction so we went with .NET. At the time I had to learn rather quickly as well and since the other 2 guys hired were most comfortable in VB (which I passionately hated at the time) I succumbed (because of time restraints) to doing the bulk of the work in VB.NET. Once nice thing was that one of the guys had done a little Java and some C though he was primarily VB, and he picked up object oriented (real) programming very quickly. The other guy's code... well, it looks like you just described. So, in general, even though we use about 85% VB.NET, 12% C#, and 3% C++ (ATL COM) I'd say we have very well designed and efficient code. After all, for the most part, in the managed world it really doesn't matter at all if you pick C# or VB.NET. They're both going to run about the same and both wrap the exact same method calls with the exact same parameters in almost all cases. More over, the "extra typing" for enclosing blocks of code, if statements, and the like is simply not true. The "idiot-proof" Intellisense makes me more productive than I've ever been before. Microsoft's Winform editor is FAR superior (IDE) with VB.NET over C# and the lack of having to deal with capitalization is just plain easier. I can't believe I'm defending VB in any form... but these kinds of comments are pretty weak. I'm responding here to the whole thread.
-
Well, in response to several comments I'll say that I really don't agree with alot of the comments. I originally learned Pascal, then C, C++ and then landed in MFC for several years. This eventually led to ATL COM as I was dragged kicking and screaming into web development work. When .NET came out it felt like a great weight had been removed (I've had my share of rants about hating ATL COM when used in scripting, VB, etc). So I took a new job at a startup company and I got to choose the tools and direction so we went with .NET. At the time I had to learn rather quickly as well and since the other 2 guys hired were most comfortable in VB (which I passionately hated at the time) I succumbed (because of time restraints) to doing the bulk of the work in VB.NET. Once nice thing was that one of the guys had done a little Java and some C though he was primarily VB, and he picked up object oriented (real) programming very quickly. The other guy's code... well, it looks like you just described. So, in general, even though we use about 85% VB.NET, 12% C#, and 3% C++ (ATL COM) I'd say we have very well designed and efficient code. After all, for the most part, in the managed world it really doesn't matter at all if you pick C# or VB.NET. They're both going to run about the same and both wrap the exact same method calls with the exact same parameters in almost all cases. More over, the "extra typing" for enclosing blocks of code, if statements, and the like is simply not true. The "idiot-proof" Intellisense makes me more productive than I've ever been before. Microsoft's Winform editor is FAR superior (IDE) with VB.NET over C# and the lack of having to deal with capitalization is just plain easier. I can't believe I'm defending VB in any form... but these kinds of comments are pretty weak. I'm responding here to the whole thread.
Matt Philmon wrote: So, in general, even though we use about 85% VB.NET, 12% C#, and 3% C++ (ATL COM) I'd say we have very well designed and efficient code. Yeah, I didn't say it wasn't possible. I'm writing well designed VB code now. My point is only that there seems to be more bad VB code than, for example, C++ code. VB gives bad programmers the illusion of ability. Matt Philmon wrote: After all, for the most part, in the managed world it really doesn't matter at all if you pick C# or VB.NET. Yeah, I accept this to be true. If I can get to a point where I know all the annoying, terrible VB.NET syntax and gotchas ( still getting over the if not x is nothing and x ... problem ), then at the end of the day, it all compiles to IL and so should not make a difference. Matt Philmon wrote: More over, the "extra typing" for enclosing blocks of code, if statements, and the like is simply not true. The "idiot-proof" Intellisense makes me more productive than I've ever been before. Yes, intellisense does some of it. But it's still hard to read. It's far easier to block braces in your mind than to recognise blocks of if/end if. Matt Philmon wrote: Microsoft's Winform editor is FAR superior (IDE) with VB.NET over C# and the lack of having to deal with capitalization is just plain easier. The IDE should improve, I hope, and the capitalisation thing is just damn stupid. I hate it. It means that standards, such as lowercase for private variables, cannot be enforced. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
Matt Philmon wrote: So, in general, even though we use about 85% VB.NET, 12% C#, and 3% C++ (ATL COM) I'd say we have very well designed and efficient code. Yeah, I didn't say it wasn't possible. I'm writing well designed VB code now. My point is only that there seems to be more bad VB code than, for example, C++ code. VB gives bad programmers the illusion of ability. Matt Philmon wrote: After all, for the most part, in the managed world it really doesn't matter at all if you pick C# or VB.NET. Yeah, I accept this to be true. If I can get to a point where I know all the annoying, terrible VB.NET syntax and gotchas ( still getting over the if not x is nothing and x ... problem ), then at the end of the day, it all compiles to IL and so should not make a difference. Matt Philmon wrote: More over, the "extra typing" for enclosing blocks of code, if statements, and the like is simply not true. The "idiot-proof" Intellisense makes me more productive than I've ever been before. Yes, intellisense does some of it. But it's still hard to read. It's far easier to block braces in your mind than to recognise blocks of if/end if. Matt Philmon wrote: Microsoft's Winform editor is FAR superior (IDE) with VB.NET over C# and the lack of having to deal with capitalization is just plain easier. The IDE should improve, I hope, and the capitalisation thing is just damn stupid. I hate it. It means that standards, such as lowercase for private variables, cannot be enforced. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
Christian Graus wrote: Yes, intellisense does some of it. But it's still hard to read. It's far easier to block braces in your mind than to recognise blocks of if/end if. Yeah, I agree with this. I've always liked C/C++. I loved MFC. Christian Graus wrote: and the capitalisation thing is just damn stupid. I hate it. It means that standards, such as lowercase for private variables, cannot be enforced. Hmmm. I guess I don't really see that. We use coding standards here which we utilize in both VB.NET and C# components... the same naming conventions. What I like about VB.NET is that once I've created a local variable like: Dim strMsg as String, Intellisense will automatically fix it for me when I type in strmsg. It saves me a great deal of time when I have a great deal to do. In C# I'd have to hit auto-complete for it to make this correction and once you're past the first '.' it will not longer correct. For instance, in C# if you (being lazy like me) were to type in system.io.path. and hit autocomplete it wouldn't do it... it doesn't have any idea what "system" is. Now, if I did System.IO.path and hit autocomplete it would immediately correct to Path. These are the kinds of minor irritations that make it difficult for me to stick with C#. I just don't care about elegance. As long as it's efficient, intelligently designed, and effective that's plenty good enough for me.
-
We took a small job recently, fixing an existing website, via rent a coder. I forgot to ask what language it was, and, naturally, it was VB.NET. I'm getting more comfortable with the syntax now, and I'll admit to seeing a few things that I like compared with C# ( for example static ( or should I say 'shared' ) members are visible at the scope of a class instance ). However, I continue to maintain that it is a TERRIBLE language to have to use, the syntax is plain ugly, and it seems every step to assume that the developer is stupid. Which, in this case, was true. The code has a class, called 'GlobalClass', which contains some of the database calls. This calls a wrapper class which, as far as I can see, doesn't make it simpler to call database methods, it just means you need to learn the syntax of the wrapper. None of the methods were 'shared', so you needed to create this class in order to call a DB method. The class is stateless, except that it has a connection object ( also a custom class ) as a member. And each method calls new to recreate it, so even if you have more than one DB call to make, no saving is made. Did I say 'some' of the DB calls ? There is no seperate middle tier, although there are entity classes, most of the business logic and about half of the database calls are within the codebehind for the pages. Except for the handful of methods that have actually been made as stored procedures. so the database stuff is pretty much in every possible place. On top of that, the site uses redirects unnecessarily, as it stores everything on the URL, no ViewState was used. Nor were any properties used, and the controls have event handlers that are public, so that containing pages can call them. I'm gradually changing all of this to instead generate events that the containing page can subscribe to. I was worried at one point that there seems to be a flood of new developers, but I'm quickly coming to the conclusion that most of them are clueless. We're actually having success winning jobs on RAC where we are significantly higher in our bids than the competition. I know this because the buyers have written and asked us to drop our price, and we always drop slightly, but won't bother trying to get near the quoted prices. It seems there are still people interested in more than just the lowest possible price, which can only be a good thing. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
As others have pointed out, everything you rant about in this post can happen for programmers using a different language. You seem to be a logical and reasonable man, why do you have such a hatred for a programming language and for people who are using it? Any personal story or traumatic experience you want to share? Forgive me for asking this, did your loved one ran away with a VB programmer? By the way, what do you think about Code Project and the people who created it? Can you honestly say VBScript/ASP is fundamentally different from VB?
-
Christian Graus wrote: Yes, intellisense does some of it. But it's still hard to read. It's far easier to block braces in your mind than to recognise blocks of if/end if. Yeah, I agree with this. I've always liked C/C++. I loved MFC. Christian Graus wrote: and the capitalisation thing is just damn stupid. I hate it. It means that standards, such as lowercase for private variables, cannot be enforced. Hmmm. I guess I don't really see that. We use coding standards here which we utilize in both VB.NET and C# components... the same naming conventions. What I like about VB.NET is that once I've created a local variable like: Dim strMsg as String, Intellisense will automatically fix it for me when I type in strmsg. It saves me a great deal of time when I have a great deal to do. In C# I'd have to hit auto-complete for it to make this correction and once you're past the first '.' it will not longer correct. For instance, in C# if you (being lazy like me) were to type in system.io.path. and hit autocomplete it wouldn't do it... it doesn't have any idea what "system" is. Now, if I did System.IO.path and hit autocomplete it would immediately correct to Path. These are the kinds of minor irritations that make it difficult for me to stick with C#. I just don't care about elegance. As long as it's efficient, intelligently designed, and effective that's plenty good enough for me.
Matt Philmon wrote: In C# I'd have to hit auto-complete for it to make this correction and once you're past the first '.' it will not longer correct. For instance, in C# if you (being lazy like me) were to type in system.io.path. and hit autocomplete it wouldn't do it... it doesn't have any idea what "system" is. Now, if I did System.IO.path and hit autocomplete it would immediately correct to Path. These are the kinds of minor irritations that make it difficult for me to stick with C#. Well, I have to say that this is laziness brought about by using VB. I never have this problem, I know where to capitalise System.IO.Path. And I'm in the habit of CTRL-spacing where I need it as I go. Matt Philmon wrote: I just don't care about elegance. Well, I kind of do :-) Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
As others have pointed out, everything you rant about in this post can happen for programmers using a different language. You seem to be a logical and reasonable man, why do you have such a hatred for a programming language and for people who are using it? Any personal story or traumatic experience you want to share? Forgive me for asking this, did your loved one ran away with a VB programmer? By the way, what do you think about Code Project and the people who created it? Can you honestly say VBScript/ASP is fundamentally different from VB?
Tu Long Dao wrote: As others have pointed out, everything you rant about in this post can happen for programmers using a different language. Perhaps. But they happen far more often in VB. I have now proven this by experience. Tu Long Dao wrote: why do you have such a hatred for a programming language and for people who are using it? I hate the language because it is crap. I don't hate all VB programmers, I am merely annoyed by the 90% who are incompetent, especially when I am cleaning their mess. Tu Long Dao wrote: Any personal story or traumatic experience you want to share? Actually, that was the point of the original post. Tu Long Dao wrote: Forgive me for asking this, did your loved one ran away with a VB programmer? ROTFL. You idiot :-) Tu Long Dao wrote: By the way, what do you think about Code Project and the people who created it? Can you honestly say VBScript/ASP is fundamentally different from VB? ASP was and is an awful hack. I am astounded that they have managed to do such a good job using it, and I take my hat off to them. Remember, I've been careful to say all along that not every VB programmer is a hack. Also, CP predates ASP.NET, there has been talk several times of an ASP.NET version, but I imagine it's now a massive code base to be converting. I've actually offered my time to a community based conversion, but nothing ever came of it. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
We took a small job recently, fixing an existing website, via rent a coder. I forgot to ask what language it was, and, naturally, it was VB.NET. I'm getting more comfortable with the syntax now, and I'll admit to seeing a few things that I like compared with C# ( for example static ( or should I say 'shared' ) members are visible at the scope of a class instance ). However, I continue to maintain that it is a TERRIBLE language to have to use, the syntax is plain ugly, and it seems every step to assume that the developer is stupid. Which, in this case, was true. The code has a class, called 'GlobalClass', which contains some of the database calls. This calls a wrapper class which, as far as I can see, doesn't make it simpler to call database methods, it just means you need to learn the syntax of the wrapper. None of the methods were 'shared', so you needed to create this class in order to call a DB method. The class is stateless, except that it has a connection object ( also a custom class ) as a member. And each method calls new to recreate it, so even if you have more than one DB call to make, no saving is made. Did I say 'some' of the DB calls ? There is no seperate middle tier, although there are entity classes, most of the business logic and about half of the database calls are within the codebehind for the pages. Except for the handful of methods that have actually been made as stored procedures. so the database stuff is pretty much in every possible place. On top of that, the site uses redirects unnecessarily, as it stores everything on the URL, no ViewState was used. Nor were any properties used, and the controls have event handlers that are public, so that containing pages can call them. I'm gradually changing all of this to instead generate events that the containing page can subscribe to. I was worried at one point that there seems to be a flood of new developers, but I'm quickly coming to the conclusion that most of them are clueless. We're actually having success winning jobs on RAC where we are significantly higher in our bids than the competition. I know this because the buyers have written and asked us to drop our price, and we always drop slightly, but won't bother trying to get near the quoted prices. It seems there are still people interested in more than just the lowest possible price, which can only be a good thing. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
On a related note, the other day I was having a beer with a co-worker in IT who wanted to get into programming and said he was going to start with VB. The next day I had a little IM conversation with him that went something like this : Me : so how's the VB going ? Him : funny you should mention that. I am messing with it right now. Me : I thought so. I felt a disturbance in the force. I could hear him laughing clear across the building. :)
-
On a related note, the other day I was having a beer with a co-worker in IT who wanted to get into programming and said he was going to start with VB. The next day I had a little IM conversation with him that went something like this : Me : so how's the VB going ? Him : funny you should mention that. I am messing with it right now. Me : I thought so. I felt a disturbance in the force. I could hear him laughing clear across the building. :)
LOL. See, I don't mind people STARTING in VB. Everyone has to start somewhere, and anyone who is tied to one language is not a programmer IMO. I was open to learning VB.NET until I started to see it. The problem is people who 'mess with it', then start getting paid to code in it. There needs to be an intermediate step where people learn not just the syntax, but what to do with it. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
they use and & or what else. The thing that really gets under my skin about VB is that logical expressions are not short circut evaluated so if (a != null && a.b == 1) { } becomes if not a = null then if a.b = 1 then end if end if since if (not a = null) and (a.b =1) then will generate an exception if a is null.
I can imagine the sinking feeling one would have after ordering my book, only to find a laughably ridiculous theory with demented logic once the book arrives - Mark McCutcheon
-
Yes, it was more about the specific project, I'll agree. However, it does seem to me that such bad coding is more likely to happen on the VB.NET side of the fence. Not all VB.NET programmers are idiots, but because it's written to be simple, and to hold your hand, it's where most idiot programmers seem to end up. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
I find that some languages encourage a 'quick and dirty' attitude (VB isn't the worst of these BTW) and some encourage a more disciplined approach. Elaine :rose: The worst is LabVIEW. Don't look The tigress is here :-D