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. Maybe we DO need professionals licensing

Maybe we DO need professionals licensing

Scheduled Pinned Locked Moved The Lounge
questiontoolshelpworkspace
30 Posts 22 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.
  • R rjmoses

    So, I'm tripping through an older (written circa 2011) command line utility program written in C and developed under MSVC (I think, because all I got was the source code but there were some variables and defines that looked like that might have been the environment) and I get the compile error message "c1061 compiler limit blocks nested too deeply". This is a new one on me! So, I started digging into the code and it turns out that the original developer had written his code for command line option processing as: for (;;) { if(..) { } else if (...) { // Occasional do while/until loops inside the if } else if (...) .... 187 TIMES!!! } } MSVC 2017 has a hard coded limit of 128 nested blocks! My question: How can someone produce that kind code and still call themselves a professional developer? It's scary that maybe this individual might now be developing code for a self-driving car.

    D Offline
    D Offline
    dandy72
    wrote on last edited by
    #4

    rjmoses wrote:

    It's scary that maybe this individual might now be developing code for a self-driving car.

    If that's the sort of code it's running, then don't worry - that car won't be driving itself for too long. It'll probably drive itself into a phone pole at high speed before long. Intentionally.

    R 1 Reply Last reply
    0
    • D dandy72

      rjmoses wrote:

      It's scary that maybe this individual might now be developing code for a self-driving car.

      If that's the sort of code it's running, then don't worry - that car won't be driving itself for too long. It'll probably drive itself into a phone pole at high speed before long. Intentionally.

      R Offline
      R Offline
      rjmoses
      wrote on last edited by
      #5

      If I was a car running that kind of code, I WOULD drive myself into a tree.

      OriginalGriffO 1 Reply Last reply
      0
      • R rjmoses

        If I was a car running that kind of code, I WOULD drive myself into a tree.

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #6

        If you were a car running that kind of code, you'd miss!

        Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        D 1 Reply Last reply
        0
        • R rjmoses

          So, I'm tripping through an older (written circa 2011) command line utility program written in C and developed under MSVC (I think, because all I got was the source code but there were some variables and defines that looked like that might have been the environment) and I get the compile error message "c1061 compiler limit blocks nested too deeply". This is a new one on me! So, I started digging into the code and it turns out that the original developer had written his code for command line option processing as: for (;;) { if(..) { } else if (...) { // Occasional do while/until loops inside the if } else if (...) .... 187 TIMES!!! } } MSVC 2017 has a hard coded limit of 128 nested blocks! My question: How can someone produce that kind code and still call themselves a professional developer? It's scary that maybe this individual might now be developing code for a self-driving car.

          R Offline
          R Offline
          RugbyLeague
          wrote on last edited by
          #7

          187 TIMES Achievement Unlocked

          1 Reply Last reply
          0
          • G GKP1992

            rjmoses wrote:

            How can someone produce that kind code and still call themselves a professional developer?

            Because the code compiles? :laugh:

            R Offline
            R Offline
            rjmoses
            wrote on last edited by
            #8

            Not anymore (until I changed it.)

            1 Reply Last reply
            0
            • L Lost User

              rjmoses wrote:

              .... 187 TIMES!!! ... My question: How can someone produce that kind code and still call themselves a professional developer?

              you think an amateur could do it that many times without making a mistake? old days people put pride in their work and crafted thing by hand, now it's all mass produced by machines. "professional" does no justice, artisan, master ....

              Message Signature (Click to edit ->)

              R Offline
              R Offline
              rjmoses
              wrote on last edited by
              #9

              Good point!

              1 Reply Last reply
              0
              • R rjmoses

                So, I'm tripping through an older (written circa 2011) command line utility program written in C and developed under MSVC (I think, because all I got was the source code but there were some variables and defines that looked like that might have been the environment) and I get the compile error message "c1061 compiler limit blocks nested too deeply". This is a new one on me! So, I started digging into the code and it turns out that the original developer had written his code for command line option processing as: for (;;) { if(..) { } else if (...) { // Occasional do while/until loops inside the if } else if (...) .... 187 TIMES!!! } } MSVC 2017 has a hard coded limit of 128 nested blocks! My question: How can someone produce that kind code and still call themselves a professional developer? It's scary that maybe this individual might now be developing code for a self-driving car.

                M Offline
                M Offline
                MarkTJohnson
                wrote on last edited by
                #10

                It's good to know someone else experienced my pain. But mine was way back in the mid 1990's with the Microsoft C 5.1 compiler. You'd think they would have fixed that since then.

                1 Reply Last reply
                0
                • R rjmoses

                  So, I'm tripping through an older (written circa 2011) command line utility program written in C and developed under MSVC (I think, because all I got was the source code but there were some variables and defines that looked like that might have been the environment) and I get the compile error message "c1061 compiler limit blocks nested too deeply". This is a new one on me! So, I started digging into the code and it turns out that the original developer had written his code for command line option processing as: for (;;) { if(..) { } else if (...) { // Occasional do while/until loops inside the if } else if (...) .... 187 TIMES!!! } } MSVC 2017 has a hard coded limit of 128 nested blocks! My question: How can someone produce that kind code and still call themselves a professional developer? It's scary that maybe this individual might now be developing code for a self-driving car.

                  abmvA Offline
                  abmvA Offline
                  abmv
                  wrote on last edited by
                  #11

                  for(try to drive) if tree brake if chimney fly if fire hydrant brake if human brake if cat go to did no see if bird try catch else throw error call horn

                  Caveat Emptor. "Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long

                  We are in the beginning of a mass extinction. - Greta Thunberg

                  M 1 Reply Last reply
                  0
                  • OriginalGriffO OriginalGriff

                    If you were a car running that kind of code, you'd miss!

                    Sent from my Amstrad PC 1640 Never throw anything away, Griff Bad command or file name. Bad, bad command! Sit! Stay! Staaaay... AntiTwitter: @DalekDave is now a follower!

                    D Offline
                    D Offline
                    dandy72
                    wrote on last edited by
                    #12

                    Good point.

                    1 Reply Last reply
                    0
                    • abmvA abmv

                      for(try to drive) if tree brake if chimney fly if fire hydrant brake if human brake if cat go to did no see if bird try catch else throw error call horn

                      Caveat Emptor. "Progress doesn't come from early risers – progress is made by lazy men looking for easier ways to do things." Lazarus Long

                      M Offline
                      M Offline
                      Mark_Wallace
                      wrote on last edited by
                      #13

                      Nah. The whole thing is probably:

                      On error Resume Next

                      I wanna be a eunuchs developer! Pass me a bread knife!

                      D 1 Reply Last reply
                      0
                      • R rjmoses

                        So, I'm tripping through an older (written circa 2011) command line utility program written in C and developed under MSVC (I think, because all I got was the source code but there were some variables and defines that looked like that might have been the environment) and I get the compile error message "c1061 compiler limit blocks nested too deeply". This is a new one on me! So, I started digging into the code and it turns out that the original developer had written his code for command line option processing as: for (;;) { if(..) { } else if (...) { // Occasional do while/until loops inside the if } else if (...) .... 187 TIMES!!! } } MSVC 2017 has a hard coded limit of 128 nested blocks! My question: How can someone produce that kind code and still call themselves a professional developer? It's scary that maybe this individual might now be developing code for a self-driving car.

                        D Offline
                        D Offline
                        David Crow
                        wrote on last edited by
                        #14

                        I saw something akin to this once:

                        for (int x = 0; x < 5; x++)
                        {
                        if (x == 0)
                        ; // do something
                        else if (x == 1)
                        ; // do something
                        else if (x == 2)
                        ; // do something
                        else if (x == 3)
                        ; // do something
                        else if (x == 4)
                        ; // do something
                        }

                        I went home early because it scared me.

                        "One man's wage rise is another man's price increase." - Harold Wilson

                        "Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons

                        "You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles

                        1 Reply Last reply
                        0
                        • R rjmoses

                          So, I'm tripping through an older (written circa 2011) command line utility program written in C and developed under MSVC (I think, because all I got was the source code but there were some variables and defines that looked like that might have been the environment) and I get the compile error message "c1061 compiler limit blocks nested too deeply". This is a new one on me! So, I started digging into the code and it turns out that the original developer had written his code for command line option processing as: for (;;) { if(..) { } else if (...) { // Occasional do while/until loops inside the if } else if (...) .... 187 TIMES!!! } } MSVC 2017 has a hard coded limit of 128 nested blocks! My question: How can someone produce that kind code and still call themselves a professional developer? It's scary that maybe this individual might now be developing code for a self-driving car.

                          J Offline
                          J Offline
                          Joe Woodbury
                          wrote on last edited by
                          #15

                          rjmoses wrote:

                          .... 187 TIMES!!!

                          Who uses an odd number? At least use 192.

                          1 Reply Last reply
                          0
                          • R rjmoses

                            So, I'm tripping through an older (written circa 2011) command line utility program written in C and developed under MSVC (I think, because all I got was the source code but there were some variables and defines that looked like that might have been the environment) and I get the compile error message "c1061 compiler limit blocks nested too deeply". This is a new one on me! So, I started digging into the code and it turns out that the original developer had written his code for command line option processing as: for (;;) { if(..) { } else if (...) { // Occasional do while/until loops inside the if } else if (...) .... 187 TIMES!!! } } MSVC 2017 has a hard coded limit of 128 nested blocks! My question: How can someone produce that kind code and still call themselves a professional developer? It's scary that maybe this individual might now be developing code for a self-driving car.

                            Sander RosselS Offline
                            Sander RosselS Offline
                            Sander Rossel
                            wrote on last edited by
                            #16

                            Who says this guy (or girl) doesn't have a Bachelor's (or Master's) degree in programming? It wouldn't be the first time I see a "licensed" programmer producing code like that :rolleyes: I once worked with someone who was certified and expensive and wrote a separate service that was so bad it negated future development. Like literally, we added some fields to the database, filled them with data, and half an hour later that service would set the fields to NULL again. Took me a while to find that one :laugh: You can imagine that wasn't the only WTF in that code base... Then there's this guy who was equally certified, full of himself, called me "a little man", and then made an unsolicited code change that broke production X| The reason he made the change is because I had wrote a function containing something like 30 lines of code (including white lines and curly braces), which he thought was bad practice. After he "refactored" it he took out the "usings" because ".NET handles that for you". He also somehow added an additional database call and discarded the results, which actually broke it. And then we had the fourth year application developer intern who literally couldn't declare a variable because "he forgot the syntax". Needless to say we failed him, but somehow he passed his next internship and a year after he couldn't declare a variable he was applying for a job at some big company :~ Don't speak to me about "professional licensing", people are bunglers and no amount of licensing can fix that X|

                            Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

                            S 1 Reply Last reply
                            0
                            • R rjmoses

                              So, I'm tripping through an older (written circa 2011) command line utility program written in C and developed under MSVC (I think, because all I got was the source code but there were some variables and defines that looked like that might have been the environment) and I get the compile error message "c1061 compiler limit blocks nested too deeply". This is a new one on me! So, I started digging into the code and it turns out that the original developer had written his code for command line option processing as: for (;;) { if(..) { } else if (...) { // Occasional do while/until loops inside the if } else if (...) .... 187 TIMES!!! } } MSVC 2017 has a hard coded limit of 128 nested blocks! My question: How can someone produce that kind code and still call themselves a professional developer? It's scary that maybe this individual might now be developing code for a self-driving car.

                              U Offline
                              U Offline
                              User 11783308
                              wrote on last edited by
                              #17

                              I don't usually join in these discussions, nor am I claiming that this is the best way to accomplish the task. However, I see more of a problem with the compiler -- these are not really nested blocks. They are "else if" statements and not really different from a case statement in a switch except that you are using an expression instead of a constant. When I write them, the formatting shows that. Every "else if" is at the same level and there is no nesting. In C (and C++) you have "#elif", but for some godforsaken reason, you don't have "elif" in the language. This is a missing control structure and why the hell is there any kind of a fixed limit on parsing the language? I seriously doubt that, once parsed, that the control flow graph has any sort of limit, but limits like these are from 30 or 40 years ago. Inexcusable in today's world.

                              1 Reply Last reply
                              0
                              • R rjmoses

                                So, I'm tripping through an older (written circa 2011) command line utility program written in C and developed under MSVC (I think, because all I got was the source code but there were some variables and defines that looked like that might have been the environment) and I get the compile error message "c1061 compiler limit blocks nested too deeply". This is a new one on me! So, I started digging into the code and it turns out that the original developer had written his code for command line option processing as: for (;;) { if(..) { } else if (...) { // Occasional do while/until loops inside the if } else if (...) .... 187 TIMES!!! } } MSVC 2017 has a hard coded limit of 128 nested blocks! My question: How can someone produce that kind code and still call themselves a professional developer? It's scary that maybe this individual might now be developing code for a self-driving car.

                                N Offline
                                N Offline
                                Nelek
                                wrote on last edited by
                                #18

                                Kind of mandatory[^]

                                M.D.V. ;) If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about? Help me to understand what I'm saying, and I'll explain it better to you Rating helpful answers is nice, but saying thanks can be even nicer.

                                1 Reply Last reply
                                0
                                • M Mark_Wallace

                                  Nah. The whole thing is probably:

                                  On error Resume Next

                                  I wanna be a eunuchs developer! Pass me a bread knife!

                                  D Offline
                                  D Offline
                                  decaffeinatedMonkey
                                  wrote on last edited by
                                  #19

                                  Lol! I'd prefer a bunch of GOTO statements in this predicament.

                                  1 Reply Last reply
                                  0
                                  • Sander RosselS Sander Rossel

                                    Who says this guy (or girl) doesn't have a Bachelor's (or Master's) degree in programming? It wouldn't be the first time I see a "licensed" programmer producing code like that :rolleyes: I once worked with someone who was certified and expensive and wrote a separate service that was so bad it negated future development. Like literally, we added some fields to the database, filled them with data, and half an hour later that service would set the fields to NULL again. Took me a while to find that one :laugh: You can imagine that wasn't the only WTF in that code base... Then there's this guy who was equally certified, full of himself, called me "a little man", and then made an unsolicited code change that broke production X| The reason he made the change is because I had wrote a function containing something like 30 lines of code (including white lines and curly braces), which he thought was bad practice. After he "refactored" it he took out the "usings" because ".NET handles that for you". He also somehow added an additional database call and discarded the results, which actually broke it. And then we had the fourth year application developer intern who literally couldn't declare a variable because "he forgot the syntax". Needless to say we failed him, but somehow he passed his next internship and a year after he couldn't declare a variable he was applying for a job at some big company :~ Don't speak to me about "professional licensing", people are bunglers and no amount of licensing can fix that X|

                                    Best, Sander sanderrossel.com Continuous Integration, Delivery, and Deployment arrgh.js - Bringing LINQ to JavaScript Object-Oriented Programming in C# Succinctly

                                    S Offline
                                    S Offline
                                    Slow Eddie
                                    wrote on last edited by
                                    #20

                                    You speak the truth. University degrees, licensing and certifications don't guarantee competence. I think that any of us including all of the people in this post would be surprised at what another programmer would find to criticize and complain about in his or her code. Also, anyone that would get in a self-driving vehicle deserves to run into a tree, in my opinion. :rolleyes:

                                    Hard work and common sense will overcome in every situation, every time.

                                    O Sander RosselS 2 Replies Last reply
                                    0
                                    • R rjmoses

                                      So, I'm tripping through an older (written circa 2011) command line utility program written in C and developed under MSVC (I think, because all I got was the source code but there were some variables and defines that looked like that might have been the environment) and I get the compile error message "c1061 compiler limit blocks nested too deeply". This is a new one on me! So, I started digging into the code and it turns out that the original developer had written his code for command line option processing as: for (;;) { if(..) { } else if (...) { // Occasional do while/until loops inside the if } else if (...) .... 187 TIMES!!! } } MSVC 2017 has a hard coded limit of 128 nested blocks! My question: How can someone produce that kind code and still call themselves a professional developer? It's scary that maybe this individual might now be developing code for a self-driving car.

                                      D Offline
                                      D Offline
                                      Daniel Wilianto
                                      wrote on last edited by
                                      #21

                                      187 nested code blocks? New Badge obtained!

                                      1 Reply Last reply
                                      0
                                      • S Slow Eddie

                                        You speak the truth. University degrees, licensing and certifications don't guarantee competence. I think that any of us including all of the people in this post would be surprised at what another programmer would find to criticize and complain about in his or her code. Also, anyone that would get in a self-driving vehicle deserves to run into a tree, in my opinion. :rolleyes:

                                        Hard work and common sense will overcome in every situation, every time.

                                        O Offline
                                        O Offline
                                        obermd
                                        wrote on last edited by
                                        #22

                                        In most cases, licensing/certification requirements are used to prevent new competition from entering a field.

                                        1 Reply Last reply
                                        0
                                        • S Slow Eddie

                                          You speak the truth. University degrees, licensing and certifications don't guarantee competence. I think that any of us including all of the people in this post would be surprised at what another programmer would find to criticize and complain about in his or her code. Also, anyone that would get in a self-driving vehicle deserves to run into a tree, in my opinion. :rolleyes:

                                          Hard work and common sense will overcome in every situation, every time.

                                          Sander RosselS Offline
                                          Sander RosselS Offline
                                          Sander Rossel
                                          wrote on last edited by
                                          #23

                                          Slow Eddie wrote:

                                          all of the people in this post would be surprised at what another programmer would find to criticize and complain about in his or her code

                                          I try to make a difference between "facts" and "preference". For example:

                                          // My style
                                          public void DoSomething(string input)
                                          {
                                          // Code...
                                          }

                                          // Someone else's style
                                          public void do_something ( string input ) {

                                          // Code...

                                          }

                                          My code is C# style, the other isn't. It's some sort of Java(Script)ish with some extra space. But it's still (more or less) the same code. I'd probably tell this person something about C# coding styles and I'd enforce some default coding style (at least to normalize the casing). When a team uses different coding styles it tends to mess up your source control (because of automatic styling, which makes it look like everyone is changing complete files even when just a single line was fixed), so it's still important, but not necessarily wrong. Then there's this:

                                          // My code
                                          try
                                          {
                                          using (var connection = new SqlConnection(connString))
                                          using (var command = connection.CreateCommand())
                                          {
                                          command.CommandText = "...WHERE Id = @Id";
                                          // Etc...
                                          }
                                          }
                                          catch (Exception ex)
                                          {
                                          logger.LogError(ex);
                                          throw;
                                          }

                                          // Someone else's code
                                          try
                                          {
                                          var connection = new SqlConnection(connString);
                                          var command = connection.CreateCommand();
                                          command.CommandText = "...WHERE Id = " + id;
                                          // Etc...
                                          }
                                          catch (Exception ex)
                                          {
                                          logger.LogError(ex);
                                          }

                                          Now we're talking about different code, good code and BAD code! Some people would say usage of var is bad practice, but that's what I consider style (after all, compiled it's still the same). However, every skilled programmer would notice the lack of using (or alternatively Dispose in a finally block), the swallowing of the Exception and the potential SQL injection. This isn't a matter of style, it's a matter of factually good and bad code. So when we're talking about people here I expect to find lots of different preferences which may not be mine (and which I might even find horrible to read), but I expect to find little actual errors. For some reason I tend to think that people who are on CodeProject know the difference between good code and bad code, whatever their style may be :)

                                          Best, Sander sanderrossel.com

                                          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