Results 1 to 18 of 18

Thread: Made me smile: VB is bad

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2009
    Posts
    547

    Made me smile: VB is bad

    "If you haven't noticed, most languages are based off of C. Therefore it is improper syntax because it isn't close to C. "



    I never realized a language was bad because it is different

  2. #2
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Made me smile: VB is bad

    VB's biggest problem has always been that it attracts so many hack coders. Being accessible has its drawbacks. A lot of the disrespect is enhanced by so much junky code and dumb questions asked.

    C for that matter was essentially a misbegotten hybrid of Fortran, Algol, and PDP-8 assembly language. There is little there that you could call innovative.

    The original strength of the language was that as a low-level language the compiler could be tiny. Because of its origins in a regulated monopoly (AT&T) compilers spread widely for free or nearly so.

    Small and free compilers were probably the main reason C became so popular. Even Microsoft gives away its C and C++ compiler.

  3. #3
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Made me smile: VB is bad

    One thing that annoys me is that VB still uses "End", etc which, is the improper way to go about closing your program. I can't remember if c, c++ or c# have that problem or not?
    Last edited by Nightwalker83; May 16th, 2012 at 01:59 AM. Reason: Fixed spelling!
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  4. #4
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Made me smile: VB is bad

    You can easily do the same thing in most compiled languages. For Windows this boils down to a call on ExitProcess before you've cleaned things up.

  5. #5
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Made me smile: VB is bad

    Yeah, but encouraging bad practice that is not a smart way to go about things.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  6. #6
    Fanatic Member esposito's Avatar
    Join Date
    Sep 2003
    Location
    Perugia, Italy
    Posts
    961

    Re: Made me smile: VB is bad

    Quote Originally Posted by Nightwalker83 View Post
    One thing that annoys me is that VB still uses "End", etc which, is the improper way to go about closing your program. I can't remember if c, c++ or c# have that problem or not?
    This is the equivalent code in Delphi/Lazarus:

    Code:
    Application.Terminate;
    Since I discovered Delphi and Lazarus, VB has become history to me.

  7. #7
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: Made me smile: VB is bad

    I only use End by accident....when I accidentally delete the word following it, such as Sub or Function. Of course, the compiler catches that pretty quickly as it pretty well wrecks the code. I don't believe that anybody encourages the use of End to exit applications, so it is just an item that is there. Kind of the dirty laundry of the language, like GoTo.

    C-style languages sure are popular. How unfortunate that such an archaic syntax should be so highly prized.
    My usual boring signature: Nothing

  8. #8
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,957

    Re: Made me smile: VB is bad

    I personally don't think it's the 'job' of the language to discourage bad practice. The language should let you do pretty much anything you want. It's the job of the programmer to use the tools in his arsenal apropriately.

    To bring up a recent debate, I don't think VB6 was wrong to support On Error Resume Next. I do think, on the other hand, that a developer is almost certainly wrong to use it. Although if the developer knows what they're doing, understands the cost and why it's considered a bad practice and still has a valid and justifiable reason to use it, then go ahead. They should expect to be challenged on it though.

    I once had a conversation with a hardware programmer who thought VB6 was "Bad" because it was too easy. You've gotta love that kind of conceipt.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  9. #9
    Fanatic Member namrekka's Avatar
    Join Date
    Feb 2005
    Location
    Netherlands
    Posts
    639

    Re: Made me smile: VB is bad

    Quote Originally Posted by kayleigh View Post
    "If you haven't noticed, most languages are based off of C. Therefore it is improper syntax because it isn't close to C. "



    I never realized a language was bad because it is different
    And compared to human languages?

  10. #10
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Made me smile: VB is bad

    Quote Originally Posted by FunkyDexter View Post
    I personally don't think it's the 'job' of the language to discourage bad practice.
    No! It's the job of the person/people developing the language to discourage bad practice... Take English for example... it's an absolute joke how some people use it and those are only the person that have English as their first language.
    when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
    If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
    https://get.cryptobrowser.site/30/4111672

  11. #11
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Made me smile: VB is bad

    END and GOTO just point out the "scripting" nature of the language from it's earlier days - mainframe days. COBOL has the "STOP RUN" commabd.

    Think about it for a second - this all started on paper-based hardware - you sat at a READY PROMPT and entered RUN PROGRAMNAME to start the application (if it was compiled).

    When all we had is interpretted versions of BASIC you had to LOAD your program into memory - or type it in line by line.

    BASIC was an answer to COBOL when I started coding in the late 1970's. COBOL had commands that were several keywords long - everything was "literal" ("ADD YEARS TO AGE" is a real command). BASIC introduced "symbolic" representation - you could actually use a + and - sign to do math.

    Just because C looks great in a railroad diagram - with every path clearly defined...

    I still use GOTO in T-SQL STORED PROCEDURES - it's required in a scripting language. Not everything is about proper loops and what not. Loops are more of the unnatural thing to have in a scripting language. GOTO doesn't create spaghetti-code - it's just highly used in spaghetti-code.

    I use this code in a splash screen to tell if I'm in the IDE - is this bad use of VB?

    Code:
        On Error Resume Next
        Debug.Print 1 / 0
        gDebugMode = (Err.Number <> 0)

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  12. #12
    PowerPoster dilettante's Avatar
    Join Date
    Feb 2006
    Posts
    24,487

    Re: Made me smile: VB is bad

    Quote Originally Posted by szlamany View Post
    END and GOTO just point out the "scripting" nature of the language from it's earlier days - mainframe days.
    Er, no.

    There is nothing "scripting" about VB, or Basic in general for that matter.

    While the earliest Basics as well as many recent ones are interpreted instead of compiled, that doesn't make them "scripting" either. And if it does then all .Net languages as just as "scripting" or more so!

    And for that matter look at VBScript, which is a scripting language. No "End" and no "Go To" in the language at all unless you count the single vestigial instance it has for VB-compatibility On Error GoTo 0 meaning "turn off structured error handling."


    Basic was never "an answer to Cobol" (nobody spells these with all-caps anymore, they are names now not acronyms). It was "an answer to" Fortran actually, and intended for use by non-programmers. It dates to the mid 1960s.

    It later became popular because it was easy to learn and small interpreters could be written for early personal computers. It's popularity grew because of the established user base and the lack of an alternative: Pascal never caught on, C was meant to be a harder to use low-level language. What else was left?
    Last edited by dilettante; May 17th, 2012 at 08:59 AM.

  13. #13
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Made me smile: VB is bad

    My first 20 years in computers were all DEC mini's - PDP-11's and VAX'es.

    I have never seen any application code ever written on any of these hardware systems that was not either BASIC of COBOL.

    All consultants and employees came in one or both of those areas...

    The blue cross/blue shield health insurance type companies still use those machines with code written in COBOL.

    So I meant BASIC vs COBOL just as a point in my own employment history...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  14. #14
    Hyperactive Member Max Peck's Avatar
    Join Date
    Oct 2007
    Posts
    384

    Re: Made me smile: VB is bad

    Quote Originally Posted by szlamany View Post
    My first 20 years in computers were all DEC mini's - PDP-11's and VAX'es.

    I have never seen any application code ever written on any of these hardware systems that was not either BASIC of COBOL.
    You have now. Back when I was working for Turbitrol (early '80's) we were writing FORTRAN IV and DEC Assembly on the PDP 11/44 under RSX/11M. We also had a few mini VAX systems around but I never got 'round to working with those. Some of our field machines were smaller PDP11's.

    -Max
    The name's "Peck" .... "Max Peck"

    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." - Red Adair

  15. #15
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Made me smile: VB is bad

    That RSX was realtime stuff - right?

    I never went there - only did applications for student and financial administration.

    Same old DB app's I'm still doing today - in Javascript with jQuery.

    jQuery is so cool - and interestingly enough the book I read to get in deep with the inner workings was written by Yehuda Katz who worked for DEC from 1979 to 1993 and was part of the team that built DECforms.

    Small world...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  16. #16
    Hyperactive Member Max Peck's Avatar
    Join Date
    Oct 2007
    Posts
    384

    Re: Made me smile: VB is bad

    Quote Originally Posted by szlamany View Post
    That RSX was realtime stuff - right?
    Yup. I was working on a water/wastewater treatment system at the time. Pretty cool stuff. We would hang an RTU (Remote Telemetry Unit) on just about anything you wouldn't want to stick your hand into. My part of the system was called SIG (Signal Definition Subsystem) which defined the RTU points to the central system.

    -Max
    The name's "Peck" .... "Max Peck"

    "If you think it's expensive to hire a professional to do the job, wait until you hire an amateur." - Red Adair

  17. #17
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,104

    Re: Made me smile: VB is bad

    Quote Originally Posted by Nightwalker83 View Post
    No! It's the job of the person/people developing the language to discourage bad practice... Take English for example... it's an absolute joke how some people use it and those are only the person that have English as their first language.
    Fo' shizzle! I'm totally down with that.
    My usual boring signature: Nothing

  18. #18
    Hyperactive Member
    Join Date
    Oct 2007
    Location
    Godzone, oops Oz
    Posts
    355

    Re: Made me smile: VB is bad

    Quote Originally Posted by Shaggy Hiker View Post
    I only use End by accident....when I accidentally delete the word following it, such as Sub or Function. Of course, the compiler catches that pretty quickly as it pretty well wrecks the code. I don't believe that anybody encourages the use of End to exit applications, so it is just an item that is there. Kind of the dirty laundry of the language, like GoTo.

    C-style languages sure are popular. How unfortunate that such an archaic syntax should be so highly prized.
    Strangely worked on a banking application that utilised GOTO due to it being quicker for transaction process than GOSUB .... RETURN. A lot of top down coding involved Wasn't a vb app btw.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width