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.Net blah blah... [modified]

Why VB.Net blah blah... [modified]

Scheduled Pinned Locked Moved The Lounge
csharp
70 Posts 44 Posters 17 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.
  • R realJSOP

    I'm using a web site that converts. For the most part, it does an okay job, but Linq statements tend to freak it out. I have a LOT of linq statements. I hate pretty much everything about VB, so this makes me hate my job. I updated my resume last night. I think my boss doesn't want to learn C#. I recognize that VB abnd C# are pretty much the same, but the differences are infuriating, and I simply don't like coding in it. NOTHING will change my outlook regarding VB. It has no redeeming features.

    .45 ACP - because shooting twice is just silly
    -----
    "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
    -----
    "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

    G Offline
    G Offline
    G Tek
    wrote on last edited by
    #56

    VB is easier to type - the letters V and B are right beside each other on the keyboard. To type C# you have to go all the way up 3 rows AND hit shift!

    1 Reply Last reply
    0
    • R realJSOP

      I wasn't ready for this:

      Dim [step] as String

      I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

      .45 ACP - because shooting twice is just silly
      -----
      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
      -----
      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

      modified on Thursday, November 18, 2010 9:55 AM

      P Offline
      P Offline
      PSU Steve
      wrote on last edited by
      #57

      Actually this "feature" helps me tremendously. My application deals with PLATFORMS that are grouped into TYPES that are grouped into CLASSES. The ability for me to define my own classes for "TYPE" and "CLASS" prevents me from having to name them something that doesn't match up directly with the requirements. Sweet.

      K 1 Reply Last reply
      0
      • R realJSOP

        I'm a government contractor - the contract doesn't end until net October, and there's no real schedule to speak of. Cost isn't an issue. He's got guns too. At least it would be a somewhat fair fight (if you can really apply the word "fair" to a gunfight).

        .45 ACP - because shooting twice is just silly
        -----
        "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
        -----
        "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

        G Offline
        G Offline
        Gary Huck
        wrote on last edited by
        #58

        Govt - that explains it. Federal?

        1 Reply Last reply
        0
        • S Slow Eddie

          Yes John BUT 1. It blows up your whole argument about the so called superiority of your language 2. You VB Haters make me sick. It's just syntax and what you know 3. It seems to me that you are as unreasonable and pig headed about it as your boss - more so if all other programs in the shop are in VB.net... 4. The golden Rule applies "the man with the gold makes the rule" 5. And Finally "Nyah, Nyah....Nyah,Nyah,Nyah!

          G Offline
          G Offline
          G Tek
          wrote on last edited by
          #59

          While I have to agree that VB haters tend to flourish as much as Microsoft haters (sometimes blind to the issues with whatever language or company they bow to) there are two important points here: 1. Why does ANY language (VB or C#) allow such bad practice? 2. Regardless of whatever language may allow this type of behaviour, John is right - it's HORRIBLE practice to actually do it and anyone that does should be drawn and quartered... just because you "can" doesn't mean you "should" so why the hell would anyone EVER want to use a reserved word other than for its reserved purpose?

          E D 2 Replies Last reply
          0
          • R realJSOP

            I'm a government contractor - the contract doesn't end until net October, and there's no real schedule to speak of. Cost isn't an issue. He's got guns too. At least it would be a somewhat fair fight (if you can really apply the word "fair" to a gunfight).

            .45 ACP - because shooting twice is just silly
            -----
            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
            -----
            "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

            J Offline
            J Offline
            Jason Christian
            wrote on last edited by
            #60

            Lovely - "cost isn't really an issue" - because there are no taxpayer dollars going to waste on this. The real problem is that is how government IT views the costs - as not an issue, so they waste money. It's crap!

            1 Reply Last reply
            0
            • R realJSOP

              I wasn't ready for this:

              Dim [step] as String

              I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

              .45 ACP - because shooting twice is just silly
              -----
              "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
              -----
              "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

              modified on Thursday, November 18, 2010 9:55 AM

              S Offline
              S Offline
              Steve Naidamast
              wrote on last edited by
              #61

              Whoa! Hold on their pard'ner... 1) VB.NET is as good as C# and I program in both fluently... However, given your circumstances Iw ould still discharge all my laser blasters in the general direction of your supervisor. Anyone who ok's development in one language and then changes his mind without a second thought to redo it in another language has got a few screws missing in the gray matter. But if this is government work... it figures.... 2) You can do the same thing in SQL Server where you can use system variable names as field names to a table...

              Steve Naidamast Black Falcon Software, Inc. blackfalconsoftware@ix.netcom.com

              1 Reply Last reply
              0
              • R realJSOP

                I wasn't ready for this:

                Dim [step] as String

                I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

                .45 ACP - because shooting twice is just silly
                -----
                "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                -----
                "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                modified on Thursday, November 18, 2010 9:55 AM

                E Offline
                E Offline
                Earl Truss
                wrote on last edited by
                #62

                Show him the project plan that he approved that says the team should use C#. Make sure he takes responsibility for the delay in the schedule. "I can do this stuff 'cause I don't care if I get fired. I'll just collect unemployment until I retire."

                1 Reply Last reply
                0
                • G G Tek

                  While I have to agree that VB haters tend to flourish as much as Microsoft haters (sometimes blind to the issues with whatever language or company they bow to) there are two important points here: 1. Why does ANY language (VB or C#) allow such bad practice? 2. Regardless of whatever language may allow this type of behaviour, John is right - it's HORRIBLE practice to actually do it and anyone that does should be drawn and quartered... just because you "can" doesn't mean you "should" so why the hell would anyone EVER want to use a reserved word other than for its reserved purpose?

                  E Offline
                  E Offline
                  Euhemerus
                  wrote on last edited by
                  #63

                  G-Tek wrote:

                  so why the hell would anyone EVER want to use a reserved word other than for its reserved purpose?

                  Because, and I realise I'm opening myself to be shot down in flames here, it sometimes serves a purpose when you can't think of a more apt name for a variable. I must admit i've done it myself as the following short sub will testify. The ONLY reason I used [string] as a variable name was because I just couldn't think of anything better :-O But then again, I only code as a hobby, not as a career.

                  Private Shared Sub AddListViewGroupStringArray(ByVal groupName As String, ByVal value As Object, ByVal listViewCtrl As ListView)

                          Dim lvGroup As ListViewGroup = CType(listViewCtrl.Invoke(New AddItemGroup(AddressOf AddListViewItemGroup), New Object() \_
                                                              {listViewCtrl, groupName, groupName}), ListViewGroup)
                  
                          Dim stringArray As String() = CType(value, String())
                  
                          For Each \[string\] As String In stringArray
                              Dim lvGroupItem As New ListViewItem(lvGroup)
                  
                              lvGroupItem.SubItems.Add(\[string\])
                              listViewCtrl.Invoke(New AddItem(AddressOf AddListViewItem), New Object() {listViewCtrl, lvGroupItem})
                          Next
                  
                      End Sub
                  

                  Nobody can get the truth out of me because even I don't know what it is. I keep myself in a constant state of utter confusion. - Col. Flagg

                  L 1 Reply Last reply
                  0
                  • E Euhemerus

                    G-Tek wrote:

                    so why the hell would anyone EVER want to use a reserved word other than for its reserved purpose?

                    Because, and I realise I'm opening myself to be shot down in flames here, it sometimes serves a purpose when you can't think of a more apt name for a variable. I must admit i've done it myself as the following short sub will testify. The ONLY reason I used [string] as a variable name was because I just couldn't think of anything better :-O But then again, I only code as a hobby, not as a career.

                    Private Shared Sub AddListViewGroupStringArray(ByVal groupName As String, ByVal value As Object, ByVal listViewCtrl As ListView)

                            Dim lvGroup As ListViewGroup = CType(listViewCtrl.Invoke(New AddItemGroup(AddressOf AddListViewItemGroup), New Object() \_
                                                                {listViewCtrl, groupName, groupName}), ListViewGroup)
                    
                            Dim stringArray As String() = CType(value, String())
                    
                            For Each \[string\] As String In stringArray
                                Dim lvGroupItem As New ListViewItem(lvGroup)
                    
                                lvGroupItem.SubItems.Add(\[string\])
                                listViewCtrl.Invoke(New AddItem(AddressOf AddListViewItem), New Object() {listViewCtrl, lvGroupItem})
                            Next
                    
                        End Sub
                    

                    Nobody can get the truth out of me because even I don't know what it is. I keep myself in a constant state of utter confusion. - Col. Flagg

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

                    Reads well to me - the brackets around [string] make it pretty easy to identify that it's not the keyword being used in the normal sense. Without the brackets I would start to dislike it. As a man, I could spend time and energy explaining how flawed evolution is for giving me useless nipples or I could go and write some useful code.

                    1 Reply Last reply
                    0
                    • R realJSOP

                      I wasn't ready for this:

                      Dim [step] as String

                      I was shocked and appalled to find out that VB allows you to do this kind of thing - using reserved words as variable names... Not only freakin' amazing, but amazingly bad practice... And you guys should just go ahead and brace yoourselves - after coding our Silverlight project in C# since March (and that is between 90 and 95% completed), my boss had a fit and decided he wanted it converted to VB because that's what everything else in the shop is coded in (and he was the one that okayed C# to begin with). I am (and I think understandably so) quite upset/annoyed/pissed off about it. Expect to see more posts like this as I progress through the conversion. IMHO, VB is a scourge on mankind.

                      .45 ACP - because shooting twice is just silly
                      -----
                      "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                      -----
                      "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

                      modified on Thursday, November 18, 2010 9:55 AM

                      K Offline
                      K Offline
                      KP Lee
                      wrote on last edited by
                      #65

                      You do know you have an infinite amount of time to not produce the product in an undeclared time frame? Instead of allowing code that appalls you to stand, fix it. You'll only produce one or two more bugs in random areas of code.

                      1 Reply Last reply
                      0
                      • P PSU Steve

                        Actually this "feature" helps me tremendously. My application deals with PLATFORMS that are grouped into TYPES that are grouped into CLASSES. The ability for me to define my own classes for "TYPE" and "CLASS" prevents me from having to name them something that doesn't match up directly with the requirements. Sweet.

                        K Offline
                        K Offline
                        KP Lee
                        wrote on last edited by
                        #66

                        Actually, this doesn't prevent you from doing anything. It does allow you to name objects something that does match up directly with your requirements. I personally tend to agree with John's assessment that this is a bad practice. How does naming a class "ClassObject" NOT directly match up with your requirements?

                        1 Reply Last reply
                        0
                        • R realJSOP

                          I'm a government contractor - the contract doesn't end until net October, and there's no real schedule to speak of. Cost isn't an issue. He's got guns too. At least it would be a somewhat fair fight (if you can really apply the word "fair" to a gunfight).

                          .45 ACP - because shooting twice is just silly
                          -----
                          "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                          -----
                          "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

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

                          John Simmons / outlaw programmer wrote:

                          I'm a government contractor - the contract doesn't end until net October, and there's no real schedule to speak of. Cost isn't an issue.

                          Yeah, government. Figures. Since the money belongs to someone else the cost isn't an issue. THAT pisses ME off. -Max

                          1 Reply Last reply
                          0
                          • R realJSOP

                            I'm using a web site that converts. For the most part, it does an okay job, but Linq statements tend to freak it out. I have a LOT of linq statements. I hate pretty much everything about VB, so this makes me hate my job. I updated my resume last night. I think my boss doesn't want to learn C#. I recognize that VB abnd C# are pretty much the same, but the differences are infuriating, and I simply don't like coding in it. NOTHING will change my outlook regarding VB. It has no redeeming features.

                            .45 ACP - because shooting twice is just silly
                            -----
                            "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
                            -----
                            "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001

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

                            Converting a large project from one language to another just because the "boss" thinks it's cool (regardless of what direction you're going) is absolutely nuts. I don't blame you for polishing up your resume. I would do exactly the same thing. This reminds me of one time when I went away on sabbatical for a month back in '06. We had this "director of technology" that felt that my subsystem needed to be rewritten in C#. (It's about 100,000 lines of code that has been gradually migrated over a period of 10 years from C to VB6 to VB.Net. No particular reason - he just thought that it needed to be in C# because all of our new development was being done with C#. So, this turkey waits for me to be away for a month to try and "take it away" from me. (I'm the only developer that understands the business logic in the product). Anyway ... when I got back everything was pretty much as it was when I left - I didn't learn about the behind-my-back attempt until a year later. When the developer assigned to the "conversion" was leaving to go to another job he told me about it. The conversion failed because these guys could not make heads or tails out of the logic - just a straight language conversion wouldn't work. There's too much different between VB.Net and C# particularly since a lot of old legacy VB6 techniques are still in use in that code. The "conversion" attempt was nothing more than a political move on the part of that "director" to wrest control of that part of the product from someone he must not have liked. It had nothing to do with technology or making it work better. From that point I refused to work for that VP any longer - I wouldn't even attend his meetings. I had the rare privilege (after slaving on that code close to 10 years and becoming - essentially - the owner of the product) of being able to literally wag the dog. That director wound up getting fired about a year later. AMF. Since you're working for a government agency there's NO telling what the reasoning is behind this "conversion" they want you to do but I can tell you from experience it has NOTHING to do with making your product better. Get outta there if you can. -Max :D

                            M 1 Reply Last reply
                            0
                            • L Lost User

                              Converting a large project from one language to another just because the "boss" thinks it's cool (regardless of what direction you're going) is absolutely nuts. I don't blame you for polishing up your resume. I would do exactly the same thing. This reminds me of one time when I went away on sabbatical for a month back in '06. We had this "director of technology" that felt that my subsystem needed to be rewritten in C#. (It's about 100,000 lines of code that has been gradually migrated over a period of 10 years from C to VB6 to VB.Net. No particular reason - he just thought that it needed to be in C# because all of our new development was being done with C#. So, this turkey waits for me to be away for a month to try and "take it away" from me. (I'm the only developer that understands the business logic in the product). Anyway ... when I got back everything was pretty much as it was when I left - I didn't learn about the behind-my-back attempt until a year later. When the developer assigned to the "conversion" was leaving to go to another job he told me about it. The conversion failed because these guys could not make heads or tails out of the logic - just a straight language conversion wouldn't work. There's too much different between VB.Net and C# particularly since a lot of old legacy VB6 techniques are still in use in that code. The "conversion" attempt was nothing more than a political move on the part of that "director" to wrest control of that part of the product from someone he must not have liked. It had nothing to do with technology or making it work better. From that point I refused to work for that VP any longer - I wouldn't even attend his meetings. I had the rare privilege (after slaving on that code close to 10 years and becoming - essentially - the owner of the product) of being able to literally wag the dog. That director wound up getting fired about a year later. AMF. Since you're working for a government agency there's NO telling what the reasoning is behind this "conversion" they want you to do but I can tell you from experience it has NOTHING to do with making your product better. Get outta there if you can. -Max :D

                              M Offline
                              M Offline
                              Member 681123
                              wrote on last edited by
                              #69

                              This sounds eerily familiar. I work on a small team which was owned by a British company (we are in Oz). We built a quick demo of our proposed new application in VB6, but quickly realised we would need something else for the full-blown thing (~200K lines), so we were working in C++. When our boss went on a long trip, the UK sent over a "project manager" who quickly decided that the re-write of some of the useful VB code was a waste of time and we should write it in VB.NET... He was with us for 3 months, managing a team of 5 and never worked out that we had ignored his directive completely. He was happy as long as he got his timesheets and project plans updated with (completely bogus) information. The product lives on (just putting it into VS2010) and we are owned by another company. Andy

                              1 Reply Last reply
                              0
                              • G G Tek

                                While I have to agree that VB haters tend to flourish as much as Microsoft haters (sometimes blind to the issues with whatever language or company they bow to) there are two important points here: 1. Why does ANY language (VB or C#) allow such bad practice? 2. Regardless of whatever language may allow this type of behaviour, John is right - it's HORRIBLE practice to actually do it and anyone that does should be drawn and quartered... just because you "can" doesn't mean you "should" so why the hell would anyone EVER want to use a reserved word other than for its reserved purpose?

                                D Offline
                                D Offline
                                Daniel Grunwald
                                wrote on last edited by
                                #70

                                G-Tek wrote:

                                1. Why does ANY language (VB or C#) allow such bad practice?

                                The reason why .NET languages have something like this is simple: interoperability. Take this C# class:

                                public class C { public void Step(); }

                                VB needs [] to call the Step method. In the other direction, C# might have to consume a variable Dim int As Integer. It's impossible for the CLS rules contain a list of reserved identifiers from all .NET languages, as that list would be continuously changing as new languages get invented. So instead, the CLS requires all .NET languages to have a way to consume members members with the same name as reserved keywords. And you also need to be able to define such members, otherwise VB couldn't implement a C# interface containing 'Step'.

                                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