Is Visual Basic a Good Beginner's Language?
Austin Milbarge asks: "Ever since the .NET framework came along a few years ago, Microsoft had promised VB developers that their language would finally be taken seriously. To be honest, I never understood why some non-VB developers thought of VB as a 'toy' language, but that is for another article. Anyways, Microsoft made good on their promise and transformed VB from an easy to learn language into an object oriented power house, with lots of OOP functionality thrown in. The old VB has been discontinued, and the new VB is no longer a simple language. With all the fancy changes, is VB still the great beginner's language it once was? Would you recommend it to a beginner over C#?"
Writing managed code in VS.NET using either VB or C# is mostly a matter of different syntax and control structures - most code looks almost identitical. This makes learning both a good idea.
And for those of you C++/Java snobs that think VB/C# are for morons, I just got done reading two articles on strategies for high-performance multi-threading of applications and sockets programming. Say what you want, but VB has come a long way from being a beginner language.
It is a completely unstructured language that promotes very bad coding practices and allows for poorly writen applications to run anyway.
MABASPLOOM!
Clicking on a wizard isn't the same thing as programming. To really understand what's going on and get used to writing programs, it's essential to type every letter of the code yourself. My first CS class taught me Java, which I'd say is a better idea than VB. I go so far as to say that it's a better idea to learn assembler first so that you know what's REALLY going on inside that computer.
no matter how much you modify it.
anyway, i don't see a point in vb. c# is very easy and if you really must take language for learing, why not chose delphi? pascal was always better than basic as a language for beginners and modern pascal dialects (like delphi) are as powerful as any other programming languages.
Conservatism: The fear that somewhere, somehow, someone you think is your inferior is being treated as your equal.
The question arises - do you want to program for any computer or device? If you do, you might want to avoid VB because you're likely to get too dependant on the admittedly great Windows ("forms") design software. However, if all you ever intend to do is stick with Windows, and all the people who are likely to use what you write use Windows, then VB is an excellent and easy to learn development environment. Just my two pence.
This tagline was transcoded to result in at least one smirk. If you experience failure to smirk, please consult your Gen
For a true beginner, I still say regular old C is the way to go. Learn how variables work, function calls, passing arguments, pointers... There's something to be said with starting out compiling a single .c source file with gcc.
Han shot first.
Python or Ruby, yes. Not C++; you'd be much better off with Java than C++.
I've abandoned my search for truth; now I'm just looking for some useful delusions.
Python is a great starter language.
Dear Osama Bin Laden: Would you like to come to my bar mitzvah?
Dear Eagles fans: Would you be willing to sign Terrell Owens again?
"Seven Deadly Sins? I thought it was a to-do list!"
While Visual Basic leads to quick and early (limited) success, your coding style and habits, and your perception of how to solve problems when programming in general, will be badly spoiled for a LOOONG time. I advise you to stay the fuck away from it. Go learn an interpreted, really well-designed language, such as Ruby. -> http://www.ruby-lang.org/
:%s/Open Source/Free Software/g
YTARY!
I think it depends on what kind of a beginner it is. It is some hobbiest, or is it someone who is going to code for a living? If the answer is, someone who is going to code for a living then I think your first language should be a language that does not have a lot of bell and whistles. It should be a language that doesn't have a built in string class. One that makes you create arrays of characters. A language that doesn't provide you data structures right out of the box. A good language would be C or Pascal. Unfortunatly, new programers are learning Java, VB, etc right away. They have no concept as to what goes on under the covers. What it means when I go and create 1000's of strings. Or what it means to have a Hash Table vs a Stack, etc. Thanks, Joe
When a man lies he murders a part of the world.
Well Mr. Millbarge, I was going to set up the Disney Channel for you for free but now I'm not going to. If you're looking to learn .NET programming, I'd go with C#. It has a C-style syntax which is makes it easier to pick up other C-style syntax languages like C, C++, Java, etc. VB's OO aspects feel to me like they were bolted onto the language as an afterthought. You can experiment with both on Visual Studio. If you want, it might be a good idea to build a few sample projects each way to see which one you feel more comfortable with. You'll learn programming with either one, but you'll learn more you can use elsewhere from C#.
I'd personally like to suggest trying out Python. Not only is it more powerful than, and just as easy to code as – in fact, often considerably easier than – Visual Basic, it also has the advantage of running on many other operating systems such as Linux and Mac OS X. It can take a little while to get the hang of, but once you know what you're doing it's effortless (take a look for yourself at a couple things I hacked together, for example).
And yes, despite being a Linux hacker now I once did use Visual Basic, and I have to say it took way longer to learn VB than it did Python.
Creative misinterpretation is your friend.
I know I'm going to get bashed for this, but I really think Java is a great first language. It has far more regularity, all of its behaviors (even error conditions) are rigorously defined, which makes debugging easier, and it has a great user interface library in the form of Swing.
ZFS: because love is never having to say fsck
VB.NET is a lot closer to C# than, say, VB6 is to C or C++. In that respect, it is a valuable learning tool, since it eases the transition to a so-called "real" language (C#). Ultimately, though, VB.NET code compiles to the same PE format that C# does, so the "real language" vs "toy language" debates largely no longer apply. To those who say that VB "promotes" bad coding habits, I say "not anymore". VB.NET and C# are at least as well structured as Java...
I am alone, yet I also surf the universal backwash of undifferentiated Being, which is LOVE.
I guess this depends on what you qualify as "good"...
I'm sure there are other reasons to consider VB to be a "good" language. Since I don't do VB anymore (thank God), I have lost track of those reasons. I think I'll stick with C and PHP, this way when I get a customer that wants something that'll work on Solaris or QNX or AIX or HP/UX, I have half a chance of success!
Ron Gage - Westland, MI
Really Short Answer: No.
.NET, for no other reason than because C# requires it) is that VB passes off this idiotic idea of grouped functions as "Object Oriented Programming". The fact that these "objects" can't be instantiated, nor can they be used as Abstract Data Types, makes them utterly useless for OOP development. I would even go as far as to say that VB's previous implemenation of OOP was misleading and dangerous.
Short Answer: Are you out of your bleeding mind?
Long Answer: Visual Basic is riddled with problems for those who are new to programming. The first problem that hits someone looking to learn programming is that he/she sees a pretty layout manager, but no code. It's quite possible to build an interface without ever writing a single line of code. When the entire point of the exercise is to learn coding, this is NOT a good thing.
The second problem is that Visual Basic doesn't clearly introduce the "programmer" to concepts like functions, interpreters, and compilers. Most of the functions in VB are automatically generated, giving the impression that these are magic incantations that shouldn't be touched by a "programmer". VB Studio has an interpreter, but it isn't interactive in the same way as BASIC interpreters. This makes it useless as a learning tool. The compiler is mostly a matter of setting a file name and hitting a button to produce an EXE. So the new programmer gains no understanding of how code gets translated into an executable. Concepts like linking, for example, are completely glossed over.
One of my personal beefs with the older versions of VB (which have been corrected in
VB also loses major points for failing to include typed variables. The automatic conversions between numbers, strings, and other types only serves to confuse a new programmer, especially when the auto-cast does the wrong thing. A new programmer should be taught to understand how data is represented by computers, not abstracted away so far that they can't understand how to fix problems.
Beyond that, VB tends to do a lot of confusing things that are not easily explainable. The lack of useful documentation and/or a good documentation browser only serves to increase confusion.
To be honest, I never understood why some non-VB developers thought of VB as a 'toy' language,
VB had/has its uses, but it's still just a RAD tool. As soon as you run into situations that the RAD tool can't handle, you should be using a real language rather than trying to hack it.
Javascript + Nintendo DSi = DSiCade
It has never been a good beginner's language.. I truly really recommend a C-family language. Why? Because most of today's popular languages are in the family (C, C++, Java, C#, etc). C++ is way over complicated for a first language. I would really recommend that you start with old fashioned C. Yes, its not object oriented, but it forces you to focus on the basic thing, OO is just a way to pack code together, its not a defining property of the language.. Then you can easily learn C++, Java, C#..
If you really want to start with a OO language, pick Java or C#.. But be warned, those are dynamic languages (Java, C#, Perl, PHP, Python, Javascript, etc) and they have some differences compared to "hard-compiled" languages like C. C forces you to understand how the computer works, and it will always help afterwards to know that. Python is also a good beginner's language, its clear, clean, easy to learn, easy to use. Stay away from Perl and PHP, they are very easy to use.. but they teach bad habits.
And VB is badly considered not because the language sucks (and it did suck last time I used it.. but that was many years ago), but because most VB programmers suck and are not very good. Often not formally trained and they dont really understand many important concepts. Its fine if you want to cook for you familly, but that's not how you cook for a large restaurant. A good formally trained programmer should be able to pick up any not-to-weird language in very little time (since they all have basicly the same concepts)... VB programmers most often can't. Where I work, I have to handle C, C++, Java, Perl, PHP, having a good base is important. The concepts are important, the syntax is just a tool. Get a good tool, dump VB.
VB is a good beginner's language.
I should know.
I started out with Java, and wasn't too impressed. After all, what could I do with it? Spend hours building widgets to do things didn't capture my interest, so about 60 hours into the language, I backed out.
So then I went to C++, in hopes of doing more, and was overwhelmed with the amount of possibilities. (The STL is huge, to say the least). I still have those books on my shelf, and while I'd love to take the time to learn more about the language, I don't have the time to spend to devote the next year to becoming even moderately proficient in that language.
Enter Perl. God I love perl. Such a neat little language, and you can do things quickly with it. Want to parse all of the instances of 'anonymous coward' from your daily slashdot discussions? Done. In 10 lines or less. Problem is, making the widgets and stuff still do not interest me, I hate to spend time coding that.
Enter VB. Sure, you pay for an IDE, and you also have to use Windows, but Microsoft has made it easy for the budding programmer to do something. I'm not a programmer because I love to program, I program to do a function, to make some part of my job easier. That's what VB (in all of it's flavors) does for me. VBA? Great for automating the small tasks (and already installed on my work machines) of doing office stuff, like automatically generating and emailing reports. VB.NET? Great for the time constraints of building an application for work.
I tell you all of this to say that VB is an excellent beginning programmers language, and for your non-programmer IT guy, it solves most of the problems that crop up. That's its' function.
War isn't about who's right. It's about who's left.
I hate when people make statements sound like questions and vice versa?
SIGSEGV caught, terminating
wait... not that kind of sig.
"Is kicking puppies still a great way of attracting women, or do you recommend kittens these days?"
VB was never a great beginner's language. It's wrong all over. The only thing that got it a reputation for being a "great beginner's language" was that you could draw the GUI in later versions * before you actually learnt how to write code, so you could get visually pleasing results immediately, whereas the competition at the time meant you actually had to learn how to use a GUI API (and consequently, how to write code) first.
You want a good beginners language, look at Python. It's been used successfully in teaching environments for a while now. It enforces good practices like indentation and prohibits easy sources of bugs, like if foo = bar: O'Reilly have an article about Python for teaching programming that you might be interested in.
* Yeah, the first versions of Visual Basic ran on DOS and didn't have the GUI builders that later versions did. I'm not quite sure what qualified them as basic of the "visual" variety, it's not like you had to type your code in with your eyes shut in other basics.
Bogtha Bogtha Bogtha
For that natural language approach, try COBOL. With skills in COBOL, I guarantee you won't be looking for a job in the IT industry very long.
Private Sub Command1_Click()
End Sub
What they will do in the process is to go out and grab a bunch of someone else's code, paste it in there, and change the names of a few things. It really bothers me that the product of this process is even called software. At best shouldn't it be called 'macro-gramming?' Sorry to be such a stickler, but does that programmer have any idea what really goes on when that button is pushed? When the end users need a change that is not an exposed property or method of the pre-packaged object, what can they do? They probably have more creative skills when it comes to making excuses than they do at actually programming. Hell, we've all done it. It seemed like a good idea at the time to just slap together a few goodies, make it look pretty and ship it out the door. But what you end up doing is letting someone else make all the really important decisions for you. If you're lucky enough to be able to satisfy all the demands you encounter that way then more power to you.
In order to learn the principles of computer programming, less is more in my book. The more computer science you know, the less dependent on any particular set of tools you become. When code is dear and time consuming to write debug test and maintain, you will be absolutely amazed on how little of it you can get by on. Take the same algorithm and implement it in a couple different formats, languages, compilers, etc. See how many instructions it actually becomes when it gets run. See where different efficiencies of speed or size become important. Try some Python to see what can really be done in an interpreted environment. Try a C compiler. Try looking for a couple of algorithms and see which one performs better and be able to describe why. Then, no matter what tools you end up using, you will have a much better idea of what is going on, how to make it both secure and efficient from the start.
"Can there be a Klein bottle that is an efficient and effective beer pitcher?"
Seems to me that any language can allow for poorly written applications to run...that's like saying that you shouldn't teach a beginner about photography using a point & shoot camera because it allows you to take crappy pictures. I used LOGO and VB to teach my nephew (he was a about 7 years old at the time) about programming. He really enjoyed it. Things that are good about it: its visual, its dead simple, the syntax is easy, the language is verbose (so its a little easier to explain and remember for a kid), there are relatively few nuances (like ending lines with ; or case sensitivity). Could you do it with Java, C#, Javascript, or Pascal? Sure, but that doesn't make VB bad for a beginner. Now, if by beginner, you mean someone who is intending to becoming a programmer and earning a living doing so, maybe VB wouldn't be my first choice. But if I had to teach a bunch of 10 year olds how to program, I would rather use VB than C# or Java (although LOGO is pretty fun).
You're going to get everyone throwing in their personal favorite reasons why C# is better or Java is better or haskell is better or whatever.
I reason it like this: What kind of beginner are you?
If you're a beginning CS student, no, VB is not the direction you want to go. There's many other languages that may have a steeper learning curve, but will reward you further in the long run.
If you're a forklift operator at a small company that gets forced into writing a small app to do this or that, simply because you're the most computer literate out of those of you working there, then yes, VB is designed for you.
I know many cases of programmers that never really intended to be, they got forced into it one way or another. If you don't have a full CS background, if you have no interest in computers outside of accomplishing the task at hand, if you just need to get something done quickly and don't have the background to do it properly..... then VB is the best choice.
I know there are plenty of advantages to doing things the 'right way', but out in the real world sometimes you just need to get things done yesterday and don't have the time or resources to do it the way a university professor would approve of. I'm not talking about writing shrink-wrapped retail software, but more things like internal apps and data transformation.
And, just to sound like a paid astroturfer (which I'm not), I must say that I have not seen anything anywhere ever that comes remotely close to the programming environment that Visual Studio provides. I'm usually on the anti-Microsoft side of the fence, but when it comes to the programming environment, again I haven't seen any other product OSS or otherwise that is even playing in the same ballpark.
burn karma burn!
Object Pascal is a good language for beginners. It has strong typing and object-oriented features, but the typing isn't strict to the point of being obnoxious like in Java. It is lower level, so you will deal some with pointers and memory management but it is harder to make a mess with than C/C++. You can also visually design the UI of your application, but the language isn't a disaster like VB (and doesn't run in a VM like C# or Java, so it's quick).
I use Visual BASIC (I choose to honor BASIC by capitalizing VB as I did), SQL, Fortran, C, Python, and Perl every week. I've written assembler for various CPUs, JCL, Smalltalk, various shell scripts, Pascal, Modula-2, MUMPS, and probably several others I'm forgetting in the past.
Every language I've learned has been useful on the various projects I've worked on and provided a perspective for evaluating what methods to use for new development.
Learn every language you can. You'll probably be surprised to find that you don't just get broad shallow experience, but each language actually gives you more in-depth knowledge of the others (and what they may do behind the scenes).
VB(A) is the scripting language built into many Microsoft products. Whether or not you harbor loathing for Microsoft, knowing VB(A) will be very helpful for many tasks and may be necessary to get a paycheck from many places.
"Flame away, I wear asbestos underwear"
"Because? What makes Java a better language for beginners?"
A consistent object model with a real base object.
No pointer/reference weirdness.
Java has range checking on arrays.
C++ is a good production language when you need the speed. Java is a "safer" language. STL really helps c++ a lot but it still isn't safe or friendly. However a person that does learn to program well in c++ will probably be a very good programmer.
See my blog http://ilovecookes.blogspot.com/ for light hearted technical information.
I'd go the other way- don't start with any language that has manual garbage collection. If you don't learn and understand pointers early, you never quite get them. And if you don't get them, you have no idea how your code actually works under the hood. Without that, you end up writing inefficient buggy code that those who do understand computers need to fix for you.
The only language a beginner should be using is C, C++, or assembly.
I still have more fans than freaks. WTF is wrong with you people?
VB4 was my first "real" programming language (I used QBASIC for years, but that doesn't really count). Since then I've used VB5, VB6, and VB.NET; I am also fluent with C/C++, Java, PHP, and a few other languages.
.NET crap does).
The long and the short of it is this: VB ain't bad.
People will say that Visual Basic is "unstructured," and they're clueless. People will say that Visual Basic is slow, and they're one step up from clueless (VB5 and VB6 compiled to native code and could, when used correctly, rival Win32 C++ applications for speed; VB.NET compiles to the same CLR the rest of the
My personal view of the Win32 API is that the inventor didn't like people. Window creation is needlessly masochistic. VB takes that hassle away. I've written applications where the entire backend of the program is in C++ and used the VB interface just to call C++ DLL functions. It's doable. It works pretty well.
Basically--VB is a viable language if you want to get something done *now* and don't care all that much about whether it's pretty. Would I use it for game programming? No (once was enough, a 2D RPG for a school project in sophomore year of high school). Would I use it to write something quick and dirty that I need immediately? Sure, and I'll be done before a C++ coder even has a window up and running.
VB also has some pretty nice features that YFTL lacks. You can run the program without compiling it, in interpreted mode--very useful for bug-ferreting. Its class system pre VB.NET was baroque at best, but its built-in garbage collection/memory allocation on-the-fly and the fact that all arrays could be dynamic without external references made it fun to mess with.
~Ed
"You can either have software quality or you can have pointer arithmetic, but you cannot have both at the same time."
From that point of view- compilers are a bad idea for a first language. The student needs to learn the first rule of programming- the computer does just what you ask, never what you want. That lesson comes quickest in an intepreter, not in a compiler.
Oh yeah, and completely agreed. I'm a professional programmer who learned VB after college- and I can always tell the difference in code between a real programmer and Visual Studio Wizards.
SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
For starters, you just asked about a VB based syntax on /., you will recieve for the most part nothing but FUD and miss information and the pundits launch into tirades about how VB.Net is a toy compared to C# (which are both the same CLR language), Java, Ruby, PHP, Perl, and some whack job will likely even recommend Python.
.Net is not going to be your tool of choice.
//Code here
Next up. Right tool for the job. If you're interested in embedded applications, coding on linux, or high performance apps, going
And finally, to refute some pundits. VB.Net is a syntax option for coding in CLR, the same as C#, J#, PHP.Net and all the other screwy variations of *.Net. Vb.Net is every bit as Object Oriented as C# or Java. VB.Net by default has explicit and strict options off, turning those two options on makes its compiler just as strict as the C# compiler. VB.Net also has almost all of the functionality from C# (I have heard that there are some obscure pointer functions that are not in VB.Net's syntax, but I have never run into them, or the lack there of). Another one of those "What were they thinking?" items though, VB.Net has a "Hide Advanced Methods" option on by default that hides a lot of methods from the autocomplete lists, turning it off allows you to see all of the same functionality as in C#.
The only substantial differences from VB.Net to C# is syntax Things like:
VB.Net: Private VarName as String
C#: Private String VarName
VB.Net:
If Var1 = Var2 Then
'Code here
End If
C#:
If Var1 == Var2
{
}
-Rick
"Most people in the U.S. wouldn't know they live in a tyrannical state if it walked up and grabbed their junk." - MyFirs
and I can always tell the difference in code between a real programmer and Visual Studio Wizards
So can I. The #Region " Windows Form Designer generated code " seems to be a bit of a giveaway, no?
VB.NET is not the same language as the VB of yesteryear. It's semantically the same as C#, just with a somewhat VB-like syntax to ease VB programmers into working with .NET.
.NET framework from scratch, I can see no reason to choose VB.NET over C#, unless you happen to like VB-like keywords more than Java-like keywords.
If you're learning to code using the
-Stephen
Python has been suggested. I also fall in the camp that say that python is probably the best learner language. Interpreter is freely available for all popular platforms. Python has enough of the niceties of VB (no strong types, easy array/dictionary construction, etc) while having enough features of a "real" programming language (shared memory, forking, etc) to teach about the concepts.
Developing in an IDE like VS obfuscates and distances the programmer from the code. It's a necessary evil for developing some things. But throwing a learning user at the bubbly GUI to figure out the wizards for him/herself is akin to putting a new pilot in the seat of a 747. There is just too much there that would seem confusing.
For these three reasons I would suggest python:
1. All you need is a free (as in speech) interpreter and your favorite text editor.
2. Documentation, howtos, sample code is easily available (there are plenty of good VB help sites out there, but I have found many many many fantastic samples of python).
3. The syntax of VB and python would seem similar enough to a beginner.
You had me until you said "It should be a language that doesn't have a built in string class. One that makes you create arrays of characters. " Strings are just an abstraction, string foo = "bar" is pretty simple to use, and when the student starts doing more complex things (and learns all about arrays), they will realize that foo[i] is just a character in a vector. It is a much more modular way to teach.
I agree that bells and whistles increase a languages' barrier to entry, but if they can be ignored (like a lot of the Java library) then it is a moot point.
C is not, nor ever will be a newbie language. By the train of thought that it is best "to [know] what goes on under the covers", then the logical conclusion of that is to teach a simple assembly language, quickly followed by a compilers and systems course.
In math, we typically teach younger students how to use a function or expression before we teach them how to prove it (consider it to be the process of giving them the specifications).
Disclaimer: I have helped and witnessed many students learn C.
Am I open minded towards open source, or closed minded towards closed source?
Oh come off it. Every language (almost) has pass by reference and arrays. The only extra thing C has is pointer arithmetic, and you don't need to know anything about pointer arithmetic in order to write non-buggy and efficient code. In fact, code using pointer arithmetic tends to be slower these days, because it's hard for compilers to optimise.
Freedom is not increased by mere diminuation of government. Anarchy is freedom for the strong and slavery for the weak.
On the other hand, I would not recommend a beginner to use Visual Studio or any of the IDE where you drag-and-drop to program.
Yeah, because programming boilerplate includes, class, main, and event handling code (which does nothing on its own) is really going to get someone hooked. Screw that. Give that code to a new programmer for free and let them add in something that does something fun, obvious, and interesting right away. That's how you'll get 'em hooked.
Look at it this way... no-one got hooked on pot because they liked making bongs.
"Honey, you'll still be a virgin if you do it THIS way..."
Worked for me.
Well, I'm no fan of java for my own use (I like C++ for "C type" stuff, and I'm far more fond of e.g., lisp family languages, for "GC'd no worries" stuff), but having helped people use it for college programming courses, it does seem to have appreciably fewer sharp edges in many ways than C++, without most of the bogosities of something like VB.
Some reasons:
We live, as we dream -- alone....
No... right clicking and selecting "New Form" is a nicety, and far from making someone a non-programmer. Eclipse and other IDEs have wizards as well - a developer using and IDE does not a non-developer make.
Excuse my speling.
Making The Bar Project
This question is wrong in so many ways...
Good beginners languages are:
- Logo (still the best)
- Scheme
- Forth
- Ruby
- Python
These all allow you to do basic, functionally-oriented programming and then "graduate", if need be, to large-scale OO stuff.I would say Common Lisp is the best, but if you start programming using Lisp you'll never truly appreciate it because you assume all languages are that well-designed.
All's true that is mistrusted
Actually, Java and C# have nearly identical syntax. I would suggest learning Object-Oriented to start, and concentrating on what OO is, rather than all the power of a specific language. OO is definitely the future, but many people who transition from procedural or don't learn the power of objects from the beginning just use Java or C# as procedural languages.
I have found that in programming, taking a class will cut down on the time spent banging your head against the wall because there's someone to answer your questions, even if they're stupid newbie questions. Programming teachers are usually far more responsive than other teachers (systems analysis, database, e.g.) because it's more practical.
If you're just learning how to program, I wouldn't worry about pointers immediately. Visual Basic is powerful in that you can write applications quickly and learn really fast.
Visual Basic: Schneider
Java: Barker
C#: Barker
Whatever your choice, there are free IDE's for all this now from Sun and Microsoft, and part of learning will be learning how to navigate the IDE. It's a great time to learn to program.
Where I live, people can't find enough VB or C# programmers, and not enough Java programmers with a security clearance. Before you buy the hype of the next great programming language, check out the want ads on Monster or Dice and see what people need now.
And remember, the highest-paid programmers (not team leaders)still write COBOL for Mainframes, because nobody else knows how to do this, and the big companies still can't get all their systems off of them.
Is VB a good beginner's language?
/. - is that people are fanatical about their language of choice. Many times to a fault.
Sure, why not? But, it depends on what you want to accomplish.
If you want to write a windows app, a script, do some office automation, connect to a database and shuffle data around, create a Web site, or do other practical business-oriented tasks, then absolutely.
If you want to write an operating system, then you'll want to look elsewhere.
First, I would ask "What do you expect to accomplish and what do you ultimately want to achieve?"
What I've learned over the years - especially from reading
When I was in the military, the old timers were so proud of the way things were when they went through basic training/airborne/ranger/sniper school and how difficult it was "back then". They used to wax poetic and tell tribal stories of when they were at NTC, the drill sergeant that used to dump bunks, or the 100-mile road marches. "Things are so easy nowadays" they'd say.
As a rule, people are very proud of their accomplishments (rightly so, I would think). Generally, people are both proud and nostalgic about their conquests, overcoming adversity, and place high value on extraordinary achievments.
You'll read many posts here admonishing VB while extolling languages like C or C++ for what they "teach" that VB doesn't. The real trick is interpreting the value of those statements. Are they saying it's better because it's harder? Or are they saying it's better for pragmatic reasons?
The world changes. Technology changes. Most things evolve and grow and change. Programming languages change, and it's a good thing too I should think. Could you imagine what the Web or economy would look like today if all we had was BCPL or x86 assembler? The fact that a language hides or automates certain implementaion details such as GUI layout should not necessarily be viewed as a detriment or deterrent. On the contrary, any language that can save time while still accomplishing the task or solving the problem is quite effective. Visual Basic, is relatively easy to learn, can solve many problems and many different types of problems, and dramatically reduces the time it takes to implement a solution. Due to that fact it has, directly or indirectly, facilitated a lot of economic growth by enabling companies to effectively solve problems, create software solutions, implement change, and reduce time-to-market. The fact that it's not a "difficult" language is what makes it so attractive to businesses. Difficult != Good (Difficult Good).
Personally, I don't particularly *like* to code Visual Basic. While I've solved many problems with it, I wouldn't choose it over C# or Java. That's just me. I'm used to curly brace languages, so that's my general preference. Having said that, I would evaluate the problem I'm trying to solve before I choose. I might very well choose VB over C++ if the solution warrants it. However, I don't think my personal preferences or opinions mean much to the next person choosing a language.
My advice is, choose Visual Basic if you really want to. Ignore the posts that tell you it's a "toy" language and remember the millions of VB programmers and tens of thousands of companies that have chosen it. I've seen some rather amazing things done in VB by my friends and colleagues - I would say it's far from being a toy. VB didn't become so popular because it's hard to use and doesn't do much. VB.NET is a fully object-oriented language. That puts it in the same terms as C#, C++, Java, Smalltalk, Ruby, Python, et al. It's not cross-platform, so you can't develop for Linux or OS X, but there may be enough challenges just learning an object-oriented language without learning the nuances of each platform at the same time.
If you do what you always did, you get what you always got.
Back in the day, its IDE was pretty good compared to all the rest. But as C++ builder, Delphi, Qt and others came along, even the IDE didn't stand out of the crowd.
The VB language itself, as well as BASIC, are not good beginner languages. They make easy things harder, and hard things impossible. They have a lot of special-case rules that only make it harder for beginners, and they have no room for growth.
To top it all, VB creates non-portable programs on a non-free platform.
It's proprietary, runs on one platform only, and it's basic (on steroids).
'Once scientists, even the dim-witted social scientists, get muzzled, the Western Civilization is finished.' - oldhack
I've been using MS compiled basics since Professional Basic back in the late 80's. I've used VB, VB.NET, etc. I've used variants of it like vbscript and lotusscript. I've used turbobasic and qbasic.
:-)
I also write in Java, and sometimes C, C++, and C#.
Issue #1. If you're starting from scratch, why pick something owned by a single vendor?
Issue #2. VB.NET isn't even remotely like old world BASIC. Even Quickbasic and Visual Basic were pretty much still very much like working with the original language. VB.NET just isn't. Starting fresh, there is very little difference in time and skill required to learn Java or C#.
Issue #3. VB is the only language in common use that I'm aware of which is NOT case sensitive. That means you're going to pick up REALLY bad habbits by learning with it. Personally, I think it stupid that modern languages are case sensitive -- it smacks more of arrogance than anything else and I just don't believe it matters that much at compile time. Still, why learn the bad habbits?
Issue #4. Personally - purely subjectively - I find Microsoft's documentation terrible, and their own support of VB to be secondary. If you don't already know what you're looking for, finding something entirely new is a nightmare with the vs.net languages. You are in a maze of web pages which all look the same. There is a mushroom growing on the way.
My recommendation would be to pick up Kathy Sierra's book "Head First Java" and download Eclipse. Eclipse, as an IDE is fantastic and fun to work in. Kathy's book is the best learn-to-code book I've ever seen, hands down. Between the two, you can be doing good work very quickly.
Hope this helps.
The problem with quotes on the internet, is that nobody bothers to check their veracity. -- Abraham Lincoln
Visual Basic was my first programming language, and it's a powerful language and Microsoft is a powerful platform.
The problem is that to do anything in the Microsoft family requires continual financial investment. Visual Studio itself (standard edition) is $299. As you learn to program, you'll probably want to program what's called "Client / Server" applications. You'll probably want to buy SQL Server ($6000 for the Standard Edition), Windows Server ($1000-ish). As you develop, you'll always find that you need other products that you don't have, and you'll always be trying to decide is it worth buying the product to learn how to do things.
Alternatively, you can learn how to program in the open-source environment. You'll find wonderful, free development tools. You'll find a community of people eager to help you learn (rather than paid support options). And, once you learn how to program this way, you'll be able to deploy real applications, without paying high licensing fees.
I remember, when I started my first company, we were a Microsoft shop, and I wanted to give away some of the technology I had written to non-profits, but I couldn't because they could not afford the licensing fees.
If you want to program a web-based application, I would install linux and apache-ssl and learn PHP. If you want to program an application to run on a client-computer, I would learn python. Both are very elegant languages that are easy to learn and have huge developer communities that are very helpful. These environments are very good investments of your time, easy to learn, and will prepare you to not have to change courses later on.
Or you just want to get some work done? If you really want to learn something, you should do it with PASCAL. Some people told you do study C, but after trying to teach it to a few people, I am fully convinced that C is not a beginer's language. PASCAL is different because you won't need to know about pointers to do quotidiane stuff, but still have manual memory allocation to study.
To learn how to program, use PASCAL on a CLI. Don't worry about the time investment, you'll learn VB much faster after you know what you are doing. Just to finish, I'd like to put here a very true quote from Dijkstra:
Rethinking email
- Smalltalk
- LISP
- Prolog
These teach different styles of programming and a lot of useful concepts. I might throw Pascal into that mix too. The next languages that they should learn are C (for when you really want an assembler, but need to be cross platform) and Erlang (for when scalability is king).If more people learned real languages before jumped-up assembly languages like C and pseudo-OO languages like C++ then we might see a bit more innovation in the language design community. Oh, and all three of the languages on my list run in an introspective environment.
I am TheRaven on Soylent News
I've been told that at some universities, such as Waterloo (Ontario Canada),they start their students with Scheme as the introduction language for Computer Science. Although definatly not a great standard for learning other languages that would be helpful in Application Development, after exploring the language for quite sometime now, I find it really pushes you to think in creative ways, (recursive functionality is big in Scheme), that are important in learning how to make clean code.
I've heard proponents at Waterloo describe the transition between Scheme and other languages like java and c++ seemless, and you end up with better programmers.. I don't know if I'd go that far, in Scheme you don't have to worry about typechecks, you're dealing with lists of data all the time.
I don't know really, I just though I'd throw that out there.
It probably wouldn't in a language like C, since it is very difficult to diagnose side-effects. If, however, you pick a (functional, or functional-style) language that supports a foreach statement then you could say something like:
foreach({x,y} in image) ->
You compiler / runtime would then pick an optimal number of concurrent threads to do this with for your target environment.do_something(x,y).
A lot of the time, going to a lower level is a bad idea because:
I am TheRaven on Soylent News
For a language to teach beginning programming, you can't beat Pascal. Yeah, I know it is not fashionable at the moment, but it is hard to beat as an introductory language. And there exist extended versions of Pascal (like Delphi) that do a great job on OO programmimg (beginners should worry about OO AFTER they learn the fundamentals)
Teen Angel - a Ghost Story
That code he wrote was clean, concise, easy to understand and debug and change. It was just wrong. The coder obviously didn't realize that implicitly creating a new object like that automatically allocates more memory. Until you've had to allocate memory manually, this kind of thing is never really driven home. It works great for small apps, but not industrial strength ones. C/C++ and the concepts they teach you are still necessary, even in the 4G languages.
My blog. Good stuff (when I remember to update it). Read it.
VB is an excellent choice for mediocre programmers who already have a basic grounding in CS. Unfortunately, VB tends to mask the basic CS skills a developer needs to acquire to grow beyond it. I've worked with several people who had great potential, but were forever stuck in a VB frame of mind. Java and C# are nearly as easy to learn as VB, granted they are lacking a bit of the syntactic sugar. I would recommend Java over C#, simply because the class library adheres much more closely to the standard "Gang of Four" design patterns, which equates to exposure to good design principles for a new developer. Don't get me wrong, .Net has a good class library as well, but I find that it isn't as consistent in its interface definitions as Java is.
.Net class library, and as such is no different from C#. Having spent the last few months cleaning up after VB.Net developers, I would argue that it would be, if they used it as such. Frankly, when a new or unskilled programmer picks up VB.Net, they immediately use Trim$(myString) versus myString.trim(). Granted, it does the same job in the end, but it is training them to avoid OO methodologies.
Now, the argument that will probably pop up to correct me is that VB.Net uses the
My next big rant would be that VB.Net will spoil a new developer on expecting everything to read immediately like plain English. Don't get me wrong, now, that's one of the nice things about VB. If Then... Gotta love that, except... If they get spoiled by this, then they are forever stagnated in VB. I have one developer I work with, every once in a while, who simply refuses to transition to any other platform just because he is locked into VB's syntax. A syntax which is unlike 90% or better of any other languages out there.
Java, C#, even PHP and Perl, share more in common in syntactic terms than VB does. Start a new developer out on a platform that will foster a better understanding of other platforms, instead of locking them in like VB tends to.
<Disclaimer>I made my living for years doing VB, but not by choice. I'm a dyed-in-the-wool C programmer, who prefers Java these days.</Disclaimer>
Please don't associate those Java users with us C++ (and C for the procedural of us) users.
*shudders* I feel so dirty.
when you see the word 'Linux', drink!
I guess the only difference between any two languages is syntax--that's what a language is. The rest is just API.
However, if you're going to program for .NET and you're not an old VB programmer, don't learn VB.NET, learn C# instead. VB is a syntactically ambiguous language, which is why C# to VB.NET translators are easy to come by, but VB.NET to C# translators are a bit more problematic. For example X=A(5) could refer to a function call, an array index, or a number of other possibilities, depending on what "A" is, which you may not know based on just that one .vb file.
Add to that the classic "bad habits" problems associated with BASIC, and you've got yourself a crappy starting point. For example, BASIC uses a single equal sign for both assignment and testing equality. BASIC uses 1-based arrays, and horror or horrors, allows you to change that behavior. I could go on, but other people will probably cover this subject adequately.
If you're doing .NET programming, which is a perfectly valid place to start, use anything other than VB.NET. E.g., C#, J#, Python, or one of about 20 other .NET languages. Don't bother with VB 6, it's going away.
"With sufficient thrust, pigs fly just fine. However, this is not necessarily a good idea...."
RFC 1925
* VB is badly OO and confuses the language and the library too much.
.net, and other .net iumplementation i.e. Mono
Not anymore
* VB is badly OO and OO is a bad paradigm to first learn to program in (and those two wrongs don't make a right).
It is nolonger bad OO and OO is a good paradigm to learn to program with.
* VB ties you down to using Windows, and Windows is a bad environment to learn to program in.
Acutally, it ties you to
* VB does memory management the wrong way from a learning perspective. Rather than specifying allocators and destructors when neccessary you simply let objects fall out of scope.
Which is how things are done now. However, you can implement garbage collection for those time when it is critical to do it now. However that is an indicator of either poor design, or that you should be using code that is clser to the machine.
* VB does not have first-class functions and cannot fake them: function manipulation and functional paradigms (whether direct or through hacks to fake it like function pointers or true reflection) is crucial to learning to program well and should be started as early as possible.
You can do this in VB
* VB teaches bad, verbose naming and programming habits.
That has nothing to do with language, however accurate verbose naming is far better then short obscure names.
Verbose programming habits in application development is a good thing. Not the best, but certianly better then implementing somme little know technique that is hard to deciphire jsut ecasue it saves a 1/100 of a second.
Funtion oriented programming languages are a poor place to start. The habitrs generated in those create very bad habits in OO programming.
All but two of your recommendations are total useless for real worled practicality.
The Kruger Dunning explains most post on
In the open-source community! The Free Pascal Compiler is a working command line compiler for the Delphi language, Object Pascal, and a graphical IDE called Lazarus is available to step in for Delphi itself.
Beholdeth the Open Source Power, that it doth keep languages from the grave!
With .NET 2.0, this is no longer entirely accurate. Even with 1.1, you could have used Array.Copy instead of the loop like someone said. Beyond that, with 2.0, you have access to Array.Resize:
// populate x
VB.Net:
Dim x(10) As Integer
'populate x
Redim x(20) As Integer
C#:
int[] x = new int[10];
Array.Resize(ref x, 20);
Personally, I'd have to say the C# variant is the simpler one now.
Perl - $Just @when->$you ${thought} s/yn/tax/ &couldn\'t %get $worse;
Keep in mind that VBA is used with MS-Office applications, and VBScript is used on IE designed web pages which are related to Visual BASIC. Learning one, can help you learn the others.
.NET Framework, and it is turned into native code in the final compiltion. Visual BASIC.NET no longer has the bottleneck that Classic Visual BASIC had, and as a result it runs faster.
.NET framework. Visual BASIC can be used as a stepping stone to a different language, or it can be used for main development.
Visual BASIC.NET was a rewrite of Classic Visual BASIC, which added in C++ type error trapping, objects, and other things that many have criticised Classic Visual BASIC for not having. Many VB developers want Microsoft to continue to support Visual BASIC 6.0 or Classic Visual BASIC, but Microsoft wants to move on.
BASIC stands for Beginners All Symbolic Instruction Code, the first word is for beginners. It was not designed to be anything but a learning tool, like Pascal, Pilot, and many other languages were designed to be. Microsoft used it for early Microcomputers, and then made a GW-BASIC version of it for MS-DOS and then later QBASIC or Quick BASIC for MS-DOS 5.0 and above. Many considered GW-BASIC and QBASIC to be free versions of BASIC and developed for them. Microsoft released Visual BASIC 1.0 and many BASIC developers adapted to it. I recall learning MS-Access 1.0 and using a form of Visual BASIC for applications for it, which they called Access BASIC or something.
Borland picked up the Pascal craze, in colleges they taught Pascal for data structures courses. There was UCSD Pascal, but Borland came out with Turbo Pascal and it worked faster than most Pascal compilers. Object Pascal became Delphi by Borland, and it is still popular and a competitor to Visual BASIC. Free Pascal tries to use Object Pascal to be more like Delphi and the Lazarus project uses an IDE with Free Pascal to work like Delphi or Visual BASIC.
I think there is an XBASIC out there that works like Classic Visual BASIC. Someone made a GNOME BASIC. The Novell Mono project has a Visual BASIC.NET language which is used on Windows, Linux, Mac OSX, *BSD Unix, etc.
The whole argument against Visual BASIC is now moot. Classic Visual BASIC lacked proper OOP, but Visual BASIC.NET fixes that, but at the cost of learning new programming methods and syntax for Classic Visual BASIC developers. While designed for beginners, Visual BASIC has extended itself. Visual BASIC.NET uses a compiler very much designed like C# or C++ to compile into IL (Interprited Language) code (which is like assembly language) to run on the
You will be shocked to find that most businesses use Visual BASIC.NET for the same reasons that they used to use COBOL, it is easy to learn, uses English words, and almost anyone can learn it.
Still don't discount C#, C++, Java, Python, Perl, and many others, they can interface with Visual BASIC via the
Remember, Slashdot does not have a -1 disagree moderation, and no, troll, flamebait, and overrated are not substitutes.
This should give you a decent indicator of my opinion, when I am interviewing programmers for a job I always ask "What is your favourite language?". You get some interesting answers when asking them why, but the main reason I ask that is because anyone who says VB is automatically not in the running for the job. VB does not give you good foundations for programming, therefore if I need a programmer to be versatile then there is no way I want someone that thinks that VB is the be all and end all. Rapid Application Development is for proto-typing only (or for your own hobby simulations if you are so inclined).
VB never was a good beginner's language. I'm sure there are 1,000 posts by now outlining the bad habits that VB creates, so I will give you an anecdote.
.Text was the default property on textboxes.
When I started VB, I didn't know what types were, I didn't know what strings were, I didn't know what arrays were.
I didn't know that
Now, with that in mind, imagine a fairly complicated program written using textboxes as strings, and in order to hide the textboxes, I would make the form really big and then make it smaller to hide them.
Once I figured out the existence of strings, I would parse strings to death instead of use arrays.
But then I became fairly proficient in VB, and I started C++. I tried mapping the VB paradigm of thinking onto C++, and that failed miserably.
So, it took me a year or two to unlearn VB habits, and then it took me a year or two to learn good programming habbits. This is inefficient. Learn things correctly the first time.
You see, in other languages, if you do something the 'wrong way', it is much harder to hack your way into making things work. In VB, if you do something the wrong way, you can just add more and more horrible monsterous ass-backwards code and eventually get things working.
The problem with VB is that it wants to be like C++, but at the same time it wants stupid stuff like variants and default properties, 'on error goto', etc. This doesn't help anyone.
And as for VB.net, it is just C# with horrible, horrible, awful keywords and semantics. Just learn C#.
Buckle your ROFL belt, we're in for some LOLs.
No, VB is not a good beginner's language for programmers thinking on current and future understanding of languages.
And worst in 2006...
Some reasons:
- Lack of natively data structures and powerful objects.
- To build new data structures you need to focus in the language and in the problem, not like C when you can focus on the raw problem/algorithm.
- No real OO, just COM Native.
- No multithreading.
- Bureaucratic syntax to do very simple things (i.e: adding a new element to a sized dimmed array, writing to files, etc)
- Weird syntax (like putting and underline to specify object's events)
But, it has some interesting properties:
- Rapid testing of COM/ActiveX Objects.
- Rapid development of COM/ActiveX Objects (for example: Office Addins)
But for learning... think in another language.
Is it a good beginner's language? Hell no it isn't. It gives the programmer unrealistic expectations of what can be achieved with the computer. Too many of the inner workings of the computer are withheld from the programmer for them to really understand how things WORK.
Personally, I think it's a toy language because it separates the programmer from the bare metal of the machine, with too many layers of abstraction, confining the programmer to a "digital playpen" much as you would confine an infant. I have similar feelings about C#.
I started with C64 BASIC, moved on to C, then C++, then I learned MSVC and VB at about the same time, and after that I picked up ASM.
I really think I learned a lot by following that path, and I'm glad I learned how much work went into writing a GUI long before I dragged and dropped my first VB app.
Reinvent the wheel only at either a lower cost, greater effectiveness, or your own personal enrichment and satisfaction.
Is TwIPS just something you made up?
Well, yes and no. I originally ran into TwIPS when taking programming classes at St. Louis Community College. Like, you, I've been completely unable to find any reference to it since then, so I wrote my own. I'd be happy to hand my code base over to anyone who feels like working with it, or drop it onto something like SourceForge.
The twelve instructions are Go, End, Move (copy, really), Jump, Conditional Jump, Subroutine Jump, Return, Add, Subtract, Multiply, Divide, and Print. Ok, that's really eleven, but I couldn't remember what the twelfth one was when I recreated it. It uses a 1000 character text array that acts as your entire memory space. You have to allocate buffers, create your initial variables and strings, and store all your code in that space. It will start execution at location 000, the Go was just something that I remember them including, so I did, too.
I don't think I have any of the exercises I had my students do written down, though, so you'd have to make up your own. It's not too hard.
Wake up - the future is arriving faster than you think.
Begginers should learn how to think, instead.
In University, I was taught general concepts: structures, recursion, iteration, abstractions, conditions, Logic and programming paradigms, never tied to a specific language. In fact, we used a pseudo-language to express the solution to a problem.
Using languages belonged to lab practices.
Pascal, X86 assembler, basic, fortran, C, scheme, SQL, you name it.
Learn principles, you'll be able to tell which language is right for the job.
And you'll always be able to catch up with whatever shows up in the ever changing madness of IT.
no
"Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
* learn several languages
* learn languages with widely differing characteristics
* learn them well enough, i.e. you don't know a language until you've used it for at least one non-trivial task
* take a data structures and analysis of algorithms course, after you know at least two languages
Most of the people I would consider bad programmers know only one language, or know one well and others very superficially, like the engineers who can write Fortran in any language*.
To show what it's possible to overcome, I started out with BASIC in high school. BASIC does not cause permanent brain damage, if you limit your exposure to it.
Before college I had moved out to assembly (PDP8); in college I was exposed to COBOL, FORTRAN, PL/I and 360 assembler. In graduate school I moved up to Pascal and C, but I also finally took a decent algorithms and data structures course - and learned Lisp. Those last two things were probably as important as all the previous experience in making me the hacker I am today.
* This is not meant to be a slur on all engineers who program when necessary - just the ones who do it badly, over and over again.
To a Lisp hacker, XML is S-expressions in drag.
Anyways, Microsoft made good on their promise and transformed VB from an easy to learn language into an object oriented power house, with lots of OOP functionality thrown in.
The implication seems to be that OOP makes something "serious" or "better". I have to disagree with that. OOP has not objectively proven to improve business apps. I agree it may work well for systems software where interfaces tend to be more stable, but that does not extrapolate to biz apps very well where the "swappable device driver" viewpoint does not really apply and hierarchical taxonomies are inferior to set-based taxonomies. Set-based taxon.'s are just a better fit for biz apps because they don't hard-wire mutual-exlusiveness into the groups. Polymorphism is ugly or out-right does not work with set-based taxonomies. If you don't believe me, try it.
Table-ized A.I.
if your code is "largely nested" you're doing it wrong.
I have a positive modifier on Troll. When I mod someone Troll their karma should go UP!
Personal Experience Speaking...
.NET incarnation, in upper level application development.
VB is pretty good at teaching programming or getting people started in programming. Being a modern 'basic' it can allow people to get the initial concepts of variables, and put them to use in a syntax that reads like common english language, yet not leave them making a turtle follow lines around a screen.
The simplicity is also good to find the 'clicks' or points where people get it. When not teaching this stuff you forget these clicks, even explaining concepts as variables is something that is hard for some people to catch, even if they understand algebra.
VB also can do some fairly advanced things now, especially with the current
A person could start with no programming background, do the hello world, and stick with VB and make a career from it producing ok software.
Pascal is also another easy to understand language (designed to be a learning language even), and it with Borland's support can be almost as powerful as C/C++. So it is another good starter language that a career can be made from - especially Europe, Delphi does quite well there in comparison to the US.
I have taken a couple of roads with people, using either VB or Pascal as the 'get it' starting language.
Then I progress them to some advanced levels in each language, and along the way contrast in another language, C is the poster child here for the contrast. It can show complexity and also levels of creativity not normally used in the other languages. Useful comparisons to stuff they are currently learning as well as 'wows' like a line of C code that is very complex and recursive, but performs as much as an advanced program.
This lets them 'click' along the way, and will hopefully keep perspective and the certain 'creative' element that syntax complexity of C draws out of people.
The 'creative' complexity has to be nurtured, even if you are keeping people in Pascal or VB for their career (or they are not going past that). It was the creative of 'how to make it work' concepts that are so dominate in C that define 'good programmers', because in the old days, we had to make it work.
Yes it is nice to drag a button on the screen and have the IDE do the work for you, but without some of the 'creative' what ifs, and 'how can we' questions, programmers won't be more than glorified form designers, and that is sad for them to invest time in learning something and not fully getting it from both angles. (The logical syntax and function and the creative inspiration of thinking outside the box.)
Programming is one area of expertise that definately benefits from bridge-brain individuals. Creative Logic at its finest...
And sadly if the person you are teaching don't fully click in either direction (logic or creative) then you lead them down the road they are good at, and let them pair with a person or team that fills in the other side...
I don't have a link on hand. But I recall reading Microsoft reps touting VB.NET maintining the VB6 ability to "code and debug until the code works". To me that should be sufficient reason to not use VB.NET. If you want another reason, please excuse my following rant.
The language is not isomorphic. For example:
'2 ways to declare an array of types.
Dim s1 As String() = {"1", "2", "3"}
Dim s2() As String = {"1", "2", "3"}
'2 Different ways to instanciate a class
Dim o1 As Object = New Object
Dim o2 As New Object
'Support for
Dim n As Integer = 0
n += 1
'But not bits (booleans)
Dim f As Boolean = False
f And= True
'3 (unsafe) ways to convert to a char (and using reserved words for variable names?)
Dim [char] As Char
[char] = "C"c
[char] = CChar("C")
[char] = CType("C", Char)
Granted in the last case you see use of the "TCHAR" and other such macros in C/C++ code. But these are macros. And not part of the language.
MS also ported in many of the old global VB6 methods such as Trim(). Even though this is a redundant method of the String class. Format() is another example. But in that case the behavior differs from the the method of the same name in the String class.
From experience I've found it easy to transistion from one language to another. Except when that language had "quirks" like those in VB.NET.
VB.NET was a very successful way to move VB6 coders to VB.NET. But is it a Good Beginner's Language?
No. Hell no.
You sound like a math snob yourself - packet routing and cryptography are both much more interesting mathematically than computationally. But don't summarily dismiss multithreading. Many recent benchmarks on recent multicore processors point to the immaturity of multithreading in modern client software. It seems that many compute-intensive programs don't make effective use multiprocessor hardware.
Real Computer Scientists have to run their programs on Real Computers, which means you can't ignore the hardware. And recent trends point to increasingly parallel processing architectures.
C isn't a high level language. For a high level language it would be something like
do something to (x,y) forall (x,y) in image
Or better yet
do soemthing to image. Even in C++ images are likely to be objects and modified via methods.
I mean if you really want to speed this up, you really need to understand:
what can the GPU respond to
how can I best buffer the information
since the real slow down is going to be the bus not the cache if you are going to go pixel by pixel
*yawn*
:-)
I've been programming in BASIC for around 15 years. I don't know why, but during that whole 15 years BASIC has copped flak.
The reasons have changed over the years. Originally, the complaints were that it didn't have variable declarations and encouraged "spaghetti code" through the GOTO command. Variable declarations were added, and SUBs/Functions and even classes/objects were added to the language.
Then there was a complaint that you couldn't make "true executables", so M$ added that option.
Then the complaints were about its lack of providing object inheritance. Now we have that. But the flames continue.
Why?
It's clear that the flames are not due to any particular aspect of the language, since the arguments have changed over time. And so has the language. I can tell you that modern BASIC has almost nothing in common with the original ANSI BASIC except for a few legacy keywords (FOR..NEXT, GOTO, DIM etc). Modern object-oriented computer languages are so similar that I have more than once been reading a bit of code in a magazine article and only realised half way through that it was a different language from VB.
I wonder if other languages get as persistently flamed. I believe the real reason is due to the language's very name: BASIC. I suspect that if the language was instead called "Visual Complex.NET", all of this flaming of the language would cease.
[waves hand] This is not the repost you are looking for.
P.S. People can actually tell the difference between C# and VB code?
I've never used any of those languages, nor do I forsee the need to.
I learned Logo in middle school.
I learned QBASIC (ugh), Pascal (ugh), COBOL (ugh++), and RPG (!) in high school.
I learned C, C++, VB, and Java in college.
Those landed me a job doing CAD drawings for a small company.
Eventually, I learned PHP on my own.
That gave me enough "experience" to get a PHP job.
So what have I learned?
- All the languages I was told were going to be useful "in real life" have turned out to be mostly worthless (perhaps I haven't reached the level of the C++ stuff yet... I'm reserving judgement on that one).
- Concepts are best learned from pseudocode, not from any particular language.
- Comfortable syntax is learned from languages that are built around a particular concept.
- Databases are the real reason OOP is a necessity. Data objects are your friends.
- Most programmers are not architects/designers. They're too impatient. They jump right in and code a plate of spaghetti before thinking about how long they'll have to support that code. Some of them do fairly well at making things efficient, though, so you can't fault them all.
I don't know ASM, so I tend to disagree with the hardcore "I coded in ASM uphill both ways naked in the snow blah blah blah bring me my cane, sonny" crowd. It's time to pull the plug, gramps.
I also disagree with the academics that sip lattes, listen to jazz, wear berets, and say that everyone should learn and use [insert obscure language here] and piss and moan that it's not happening. Man up, nancy. The real world uses real tools for real work. Your toy languages are not going to be used. So take your Smalltalk, LISP, and Prolog back to your local Starbucks where you can "ooh" and "aah" about how "advanced" they are.
If you're going to teach concepts, do so. Don't use a language as a crutch. Teach in pseudocode. Give examples of "how-to" in multiple languages. If you're going to teach a language, don't teach concepts. Teach what that tool is supposed to be used for. PHP is for dynamic web pages. C++ is for, well, damn near anything, but not dynamic web pages. Java is kinda like C++, but slower (unless you fuss with compiling natively), and can be multi-platform with minor changes. Perl is great for a quick, unreadable script. VB is nice if you want to spend lots of money for the ability to build piddly-shit apps that only you will use.
And remember that not everyone learns things the same way. Someone who "just gets it" with C, C++, Java, PHP, and similar-looking languages might have an aneurysm just looking at code in Objective C. (I did.) Sometimes a familiar syntax matters. And yet, that same person (now bleeding out on the floor) might have no trouble at all deciphering Visual Basic or Pascal even though they're different. (Again, me.) That should tell the designers of the aneurysm language that the syntax is annoying, shitty, and induces aneurysms. (Go Smalltalk and Obj-C!)
Question: Is Visual Basic still a good beginners language?
Answer: Mu.
I agree, python is excellent for beginners. The prompt allows people oto easily explore new functions and concepts while the indenting syntax forces neat code.
"Anonymous could not immediately be reached for further comment." - International Business Times
You introduced a bug ;)
That should return EXIT_FAILURE or something, not 1.
... I'm a beginner programmer, I've been teaching myself a bit of VB and a bit of Ruby (actually, I'm too busy to do either really - but php comes into my classwork at some point so...). I must say that I feel that Ruby is a better language for beginners.
...on the basis that it's the fastest route to getting a computer to do something either mildly impressive for the first time or mildly useful for the first time. Also once the Beginner has a reasonable grasp of Prolog they'll have a lot of exposure to principles that would be considered advanced to the Beginner starting with Java/C# or Python/Ruby etc.
I'm a programming teacher. I've found that the first language that students learn steers their mind in learning coming languages. If they learn perl first and then java, they tend to try to write java programs as if it was perl. If they learn java and then perl, they try to write perl as if was java.
This is important, because a language that forces you to think in a sane way from the beginning will make you write better code in the future, regardless of which language you then use.
My first recommendation for choosing a beginner language is thus: whatever you do, don't choose a language with sloppy type checking and/or sloppy syntax. Force the students to learn that explicit variable declarations, explicit type casts and explicit data structures are good things.
A large perl application structured in an object-oriented fashion, containing explicit variable declarations and care taken to type casts will be a lot easier to maintain than the same application without these features, eventhough the conceptual functionality can be the same. I would thus prefer a student who learned java as a first language to write that perl application in front of a student who learned perl as a first language.
The conclusion of this is that languages like perl, python, C and visual basic are poor choices for first languages. Languages like java, pascal and delphi are good choices for first languages (eventhough the latter two are a bit dated in regards to object-orientation).
Why do you say small?
I worked for one of the worlds largest investment banks during the late 90s and the GP is quite right... a LOT of finacial management/trading code was inside excel macros. These traders (most of whom enjoyed 6 figure bonuses each year) knew more about Excel Macro programming (in VBA) than anyone at Microsoft. VBA supports COM based CreateObject calls, so if the trader was masochistic (and most of them are), you'd find loads of esoteric code calls to Reuters/Bloomberg feeds and such.
Obviously the more sensible route would have been to ask the dev team to knock up a 'real' application - but their requirements were so bespoke, that the IT dept just left the traders to it....
-Jar.
Together, We Can Make Slashdot Better. I Do NOT Mod ACs. - Check Me Out
Call me a cheapskate if you like, but why should someone who just starts programming be forced to use a language which he has to buy before he can do anything? There are just too many free alternative available which beginners can install at home (without getting in legal troubles for using copied stuff). Actually i'd recommend using python or ruby for learning programming and a supplementary course which does teach the workings of a computer at a lower level (processor, registers, interrupts, memory access, etc.).
Sorry, but this is a very wrong view of what computer science or programming really are. There are three things being mixed up here which are largely separate bodies of knowledge and any decent computer science program separates them out as such.
Algorithms - This is the core of Computer Science; learning to think like a programmer and to break problems down into logical chunks is tantamount to becoming a computer scientist. With this at the core, a language should then be chosen that most facilitates this. When I started college 10 years ago we used Pascal in our lab for our algorithms courses (which notably were just about implementing the theory we covered in the course), and that at the time was a very sane choice. Java's a pretty sane choice these days. Lots of things are really, but something like C forces people trying to learn how to think in algorithms to be side tracked by all of the tedious low level junk. (For reference, I'm a low-level C systems programmer at a large software company, so this isn't some "C sucks" wankery.)
Computer Organization - This is usually cross listed in electrical or computer engineering, and for good reason. This is where you figure out how hardware works. C and assembler (RISC works fine here) are appropriate in such a course. As this course naturally follows introductory algorithms courses, you can here put the theoretical constructs learned there in context.
Operating Systems - Memory management doesn't belong in either of the above and certainly saying that you learn "memory management" with C is pretty silly. You learn how to malloc and free stuff. Whoopee. "Memory management", in any sort of interesting way, is better treated in an Operating Systems course where you can track what exactly is happening down from the programming language, into the OS and finally at the hardware side. It can be put in context of what actually happens when you call malloc and what that means. Fundamentally, you don't understand anything more about memory management from a basic C course than if somebody tells you in a Java course "When you use 'new' some memory will be allocated, and when you're done with that object there's a thing called a garbage collector that will eventually come and give that memory back." Memory management is a non-trivial topic and one that certainly goes deeper than simple allocation.
So, is VB suitable for any of this? Not really. VB is kind of orthogonal. Like you said, it's fine for someone who needs to solve certain sets of tasks, but doesn't want or need to bother with really understanding deeper concepts.
Here are my estimates after running through a few that I was curious about:
Java 500 Python 180 Ruby 120
Notes:
- I counted on a few pages, and estimated the rest.
- This was strictly a word find, so Java and JavaScript would both show up above (and yet, I understand that they are different languages). For this reason, I couldn't easily count C or VB/Visual Basic.
- Some people mentioned the same language by name multiple times, and thus got counted multiple times.
- Mentioning that "LanguageX sucks" would still register a count for LanguageX. Further, a message with the Subject "Re: Python", that said "No, try Ruby" would count once for Python and once for Ruby.
- I am not trying to make any point with this, other than seeing which languages people are mentioning. Someone might want to run a more elaborate test, as this has no statistical significance.
- This message was constructed to the same number of references to each language counted, so if someone wants to count again, I don't throw off the count much (for the languages mentioned - even LanguageX).
As there isn't one good language for every programming task, there isn't one good language for teaching everything in CS. My thoughts:
I personally think it's not a bad way to introduce kids to programming, although not necessarily the best platform to teach programming.
When I first started programming, the school I was at started us off with VB6. It was just an introductary class to computers, and they taught us some basic programming stuff. I was really excited though, because it allowed me to easily make programs that looked like real programs. (at the time I had only ever really used GUI programs) The next level programming class, which I happily signed up for, moved on to C and taught us how to properly code, but VB was what really helped to grab my interest.
BASIC
Perl
OO Perl
Java
c#
Perl is a good first language. They should first learn it the wrong way, then go back and learn the OO aproach... Learning Java first, will help them to appreciate c#.
FIRST language should be something basic that takes input and output in a top down order via a console.
You don't want to waste your time with complex syntax and cryptic keyword concerns until you understand the basics of programming.
Start with an interpreted language like Perl that is forgivable (with effort in consistently readable formatting, actually assume that for every language from the start). This will give you a taste of the power a few lines of code can do for you, using almost plain english (obviously Perl can be poorly written and obfuscated, but you do it the long with with nice naming conventions and formatting).
Then learn some basic ANSI C and/or Pascal (maybe highly structured Java basics at a stretch which is what they're teaching at first year uni here). This will teach you code structure and algorithms, the grounding you need for OO and will teach you to be comfortable with some advanced syntax before GUI code starts being thrown into your code.
Then it's time for your choice of Java, VB.Net or C# for more advanced GUI apps and to learn OO.
I personally went from shell scripts and some ANSI C hacking to Uni where I did Pascal and ANSI C in the first year, while learning Perl at work.
Recently I played with some Java tutorials and got a basic grasp, this year I'm taking a 1-semester course on C#, this and the VB course requires basic programming concept knowledge before applying, which seems about right.
Unfortunately I don't have experience with VB, but while learning C# all the code shows the VB.net code snippets that do the same thing. It's not clear what the code does but it could be from never learning VB basics.
All I can say now is that I'm having fun learning C# and it was extremely easy to get into since I understand the basics from ANSI C/Pascal/Perl. This is my first GUI exposure and I'm looking forward to learning more OO through C#.