Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. Why VB is popular in America!

Why VB is popular in America!

Scheduled Pinned Locked Moved The Lounge
c++phpvisual-studiocom
75 Posts 34 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M mikemar

    I don't get your point. VB.NET is base zero only. Classic VB used base zero by default although you could set an option to make it base one. I've always thought base zero was stupid for any language that doesn't make pointers and arrays synonamous. Personally though I'd like to see most languages let you pick the base so this argument is ended and because there are occasional times when numbers other than zero or 1 would be handy. In fact most languages before C and a few that came after that weren't influenced by C had this feature but this is one area that computer science has gone backwards IMHO due mostly to the influence of C.

    P Offline
    P Offline
    PIEBALDconsult
    wrote on last edited by
    #44

    mikemarquard wrote:

    let you pick the base

    Untested:

    public partial class Array<T>
    {
    protected T[] array ;

    public Array
    (
      int BaseIndex
    ,
      int Capacity
    )
    {
      this.BaseIndex = BaseIndex ;
    
      this.array = new T \[ Capacity \] ;
    
      return ;
    }
    
    public virtual int BaseIndex { get ; private set ; }
    
    public virtual int Capacity 
    {
      get
      {
        return ( this.array.Length ) ;
      }
    }
    
    public virtual T
    this
    \[
      int Index
    \]
    {
      get
      {
        return ( this.array \[ Index + this.BaseIndex \] ) ;
      }
    
      set
      {
        this.array \[ Index + this.BaseIndex \]  = value ;
    
        return ;
      }
    }
    

    }

    B 1 Reply Last reply
    0
    • L Lost User

      I would think that is only the case in those building. Like in my sisters apartment building she lives on floor 3. You go to the elevator and press 3 or walk up the stairs till you see 3. If someone told you level 4, well they are... How to a put this delicately. "An idiot". I have stayed in hotels that have Lobby as the main. In fact there are no rooms on the main floor (conference rooms etc, but no sleeping rooms). These in particular define the "1st" floor as that above the lobby. If the conceirge tells you, "Your room is on floor 3" and you press three but really he meant 2 (cause he thinks of the lobby as 1), he should be fired or atleast given a good lashing. However, with that said there are plenty of hotels (in particual motels are this way) that have the "1st" floor defined as the ground level. Just have to be observant I think. I do see how getting a "1st" floor room might end up confusing in the states. Because in some cases it is ground and some not. So one thinks its ground and goes looking for the room and then realizes they are on the "G" level or "L" level. But any other level you need to use stairs or an elevator regardless so you quickly realize where you are and where you need to be.

      Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

      B Offline
      B Offline
      BobJanova
      wrote on last edited by
      #45

      What I remember of US hotels is that they often number 'L, 2, 3 ...'.

      L 1 Reply Last reply
      0
      • P Paul M Watt

        So is there a concept of story (number of floors) in the UK? Such as a three-story building (3 floors). How often does floor overrun happen in the UK?

        B Offline
        B Offline
        BobJanova
        wrote on last edited by
        #46

        What is floor overrun? Yes we have multi-storey buildings. What kind of country do you think it is :p

        P 1 Reply Last reply
        0
        • S Slacker007

          if you are on the ground floor, isn't that floor 1? and the floor above you would be floor 2? most hospitals have the base floor as floor 1 and the G is the garage. My reasoning is that how can you be on floor 0? it makes no sense...to me at least. Then again, I'm just a silly American who started off programming with VB. :-D

          Just along for the ride. "the meat from that butcher is just the dogs danglies, absolutely amazing cuts of beef." - DaveAuld (2011)
          "No, that is just the earthly manifestation of the Great God Retardon." - Nagy Vilmos (2011)

          B Offline
          B Offline
          BobJanova
          wrote on last edited by
          #47

          It wouldn't normally be 'floor 0', it would be 'the ground floor' (or G in lifts and stairwells and things where they label it). I don't see how that makes less sense than being on 'the garage floor' ...

          1 Reply Last reply
          0
          • P PIEBALDconsult

            mikemarquard wrote:

            let you pick the base

            Untested:

            public partial class Array<T>
            {
            protected T[] array ;

            public Array
            (
              int BaseIndex
            ,
              int Capacity
            )
            {
              this.BaseIndex = BaseIndex ;
            
              this.array = new T \[ Capacity \] ;
            
              return ;
            }
            
            public virtual int BaseIndex { get ; private set ; }
            
            public virtual int Capacity 
            {
              get
              {
                return ( this.array.Length ) ;
              }
            }
            
            public virtual T
            this
            \[
              int Index
            \]
            {
              get
              {
                return ( this.array \[ Index + this.BaseIndex \] ) ;
              }
            
              set
              {
                this.array \[ Index + this.BaseIndex \]  = value ;
            
                return ;
              }
            }
            

            }

            B Offline
            B Offline
            BobJanova
            wrote on last edited by
            #48

            Should be Index - BaseIndex, I think. And it should have either Length or Count to fit with array/collection convention. But not bad for a lounge post ;)

            1 Reply Last reply
            0
            • L Lost User

              Bert Mitton wrote:

              just to be obstinate.

              You typical American. :-)

              I Offline
              I Offline
              ii_noname_ii
              wrote on last edited by
              #49

              Huh?! Should I be worried about american predator drones dropping bombs to liberate me from the tyranny of C languages? *waves a white flag with VB on it*

              L 1 Reply Last reply
              0
              • N Nish Nishant

                Yes but when anyone says first floor here we always mean the ground floor. This confuses Brits and Aussies, and some Indians as well.

                Regards, Nish


                My technology blog: voidnish.wordpress.com

                F Offline
                F Offline
                Fabio Franco
                wrote on last edited by
                #50

                And some Brazilians

                "To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson

                N 1 Reply Last reply
                0
                • M mikemar

                  I don't get your point. VB.NET is base zero only. Classic VB used base zero by default although you could set an option to make it base one. I've always thought base zero was stupid for any language that doesn't make pointers and arrays synonamous. Personally though I'd like to see most languages let you pick the base so this argument is ended and because there are occasional times when numbers other than zero or 1 would be handy. In fact most languages before C and a few that came after that weren't influenced by C had this feature but this is one area that computer science has gone backwards IMHO due mostly to the influence of C.

                  S Offline
                  S Offline
                  StarNamer work
                  wrote on last edited by
                  #51

                  Of course, the really ridiculous thing is that VB accepts the syntax

                  Dim myArray(0 to 10) As Double

                  but produces the error Array lower bounds can be only '0' if you try to use a different value for the lower bound. Plus, of course, the function LBound(array) exists to determine an array's lower bound (which must be zero!). I've also thought this was a backward step, since it would would make so much more sense to have the compiler/runtime keep track the base offsets of arrays instead of forcing the programmer to do it.

                  1 Reply Last reply
                  0
                  • N Nish Nishant

                    I realized this as I was explaining the 1s floor vs 2nd floor differences[^] between UK and American english. In the UK (and India, Australia) floors are 0-indexed. The ground floor is 0, the first floor above ground is 1, and so on. The basement is usually -1. In the US (and I believe Canada too), floors are 1-indexed. The ground floor is 1, the next floor is 2 and so on. I don't think negative numbering is used for sub-ground levels. May explain why a lot of the C/C++ aficionados are European. While VB and BASIC are essentially American inventions.

                    Regards, Nish


                    My technology blog: voidnish.wordpress.com

                    M Offline
                    M Offline
                    MSBassSinger
                    wrote on last edited by
                    #52

                    I don't get your point. VB uses zero based indices. VB6 had the flexibility to allow you to define what the number was the initial index in an array is - perhaps that is what is confusing you. Also, VB was very popular in Europe. You are right that VB is an American creation - as are most good things. :) Americans (from the traditional American culture) do focus on getting the job done with excellence in the shortest time possible. VB was created to do that, and certainly allowed that level of productivity. Even to this day, I prefer VB.NET to C#, although I've spent over 10 years developing in C#. Unfortunately, many Americans have adopted a neo-European culture, and programmers I know liek that do prefer C/C++/Java to VB, even though it is less productive.

                    N 1 Reply Last reply
                    0
                    • N Nish Nishant

                      I realized this as I was explaining the 1s floor vs 2nd floor differences[^] between UK and American english. In the UK (and India, Australia) floors are 0-indexed. The ground floor is 0, the first floor above ground is 1, and so on. The basement is usually -1. In the US (and I believe Canada too), floors are 1-indexed. The ground floor is 1, the next floor is 2 and so on. I don't think negative numbering is used for sub-ground levels. May explain why a lot of the C/C++ aficionados are European. While VB and BASIC are essentially American inventions.

                      Regards, Nish


                      My technology blog: voidnish.wordpress.com

                      A Offline
                      A Offline
                      agolddog
                      wrote on last edited by
                      #53

                      One of the things Australia certainly has going for it is understanding the proper meaning of VB: http://www.vb.com.au/[^]

                      N 1 Reply Last reply
                      0
                      • A agolddog

                        One of the things Australia certainly has going for it is understanding the proper meaning of VB: http://www.vb.com.au/[^]

                        N Offline
                        N Offline
                        Nish Nishant
                        wrote on last edited by
                        #54

                        True :-D

                        Regards, Nish


                        My technology blog: voidnish.wordpress.com

                        1 Reply Last reply
                        0
                        • M MSBassSinger

                          I don't get your point. VB uses zero based indices. VB6 had the flexibility to allow you to define what the number was the initial index in an array is - perhaps that is what is confusing you. Also, VB was very popular in Europe. You are right that VB is an American creation - as are most good things. :) Americans (from the traditional American culture) do focus on getting the job done with excellence in the shortest time possible. VB was created to do that, and certainly allowed that level of productivity. Even to this day, I prefer VB.NET to C#, although I've spent over 10 years developing in C#. Unfortunately, many Americans have adopted a neo-European culture, and programmers I know liek that do prefer C/C++/Java to VB, even though it is less productive.

                          N Offline
                          N Offline
                          Nish Nishant
                          wrote on last edited by
                          #55

                          MSBassSinger wrote:

                          I don't get your point. VB uses zero based indices.   VB6 had the flexibility to allow you to define what the number was the initial index in an array is - perhaps that is what is confusing you.

                          Okay, the original post was meant as humor (hence the joke icon). That said, it's also a CodeProject meme from a few years ago where some of us (mostly John, CG and myself) would joke about C/C++ guys 0-indexing in real life vs VB guys who'd use 1-based indexing. By default, Dim a as int(10) means a 11-item array indexed from 0 to 10. int a[10] means a 10-item array indexed from 0 to 9. So typically Basic devs would just treat it as a 10-item collection indexed from 1 to 10 (ignoring the 0th element).

                          MSBassSinger wrote:

                          prefer C/C++/Java to VB, even though it is less productive.

                          C++ is not less productive. It has certain usage scenarios where any other language fails.

                          Regards, Nish


                          My technology blog: voidnish.wordpress.com

                          M 1 Reply Last reply
                          0
                          • F Fabio Franco

                            And some Brazilians

                            "To alcohol! The cause of, and solution to, all of life's problems" - Homer Simpson

                            N Offline
                            N Offline
                            Nish Nishant
                            wrote on last edited by
                            #56

                            Fabio Franco wrote:

                            And some Brazilians

                            Yeah, you Brazilians! :rolleyes:

                            Regards, Nish


                            My technology blog: voidnish.wordpress.com

                            1 Reply Last reply
                            0
                            • B BobJanova

                              What I remember of US hotels is that they often number 'L, 2, 3 ...'.

                              L Offline
                              L Offline
                              Lost User
                              wrote on last edited by
                              #57

                              Again, it depends on the building. Some may do that, some may do as I posted. I guess my point is wether your an Aussie, Brit, or born in the USofA you will be confused unless you observe what the building is doing. On a similar point rarely (but not always) is there a 13th floor. Superstition and all. However, as I said this is not always the case. Similarily in Japan you will see the 4th floor missing (not always though).

                              Computers have been intelligent for a long time now. It just so happens that the program writers are about as effective as a room full of monkeys trying to crank out a copy of Hamlet.

                              N 1 Reply Last reply
                              0
                              • N Nish Nishant

                                MSBassSinger wrote:

                                I don't get your point. VB uses zero based indices.   VB6 had the flexibility to allow you to define what the number was the initial index in an array is - perhaps that is what is confusing you.

                                Okay, the original post was meant as humor (hence the joke icon). That said, it's also a CodeProject meme from a few years ago where some of us (mostly John, CG and myself) would joke about C/C++ guys 0-indexing in real life vs VB guys who'd use 1-based indexing. By default, Dim a as int(10) means a 11-item array indexed from 0 to 10. int a[10] means a 10-item array indexed from 0 to 9. So typically Basic devs would just treat it as a 10-item collection indexed from 1 to 10 (ignoring the 0th element).

                                MSBassSinger wrote:

                                prefer C/C++/Java to VB, even though it is less productive.

                                C++ is not less productive. It has certain usage scenarios where any other language fails.

                                Regards, Nish


                                My technology blog: voidnish.wordpress.com

                                M Offline
                                M Offline
                                MSBassSinger
                                wrote on last edited by
                                #58

                                Nishant Sivakumar wrote: C++ is not less productive. It has certain usage scenarios where any other language fails. Actually, it is less productive from a project standpoint. C and C++ do a few things very well. One example is floating point calculations. Just to build on that one exmaple, if I have a project that has some floating point calculations, such as GPS or finance, in the initial version of the app I would do them in VB, and in later versions, convert them to C or C++ for the performance gain. And here is why - Assuming equally proficient C++ and VB developers, for a given application, it takes about 1/3rd to 1/2 as long to write a stable, scalable, decent performing, OO, application in VB as it does to write it in C++ or Java. That means the app gets to market sooner. Then, in later versions, the developers and testers can identify performance bottlenecks, and replace VB classes with C++ classes where it makes a difference. Since the project was OO to start with, the interface contracts remain the same, so the C++ becomes a drop-in replacement (or nearly so, depending on the implementation). And this approach was true even in the VB6 days. If development time is not an issue, such as when writing a program on your own with no concern for marketshare, and you program in C++, then by all means stick with that. But in the world that pays the bills, getting to market first is a prime consideration. Nishant Sivakumar wrote: the original post was meant as humor (hence the joke icon) I noticed that, but for something to have humor, it needs to have some basis in truth. VB arrays were and are zero indexed. That kind of undermines the attempt at humor.

                                1 Reply Last reply
                                0
                                • N Nish Nishant

                                  I realized this as I was explaining the 1s floor vs 2nd floor differences[^] between UK and American english. In the UK (and India, Australia) floors are 0-indexed. The ground floor is 0, the first floor above ground is 1, and so on. The basement is usually -1. In the US (and I believe Canada too), floors are 1-indexed. The ground floor is 1, the next floor is 2 and so on. I don't think negative numbering is used for sub-ground levels. May explain why a lot of the C/C++ aficionados are European. While VB and BASIC are essentially American inventions.

                                  Regards, Nish


                                  My technology blog: voidnish.wordpress.com

                                  K Offline
                                  K Offline
                                  Kirk Wood
                                  wrote on last edited by
                                  #59

                                  Aside from the simple fact that there is no numbering standard for floors in America, (The convention is very loose.) I don't believe that those numbering the floors ask programmers or mathmatics people at all. But VB was indeed designed for the non-pogrammer. I did find encouraging though that in school my kids were taught to start counting at zero.

                                  1 Reply Last reply
                                  0
                                  • N Nish Nishant

                                    I realized this as I was explaining the 1s floor vs 2nd floor differences[^] between UK and American english. In the UK (and India, Australia) floors are 0-indexed. The ground floor is 0, the first floor above ground is 1, and so on. The basement is usually -1. In the US (and I believe Canada too), floors are 1-indexed. The ground floor is 1, the next floor is 2 and so on. I don't think negative numbering is used for sub-ground levels. May explain why a lot of the C/C++ aficionados are European. While VB and BASIC are essentially American inventions.

                                    Regards, Nish


                                    My technology blog: voidnish.wordpress.com

                                    R Offline
                                    R Offline
                                    Rutvik Dave
                                    wrote on last edited by
                                    #60

                                    There is no way some people are going to take this as joke :laugh:

                                    1 Reply Last reply
                                    0
                                    • N Nish Nishant

                                      I realized this as I was explaining the 1s floor vs 2nd floor differences[^] between UK and American english. In the UK (and India, Australia) floors are 0-indexed. The ground floor is 0, the first floor above ground is 1, and so on. The basement is usually -1. In the US (and I believe Canada too), floors are 1-indexed. The ground floor is 1, the next floor is 2 and so on. I don't think negative numbering is used for sub-ground levels. May explain why a lot of the C/C++ aficionados are European. While VB and BASIC are essentially American inventions.

                                      Regards, Nish


                                      My technology blog: voidnish.wordpress.com

                                      S Offline
                                      S Offline
                                      SeattleC
                                      wrote on last edited by
                                      #61

                                      Oh, thinly disguised US-bashing troll. Maybe the reason why VB is "popular" in the US is because the US leads the world in computing, with more software, more software engineers, more papers and patents, etc. That means even relatively lame tools like VB have a larger following here. Maybe also it's because BASIC was invented in 1963 at Dartmouth College in New Hampshire, when most of Europe was still dreaming pulp sci-fi dreams of "electronic brains". Many BASICs in the US can address the zero-th element of an array. The ANSI standard for BASIC even has a statement, called OPTION BASE that says whether to start numbering array elements at 0 or 1. The US is also the birthplace of C, C++, and Java, which unashamedly number arrays from 0. I've been told these languages are even popular in Europe.

                                      N 1 Reply Last reply
                                      0
                                      • S SeattleC

                                        Oh, thinly disguised US-bashing troll. Maybe the reason why VB is "popular" in the US is because the US leads the world in computing, with more software, more software engineers, more papers and patents, etc. That means even relatively lame tools like VB have a larger following here. Maybe also it's because BASIC was invented in 1963 at Dartmouth College in New Hampshire, when most of Europe was still dreaming pulp sci-fi dreams of "electronic brains". Many BASICs in the US can address the zero-th element of an array. The ANSI standard for BASIC even has a statement, called OPTION BASE that says whether to start numbering array elements at 0 or 1. The US is also the birthplace of C, C++, and Java, which unashamedly number arrays from 0. I've been told these languages are even popular in Europe.

                                        N Offline
                                        N Offline
                                        Nish Nishant
                                        wrote on last edited by
                                        #62

                                        Member 2941392 wrote:

                                        Oh, thinly disguised US-bashing troll.

                                        The US is my home :-)

                                        Member 2941392 wrote:

                                        Maybe the reason why VB is "popular" in the US is because the US leads the world in computing, with more software, more software engineers, more papers and patents, etc. That means even relatively lame tools like VB have a larger following here. Maybe also it's because BASIC was invented in 1963 at Dartmouth College in New Hampshire, when most of Europe was still dreaming pulp sci-fi dreams of "electronic brains".
                                         
                                        Many BASICs in the US can address the zero-th element of an array. The ANSI standard for BASIC even has a statement, called OPTION BASE that says whether to start numbering array elements at 0 or 1.

                                        Okay, the original post was meant as humor (hence the joke icon). That said, it's also a CodeProject meme from a few years ago where some of us (mostly John, CG and myself) would joke about C/C++ guys 0-indexing in real life vs VB guys who'd use 1-based indexing. By default, Dim a as int(10) means a 11-item array indexed from 0 to 10. int a[10] means a 10-item array indexed from 0 to 9. So typically Basic devs would just treat it as a 10-item collection indexed from 1 to 10 (ignoring the 0th element).

                                        Regards, Nish


                                        My technology blog: voidnish.wordpress.com

                                        1 Reply Last reply
                                        0
                                        • N Nish Nishant

                                          Yes but when anyone says first floor here we always mean the ground floor. This confuses Brits and Aussies, and some Indians as well.

                                          Regards, Nish


                                          My technology blog: voidnish.wordpress.com

                                          U Offline
                                          U Offline
                                          User 3760773
                                          wrote on last edited by
                                          #63

                                          Hmm... Even in C we talk about an array, element array[0] is the 1st one, isn't it?

                                          N 1 Reply Last reply
                                          0
                                          Reply
                                          • Reply as topic
                                          Log in to reply
                                          • Oldest to Newest
                                          • Newest to Oldest
                                          • Most Votes


                                          • Login

                                          • Don't have an account? Register

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • World
                                          • Users
                                          • Groups