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. What is the longest programming misconception you've held (that you are aware of)?

What is the longest programming misconception you've held (that you are aware of)?

Scheduled Pinned Locked Moved The Lounge
questionc++com
55 Posts 31 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 Member_5893260

    That functional programming might be useful for anything. At first it seemed to me that, due to its recursive nature, it might be good for writing compilers. This was a misconception I held for nearly two minutes, which, as any GPU will tell you, is an eternity!

    D Offline
    D Offline
    David ONeil
    wrote on last edited by
    #44

    Functional programming has fascinated me! But not enough to ever write a single line of code. Every time I come across one of those sites saying FP is going to solve all the problems that exist in programming I read it with curiosity. But I've never seen a single site that delves into the guts of what it would take to do a significant program, such as a word processor. Everything I've read indicates (between the lines) that when tackling such a problem FP would actually get in the way of accomplishing the goal. With their newer tree structure use it may be possible, but it still seems like a complete pain, and a memory-intensive hog. If anyone ever comes across a 'create a word processor with FP' site let me know!

    The forgotten roots of science | C++ Programming | DWinLib

    M 1 Reply Last reply
    0
    • D David ONeil

      Functional programming has fascinated me! But not enough to ever write a single line of code. Every time I come across one of those sites saying FP is going to solve all the problems that exist in programming I read it with curiosity. But I've never seen a single site that delves into the guts of what it would take to do a significant program, such as a word processor. Everything I've read indicates (between the lines) that when tackling such a problem FP would actually get in the way of accomplishing the goal. With their newer tree structure use it may be possible, but it still seems like a complete pain, and a memory-intensive hog. If anyone ever comes across a 'create a word processor with FP' site let me know!

      The forgotten roots of science | C++ Programming | DWinLib

      M Offline
      M Offline
      Member_5893260
      wrote on last edited by
      #45

      Yeah. I actually tried it to see what it would be like... the answer is that it's effectively a thought experiment - nothing much more than that. With something like F#, you can also pretty much break the rules and start writing C# with different syntax, and in effect, that's what you end up doing: the functional thing ends up becoming nothing much more than a more cumbersome way to declare fairly standard methods. I don't think it could ever be used to write actual systems - such as your word processor, and every time I've tried to get someone who evangelizes this stuff to explain how it would be done, they just get angry. So I win!

      D 1 Reply Last reply
      0
      • M Member_5893260

        Yeah. I actually tried it to see what it would be like... the answer is that it's effectively a thought experiment - nothing much more than that. With something like F#, you can also pretty much break the rules and start writing C# with different syntax, and in effect, that's what you end up doing: the functional thing ends up becoming nothing much more than a more cumbersome way to declare fairly standard methods. I don't think it could ever be used to write actual systems - such as your word processor, and every time I've tried to get someone who evangelizes this stuff to explain how it would be done, they just get angry. So I win!

        D Offline
        D Offline
        David ONeil
        wrote on last edited by
        #46

        Thanks for sharing your experience. For a while I was confused, because I heard that full systems were made in lisp, which my reading made me think was functional. A few months ago I actually dug deeper into that and found that lisp isn't an 'only-functional' language, and my 'A-Ha!' light turned on! So I'm still waiting for someone to show me my word processor example! If I'm not mistaken, another disadvantage of doing one fully functional is there is no way to really organize and see the code as you can with OO. Functions everywhere! But maybe I don't understand it enough. It just seems like a pain in the ass.

        The forgotten roots of science | C++ Programming | DWinLib

        1 Reply Last reply
        0
        • T trønderen

          You've got 1's complement as well, which I believe was far more common in the '60s and '70 than sign-magnitude. Wasn't the Univac 1100 series all 1's complement? Some CDC mainframes as well, I believe. I believe that you have to go back to designs from the '50s to find sign-magnitude integer representation. For floating point, I have never seen anything but sign-magnitude, though.

          FreedMallocF Offline
          FreedMallocF Offline
          FreedMalloc
          wrote on last edited by
          #47

          The Univac 1100 was indeed 1's complement. As was its mid-80s successor the 2200.

          1 Reply Last reply
          0
          • R Rusty Bullet

            For 30 years, I have thought readability was the "truth". Then I bought a book called "Clean Code" by Robert C. Martin and found clean code was this convoluted set of rules of hard to read code that made no sense. I am now aware that "readability" means "machine readability".

            D Offline
            D Offline
            David ONeil
            wrote on last edited by
            #48

            For clarity, are you saying that the rules in 'Clean Code' are convoluted and make no sense, or that your earlier definition of 'clean code (readability?)' was nonsensical?

            The forgotten roots of science | C++ Programming | DWinLib

            R 1 Reply Last reply
            0
            • D David ONeil

              For clarity, are you saying that the rules in 'Clean Code' are convoluted and make no sense, or that your earlier definition of 'clean code (readability?)' was nonsensical?

              The forgotten roots of science | C++ Programming | DWinLib

              R Offline
              R Offline
              Rusty Bullet
              wrote on last edited by
              #49

              I was implying that "Clean Code" rules were convoluted, but after reading it, I was clearly questioning my own rules as well. The confusion was deliberate!

              1 Reply Last reply
              0
              • D David ONeil

                Until just now I believed negative integers were just a flip of the first bit. Wow, how wrong I was, for MANY years! Are there some architectures where that is the case, to make myself feel a little better?

                The forgotten roots of science | C++ Programming | DWinLib

                J Offline
                J Offline
                JP Reyes
                wrote on last edited by
                #50

                I had no idea C actually has (or had, haven't updated since ANSI C) a goto statement in it. (not that it's in anyway sane to use)

                F 1 Reply Last reply
                0
                • D David ONeil

                  Until just now I believed negative integers were just a flip of the first bit. Wow, how wrong I was, for MANY years! Are there some architectures where that is the case, to make myself feel a little better?

                  The forgotten roots of science | C++ Programming | DWinLib

                  D Offline
                  D Offline
                  DerekT P
                  wrote on last edited by
                  #51

                  Not strictly programming, but regarding HTTPS protocol. For a long while I was convinced that sending sensitive data in the query string of an HTTPS request was insecure, because I believed the URL (including the querystring) was un-encrypted. At the time I was working with a financial services company with many third parties sending data around in pseudo-webservices. I refused to deal with 3rd parties that insisted on passing data in the querystring, and insisted on POSTing it instead. It took a while (many months) before I realised that when using HTTPS protocols, the client and host negotiate first and the actual URL (with querystring) is only sent once keys are exchanged and can therefore be encrypted over the wire. It just seems counter-intuitive that a string I can type into the browser address bar, or into Fiddler, or set as a string for a WebRequest address, would actually get encrypted before sending. Nobody ever actually called me out over it though, and a few companies changed their interfaces as a result. :sigh: :-O

                  1 Reply Last reply
                  0
                  • J JP Reyes

                    I had no idea C actually has (or had, haven't updated since ANSI C) a goto statement in it. (not that it's in anyway sane to use)

                    F Offline
                    F Offline
                    Forogar
                    wrote on last edited by
                    #52

                    I agree. For many years I assumed that C, C++ and C# had no GOTO - then I saw it in some example code somewhere and was shocked! I still didn't use it myself - I've never had the need for it - I was just surprised it existed.

                    - I would love to change the world, but they won’t give me the source code.

                    J 1 Reply Last reply
                    0
                    • F Forogar

                      I agree. For many years I assumed that C, C++ and C# had no GOTO - then I saw it in some example code somewhere and was shocked! I still didn't use it myself - I've never had the need for it - I was just surprised it existed.

                      - I would love to change the world, but they won’t give me the source code.

                      J Offline
                      J Offline
                      JP Reyes
                      wrote on last edited by
                      #53

                      C# too? :wtf:

                      F 1 Reply Last reply
                      0
                      • OriginalGriffO OriginalGriff

                        There are two ways to represent negative numbers: "sign & magnitude" and "two's-complement" - the "flip the top bit" approach is the former, and was used extensively by IBM until around the 70's bby which time it was clear that two's complement was a "better" solution (i.e. easier to implement in hardware, and didn't have a "negative zero" which is a odd concept all on it's own).

                        "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 AntiTwitter: @DalekDave is now a follower!

                        K Offline
                        K Offline
                        kiwerry
                        wrote on last edited by
                        #54

                        Along with the odd concept that the genitive of it is it's. It isn't it's, it's its.

                        1 Reply Last reply
                        0
                        • J JP Reyes

                          C# too? :wtf:

                          F Offline
                          F Offline
                          Forogar
                          wrote on last edited by
                          #55

                          Yes, apparently. :wtf:

                          - I would love to change the world, but they won’t give me the source code.

                          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