Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
×

Is Visual Basic a Good Beginner's Language? 1100

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#?"
This discussion has been archived. No new comments can be posted.

Is Visual Basic a Good Beginner's Language?

Comments Filter:
  • Why not both? (Score:2, Insightful)

    by Anonymous Coward on Tuesday March 07, 2006 @05:37PM (#14869894)
    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.
  • No. (Score:2, Insightful)

    by neoform ( 551705 ) <djneoform@gmail.com> on Tuesday March 07, 2006 @05:37PM (#14869895) Homepage
    It is a completely unstructured language that promotes very bad coding practices and allows for poorly writen applications to run anyway.
  • Bad idea (Score:2, Insightful)

    by 77Punker ( 673758 ) <spencr04 @ h i g h p o i n t.edu> on Tuesday March 07, 2006 @05:38PM (#14869900)
    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.
  • Re:No. (Score:3, Insightful)

    by hexghost ( 444585 ) on Tuesday March 07, 2006 @05:39PM (#14869905) Homepage
    I agree. I'd personally recommend Java, as most colleges and classes are using it, plus it lets learners go straight into OO and learn good practices.
  • still a toy (Score:2, Insightful)

    by dunkelfalke ( 91624 ) on Tuesday March 07, 2006 @05:40PM (#14869919)
    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.
  • Re:No! (Score:3, Insightful)

    by Locke2005 ( 849178 ) on Tuesday March 07, 2006 @05:42PM (#14869935)
    Python or Ruby, yes. Not C++; you'd be much better off with Java than C++.
  • by Anonymous Coward on Tuesday March 07, 2006 @05:43PM (#14869936)
    Python is a great starter language.
  • Not really. (Score:5, Insightful)

    by c0l0 ( 826165 ) on Tuesday March 07, 2006 @05:44PM (#14869949) Homepage
    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/ [ruby-lang.org]
  • by joekampf ( 715059 ) on Tuesday March 07, 2006 @05:44PM (#14869954)
    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
  • I'd go with C# (Score:5, Insightful)

    by hal2814 ( 725639 ) on Tuesday March 07, 2006 @05:44PM (#14869956)
    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#.
  • by martinultima ( 832468 ) <martinultima@gmail.com> on Tuesday March 07, 2006 @05:44PM (#14869957) Homepage Journal
    I'd personally like to suggest trying out Python [python.org]. 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 [sf.net] for yourself [sf.net] 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.
  • Re:No. (Score:4, Insightful)

    by ObsessiveMathsFreak ( 773371 ) <obsessivemathsfreak.eircom@net> on Tuesday March 07, 2006 @05:45PM (#14869963) Homepage Journal
    Let's stop referring to it as a programming language too, please.

    I sympathise with your sentiments, but VB is a turing machine just like all the rest of them [sourceforge.net]
  • I'm a fan of Java (Score:3, Insightful)

    by egomaniac ( 105476 ) on Tuesday March 07, 2006 @05:45PM (#14869973) Homepage
    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.
  • sort of. (Score:2, Insightful)

    by Captain_Stupendous ( 473242 ) on Tuesday March 07, 2006 @05:46PM (#14869976) Homepage
    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...
  • Good ... for what? (Score:5, Insightful)

    by rongage ( 237813 ) on Tuesday March 07, 2006 @05:46PM (#14869982)

    I guess this depends on what you qualify as "good"...

    • VB is good if you want to write apps for Windows
    • VB is good if you don't care about other platforms
    • VB is good if you don't care much about stability
    • VB is good if you want to learn the "wrong way" to code (who needs type enforcement)
    • VB is good if you want code that you can read but not understand

    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!

  • dont learn vb (Score:4, Insightful)

    by Tester ( 591 ) <olivier.crete@oc ... .ca minus author> on Tuesday March 07, 2006 @05:47PM (#14869990) Homepage
    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.
  • by Bogtha ( 906264 ) on Tuesday March 07, 2006 @05:50PM (#14870015)

    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#?"

    "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 [oreilly.com] 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.

  • Try COBOL (Score:2, Insightful)

    by Chapter80 ( 926879 ) on Tuesday March 07, 2006 @05:51PM (#14870023)
    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.
  • D'oh! (Score:5, Insightful)

    by stuffduff ( 681819 ) on Tuesday March 07, 2006 @05:51PM (#14870026) Journal
    Microsoft's language offerings are the result of some other people's way of deciding how things should work. While Microsoft is not alone in this practice, they are the topic of this article. I can't even count the times that I have seen the following: A programmer sits at an IDE, and on the screen is something like this:

    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.

  • Re:No. (Score:3, Insightful)

    by neoform ( 551705 ) <djneoform@gmail.com> on Tuesday March 07, 2006 @05:54PM (#14870049) Homepage
    Do you teach someone to speak english by teaching them ebonics first? No, you teach them proper english with proper grammar.
  • Re:No. (Score:3, Insightful)

    by chasingporsches ( 659844 ) on Tuesday March 07, 2006 @05:54PM (#14870060)
    have you USED VB.NET? or C#? i can do anything in vb.net that i can do in C#, and it makes my head ache less. i can do C++ programming all day long, mind you... but in terms of getting things done quickly and powerfully... i'd much rather write VB.NET code than anything else. especially if i'm getting paid to do it. you must be talking about VB 6, in which case i'd agree with you. VB.NET is an OO, structured, efficient, powerful language. and i'm a microsoft hater as much as the next guy.
  • by Spectre ( 1685 ) on Tuesday March 07, 2006 @05:55PM (#14870071)
    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.
  • Re:No! (Score:3, Insightful)

    by LWATCDR ( 28044 ) on Tuesday March 07, 2006 @05:55PM (#14870072) Homepage Journal
    "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.
  • Re:No! (Score:5, Insightful)

    by AuMatar ( 183847 ) on Tuesday March 07, 2006 @05:55PM (#14870075)
    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.
  • Re:No. (Score:2, Insightful)

    by bateleur ( 814657 ) on Tuesday March 07, 2006 @05:58PM (#14870106)
    Actually I do have two small children and I most definitely do neither of those things. I taught them first to communicate in whatever ways they found easiest and most effective - it certainly wasn't correct English. Your analogy isn't bad at all!
  • Re:No. (Score:2, Insightful)

    by in10se ( 472253 ) on Tuesday March 07, 2006 @05:58PM (#14870107) Homepage

    While I certainly don't agree that VB (specifically VB.NET) is a good choice for beginner programmers, I would have to disagree that VB is not a structured language. As the original article states, it is now a fully developed OO language which means you can teach all the appropriate theory on classes, objects, methods, properties, inheritance, etc. However, as a first language, there are too many nuances in VB that could easily confuse a beginner. One of the major strengths of VB is that you can quickly create applications with little work - while great for an advanced programmer, this exactly what you don't want for a beginner.

    I am not a Microsoft hater like much of the Slashdot community, but I do personally hate VB and VB.NET because of its syntax. If you want to go with .NET, C# is definately the answer. If VB is your only background, it is much harder to pick up the more tried-and-true languages such as C, C++, and Java.

    There is also the issue of platform independence. While the Mono project is well on its way to supporting the .NET languages on Linux, the only true support for .NET is Windows-based. To limit a new programmer to Windows might hold them back.

  • Re:No. (Score:2, Insightful)

    by RetroGeek ( 206522 ) on Tuesday March 07, 2006 @05:58PM (#14870108) Homepage
    It is like the difference between a sedan and a sports car.

    The sedan is easy to drive, has power everything, automatic transmission. The sports car has manual rack&pinion steering and a manual transmission.

    Both will get you from here to there, but with the sports car you need to pay attention. The upside is that with the sports car you have much better control over what you are doing.

    Yes it does take several objects to read and write a file, but then you have complete control over HOW the file is being read and written, including inserting your own filter classes.

    With power comes complexity.
  • 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.

    An important point to note here, is that most programmers nowadays don't need to be aware of this. At least not to the extent they used to.

    More and more, business and industry needs software to simply automate simple tasks. As processing power increases, as memory space grows, it's not necessarily the case that the basic tasks people need done will grow to match them. Thus it becomes less important for a programmer to optimise or worry about optimisation.

    In addition, although more programmers will be required to create software, they will not be required to delve into programmings basic complexities. It's not required you know about opcodes and memory addresses to write HTML, and soon it will be th ecase that you won't need to know when coding business apps. At all.

    In short, the future legions of greasemonkey coders will be using Ruby on Rails, not C and FORTRAN. When the job gets too big, complex and nasty for them or a hardware upgrade to handle, they'll call in the high priced consultants who can still code in low level procedural languages.
  • It's decent. (Score:5, Insightful)

    by FishWithAHammer ( 957772 ) on Tuesday March 07, 2006 @05:59PM (#14870120)
    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.

    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 .NET crap does).

    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
  • Re:No. (Score:3, Insightful)

    by AKAImBatman ( 238306 ) * <akaimbatman@gmaYEATSil.com minus poet> on Tuesday March 07, 2006 @06:00PM (#14870126) Homepage Journal
    Never, ever, ever, ever start a beginner programmer with Java. The OOP features are guaranteed to confuse the poor soul and turn him/her off to programming forever. The best option is to start a new programmer off with a traditional BASIC variant such as SmallBASIC [sourceforge.net]. Such BASICs can be used to teach a new programmer about how software executes one line after another (don't laugh, this is a big problem for new coders), control structures, and how the computer stores/interprets numbers and strings.

    I only wish we still had command line interpreters around. It was so nice when beginners could execute their instructions directly OR add them to a program. It made playing around and learning so much quicker.

    Once they graduate to more complex programming, something like C is a good choice to introduce concepts like functions, data structures, pointers, libaries, compilers, and linkers. Once they get to the point where they start prefixing every function with a module name, then its time to introduce them to OOP and Java. The Java stuff should make a lot of sense at that point. ("You mean I can group these functions... err... methods together, then store the data inside that grouping so that I don't have to pass a STRUCT around? Sold!")

    The result of this education is that you'll have a well-rounded programmer who's ready to run out and attack any problem. New languages should be easy for him/her to grasp, and they should be looking to learn more computer science beyond just language constructs.
  • by RingDev ( 879105 ) on Tuesday March 07, 2006 @06:01PM (#14870137) Homepage Journal
    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.

    Next up. Right tool for the job. If you're interested in embedded applications, coding on linux, or high performance apps, going .Net is not going to be your tool of choice.

    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
    { //Code here
    }

    -Rick
  • Re:Bad idea (Score:3, Insightful)

    by 77Punker ( 673758 ) <spencr04 @ h i g h p o i n t.edu> on Tuesday March 07, 2006 @06:04PM (#14870174)
    Well, I suppose it'll make you lazy. This particular article, however, is not about programmers. It's about people who are wanting to become programmers. Someone with little to no low-level experience has absolutely no idea what the IDE really creates.
  • Re:Not really. (Score:5, Insightful)

    by digidave ( 259925 ) on Tuesday March 07, 2006 @06:06PM (#14870202)
    I was corrupted by VB in my youth. It really does teach you bad programming practices.

    Go with Ruby. It's such a lovely language.
  • Re:Yes. (Score:4, Insightful)

    by egomaniac ( 105476 ) on Tuesday March 07, 2006 @06:08PM (#14870217) Homepage
    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.

    This doesn't even make sense. Java is a general-purpose programming language -- you can write absolutely anything in it. Client software, server software, command-line tools, graphical tools, compilers, games, anything. What do widgets have to do with things?
  • Re:Why not both? (Score:2, Insightful)

    by AKAImBatman ( 238306 ) * <akaimbatman@gmaYEATSil.com minus poet> on Tuesday March 07, 2006 @06:09PM (#14870226) Homepage Journal
    I don't think the grandparent (who is now, IMHO, unfairly rated at -1) was referring to grammar. The point I got from his post was that anyone who *just* learned about performance threading/sockets and considers himself a serious programmer, is anything but. The Java/C++ "snobs" are off thinking about how to implement a new compression algorithm, or how to improve packet routing on a cryptographically secure Peer 2 Peer network while the VB "programmers" are patting themselves on the back for "high performance" multithreading and sockets.

    As you say, those are not real Computer Scientists or Engineers. They're sysadmins with delusions of grandeur.

    VB always has been and always will be a RAD tool. Nothing more, nothing less.
  • Re:No. (Score:3, Insightful)

    by ObsessiveMathsFreak ( 773371 ) <obsessivemathsfreak.eircom@net> on Tuesday March 07, 2006 @06:10PM (#14870235) Homepage Journal
    Yes it does take several objects to read and write a file, but then you have complete control over HOW the file is being read and written, including inserting your own filter classes.

    If you have to go to such trouble, why did you leave C++ in the first place?

    Java is a language designed for people who already know how to program. It starts off, from day one, with object orientation concepts, scope, namespaces, system calls, and in some Hello world cases, typecasting. All this verses a one liner in other languages.

    Using Java as a teaching language is a recipe for disaster. Students won't grok it, will abuse its framework, and come away with a totally backwards understanding of how programming works. That is if they don't walk away in disgust at the first example.

    Showing someone Java's "Hello World" as their first program is an insult every andragogical principle ever written. It's a personal insult to each and every student in the class, and a clear indicator of the incompetance and/or disinterest of the educator.
  • Re:still a toy (Score:2, Insightful)

    by galonso ( 705202 ) on Tuesday March 07, 2006 @06:10PM (#14870240)
    It's certainly not a toy, but it's not written or employed in a way that lends itself to good programming practices. Frankly, if a person had to learn with VB I would point them to VBS employing classes, because you can get somewhere close to standard programming practices.

    c, I would argue, is a fine language to learn the 'under the hood' aspects of programming, and c++ or java for moving to the OOP world; not because they are better than Smalltalk, but because they are in wider use. C#, really, is no worse than java, the main thing is to avoid the GUI wizards and such early on so that you have a good foundation.

    I am not surprised, yet am somehow disappointed, that there are so many bashers who seem to bash for religious (anti MS or language snobbery) reasons instead of thinking this through. Yes, I know where we are, but please!

  • by sedyn ( 880034 ) on Tuesday March 07, 2006 @06:15PM (#14870291)
    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.
  • Re:Why not both? (Score:2, Insightful)

    by Nutria ( 679911 ) on Tuesday March 07, 2006 @06:16PM (#14870295)
    real computer scientist.

    "Computer Science" is so bogus. Sure, some people with CS degrees go on to get PhD's and disover better sorting algorithms, but 99.9% of us "just" become programmers.
  • Re:No! (Score:3, Insightful)

    by brpr ( 826904 ) on Tuesday March 07, 2006 @06:26PM (#14870376)
    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.
  • Re:No. (Score:5, Insightful)

    by Rei ( 128717 ) on Tuesday March 07, 2006 @06:26PM (#14870384) Homepage
    I agree. I would recommend:

    1. (Insert favorite *simple* language here): simple meaning that you can't do much with it, and what you can do is very easy and obvious. Qbasic comes to mind, as that's what I learned with, but there are many which fit the bill.

    2. C: Turn the language from a magical tool that does what you want (poorly) into something that actually reflects the underlying architecture. Helps the programmer understand why their previous language performed so badly. Widely used (and mimicked), so they know a useful language.

    3. C++: Now that they understand what's going on under the hood, teaches them good coding habits - objects which clean up their own memory, const variables, object oriented programming, generic programming, etc. Widely used (and mimicked)

    4. Any other language(s) here: they already know the basic concepts, so it's just implementation details.

    You *could* have them branch out at any other stage, assuming that they've already learned the prerequisites. For example, once they've just learned to program (#1), they could do basic python. They won't be able to write maintainable or fast code, however. If that's not a problem, power to them!

    I haven't used VB since Windows 3.1. I understand it's really changed ;) Back then, I wrote a pi calculator in VB. It ran half as fast as the equivalent program in Qbasic. That's really saying something; I dropped VB as soon as I saw that.
  • Re:Yes. (Score:5, Insightful)

    by MythoBeast ( 54294 ) on Tuesday March 07, 2006 @06:55PM (#14870604) Homepage Journal
    Sixty hours? A year? You make this amount of practice sound like a lot of time. I'm fifteen years into C++ and I hack kernel and could write my own compiler. Nonetheless, I'm still learning about some of the things it can do.

    I'm not a programmer because I love to program, I program to do a function, to make some part of my job easier.

    This is a truly key statement in his post. You have to ask yourself what you want to do with programming. If you want to write software that'll do interesting things for your own personal use, then VB is probably about right. It won't produce elegant code, but it will produce simple functionality fairly quickly, and you can build your own tools with it. In a society where computer illiteracy is becoming as problematic as written illiteracy, this kind of programming language definitely has a place.

    On the other hand, if you want to produce programs for OTHER people to use, you shouldn't flinch at spending a year learning how to make a programming language do what you want it to do. It's like mechanical or civil engineering. If you want to build a shed out back or a trebuchet then go ahead and pickup some parts at Home Depot and start nailing things together. If you want to design anything that ANYONE ELSE is going to use, like an office building or an automobile, then you had better figure out how to use something a little more sophisticated than 2x4's.

    A lot of people will come back with the argument that there should be something easier to learn than C or C++ for the beginners, but in my experience that's a flawed argument. Learning a language is an investment in time, and most people are unwilling to discard that investment. Instead, they've bolted on afterthoughts to the programming languages to make them more functional. For that reason, VB6 was always a horse designed by a committee. If you want to learn how to program like a professional then start with a professional language.

    The one exception is Assembly Language. Every time I try to teach people how to program I start by teaching them the Twelve Instruction Programming System (TwIPS), which is a simplified subset of assembly. With this they learn the bare bones of what any piece of software does, how algorithms function inside a computer, and what the instructions are really doing.

    And when they get around to learning C++ they find it considerably less tedious than if they had hit it directly.
  • So can I. The #Region " Windows Form Designer generated code " seems to be a bit of a giveaway, no?

    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.

  • Where to begin? (Score:5, Insightful)

    by Theatetus ( 521747 ) on Tuesday March 07, 2006 @07:09PM (#14870736) Journal

    This question is wrong in so many ways...

    • VB is badly OO and confuses the language and the library too much.
    • 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).
    • VB ties you down to using Windows, and Windows is a bad environment to learn to program in.
    • 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.
    • 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.
    • VB teaches bad, verbose naming and programming habits.

    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.

  • Re:No. (Score:4, Insightful)

    by gnuLNX ( 410742 ) on Tuesday March 07, 2006 @07:11PM (#14870749) Journal
    "I only wish we still had command line interpreters around. It was so nice when beginners could execute their instructions directly OR add them to a program. It made playing around and learning so much quicker."

    at the command prompt type: python

    BTW I think Python is without a doubt the best language to teach a begginer with.
  • Re:Why not both? (Score:5, Insightful)

    by Durandal64 ( 658649 ) on Tuesday March 07, 2006 @07:18PM (#14870826)
    It depends on what you're trying to teach the person. If you want to teach someone how to write programs using programming languages, then yes, things like VisualBasic will probably be good starting points. But if you want to teach someone the fundamentals of computer programming, including proper memory management, efficient use of resources and how the compiler is going to see the human-readable code, then I think that C is still the best introductory programming language out there.

    Basically, I'm saying that students of computer science shouldn't start off with VisualBasic. But if you're a hobbyist or a network engineering type who needs to be able to write working scripts and stuff like that, sure, VisualBasic is as good as any other ultra-high-level language, I suppose.
  • Re:Try COBOL (Score:4, Insightful)

    by jaydonnell ( 648194 ) on Tuesday March 07, 2006 @07:25PM (#14870863) Homepage
    I don't believe I was a good programmer until I learned NOT to think like a computer. High level languages let you accomplish a great deal with very clear and concise code, but it is hard to write clean code if you look at a problem and try to solve it by thinking "what does the computer need to do". Making functions that take an input and generate a specified output is easy. Making them faster isn't too hard either. Making code that is easy to understand, debug, change, and maintain is the hard part. I don't believe learning assembly and thinking like a computer helps much in this area. This doesn't mean that learning assembly isn't a good thing, it means that it's not a high priority in my mind.
    when I say programmer I mean someone who designs and writes applications.
  • Re:No. (Score:5, Insightful)

    by Decaff ( 42676 ) on Tuesday March 07, 2006 @07:32PM (#14870910)
    Once they get to the point where they start prefixing every function with a module name, then its time to introduce them to OOP and Java.

    I disagree. This is the wrong way to introduce OOP, as it treats it as some sort of high level way of managing code rather than as a fundamental technique that can be used at all levels. My view is that the best way is to teach something like Smalltalk or Ruby initially in a procedural style, and then show that everything in the language is an object, with methods and properties. Then, perhaps, the compromises made in a language like Java can be explained. One thing that should definitely be avoided is C - for goodness sake teach a safe language like Pascal instead. Beginners should not be dealing with pointers to memory (most developers never need to anyway).

    OOP needs to be taught at the start, not as an optional add-on.
  • Why not? (Score:3, Insightful)

    by blueforce ( 192332 ) <clannagael@gmaCHEETAHil.com minus cat> on Tuesday March 07, 2006 @07:37PM (#14870948) Homepage Journal
    Is VB a good beginner's language?

    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 /. - is that people are fanatical about their language of choice. Many times to a fault.

    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.

  • Re:Bad idea (Score:5, Insightful)

    by dedazo ( 737510 ) on Tuesday March 07, 2006 @07:40PM (#14870974) Journal
    Mmmkay, since I've noticed that you're some sort of shining star around here and your insight tends to get modded up regularly, I'll try to be as polite as possible, even though my first instinct is to say you're full of it.

    Your first problem is that you're mashing VB6 and VB.NET. They, for all the similarities in syntax, are really completely different languages with a completely different runtime going underneath. Now, since this is a question about a "beginners language", it's unlikely that someone would mistakenly rant off about VB6, since it has been largely deprecated. Anyone starting with "VB" now would use VB.NET, with or without the pretty IDE. I think that's clear enough from most of the posts I've seen so far in this article.

    Some of your points are valid vis-a-vis VB6. It was completely tied to the IDE (the preprocessor infact was the IDE) and it supported a semi-OO model, which is like saying "a little bit pregnant", but regardless, most of these limitations were related to the fact that VB6 was essentially a COM server and consumer platform. The lack of implementation inheritance is a good example of that - since COM is a binary spec, it does not support it. Polymorphism and aggregation OTOH, which permeate COM, were. So pre-VB.NET, "Visual Basic" was both hobbled and all the better off for being tied to intrinsically to the COM spec. VB6 didn't behave like it did because someone at Microsoft didn't have anything better to do, it did because it had to play by the rules - the rules of COM. You could either understand these limitations (if they were to you) and live with them, or just use C++. By the time Microsoft released ATL, COM-centric coding in C++ became extremely easy - I always chuckle at the quitessential "yeah I know C++ and VB sucks, but I don't know a replacement for the GetObject() function and my life suxx0rz" claim from people who think it's really cool to bash VB because it has a large following of hobby developers that know nothing about software design, as if it was impossible to do anything meaningful with it. But I digress.

    Along comes VB.NET, which is essentially the VB6 syntax ported to the .NET CLR. Like the other "mainstream" languages that target the CLR/CLI, VB.NET is essentially a full OO implementation, unless you're willing to call Python or Java "toys" because they don't support multiple inheritance or the concept of friend classed as implemented by C++.

    So you have a fully OO language (for all practical purposes) with generics, operator overloading, partial classes, etc. that can be easily decoupled from the IDE - all you need is a text editor and the compiler, though most people prefer the IDE route. It just happens to look like BASIC. Other than that, I think it's a good beginner's language. Wouldn't you agree?

    That's as far as VB currently goes... the rest of your rant is just the usual bashing a platform that is no longer supported or in active development, nor understood (obviously) by people like you.

  • Re:Bad idea (Score:5, Insightful)

    by Mr. Underbridge ( 666784 ) on Tuesday March 07, 2006 @07:45PM (#14871028)
    I agree that clicking on a wizard is not programming, but for someone who's just starting, built-in IDE tools (like wizards) can really help. As an expirienced user, I have no problem manually typing

    Bad idea. A new programmer should start with small command-line programs, and grow into coding bigger things *by hand* at first. Only when they understand exactly what the wizard does should they start using them as time savers.

    That, I think is the point of wizards - to save you time, not to do for you things you don't understand. When new users start using wizards, bad code WILL result.

  • Re:Yes. (Score:2, Insightful)

    by pionzypher ( 886253 ) on Tuesday March 07, 2006 @07:51PM (#14871084)
    There a link for TwIPS? googled with no luck. Sounds like something worth checking out.
  • Re:Why not both? (Score:3, Insightful)

    by NiteShaed ( 315799 ) on Tuesday March 07, 2006 @07:52PM (#14871093)
    It sounds like either he had no idea what their VB programmers did, or they had some fairly serious problems with their hiring practices.....If all they did was write meaningless programs that no one used, why did the company have them?
  • 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:

    "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration."
  • Re:Why not both? (Score:2, Insightful)

    by cybergenius1 ( 864183 ) on Tuesday March 07, 2006 @08:02PM (#14871167)
    I completely agree with your opinion on learning the fundamentals with C. I graduated with my bachelors about a year and a half ago and have been working as a programmer since. My school taught the basics, but only the very basic fundamentals. I really learned how to program on the job. The job entailed programming in ANSI C for 16 Bit DOS/OS2 Warp and 32 Bit Windows environments. On top of that, the environment we develop in is completely custom. The build scripts (batch files), editor scripts (vim), and all the configurations are custom. This was great for learning, but proved to be very time consuming. As my company has moved away from having to develop for DOS/OS2 Warp and is now strictly Windows I am enjoying not worrying about memory management issues so much (great memory overloading learning experiences). I don't know much about .Net yet, but from my experience thus far in multi platform development is Java is portable, C/C++ portable and .Net is not (yet). However I have seen C# .Net 1.1 framework running in a Linux environment (when not compiled to any windows DLL's of course), but not 2.0. Back to topic, beginners should pick up K&R C, read it, do the lessons, then move on to a series of books called "Write Great Code" by Randall Hyde.
  • by TheRaven64 ( 641858 ) on Tuesday March 07, 2006 @08:05PM (#14871181) Journal
    or that your compiler wouldn't just optimize the code in the first example anyway

    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) ->
    do_something(x,y).

    You compiler / runtime would then pick an optimal number of concurrent threads to do this with for your target environment.

    A lot of the time, going to a lower level is a bad idea because:

    1. You throw away semantic information that the compiler could have used for optimisation, and
    2. Your high-level language compiler is better at optimisation than you.
  • by xjimhb ( 234034 ) on Tuesday March 07, 2006 @08:14PM (#14871245) Homepage
    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)

  • Re:Bad idea (Score:4, Insightful)

    by object88 ( 568048 ) on Tuesday March 07, 2006 @08:15PM (#14871257)
    Given that almost all images are stored with x-adjacent pixels being stored in consecutive memory locations (or nearly interleaved, with other data between them), the first example stands a much better chance of minimizing cache misses.

    Thank you-- I'm going to try to keep that in mind. I appreciate the tip.

    But if they tried to teach that stuff in programming 101 (regardless of the language), the students would leave at the end of the semester complaining that they didn't get to do anything fun, and are less likely to want to continue. A new student will have a hard enough time getting a project working. If you teach complex subjects first, they're more likely to make simple mistakes, rather like the typo you had in your initial example.

    Let them get passionate about the subject by completing small tasks right away, then move on to the heavy material.

    For that matter, in your example, the first code was not a "bad idea", it was simply less efficient. It would have been less efficient regardless of the language complexity, and the concept or cache-misses can be taught regardless of language.
  • by PitaBred ( 632671 ) <slashdot&pitabred,dyndns,org> on Tuesday March 07, 2006 @08:19PM (#14871278) Homepage
    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.
  • by tyler_larson ( 558763 ) on Tuesday March 07, 2006 @08:44PM (#14871460) Homepage
    The only substantial differences from VB.Net to C# is syntax

    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 [gotdotnet.com], or one of about 20 other .NET languages. Don't bother with VB 6, it's going away.

  • Interview Question (Score:2, Insightful)

    by Cat 99 ( 640646 ) on Tuesday March 07, 2006 @08:59PM (#14871557)
    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).
  • by Xtravar ( 725372 ) on Tuesday March 07, 2006 @09:16PM (#14871675) Homepage Journal
    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.

    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 .Text was the default property on textboxes.

    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#.
  • by idlake ( 850372 ) on Tuesday March 07, 2006 @09:18PM (#14871686)
    A lot of people will come back with the argument that there should be something easier to learn than C or C++ for the beginners, but in my experience that's a flawed argument.

    Well, I'll come back with the argument that any experienced programmer should know better than to choose C/C++ voluntarily. The problem with those languages is not that they are tedious, the problem is that it's too easy to make mistakes in them even for the most experienced programmers.

    And the "we're so excellent, we can handle it" attitude is what really sets the mediocre programmers apart from the best programmers: the best programmers know that they can't handle it, they can at best muddle through in C/C++.
  • Re:No. (Score:2, Insightful)

    by Danga ( 307709 ) on Tuesday March 07, 2006 @09:18PM (#14871690)
    I agree that Java wouldn't necessarily turn some people off to programming if it is the first language used but I don't think it is a good starting language. My first language I was taught was VB and next was Java, and I have to admit they gave me NO clue about what was going on behind the scenes which is pretty important. It was not until I started classes in C/C++ that I really started to undertand basic programming and OO concepts as well as memory management.

    I think having to allocate and deallocate memory takes away the "magical" appearance that variables have in the first 2 langauges I learned, and it also forces you to understand how the computer works and most importantly how to write clean, memory leak free code. Personally, I believe having a garbage collector from the get go is a bad idea. It does make coding less of a hassle as there is less to worry about but learning how to manage memory is not a very hard concept to grasp and I wish I had started off learning about it from the very start.

    I think the best way to start programmers off is:
    1) Simple programs that only have a main function so they can play around and learn how/what variables are and how to interact with them.
    2) Teach them what arrays are and make them use them.
    3) Move on to simple functions.
    4) Let them create some structs.
    5) Have them create some simple classes and make sure they understand constructors/destructors.
    6) Teach them about basic pointer concepts and how to allocate/deallocate memory and have them create some classes that allocate memory and then check to deallocate it in the destructor.

    Thats how I wish I had started out, I think it would have made learning a lot of programming concepts easier for me.
  • by syukton ( 256348 ) on Tuesday March 07, 2006 @09:46PM (#14871843)
    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.
  • by ferespo ( 899921 ) on Tuesday March 07, 2006 @10:01PM (#14871911)
    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.

  • by dancpsu ( 822623 ) on Tuesday March 07, 2006 @10:05PM (#14871930) Journal
    The reasoning behind this is that C teaches a lot of basic (easy and complex ) things such a variable and memory, functions, types, stucture, control flow...After new programmers have done it the hard way, Python is great to...

    Why would you want to start with "the hard way"? Bringing students into a EECS program might benefit from starting out with C or even assembler, but for anything else it is overkill. Python teaches variables, functions, structure, and control flow as well, so I don't see the disadvantage of starting with Python. The main thing that Python does not teach is memory management and some of the more interesting bugs that C can produce.

    The main reason to introduce a student to more than one language is to begin without the more complex parts of languages like object oriented code, and even structured code. The nice thing about python is that you can start with procedural code, continue through structured code, and end up at object oriented code, introducing only a few concepts at a time.

    With C, you have the problem of explaining the main() function or doing handwaving before you get around to explaining functions. With Java, you have the problem of classes even before you get to a main function. When even the most basic program requires structured or object oriented code, you have a problem teaching it to beginners. Take the following examples:

    Java:
    class myfirstjavaprog
    {
    public static void main ( String args[] )
    {
    System.out.println ( "Hello World!" ) ;
    }
    }
    Student asks:

    What is a class?, What is that funny looking bracket?, What is public?, What is static?, What is void for?, What is main?, What are the parenthesis for?, What is a String?, What is args?, How come there are funny square brackets?, What is system?, What does the dot do?, What is out?, What is println?, Why are there quotes there?, What does the semicolon do?, How come it's all indented like that?.

    C:
    #include <stdio.h>

    main() {
    printf ( "Hello, World!\n" ) ;
    }
    Student asks:

    What is #include?, What are the greater than and less than signs doing there?, What is stdio.h?, What is main? What are the parenthesis for?, What is the funny bracket for?, What is printf?, Why is hello world in quotes?, What is the backslash-N doing at the end?, What is the semicolon for?

    Python:
    print "Hello World"
    Student asks:

    What is print?, Why is hello world in quotes?

    Get the picture?
  • Re:Not really. (Score:3, Insightful)

    by shutdown -p now ( 807394 ) on Tuesday March 07, 2006 @11:04PM (#14872176) Journal
    In 2006, I refuse to go anywhere near a language which lacks proper Unicode support.
  • by Euler ( 31942 ) on Wednesday March 08, 2006 @12:07AM (#14872437) Journal
    My beginnings were on QuickBasic, which looking back.. it kinda sucked, I only wish I had Python back then. But it's a fact that if I had to learn on C, I would have quit right then and taken up a sport instead of programming. :) It's not worth getting religious about, but i think *Basic, JavaScript, and Python are all reasonable choices for beginners. They can all be used in real applications as well. C and/or assembler is not a good idea until people are ready for it. I don't think there is all that much benefit to learning memory allocation, and all the complexities of declarations, pointers, page violations, header files, and compiler/linker headaches until you really need it.

    To be a good programmer, you will eventually have to study these things and more, including digital logic, system hardware architecture, and assembly. But I don't agree with the 'sink or swim' school of learning, most CS students I knew in college just sank unless they had some experience already. Learning more complex concepts in due time will help you with problem solving and analysis in the future, even if you don't really ever write in C, or design a CPU.

    Back when Basic was the only thing available to beginners there were some major elements missing. For instance it was nearly impossible to do any kind of dynamic data structures unless you somehow implemented your own heap in a giant array, only I didn't know what a heap was at the time. In that case, it would be pretty important to be able to write C functions instead. Now with Python, it becomes second nature to create dynamic data structures... you just append to a list. It was so easy, in fact, that I had to erase years of Basic and C habits out of my head before I could grasp how powerful and easy Python is.

  • by plastik55 ( 218435 ) on Wednesday March 08, 2006 @12:16AM (#14872474) Homepage
    if your code is "largely nested" you're doing it wrong.
  • by TheNetAvenger ( 624455 ) on Wednesday March 08, 2006 @12:24AM (#14872500)
    Personal Experience Speaking...

    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 .NET incarnation, in upper level application development.

    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...
  • Re:Why not both? (Score:1, Insightful)

    by Anonymous Coward on Wednesday March 08, 2006 @12:41AM (#14872563)
    hehe, any science that has to call itself science probably isn't really science.

    With the exception of physics and chemesty everything that is pretty universally excepted as science tends to end in ology.

    There are lots of smart people in the our field, just like other similar fields like mathematics (number science?), but in my experience CS is generally more like a field of engineering than a section of science.

    I guess it's hard getting recognition at university for a new field and hence putting "science" in the name. But you know what? Even though I went to school for CS my business card says has the word "programmer" on it, not "scientist". I'm sure the majority of us "scientists" have cards that say "programmer" or "software engineer" and nobody complains in the real world. You won't find a much better confirmation that we're not scientists than the way it actually is.
  • Re:Why not both? (Score:2, Insightful)

    by Fjornir ( 516960 ) on Wednesday March 08, 2006 @01:44AM (#14872800)
    VB has all the functionality of an OOP powerhouse but the syntax is different.

    The problem with VB.Net as a beginner language has less to do with the syntax being different in my estimation. It has more to do with the keywords which are used meaning wonky things in relation to their accepted use in OOP parlance. If you take the O'Reilly text on Windows Forms there's a lot of talk about how in C# it's a [foo] (but in VB say [bar])...

    That's fine and dandy -- VB can have its own keywords as much as it wants to... Until the serious student reads a language-agnostic text on the fundamentals of OO Design, lets say, and suddenly he finds that [bar] actually means something different than the [bar] he's been using and that the "right" word to describe it was really [foo] and the only reason he thinks it is [bar] is because VB.Net syntax makes a tremendous number of compromises to make the syntax familiar to users of VB4.

  • Re:No. (Score:3, Insightful)

    by kuzb ( 724081 ) on Wednesday March 08, 2006 @01:59AM (#14872851)
    Depending on the language, and the severity of the error, sure you can. Look at any person's PHP code where they've ignored things like defining variables before use and then accessing them even though they do not exist, using constants instead of strings in array (hash) keys which PHP automagically translates in to a string, using error suppression to stop error output from bad fopen() calls, and let's not forget that errors in MySQL queries won't stop the code from executing either. It's possible to have all kinds of errors, and still have a functional program. While I don't advocate this, it does in fact make your statement blatently false.
  • by Mattintosh ( 758112 ) on Wednesday March 08, 2006 @02:03AM (#14872864)
    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!)
  • Re:Python (Score:2, Insightful)

    by VoltageX ( 845249 ) on Wednesday March 08, 2006 @03:11AM (#14873062)
    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.
  • Re:Bad idea (Score:3, Insightful)

    by Hosiah ( 849792 ) on Wednesday March 08, 2006 @03:49AM (#14873159)
    A new programmer should start with small command-line programs,

    What sad world we inhabit when common sense is in such short supply that things like this have to be *told* to people - and be disbelieved anyway. I wouldn't expect to learn to drive by hiring somebody else to chaffer me around while I sit in the back seat with opaque glass blocking my view of the driver's seat - yet gullible unfortunates out there insist that they will learn to program by paying for somebody else's program to write programs for them.

    Believe it, folks: programming is a PHYSICAL activity. Do it in the console. Unplug the damn mouse and throw it in the closet. SWEAT! Type til your fingers bleed! You shouldn't touch a GUI IDE until you've generated at least your first thousand-line original code block.

  • Re:Why not both? (Score:2, Insightful)

    by Anonymous Coward on Wednesday March 08, 2006 @04:28AM (#14873253)
    "Computer Science" is so bogus. Sure, some people with CS degrees go on to get PhD's and disover better sorting algorithms, but 99.9% of us "just" become programmers.

    Sure, some people with Chemistry degrees go on to get Ph.Ds and discover new chemicals, but the vast majority of them "just" mix reagents.

    Sure, some people with Astronomy degrees go on to get Ph.Ds and discover new planets, but a lot of them "just" look at the moon.

    Sure, some people who have recieved B.S. degrees go on to get Ph.Ds and discover something new in their field, but 99.9% of them "just" get ordinary jobs.
  • by faid ( 959730 ) on Wednesday March 08, 2006 @06:11AM (#14873563)
    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).
  • Re:Why not both? (Score:3, Insightful)

    by Shaper_pmp ( 825142 ) on Wednesday March 08, 2006 @07:05AM (#14873746)
    Also:

    BASIC was designed as a teaching language, and while it was easy to learn its use of things like GOTOs meant it even sucked at that, encouraging bad programming practice long after it was generally recognised to be bad. Ok, maybe BASIC only allowed (and didn't punish) bad programming practice, but in the context of a teaching language the two things are pretty much equivalent.

    VB was always a shitty language, that carried on teaching bad programming practice. VB encouraged an entire generation of bad coders to write bad code, and because it was so easy the coders often never even realised how bad they truly were. (Contrast in C/C++, where if you're a bad coder you know all about it, because the language doesn't try to hold your hand and wipe your arse all the time).

    The only thing MS could do to make VB.NET remotely credible as a "serious" language (C/C++/C#/Java/whatever) was to... break backwards-compatibility and re-write it completely so it looked almost exactly like all the other serious languages.

    Every new version of VB seems a little more credible, and every version tends it more in the direction of C/C++/C#/Java.

    You do the math.
  • Both to expensive (Score:2, Insightful)

    by CuteAlien ( 415982 ) on Wednesday March 08, 2006 @07:45AM (#14873856) Homepage
    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.).
  • Re:Why not both? (Score:4, Insightful)

    by pdbogen ( 596723 ) <tricia-slashdot@ce r n u.us> on Wednesday March 08, 2006 @11:51AM (#14875412)
    I disagree. For many programming tasks, you are perhaps correct- but I still don't think computers have advanced enough so that a few lines in Scheme or [insert language of your choice] will make an operating system.

    Let alone an efficient operating system. You're not going to learn the fundamentals of programming from a language that does it all for you. Java, Scheme (apparently), Visual Basic.. There are *concepts* that you need to take away from things like manual memory management. Do you think these features magically appear in a language?

    Learning assembly went a long way towards my being able to understand how to optimize code in a way that makes sense, since it's going to be converted to assembly at some point. If I had never used a language lower-level than C, at best I might have understood this after years of trial-and-error. I shudder to imagine trying to learn to optimize code from using something like Java.

    Your basic argument seems to be that the fundamentals of computer science aren't relevant anymore because there are programming languages that abstract the user from them; this is akin to saying that you don't need to know how addition and subtraction work because we have calculators.

    Seems silly when you put it in terms that you're familiar with, doesn't it? And besides that, someone has to make the calculators.
  • Re:Why not both? (Score:5, Insightful)

    by Phisbut ( 761268 ) on Wednesday March 08, 2006 @11:51AM (#14875420)
    Disclaimer : My experience with VB stops at VB6. I have steered away from all that .NET stuff since then.

    I may sound old-school, and then maybe I am, but "programming" and "writing a program" seem like two different things to me. If all you want to do is write programs, then I think about any high-level language could be appropriate because programs can be written in any language and high-level ones hide all the ugly computer part from the programmer.
    However, if you want to learn to program, then you need some serious commitment, and you need to learn (or at least understand) assembly language, and then work with C or C++ or a language that actually lets you play with bits and bytes.

    One of the lead computer people at one of the major oil companies told me once that all that their Visual Basic programmers do is to write meaningless little programs that noone ever uses.

    VB is a quite high-level language, and is easy to learn (or at least fiddle with). That lead to a whole bunch of VB coders who pretends they are programmers because they can write programs. However, all they do is write lines after lines of VB code (and most of it is *click* *click* *click* through the UI), with no understanding whatsoever of what is really going on when the program runs. It is really nice when, with little effort, a program can be made and performs the desired operation. However, when a bug arises, those coders that don't understand the low-level stuff might not understand the source of the bug (and then sometimes blame it on someone else), and therefore can't debug their own application.

    Every programming language is a tool, and when a job needs be done, one should use the best tool for the job. I suppose there are some jobs for which VB is the best tool. However, when someone claims to be a programmer and only knows VB, chances are he doesn't program, he just knows where to click to create a dialog with some buttons. If he knows VB and C++, Java, PHP, Perl, Python, etc., he's more likely to understand what he does, and will probably write a good VB program if he needs to.

    Know your needs and know your wants. If you want to learn how to program, don't choose a language that will hide all the ugly stuff from you, because you need to know about the ugly stuff.

  • by chicovstheworld ( 744350 ) on Wednesday March 08, 2006 @11:54AM (#14875452)
    First off, VB isn't a good programming language, period, let alone a good one for beginners.

    As there isn't one good language for every programming task, there isn't one good language for teaching everything in CS. My thoughts:
    • You want to teach the UTTER basics (basic syntax, simple input/output, logic, flow control, iteration), use python, perl, or ruby. It'll get students' feet wet real quick, and show them that programming, above all, is fun, without intimidating them too much.
    • You want to teach memory management, pointers, basic data structures, and hardware? Use C.
    • You want to teach OOP? Use Java.
    • You want to really, really learn how all that hardware works (along with compilers, linkers, etc.)? Use assembly.
    • You want to teach recursion and some of the real art and beauty in programming? Use Lisp.
  • Re:This is crap. (Score:3, Insightful)

    by Ted Stoner ( 648616 ) on Wednesday March 08, 2006 @12:58PM (#14876191)

    Yah, what he said. Start out teaching how computers really work from a software perspective. Bits, bytes, boolean. Abstract if-then logic, do-loops, function calls and subroutines, heaps and stacks, program counters and stack pointers.

    After that, high level languages are just syntax and you have feel for what is really going on. Then add OO principles and pick a language. Crudely, in the last 25 years I've worked full time programming assembler, then C, then C++ then Java. A little VB on the side. Back to assembler and C for embedded stuff.

    Java strongly preferred by me. YMMV. Better than C because OO principles. Better than C++ because of simplicity (no #defines to create massively obfuscated shit). Free powerful IDEs and compilers. Tons of open source. If submerged in MS world consider C#. Java doesn't bind you to MS.

    But it depends on what you want to accomplish. I don't do a lot of GUI and I suppose Java isn't the best there. What works for me might be wrong for you.

    The answer as to whether VB should be used is the same answer as to the question of should abortions be allowed.

  • by Anonymous Coward on Wednesday March 08, 2006 @02:35PM (#14877172)
    To be honest, I never understood why some non-VB developers thought of VB as a 'toy' language, but that is for another article.
    It's not non-VB developers that think this, it's experienced, competent computer professionals that do.

    Because VB is not OS-portable. Commercial OSes come and go, but good code lasts, and profitable processes should survive with minimal porting cost when old hardware wears out and currently available hardware will not run the old OS. Minimizing recurring costs is an excellent way to be more profitable than your competition.

    There is plenty of room for "toy" languages, they solve a particular problem set. OS-specific problems, for example, are well suited to OS-specific languages, and rapid development is a must for that problem space. OS-specific languages are also viable candidates for teaching programming, as long as the teacher has mastered both teaching and programming in that language.
  • by maxII ( 83694 ) on Thursday March 09, 2006 @02:51AM (#14881218)
    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#.

Remember, UNIX spelled backwards is XINU. -- Mt.

Working...