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. Other Discussions
  3. The Weird and The Wonderful
  4. I didn't really think that people like this existed . . .

I didn't really think that people like this existed . . .

Scheduled Pinned Locked Moved The Weird and The Wonderful
7 Posts 6 Posters 2 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.
  • P Offline
    P Offline
    Patrick McElwee
    wrote on last edited by
    #1

    I have never really posted on code project, but this just made me angry that someone would put this into a production code base! I tried to drop the entire sample into here, but I think there is a limit so I snipped out repetitive parts (which is pretty much all of it). Anyways, the guy also indented the thing so it was like 200 characters wide at the last nested if!

    If intColumnnum = 1 Then
    crDField(pcounter).Width = 2475
    crDField(pcounter).Left = 240
    intColumnwidth3 = 2475 + 240
    intColumnwidth3 = intColumnwidth3 + 60
    Else
    If intColumnnum = 2 Then
    crDField(pcounter).Width = 990
    crDField(pcounter).Left = intColumnwidth3
    intColumnwidth3 = intColumnwidth3 + 990 + 60
    Else
    *SNIP*
    If intColumnnum = 38 Then
    crDField(pcounter).Width = 2400
    crDField(pcounter).Left = intColumnwidth3
    intColumnwidth3 = intColumnwidth3 + 2400 + 60
    End If

    *37 more End Ifs*

    P P D 3 Replies Last reply
    0
    • P Patrick McElwee

      I have never really posted on code project, but this just made me angry that someone would put this into a production code base! I tried to drop the entire sample into here, but I think there is a limit so I snipped out repetitive parts (which is pretty much all of it). Anyways, the guy also indented the thing so it was like 200 characters wide at the last nested if!

      If intColumnnum = 1 Then
      crDField(pcounter).Width = 2475
      crDField(pcounter).Left = 240
      intColumnwidth3 = 2475 + 240
      intColumnwidth3 = intColumnwidth3 + 60
      Else
      If intColumnnum = 2 Then
      crDField(pcounter).Width = 990
      crDField(pcounter).Left = intColumnwidth3
      intColumnwidth3 = intColumnwidth3 + 990 + 60
      Else
      *SNIP*
      If intColumnnum = 38 Then
      crDField(pcounter).Width = 2400
      crDField(pcounter).Left = intColumnwidth3
      intColumnwidth3 = intColumnwidth3 + 2400 + 60
      End If

      *37 more End Ifs*

      P Offline
      P Offline
      Patrick Etc
      wrote on last edited by
      #2

      Why does the choice of language here not surprise me..


      It has become appallingly obvious that our technology has exceeded our humanity. - Albert Einstein

      C 1 Reply Last reply
      0
      • P Patrick Etc

        Why does the choice of language here not surprise me..


        It has become appallingly obvious that our technology has exceeded our humanity. - Albert Einstein

        C Offline
        C Offline
        CARPETBURNER
        wrote on last edited by
        #3

        I think I have said before, its not the language that's at fault, its the ability of the developer in question that wrote these lines of code! You could do exactly the same thing in any programming language.. However unfortunately the fact is that most developers of a questionable ability develop in that language!

        CPalliniC 1 Reply Last reply
        0
        • C CARPETBURNER

          I think I have said before, its not the language that's at fault, its the ability of the developer in question that wrote these lines of code! You could do exactly the same thing in any programming language.. However unfortunately the fact is that most developers of a questionable ability develop in that language!

          CPalliniC Offline
          CPalliniC Offline
          CPallini
          wrote on last edited by
          #4

          I agree it is not the language. I think that Visual Basic was a marketing trap: the appealing smoothness of its learning step made it be considered the language for all, hence many, many people became at once programmers, very poor programmers, in fact. I know (few) skilled guys using VB6 and also a bunch of pretty weird C++ coders. Another reason maybe that, usually, skilled people like to challenge themselves with more complex (and powerful) languages, leaving VB to less skilled ones. :)

          If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
          [my articles]

          In testa che avete, signor di Ceprano?

          C 1 Reply Last reply
          0
          • CPalliniC CPallini

            I agree it is not the language. I think that Visual Basic was a marketing trap: the appealing smoothness of its learning step made it be considered the language for all, hence many, many people became at once programmers, very poor programmers, in fact. I know (few) skilled guys using VB6 and also a bunch of pretty weird C++ coders. Another reason maybe that, usually, skilled people like to challenge themselves with more complex (and powerful) languages, leaving VB to less skilled ones. :)

            If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
            [my articles]

            C Offline
            C Offline
            CARPETBURNER
            wrote on last edited by
            #5

            I know C# and VB, I have tended to code in the past using VB, but I do use the language properly and make use of all the features available. I do agree VB Was marketted as the language for all, unfortunately it has caused a minority (slowly becoming a majority) to market themselves as professional programmers when they are nothing more than hobbyists, and this reflects in the quality of code produced. I always ensure Option Strict is turned on when programming ;-) but again if VB was a proper language it should never allow you to turn it off! I have seen too many coding horrors where it has been turned off due to programmer laziness. VB used to offer many advantages (disadvantage?) in being able to create applications quickly but this is being eroded by the likes of C# and other contempary languages. I am planning to move more of my development over to C# over the coming months and migrate legacy systems as and when required, mainly as I want my internal team to code properly!

            1 Reply Last reply
            0
            • P Patrick McElwee

              I have never really posted on code project, but this just made me angry that someone would put this into a production code base! I tried to drop the entire sample into here, but I think there is a limit so I snipped out repetitive parts (which is pretty much all of it). Anyways, the guy also indented the thing so it was like 200 characters wide at the last nested if!

              If intColumnnum = 1 Then
              crDField(pcounter).Width = 2475
              crDField(pcounter).Left = 240
              intColumnwidth3 = 2475 + 240
              intColumnwidth3 = intColumnwidth3 + 60
              Else
              If intColumnnum = 2 Then
              crDField(pcounter).Width = 990
              crDField(pcounter).Left = intColumnwidth3
              intColumnwidth3 = intColumnwidth3 + 990 + 60
              Else
              *SNIP*
              If intColumnnum = 38 Then
              crDField(pcounter).Width = 2400
              crDField(pcounter).Left = intColumnwidth3
              intColumnwidth3 = intColumnwidth3 + 2400 + 60
              End If

              *37 more End Ifs*

              P Offline
              P Offline
              Paul Conrad
              wrote on last edited by
              #6

              :wtf: ( pretty much sums it up for me )

              "I guess it's what separates the professionals from the drag and drop, girly wirly, namby pamby, wishy washy, can't code for crap types." - Pete O'Hanlon

              1 Reply Last reply
              0
              • P Patrick McElwee

                I have never really posted on code project, but this just made me angry that someone would put this into a production code base! I tried to drop the entire sample into here, but I think there is a limit so I snipped out repetitive parts (which is pretty much all of it). Anyways, the guy also indented the thing so it was like 200 characters wide at the last nested if!

                If intColumnnum = 1 Then
                crDField(pcounter).Width = 2475
                crDField(pcounter).Left = 240
                intColumnwidth3 = 2475 + 240
                intColumnwidth3 = intColumnwidth3 + 60
                Else
                If intColumnnum = 2 Then
                crDField(pcounter).Width = 990
                crDField(pcounter).Left = intColumnwidth3
                intColumnwidth3 = intColumnwidth3 + 990 + 60
                Else
                *SNIP*
                If intColumnnum = 38 Then
                crDField(pcounter).Width = 2400
                crDField(pcounter).Left = intColumnwidth3
                intColumnwidth3 = intColumnwidth3 + 2400 + 60
                End If

                *37 more End Ifs*

                D Offline
                D Offline
                Derek Bartram
                wrote on last edited by
                #7

                It depends what the life of the code is indended. If it was a short term piece of interim code then perhaps it might be justifiable (perhaps even on performance grounds)

                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