locked
Whats the best way to Learn Visual Basic?

    General discussion

  •  

    I'me new but I've learnt all the declaring variables, operators simple message boxes etc.

     

    On the learning site, the mans on about objects and Ime like "what is he on about"

     

    is there better ways of learning coding for visual basic?

     

    Some ways i was told to learn:

     

    - learn from snippets of code

    - Go through instruction manuals

    - watch tutorials on the official website(Currently doing, stuck on objects, classes, ect...)

     

    what do you think the best way of learning coding, I have a pretty good idea of the basics with variables, recursion and all that intoduction stuff. but can I learn more faster and get more information? which of the 3 above do you suggest?

     

     

    Wednesday, February 20, 2008 9:15 PM

All replies

  •  

    First of all, read and participate in the thread called, "How NOT to learn VB".

     

    Then pick a simple but slightly intense task like write a console encryption/decryption program where the goal is NOT to create an algorithm that NSA cannot crack.... the goal is to learn a language.

     

    Back in the old days, whenever I needed to learn a language in order to learn it, I'd write an encryption/decryption program.

     

    This was before there were any Encryption/Decryption programs in DECworld and it cause tons of problems. There was a feud between on developer and system managers so he encrypted his directories with me program. That causeed a real row and then when hackers broke into the system what did the quirrel away? Why my encryption program is course.

     

    Back in the old days encrypt32.exe cause so many problems that I had nothing to do with. I think it's safer these days. Big Smile

    Wednesday, February 20, 2008 10:02 PM
  • "There was a feud between on developer and system managers so he encrypted his directories with me program. That causeed a real row and then when hackers broke into the system what did the quirrel away? Why my encryption program is course."

     

    It looks like you used your encryption program to write that paragraph

    Wednesday, February 20, 2008 10:36 PM
  • Sorry dave, I was in a hurry - typos...

     

    "There was a feud between a developer and system managers so he encrypted his directories with my program. That caused a real row. Then when hackers broke into the system what did they squirrel away? Why my encryption program of course."

     

    The district was full of smoking guns. So many times when there was a problem my program was used as a solution and was interesting enough for hackers to steal. The only reason I wrote it was to learn a language but goodness was it involved in every trangression.

     

    I didn't know you could encrypt a directory like that! Remarkable!

    Wednesday, February 20, 2008 11:01 PM
  • I have to admit the idea of writing an encryption program has absolutely no appeal to me.  I'm not at all sure how the idea would appeal to new developers.  I suspect most of them would even have difficulty deciding what was needed.

     

    Getting back to the original question the best way to learn is whatever works for you.  What works for Renee wouldn't work for me maybe because she is a professional and I'm not - although I try and write professional code, despite VBE encouraging me to do the opposite.  If you don't get on with the tutorials supplied then try Google and find some more - there are plenty of them around.

     

    One thing I would recommend - stay away from databases.  The way you do them in VBE has very little to do with learning to program.

    Wednesday, February 20, 2008 11:21 PM
  •  

    Dave,

     

    I'd say a couple of things about this. The encryption engine is not relevant. What an encryption program teaches is opening and closing, reading and writing files, data types, data manipulation and iteration, the basics and fundamentals of any language. So the object is not encryption/decryption but learning.

     

    You can learn to program with databases IF you don't do the way MS teaches it. I think the way it's taught by MS is awful and we are in agreement on that. If you do adapter I/O and work with tables AND NOT databindings there's plenty there to learn. If you notice, I don't answer database questions where an OP is using tableadapters because you don't have access to a table and its rows.

     

    If they are actually programming I'll help them. Jeff started out the way  MS teaches and I yelled at him. He finally understood and as a result has turned into a good programmer. So I agree, if you start with databases the way MS teaches you and you start with the datadesigner you won't learn much. There's a programming way and a non-prgramming way.

    Wednesday, February 20, 2008 11:46 PM
  • Hi xAlanxEnglandx,

     

    You might not have noticed the links on the left when you open Visual Basic Express.  There's a section that is titled "Getting Started."  I hope that helps.

    Thursday, February 21, 2008 12:47 AM
  • I think that the fastes way to learn to program is:

     

    1) Learn the basic syntax of the language, which data types there are, how to declare variables (Dim x As y), how to add, subtract, multiply, shift left and right, make loops, make If-Then-Else statements etc., so that you are able to read and understand a very simple VB program. You don't need to be able to write it yet.

     

    2) Learn how Windows and .Net works. The user interface (UI) is entierly event driven and unless you know what goes on, the first double-click you make on a control (form, button, textbox etc.) will create a code, which may look as it was written in ReneeC's encryption program.

     

       Private Sub Button1_Click(ByVal sender As System.Object, _

           ByVal e As System.EventArgs) Handles Button1.Click
       End Sub

     

    Unless you understand this entierly - including how it handles the click event and why the two arguments are needed even though you may not use them, you are not ready to program for .Net yet and will probably not be able to understand the help files. I am sure that the reason why most (all) beginners don't understand the help files is that they lack the necessary background knowledge.

     

    I have written a very big totorial about SerialPort, but 80% of this is only about the necessary backgroung knowledge like multithreading, delegates, events etc. Just skip everything about SerialPort (unless you are interested) and read the chapters from "Enumeration" to "UART". It may take you a day or more to read and understand it, but it will give you a knowledge even some MVP's with many stars on their shoulders don't have. The URL is: http://www.innovatic.dk/knowledg/SerialCOM/SerialCOM.htm

     

    3) Now you are ready to start programming and I am sure you will find it easy. .Net has so many classes that almost no matter what you want to do, you can be sure there is a class for it. It is just a matter of finding it! To me a good programmer is not just somebody, who knows all these classes by heart - this is just a fast programmer - but it is a programmer, who is able to overlook and fully understand what (s)he is doing because this is the key to reliable programs.

    Thursday, February 21, 2008 8:42 AM
  • Good stuff here, is there a simple sample encryption program code/tutorial anywhere i could follow?

     

    Thanks!

    Friday, March 07, 2008 11:55 AM
  •  

    No, that's the beauty of the sugestion. You have a goal. Now you get to figure it out.

     

    To begin with, you can learn to use help which is a pretty good reference source. Check out the stream reader and stream writer classes used to do I/O and File Open DIalogues.

    Friday, March 07, 2008 2:47 PM
  • Thanks! I'll get right onto it! Smile

    Friday, March 07, 2008 2:53 PM