http://www.perlmonks.org?node_id=328973

Dear Monks,

I don't consider myself as a programmer and I probably never will. The reason why I got envolved with scripting language was because I worked as an application engineer for a software company that had a COMMAND interface in their application and that allowed interaction using initially Cshell and later Perl to communicate with it. So I had to learn Perl and without knowledge of any programming language I basically have been able now for one year to do anything I want with Perl, most of the things I learned, I have learned them from this site. I feel that I can do basically anything with Perl from powerfull user interfaces to Database communications, to comprehensive IO handlings but even I can all do this I still don't believe I talk the language of a programmer. Still many things on this site will be completely Chinese for me. However their is a trend switching that is pushing me to look at something else. Software I use is using Visual Basic language and using Visual Basic objects, ..... So I have convinced myself to have a look at it and I have purchased Visual Basic.net. The only thin I have done is installed it and that is it. Now I would like to know if :

1) I totally wasted my money because everything it can do Perl can do.

2) For a novice programmer who can do anything in Perl because of a strong supportive non-commercial organisation will be getting nowhere using commercial software that require dollar for every question needed.

3) With Perl knowledge and nothing else then Perl knowledge it is impossible to learn Visual Basic from the box.

Any other ideas or suggestions you have on this. Is the right thing to do. Everybody is talking so much about Visual Basic.net.

Does anybody knows on any good sites that can be called an equivalent of perlmonks for Visual Basic ?

janitored by ybiC: Moved from Seekers of Perl Wisdom to the Meditations section, as this really isn't a specific question reqarding Perl or perl

Edit by tye, remove A tags

Replies are listed 'Best First'.
Re: Visual Basic .net and Perl
by Corion (Patriarch) on Feb 14, 2004 at 12:16 UTC

    In my opinion, you never can know "enough" programming languages. The first (programming) language you learn is the hardest, the second is much easier, and after the third, it almost becomes easy.

    You should look at what strengths Visual Basic .net has to offer - for example the very easy and convenient designing of user interfaces and its very transparent integration and interoperation with other Win32 components and applications.

    For example, demerphq is using Visual Basic frontend programs to launch and configure Perl programs which do the hard work.

    Of course, you can always think that you wasted your money, because in the end, everything that Visual Basic can do can also be done in Perl, much in the same way that you can use a chain-saw to hammer in nails as well - learn your tools and their strengths, weaknesses and common uses is the advice I can give to you.

      The first (programming) language you learn is the hardest, the second is much easier, and after the third, it almost becomes easy.
      Obligatory counterexample:

      1st: COBOL

      2nd: C++

      3rd: Assembler

Re: Visual Basic .net and Perl
by hardburn (Abbot) on Feb 14, 2004 at 18:40 UTC

    Programming languages don't differ in what they can do, but in what they make easy. I like Perl because I find it makes a wide range of tasks very easy. However, there will always be something that Perl just isn't good at and nothing you or me can do will change that, short of redeveloping it into a completely new language.

    I haven't learned the .NET version, but I've found regular VB to be good at doing one thing: make a quick and dirty GUI that you never intend to run outside a Win32 system. With .NET, you may or may not be able to use it on other systems via Mono (a Free Software .NET runtime), but this isn't assured. I've also heard that in VB.NET, there are a lot of features that make it look more like C# and that many people are skipping the VB bits entirely and going straight for C#.

    ----
    : () { :|:& };:

    Note: All code is untested, unless otherwise stated

Re: Visual Basic .net and Perl
by Mr. Muskrat (Canon) on Feb 15, 2004 at 00:58 UTC

    I used to have a license for VB 4. It was nothing like the BASIC I grew up using. I used it for maybe six months before I found Perl. I did not even think twice about uninstalling VB. Perl is simply awesome.

    At my previous place of employment, I had a license for VB 6 that I used to assist me in porting some VB code (that my predecessor had written) to Perl. Did I mention how awesome Perl is?

    It's not that I don't like VB... I simply hate it! Perl however is really quite awesome.

    Had I gotten to you prior to your purchase, I would have recommended VC++ .NET. I finally have a license so that I can learn C++ (and learn how to start writing some XS modules). C++ skills can be used on many platforms while VB is well limited to one platform right now. (Mono is working to fix that though.) It's too late for me to convince you not to buy a license for VB .NET so instead I'll just point you to some good resources of .NET info. You can even do .NET with Perl. Isn't Perl awesome?

    Updated the ".NET with Perl" link to three links.

Re: Visual Basic .net and Perl
by l3nz (Friar) on Feb 14, 2004 at 19:50 UTC
    You'll likely find Visual Basic rather expressionless if compared to Perl, and you'll miss the covenient use of things like arrays of hashes of arrays, but I don't think the migration will be so hard as to learn one's first language. As other monks say, VisualBasic is actually good at GUIs and it makes quite convenient to automate Windows objects or to create automatable Windows objects. This means you can link it with Perl in many different ways - have a look at Win32::OLE, then you can use each tool for what it does best.

    In general, I prefer Perl for my own stuff, but that's mostly very quickly written and text-oriented. If I have to write a piece of code I'll rapidly move to another Windows workstation, I'd write in in VB and let it polish and package for me.

Re: Visual Basic .net and Perl
by disciple (Pilgrim) on Feb 15, 2004 at 02:24 UTC

    I use VB.NET and C# for building web applications for a local government agency. I have found that it is a very good model for building web apps. I can only assume that building windows guis in VB.NET will be just as good. I make this assumption because the web model has been designed to mirror the Windows gui model.

    As a language it is very lacking compared to Perl, however the Framework Class Library (standard with the .NET framework) is extensive; in fact, it is huge. It include Hashes which, are called HashTables. You can use arrays and HashTables to build complex data structures just as you would in Perl. However, many of the features that Perl implements as language features, the .NET languages implement as classes.

    IMO by learning another programming language you are expanding your toolset and that can only help. You may decide that Perl is still your favorite, but at least you have others to choose from for the task at hand.

Re: Visual Basic .net and Perl: learn the former; use the latter.
by jonadab (Parson) on Feb 15, 2004 at 01:41 UTC

    /me agrees with Corion. I will NEVER have any real use for Visual Basic and don't even own it, but I don't regret having learned it. Nor do I regret having learned Fortran or Cobol, though I'm unlikely to ever use either of those, either. The only language I regret wasting time learning is Lingo.

    Perl is a very practical language, and I think you'll keep coming back to it, but don't let that stop you from learning others; I'm not letting it stop me. When I was a novice programmer, knowing only BASIC (the line-number variety -- GWBASIC if you're familiar with that), I took a high-school class in Pascal. It revolutionized the way I wrote BASIC. I went back to BASIC, incidentally, rather than continuing to use Pascal, but just knowing a second language, different from the one I was using, had changed the way I thought about certain things and greatly improved the quality of my code.

    In college I took courses in Cobol and Fortran, studied Inform on my own (which I recommend, incidentally; the way it does objects is just really cool, and the Designer's Manual is top-notch), picked up courses in C++ and Pascal (again, but Borland Pascal 7 this time, more capable than what I'd used before), and started using QBasic instead of line number BASIC. By this time I was writing things in BASIC that are not normally written in BASIC. Because it was the only language I had an interpreter for on my PC, but I was thinking (and programming) like someone who knew multiple languages. If I dig out that QBasic code now it's moderately embarrasing (all the languages I'd studied were either procedural or object-oriented, and it shows, and the only OS I'd used was DOS, and that shows too), but it was still way better than you normally expect to see in BASIC.

    Then I picked up elisp and subsequently Perl and have not looked back -- except, my knowledge of those other languages (especially BASIC, Pascal, Inform, and elisp) greatly influences the way I write Perl. I no longer think in BASIC or elisp and translate to Perl like I did at first; I think exclusively in Perl now; in fact, I don't think I remember QBasic well enough to think in it anymore, and when I work in elisp, I find myself slipping back and forth between thinking in elisp and thinking in Perl. But still, my style is influenced by my background.

    After Perl, I learned enough Python to get a basic feel for its style and had a brief look at PHP. I came back to Perl, but I don't regret the time I spent learning those other languages. Now I'm in the process of learning scheme, which I'm pretty sure I won't ever use on a regular basis, but I want to understand some of its concepts (continuations, particularly) in order to expand the way I think about programming. I want to be comfortable with a programming Perl according to a multiparadigmatic approach (something Perl is particularly good at, BTW), and so understanding different paradigms is very useful to me. After scheme I want to learn Smalltalk, and I'm debating about Haskell, prolog, unlambda, and maybe Java -- none of which I expect to use on a regular basis, but all of which I think could teach me something, something that will be useful when I write Perl code.

    In summary: Yes, learn a second language. VB is perhaps not the *most* useful choice, but who cares? It is *a* useful choice (useful in the sense of what learning it can teach you), and you can get around to the others afterwards. VB does have the virtue of being fairly easy to learn, and every extra language you learn makes it easier to learn others. Go for it.

    Plus, if you're on Windows, VB is not just (not, IMO, even primarily) a programming language -- it's a macro toolkit for the OS (and a pretty good one, IMNSHO). You won't use it for network programming or serious text processing, but if you want to slap together a quick dialog box that asks the user a question and then changes a setting in the control panel, VB is fine for that. When I had access to it in college, I used it for that kind of stuff, more than for any real programming.

    But more important than what you'll use it for is what it will teach you. Your second language is a significant step forward. Don't hesitate to take it.


    ;$;=sub{$/};@;=map{my($a,$b)=($_,$;);$;=sub{$a.$b->()}} split//,".rekcah lreP rehtona tsuJ";$\=$;[-1]->();print
      I have to disagree about not sure what network programming you are referencing, but I use Visual Basic Express to do various task on different servers and PC's. I also used VB to import data to MS-Access, SQL, execute Queries, and even create queries. Don't get me wrong I am liking perl, but I like a GUI. I am working on a VB program to manage PERL scripts at the site I am assigned to. The perl programmers constantly are changing folder paths and numbers in perl scripts and copying them and creating a new bat file. With VB they no longer have to do that. So all languages have a purpose. It is like a Phillips vs flat head screw drivers. They both work, just with specific screws. Non really is better then the other. And sometimes you can use a flat head driver with a Phillips screw, but can't do that in reverse.

        Wow, thread necromancy.

        These days I'm working a lot in C (which I am learning by studying the NetHack codebase; yes, I realize this is a terrible terrible approach to learning C and will no doubt cause irreversible brain damage, but I am doing it anyway) and trying to get around to learning Ruby finally. I still think in Perl mostly, but I now occasionally catch myself trying to write "else if" in Perl instead of "elsif", due to the C.

        The perl programmers constantly are changing folder paths and numbers in perl scripts and copying them and creating a new bat file.

        They almost certainly should not be doing that. There are like fifty different ways to avoid hardcoding paths, and most of them are better than hardcoding paths. Using VB instead of Perl isn't really relevant to this, though: I can assure you that the tendency for programmers to hardcode paths, particularly when they are either A) not very good or more likely B) in a hurry, transcends language. PHP programmers do it. VB programmers certainly do it (and often in a way that breaks in various interesting ways if you try to run the code on a different version of Windows, because figuring out how to use the %BLAH% API really correctly is something of a dark art). Lisp programmers do it. Perl programmers do it. C programmers do it -- or do it in Makefiles, which is just as bad, unless you subject yourself to the agony that is maintaining good .ac and .am files, and then it's still not really good. Ruby programmers do it. Inform programmers don't hardcode paths, but that's because Inform programs don't directly do anything with files at all, so that exception really doesn't count.

Re: Visual Basic .net and Perl
by dthacker (Deacon) on Feb 14, 2004 at 23:41 UTC
    IMHO, There is nothing wrong with learning another language. There is nothing wrong with learning a language used in Microsoft products. We are starting to use VB .Net as a GUI at my place of work and one of the programmers told me yesterday that he was really enjoying the experience. He said it had regexes and the syntax reminded him of perl at times. Go Learn! Have Fun!

    Dave
    Code On!
Re: Visual Basic .net and Perl
by MCS (Monk) on Feb 15, 2004 at 17:57 UTC

    I had to learn a bit of vb.net for an Object Oriented Programming class and I found it to be quite painful. Basically the teacher was writing a book in vb.net and decided he would make everyone use it for class. I would have much prefered Java or C++ for the course but that's all in the past now thank god. (and I had to scramble to find a windows machine as I was using linux exclusively)

    The biggest problem I have with visual basic is that it requires windows. Now if you just want to make some nice looking (but very slow) scripts, vb is the way to go. However, you can't use them on any other operating system. So how important is that to you?

    The best reason for using perl is great communities such as this. Because perl has such a wide audience and a great deal of people who really know there stuff, you have a lot of people to help you. However, with visual basic you have a much smaller community willing to help you. I think a large part of this is because perl is open sourced and vb isn't. Therefore, you get a lot of people who have benefited from perl and decide to help others who want to use it.

    It certainly won't hurt you to learn visual basic... you just have to decide what you want to do with it. If you are looking to write more powerful programs, I think you took a step in the wrong direction.

    If you get bored with vb.net, I'd recommend taking a look at something like Java or possibly even c++. I think those languages will be more useful in the long run.