• Is Visual Basic worth learning?
    43 replies, posted
First day back to college and our teacher talks to us about different things we'll be doing. I'm supposed to be learning Programming Logic & Design, XHTML, Alice3D, and Game Research & Development. Right now the two classes I'll be taking are the Programming Logic and XHTML. We're also supposed to be learning some Visual Basic it seems while taking the Programming Logic class. I don't really know anything about Visual Basic though...but the reason I'm asking if it's worth it is because of the Alice3D course I'm enrolled in. I worked with Alice3D in high school, and it was pretty lame. I guess it's also supposed to be used teach us how programming logic is used, but in an actual 3D environment. It's free to download, so go check it out so you know what I'm talking about when I say it's pretty crappy. So I ask Facepunch, is Visual Basic even worth learning? Especially for someone who has very little to no programming knowledge? On an unrelated note, I thought it was funny when my teacher said that Alice3D teamed up with Electronic Arts to help make the characters "smoother" and "animate better".
If it's Visual Basic .Net, then it's kiiiiinda worth it (it's just like C#, but with crazier syntax). If it's Visual Basic 6.0, run like hell.
So basically I'm screwed either way? I guess I should have mentioned that I'm going to a technical college.
I took Visual Basic (6.0) in high school because it was the only programming class they offered there. Not really worth it. If you're paying for such a class, it's not worth it at all. On the upside, I made Pong in my free time while I was taking that class.
If you want to just program as a hobby, nothing hardcore (just small apps and stuff) VB.NET is fine. If you want to move up, explore programming, and understand it better for a potential career I suggest moving to something like C# or C++.
My dad uses VB 6.0 haha
[QUOTE=Sartek;31759410]My dad uses VB 6.0 haha[/QUOTE] what a badass i bet he doesn't even give a fuck
VB6.0 sucks so hard. Had it in school a few years ago, i learned how to make a calculator. HOLY FUCK!!!
Bottom Line: VB6.0 sucks bad in terms of real-world applications, I recommend C# instead, plus in my opinion its easier to learn with loads more documentation.
This stuff about English-like syntax being easier to understand is bullshit. Like everyone says, use C#. It can do basically everything Visual Basic can do but with much nicer syntax.
My main problem with VB is the horrible syntax. My problem with VB6 compared to VB.NET is that the p-code of VB6 and earlier versions is proprietary and because of that it's hard to find any good documentation of it or any good decompilation tools. On the other hand, you can use it as a sort of free DRM, because the outcome is so horrible that no sane person wants to touch it.
Well she made it clear that we will be using Visual Basic. Not sure which version though... We do have a class for C#, however I have to take this class with the VB as a prerequisite before I can take the C# class. Taking this VB class at least shouldn't be too big of a problem, right?
It will be both good and bad (assuming you're using VB.NET) Good because you'll be learning all of the .NET methods and controls/properties of Winforms I guess Bad because you'll be stuck with the terrible syntax
I'm a little over half way through a "teach yourself" C# book with little to no problem understanding the concepts involved, even though the wording is somewhat confusing, and there are quite a few typos. I probably learned all of what I would have learned in a high school(just reread op and realized you're in college, so this may not apply) level beginner class within the first few hours. All I'm trying to say is that you should learn what you want to learn, even if it means learning it by yourself. The book was cheap, my time is free, and I didn't have to wait for 20 odd other kids to understand a concept before I could move on. Don't think a school is the only place you can learn(and this goes for anything and everything) Also, google is a life saver, especially when you consider how well documented C# is.
VB.NET isn't that bad. It taught me the basics of programing. But yeah, it's better to be thrown into something like C-based language, if only because more important concepts are present.
just a quick question I saw this thread and i'm taking a visual basic programming class in college, we're using visual basic express edition 2008 is that visual basic 6.0, .net or something entirely different?
[QUOTE=Ehaic;31980477]just a quick question I saw this thread and i'm taking a visual basic programming class in college, we're using visual basic express edition 2008 is that visual basic 6.0, .net or something entirely different?[/QUOTE]No, that's Visual Basic .NET. Just a slightly older IDE, but it's the same language.
I guess I'll just have to bring my laptop and C# book to school and read it during my 2 and a half hour break.
anyone remember writing adventure quest trainers with VB6?
Visual Basic 6.0 shouldn't be that bad, it's taught in Software Development and Design classes for the preliminary course here in Australia, but mainly as a catalyst for the concepts of programming (desk checking, understanding and interpreting code etc). Visual Basic I reckon is a great way to get started with programming. It's simple, and it's those concepts and many more which will make you hit the ground running.
[QUOTE=Antdawg;31999698]Visual Basic 6.0 shouldn't be that bad, it's taught in Software Development and Design classes for the preliminary course here in Australia, but mainly as a catalyst for the concepts of programming (desk checking, understanding and interpreting code etc).[/QUOTE] Except there is absolutely no reason to use 6.0. Using outdated tools with no future in a Software Development class? Not the best thing there is.
[QUOTE=Antdawg;31999698]Visual Basic 6.0 shouldn't be that bad, it's taught in Software Development and Design classes for the preliminary course here in Australia, but mainly as a catalyst for the concepts of programming (desk checking, understanding and interpreting code etc). Visual Basic I reckon is a great way to get started with programming. It's simple, and it's those concepts and many more which will make you hit the ground running.[/QUOTE] It might teach you basic programming concepts but there are load of simple languages - e.g python - that are much easier to learn, more useful and the syntax isn't teaching bad habits (in fact you could argue it teaches good indentation). In my opinion there are too many alternatives to VB for teaching languages and development. VB should be considered harmful imo.
Your better off investing your time into learning C# and getting familiar with Microsoft Visual C# 2010 Express (free edition, requires email verification after 30-90 days i think). If you want to start writing styled applications you can also look into WPF (Windows Presentation Framework/Foundation).
[QUOTE=iPope;32002779]It might teach you basic programming concepts but there are load of simple languages - e.g python - that are much easier to learn, more useful and the syntax isn't teaching bad habits (in fact you could argue it teaches good indentation). In my opinion there are too many alternatives to VB for teaching languages and development. VB should be considered harmful imo.[/QUOTE] Any teacher worth their pay will actively teach you to do things the correct way instead of falling into bad habits. The language has nothing to do with it other than being the easy target everyone goes for because it has the word basic in it's name and doesn't look like a C-style language. The truth of the matter is that if you are being taught legacy VB ( pre .Net ), no it isn't worth learning. VB 6 was finalized in [B]1998[/B] and is no longer supported as of March of 2008. As far as .Net goes, it's near feature parity with C# and compiles to the nearly, if not entirely, identical code since both are CLR languages. Deciding on one langauge over the other is almost an entirely cosmetic choice at this point. Some things are certainly easier to type in C# than they are in VB. Handlers come to mind for this: [code]AddHandler MyObject.SomeEvent, AddressOf Handler[/code] [code]MyObject.SomeEvent += Handler[/code] Please provide actual reasoning and examples when you declare a language harmful instead of just riding the bash bandwagon.
[QUOTE=Kogitsune;32003042]Any teacher worth their pay will actively teach you to do things the correct way instead of falling into bad habits. The language has nothing to do with it other than being the easy target everyone goes for because it has the word basic in it's name and doesn't look like a C-style language. The truth of the matter is that if you are being taught legacy VB ( pre .Net ), no it isn't worth learning. VB 6 was finalized in [B]1998[/B] and is no longer supported as of March of 2008. As far as .Net goes, it's near feature parity with C# and compiles to the nearly, if not entirely, identical code since both are CLR languages. Deciding on one langauge over the other is almost an entirely cosmetic choice at this point. Some things are certainly easier to type in C# than they are in VB. Handlers come to mind for this: [code]AddHandler MyObject.SomeEvent, AddressOf Handler[/code] [code]MyObject.SomeEvent += Handler[/code] Please provide actual reasoning and examples when you declare a language harmful instead of just riding the bash bandwagon.[/QUOTE] I'm not jumping on any bandwagon. Nor did I mention C style languages or the word Basic as an argument. VB is useless for teaching and will make it harder for you to move to other languages. VB likes to hide away the workings of everything. It's syntax doesn't follow any of the modern conventions - for example "sub". Okay this is a cosmetic choice - but as nearly every other language refers to them as functions or methods that could be quite confusing for someone. I also feel as if the work flow of VB is a mess. For example a wikipedia example: [code] Option Explicit Dim Count As Integer Private Sub Form_Load() Count = 0 Timer1.Interval = 1000 ' units of milliseconds End Sub Private Sub Timer1_Timer() Count = Count + 1 Label1.Caption = Count End Sub [/code] From that piece of code I am left with a lot of questions. What is Timer1? where is Timer1 defined? What does Timer1 do? Where did Label1 come from? Where is the program executed? What functions are being called? When are the functions being called? As a programmer you should be answering those questions. A VB programmer is like a guy with poor english and translator that says what he thinks the programmer is trying to say. It's alternatives allow for the actual explicit expression of ideas and concepts - which make programming and understanding how programs work a hell of a lot easier.
[QUOTE=iPope;32003974]I'm not jumping on any bandwagon. Nor did I mention C style languages or the word Basic as an argument. VB is useless for teaching and will make it harder for you to move to other languages. VB likes to hide away the workings of everything. It's syntax doesn't follow any of the modern conventions - for example "sub". Okay this is a cosmetic choice - but as nearly every other language refers to them as functions or methods that could be quite confusing for someone. I also feel as if the work flow of VB is a mess. For example a wikipedia example: [code] Option Explicit Dim Count As Integer Private Sub Form_Load() Count = 0 Timer1.Interval = 1000 ' units of milliseconds End Sub Private Sub Timer1_Timer() Count = Count + 1 Label1.Caption = Count End Sub [/code] From that piece of code I am left with a lot of questions. What is Timer1? where is Timer1 defined? What does Timer1 do? Where did Label1 come from? Where is the program executed? What functions are being called? When are the functions being called? As a programmer you should be answering those questions. A VB programmer is like a guy with poor english and translator that says what he thinks the programmer is trying to say. It's alternatives allow for the actual explicit expression of ideas and concepts - which make programming and understanding how programs work a hell of a lot easier.[/QUOTE] Legacy VB is a terrible set of languages that are not friendly in any way, nor am I defending them. It isn't clear if a method is actually for a control's event or just named like one, is all over the place in property names ( Label.Caption vs TextBox.Text ), doesn't have proper support for one method handling multiple control's events ( control arrays are just terrible ), and lacks organization overall. But, I have to wonder: So not naming your controls properly or at least clearly is automatically VB's fault and not a lazy programmer's? Someone who writes bad code is going to write bad code regardless of what language they are using. Have you even looked at code generated by VB.Net? It is miles better: Option Strict and Option Explicit are set across the project, but can be overridden on a per-file basis. I opt to have both on in the project and do not make exceptions. [code]Public Class frmMain Private Count As Integer = 0 Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load tmrUpdate.Interval = 1000 End Sub Private Sub tmrUpdate_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrUpdate.Tick Count += 1 lblDisplay.Text = CStr(Count) End Sub End Class [/code] Please tell me what isn't clear about this and how using a different language would make this clearer. [B]To have a blanket "harmful" label for a language, you actually need to specify versions. VB.Net's proper name is still just Visual Basic, but it is miles ahead in terms of usability.[/B] Unless I missed it, we haven't been made aware of exactly what version of Visual Basic OP is going to be using - in fact, it's very likely to be .Net if they are also offering courses on C#, unless the school is just all kinds of backwards.
The same questions stand. Where is lblDisplay defined? Where is tmrUpdate defined? Where does that code execute? Where is MyBase defined? Unless you just omitted the code my concerns are still valid. If you haven't omitted then what I am seeing is a lot of magic going on with out explicit definition. How is that helpful to anyone? let alone someone not familiar with what is actually going on. Without knowing that those names reference controls then you have no idea where they come from. You can disagree with me all you like, much of what we are discussing is subjective. However it is wrong to say that VB is without it's flaws. If you are defining tmrUpdate ect. somewhere and you have just omitted it then I take back what I said. Also there is inconsistent syntax or something. When you define the "sub" frmMain_Load in the class frmMain how is that called? frmMain.frmMain_Load or frmMain.Load or frmMain_Load. The first one is just your naming, the last one doesn't make sense and if it is the middle one then you are using "_" to define it as part of frmMain and . to call it?! Let's just ignore the fact nothing is ever called. I've been a programmer for a while now and I am familiar with the syntax to a number of languages, I'd expect a language to include some form of reasoning to it. Also this: [quote] So not naming your controls properly or at least clearly is automatically VB's fault and not a lazy programmer's? [/quote] I never used the naming as a point. My point was that Label1 or Timer1 was never defined within the code. [quote]Have you even looked at code generated by VB.Net? It is miles better:[/quote] Sorry, unless I'm blind both sets of code have the same problems with semantics and syntax. A new programmer won't benefit from either set.
[QUOTE=iPope;32009404]The same questions stand. Where is lblDisplay defined? Where is tmrUpdate defined? Where does that code execute? Where is MyBase defined? Unless you just omitted the code my concerns are still valid. If you haven't omitted then what I am seeing is a lot of magic going on with out explicit definition. How is that helpful to anyone? let alone someone not familiar with what is actually going on. Without knowing that those names reference controls then you have no idea where they come from. You can disagree with me all you like, much of what we are discussing is subjective. However it is wrong to say that VB is without it's flaws. If you are defining tmrUpdate ect. somewhere and you have just omitted it then I take back what I said. Also there is inconsistent syntax or something. When you define the "sub" frmMain_Load in the class frmMain how is that called? frmMain.frmMain_Load or frmMain.Load or frmMain_Load. The first one is just your naming, the last one doesn't make sense and if it is the middle one then you are using "_" to define it as part of frmMain and . to call it?! Let's just ignore the fact nothing is ever called. I've been a programmer for a while now and I am familiar with the syntax to a number of languages, I'd expect a language to include some form of reasoning to it. Also this: I never used the naming as a point. My point was that Label1 or Timer1 was never defined within the code. Sorry, unless I'm blind both sets of code have the same problems with semantics and syntax. A new programmer won't benefit from either set.[/QUOTE] The function frmMain_Load is given an autogenerated name that you can change to your heart's content. This would be entirely valid ( but terrible in practice ): [code]Private Sub Q(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load[/code] There are two ways to have this method called: Manually invoking it - Q( Me, Nothing ) or, from another object, frmMain.Q( frmMain, Nothing ) Automatically when the Form.Load event is raised in the base class. In VB [i]and[/i] c#, the auto-generated form code is hidden from the user. This is the same program wrote in C#: [code]using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { private int Count = 0; public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { tmrUpdate.Interval = 1000; } private void tmrUpdate_Tick(object sender, EventArgs e) { Count++; lblDisplay.Text = Count.ToString( ); } } }[/code] Language features become more pronounced. C# doesn't seem to handle references the same way VB does - that block of using are normally just project-wide references, but for the most part they are not in C#. This means that if you wanted to access something in WinForms you're looking at adding it to the globals anyways. The next thing to notice is Namespace - you don't need to do this in VB unless you want to specify something other than the project as the namespace. Next the declaration of the class - partial class. This means the rest of the class is defined in another file. In VB, this would be FormName.Designer.vb and in C# it is FormName.Designer.cs. C# likely requires it on all linked classes while VB only requires it on the partials but not on the main. In a VB project, these designer files are hidden unless you enable the expanded view by clicking a button above the file browser. This partial class is where all the controls are created, initialized, and have their initial properties set. Since the initially visible access to the form is not partial, you don't need to define the constructor, although if you wanted to you could, as long as you make sure to call InitializeComponent. In relation to legacy VB and being able to find declarations of controls - if you are in the IDE, I don't remember there being an explicit way because it is hidden from the user. This is what a VB5/6 .frm file looks like inside: [code]VERSION 5.00 Begin VB.Form Form1 Caption = "Form1" ClientHeight = 4305 ClientLeft = 3090 ClientTop = 2535 ClientWidth = 6075 LinkTopic = "Form1" ScaleHeight = 4305 ScaleWidth = 6075 Begin VB.CommandButton cmdExit Caption = "E&xit" Height = 495 Left = 1920 TabIndex = 4 Top = 3300 Width = 2235 End Begin VB.CommandButton cmdForm3 Caption = "Form&3 Stuff" Height = 495 Left = 1920 TabIndex = 3 Top = 2610 Width = 2235 End Begin VB.CommandButton cmdForm2 Caption = "Form&2 Stuff" Height = 495 Left = 1920 TabIndex = 2 Top = 1920 Width = 2235 End Begin VB.Label Label2 Alignment = 2 'Center Caption = "Main Menu" BeginProperty Font Name = "Arial" Size = 14.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 375 Left = 450 TabIndex = 1 Top = 1020 Width = 5175 End Begin VB.Label Label1 Alignment = 2 'Center Caption = "My Cool Application" BeginProperty Font Name = "Arial" Size = 14.25 Charset = 0 Weight = 700 Underline = 0 'False Italic = -1 'True Strikethrough = 0 'False EndProperty Height = 375 Left = 450 TabIndex = 0 Top = 540 Width = 5175 End End Attribute VB_Name = "Form1" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = False Attribute VB_PredeclaredId = True Attribute VB_Exposed = False [/code] I never liked that it was done that way because there was no way to connect a timer's tick to the actual timer, for example. I can understand your complaints with the syntax of the language - everyone has their preferences, and VB is extremely wordy when doing things like event handlers and could really take a clue from C# and do it that way instead: [code] 'VB AddHandler SomeObject.SomeMethod, AddressOf MyMethod 'Or AddHandler SomeObject.SomeMethod, MyDelegateOrMyLambada //Versus SomeObject.SomeMethod += MyMethodOrMyDelegateOrMyLambada [/code] Although the VB approach is somewhat less ambiguous when reading, but the C# approach is simpler.
So wait C# is easier than VB? I had to do VB with my software design and development course, I learned a bit of VB would it be easy to transition into C#?
Nether language is "easier" to learn than the other if you start from zero. If you are already familiar with VB.Net, transitioning to C# is a pretty simple task since you would already have general experience with the framework and existing classes, and would only need to learn the block structures and keywords.
Sorry, you need to Log In to post a reply to this thread.