I attend a community college, and am working for my AA and transferring to a state college for my computer science degree.
Problem is, the college recently changed its programming classes from C++ to using visual basic 2005 or visualbasic.net whatever its called.
Sifting through all the programming threads here I've discovered that VB or anything with the word basic in it seems to be detrimental to learning proper programming skills and habits, but none seem to say why.
I'm actually nearing halfway through the semester so I plan on just getting through it and afterwards am probably going to learn python then C++ on my own with text I've picked out all ready.
Right now were up to generating random numbers but we've gone through quite a bit of the language, but I still don't grasp it that often, and I find myself experimenting with different syntax combinations when left on my own, even though compared to other languages this stuff almost looks like pseudocode, but thats besides the point.
So what makes VB so detrimental to learning programming I guess is what I'm trying to get at
.
Posts
The really bad vb is vb6 and prior.
For the most part vb.net is similar to c# in that they are both object oriented languages. Under the hood in the .net framework they also work basically the same.
The only real downside is that I personally find the syntax of vb.net to be quite ugly compared to c# but I come from a c++ background so I naturally prefer it's style.
The benefits of vb.net are that it is a bit higher level as far as readability goes (at least for people new to programming).
It is a good idea to pick up c++ at some point to learn some of the fundamentals of programming that .net glosses over and does for you.
Also, focus as much as possible on learning good object oriented stuff as if you do it properly, it can save you a lot of coding time by letting you re-use things.
Also, because it was perceived as being easier to learn than other languages, a LOT of people became "developers" without learning modern programming skills (or any skills at all, in some cases). So you ended up with e.g. old mainframe COBOL developers writing tons of spaghetti code because they were using old habits from a system where you pretty much had to do everything yourself. I am looking at you, 30+-line routine to perform a string replace which can be done in a single command in VB.
The main things I dislike about VB.NET are all holdovers from previous versions, like the lame "If"/"Else"/"End If" syntax instead of proper curly braces. But if all of that stuff were changed, it would basically be C#. In .NET 1.1, VB was missing some important things like unsigned integers, but most/all of that was fixed in .NET 2.0 (which you get with Visual Studio 2005).
I would recommend C# over VB.NET, but if you learn one it's easy to pick up the other. I loathe Python because of its ridiculous inclusion of whitespace in the syntax.
http://www.thelostworlds.net/
It's syntax is divergent from many other popular languages.
If you look at the trends, VB is sinking fast in the context of .NET. As of this year, the amount of C# developers is now about even with the amount of VB developers, and C# will continue to grow, and VB will eventually cease to have Microsoft support.
I would say: learn the basics, buy a good VB book and keep it on your bookshelf. Even though VB is horrific and depressing to work with, about 10 years from now when all of these businesses will be looking at upgrading their shitty VB applications, you will be able to pick the bones clean.
COBOL programmers are making some serious bank these days because all of these old banking systems and shit that were written decades ago are getting replaced, and COBOL is a rare skill these days, so they get to write their own pay checks.
VB is not detrimental to programming as long as you register that most stuff in newer languages will have different terminology.
we also talk about other random shit and clown upon each other
You'll be laughing at how easy it is in a couple weeks.:P
It doesn't have to be detrimental at all. Just realize that what you're seeing in the code isn't the "right way" (read: best way). Use the class to learn the basic ideas of programming which are constant throughout all languages. Don't let yourself get hard-wired into doing things the VB way. Picking up other languages on your own is a good idea, and having some kind of introduction to programming isn't a bad thing, even if it is from VB.
Not everything can look like Lisp. HEY-O!
But yeah, VB is not a good language to start with for best practices, or even as a way of teaching how computers work (ala C). Why they've decided to go that route rather than Python/Java/C is a mystery. Perhaps they expect to be teaching students who will primarily run IT support for businesses on MS Office?
possibly,
heres the course description
COP 1332
Visual Basic
.NET Programming 3 cr.
Prerequisite: CGS 1000 and COP 1000 or
consent of instructor. This course emphasizes
the development of introductory
object-oriented Visual Basic .NET applications
for the Windows and Web environments
using forms and controls to create
user interfaces. The use of properties, variables,
constants, arrays, procedures, events,
functions, menus, status bars, input validation,
debugging, and application deployment
will be covered. Lab fee required. 45
class hours
This damn school switches languages a lot though, They do have a javascript course available but all the intro classes are taught in VB?!?! eh,
Thanks for the advice guys.
we also talk about other random shit and clown upon each other
COP 2801
JavaScript Programming 3 cr.
Prerequisite(s): CGS 1000, CGS 2820 and
COP 1000. This course provides an understanding
of structured programming concepts
used to create interactive web pages
and dynamic web page elements. The use of
properties, variables, constants, arrays, procedures,
events, functions, input validation,
debugging, advanced HTML features,
forms, DHTML, and animation in developing
and deploying web sites will be covered
Lab fee required. 45 class hours
You could easily fill a class for at least a semester on javascript. I try to avoid it because I find it ugly to use.. but at least it's not XSL :P
Oh god.. the hours spent with XSL/apache FOP/SVG all that xml...
Although math and phys science course are more important, I wouldn't be able to transfer into any public university in California without taking an appropriate datastructures course.
Jasconius, my point about COBOL wasn't related to the quality of that language, just that being an ancient mainframe programmer got a lot of people into bad habits where they refuse to use modern things like OO code or even things like the built in string replace function. Yes, you can make a lot of money coding COBOL now. Does that mean you should code in C# or C++ like you do in COBOL? No.
http://www.thelostworlds.net/
What you're doing is assuming that the functionality matters when you're trying to transfer to a university (where universities typically choose a standard language to teach CS concepts). It doesn't matter if VB.NET is an OK language if you're not going to use it academically, or if doesn't even transfer over. Why even mention a language like PHP? You're not going to be using PHP to learn about Big-O or code decision trees.
You waste your time taking vocational VB courses, and you might end up retaking first quarter lower division courses at a university, making learning VB totally useless. Of course, some schools might not care, but you'll still be forced to learn a more standard language by yourself.
I personally think it made it easier to learn other languages. Having a basic understanding of programming is important and any introductory VB class will teach you that. But I also had advanced programming experience when I took VB, so maybe that's why it's all so easy for me.
D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:D:
What sort of schools are these?!
Wow, I'd like to know what schools these were. Every major university I know avoids it. I know no one who had to learn VB.NET for their CS program. I've had a class that needed C# (Students were expected to learn it on their own, as is the case with many classes). I don't see any meaningful reason to have VB.NET as the standard language of a university.
MIT actually has VB classes. More VBA classes, but there are ones that teach VB also.
Harvard, Stanford and other Ivy league colleges also teach it. It's much more common than people think.
I'm pretty sure Berkley is C++. I know my friend at UCLA was learning C++ and Scheme.
Yes, CS majors need to know more than one language, but I've never heard of VB.NET as a requirement or a primer language, though it might be an elective for a class or a professor's preference.
I'm having trouble figuring out which parts of what you wrote were addressed to me, since I didn't discuss a number of those things.
My main point is that VB.NET's syntax is not (to my eyes) significantly different than any other programming language, other than the one thing I already mentioned. I've worked with VB.NET in .NET 1.1, C# in .NET 1.1 and 2.0, Perl and Java back in the late 90s, Javascript, PHP, VBScript, MIPS assembly, and even the vile VB6 when I had to come up with a quick app that would run on Windows machines without the .NET framework a few years ago. So I asked that if people had a complaint about it, they describe a specific example not only because it was part of the original request, but also because *I* am genuinely curious.
I mentioned PHP because (again, to my eyes) it's at least as much of an abomination as VB6 (although for different reasons), and yet it doesn't get nearly as much nonspecific hate as VB.
I took a pretty long break in coding in-between dropping Java and picking up VB.NET, but after that it was a breeze to switch over to C#. That's why *I* don't think it's such a big deal about whether Earthenrock's classes use one or the other. It literally took me one night to pick up the syntax differences, although having worked with Java previously was some help.
http://www.thelostworlds.net/
Well, what you're getting into is a specific language argument. I was trying to frame things into a school perspective, where a multiplatform and general purpose language is preferred over a OS locked in, IT centric language like VB.NET (even if Mono is around).
I was getting at that even if a language is good, OK, bad, whatever, if it's not used for what you want, then it's useless. Learning VB.NET as a prep for comp sci? Useless, imo.
I don't think syntax is even relevant, unless the language is for your own personal enjoyment. The OP did not seem to be learning VB for his own amusement. It's not even about how easy it is to use it as a stepping stone.If that's not the language you want to learn, it's just going out of your way to learn a language that you don't even want to use.
So trying to dissect why VB is a bad language is more for a general language flame fest. The question is, why take classes for a language that might not even be accepted at a university, nor be useful later on?
What I am arguing is more or less that good OO coding habits are good OO coding habits. If someone learns VB.NET now and has to learn C# or Java later, they're 75%+ there anyway, so they should take advantage of the opportunity they have, rather than not learn anything until later. I make that claim based on my experience that VB.NET is not notably worse than any other OO language. I am willing to revise that opinion if someone can convince me that I am wrong in my opinion of VB.NET.
The only thing I can think of that someone wouldnt get out of learning VB.NET of it is memory management and using headers and other C++-specific things, but they wouldn't get that out of C# or Java either.
http://www.thelostworlds.net/
It will teach you principles, blah blah blah, but with an arcane syntax.
You would do well to learn C# in tandem with this course so you truly understand this stuff with an up to date language.
we also talk about other random shit and clown upon each other
How is that even remotely true? Again, please cite examples.
http://www.thelostworlds.net/
Cite evidence?
The syntax is different
Here is VB
--
Dim foo as int
If foo <> 0 then
statement
else
statement 2
end if
--
Here is C# and other similar languages
Int foo;
if (foo != 0)
{
statement;
}
else
{
statement 2;
};
--
And that's just an if statement. Event handlers in .NET, and other more advanced operations are not even remotely similar.
The only other language I am aware of that uses VB syntax is classic ASP which is defunct.
we also talk about other random shit and clown upon each other
And even if it were true, how would it matter? LISP also has no syntactic similarity to any other language, but I doubt anybody would seriously say that learning LISP inhibits your abilities as a programmer.
I feel that Visual Basic's problems stem from how sloppily it allows a person to "program". Any programming language that allows absurd constructs like "lol" + 5 is setting the stage for confusion. Another problem with VB is that its syntax and behavior is inconsistent. When a language is inconsistent, it encourages students to treat the computer as a magical device that must be "tricked" into working. No programmer who believes this has any hope of ever achieving high-quality code.
EDIT: The more I think about it, the dumber the "no syntactic relevance" argument becomes. There are only 5 popular languages I can think of that have C family syntax. Of those, 1 is an extension of another (C++ of C), one is a clone (C# of Java), and one is closer to a bastard offspring between VB and LISP than it is to a C language (Javascript).
Here it is in MIPS assembly:
Does the fact that it looks completely different mean that no one should code in MIPS, or alternately that no one should code in C#?
The only difference in the examples you mentioned is the delimiters for the control structures. If someone has serious trouble following code just because it uses curly braces instead of "If" and "End If" (or vice versa), maybe development is not for them.
Can you be more specific about the event handlers? The one thing I can think of off the top of my head is how VB.NET lets you add "Handles SomeEvent" after the beginning of a function instead of having to do a SomeEvent += new System.EventHandler type of thing. That is different, but I think it's in keeping with the spirit of VB being intended for less hardcore developers.
Janin, when you mention "'lol' + 5", do you mean how in VB 6 and previous you could do something like this?
And end up with it being equal to 2 instead of erroring out when you tried to add an integer to a string? If so, that is one of my complaints about the older versions as well. I have to work with VBScript somewhat frequently, and that variables default to being of type "Variant" that is handled that way is really, really annoying. But as far as I know, VB.NET is not like that. Maybe it is if you tell it to support legacy functionality, like what happens when you port a VB6 app into .NET. I agree with the rest of what you said, and if VB.NET supports it by default that is pretty stupid.
http://www.thelostworlds.net/
Yes, exactly. And if I remember correctly VB.NET still supports stuff like that, for backwards compatibility. IMO, anything like this should at minimum raise an exception. Your code also reminded me how obnoxious separate define and assign semantics are for dynamic languages.
Fucking non type safe languages. Stuff like that causes more headaches than anything.
Agreed. All of the VB.NET material I learned from had the types set when the variables were declared, so I've never actually tried declaring one without a type. My work PC is broken right now or I would try it out.
http://www.thelostworlds.net/
without declaring the variable with Dim or its type.
Same code with Option Strict On and Option Explicit On :
With VB, if you set your default options to Option Strict On and Option Explicit On, it's really just C# with a different syntax and maybe 1-2 years behind on some features (yield keyword for enumerators...)
I wonder if I'm the only one in the class that realized the random lottery number assignment was done for me in a template provided for us in a later chapter O_o.
Looking into C# I think I'll get into it after this class is behind me. Thanks for all the input.