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. Old code challenge - Today's longest function

Old code challenge - Today's longest function

Scheduled Pinned Locked Moved The Lounge
comquestioncode-reviewlearning
24 Posts 14 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.
  • L l a u r e n

    a single function? 14000+ lines long? not 13999 lines of whitespace and 1 line of code? :wtf:


    "there is no spoon"
    biz stuff about me

    B Offline
    B Offline
    bryce
    wrote on last edited by
    #13

    stop being cheeky lauren ;) Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
    Publitor, making Pubmed easy. http://www.sohocode.com/publitor

    Our kids book :The Snot Goblin

    L 1 Reply Last reply
    0
    • C Christian Graus

      Wow - I was recently asked to work on some code and the first thing I insisted on was the right to refactor an 800 line function before adding to it. 1709 has got to be some sort of record. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer

      B Offline
      B Offline
      bryce
      wrote on last edited by
      #14

      i can post if if you like, but i think paul has a bigger one with his post ;) Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
      Publitor, making Pubmed easy. http://www.sohocode.com/publitor

      Our kids book :The Snot Goblin

      T 1 Reply Last reply
      0
      • B bryce

        stop being cheeky lauren ;) Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
        Publitor, making Pubmed easy. http://www.sohocode.com/publitor

        Our kids book :The Snot Goblin

        L Offline
        L Offline
        l a u r e n
        wrote on last edited by
        #15

        :rolleyes:


        "there is no spoon"
        biz stuff about me

        1 Reply Last reply
        0
        • B bryce

          i can post if if you like, but i think paul has a bigger one with his post ;) Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
          Publitor, making Pubmed easy. http://www.sohocode.com/publitor

          Our kids book :The Snot Goblin

          T Offline
          T Offline
          tom_dx
          wrote on last edited by
          #16

          go ahead. IM PROUD TO BE A GMAIL;

          1 Reply Last reply
          0
          • B bryce

            The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
            Publitor, making Pubmed easy. http://www.sohocode.com/publitor

            Our kids book :The Snot Goblin

            E Offline
            E Offline
            El Corazon
            wrote on last edited by
            #17

            I probably do, but finding it may be difficult. I will have to find a function analyzer to see.... I've only got a decade's worth of code in one project. A header function documentation extraction (similar to doxygen) overran a 4 inch binder last year. _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

            1 Reply Last reply
            0
            • B bryce

              The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
              Publitor, making Pubmed easy. http://www.sohocode.com/publitor

              Our kids book :The Snot Goblin

              S Offline
              S Offline
              spsharma
              wrote on last edited by
              #18

              135 only :( :(

              1 Reply Last reply
              0
              • B bryce

                The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
                Publitor, making Pubmed easy. http://www.sohocode.com/publitor

                Our kids book :The Snot Goblin

                E Offline
                E Offline
                El Corazon
                wrote on last edited by
                #19

                I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? uhhh... If I remove the header comment from DrawCallback() it is 1710 lines, it is the most important function I am currently using too. (and has 2 gotos) X| It calls another function (yes it actually calls functions too) that is 786 lines long. (and it has 3 gotos) X| Networking thread is 1386 lines AppProcessing has to have been rewritten (I just don't remember doing it) as it is a measly 732 lines long. (and neither have gotos) that's from a quick 3 minute perusal. _________________________ Asu no koto o ieba, tenjo de nezumi ga warau. Talk about things of tomorrow and the mice in the ceiling laugh. (Japanese Proverb)

                1 Reply Last reply
                0
                • B bryce

                  The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
                  Publitor, making Pubmed easy. http://www.sohocode.com/publitor

                  Our kids book :The Snot Goblin

                  P Offline
                  P Offline
                  peterchen
                  wrote on last edited by
                  #20

                  May I check back tomorrow @ work? I have a few (!) files containing basically gargantous switch statements of copypasted code. I know that for one, the whole file is >3.5K lines. Duno the actual funciton though.


                  we are here to help each other get through this thing, whatever it is Vonnegut jr.
                  boost your code || Fold With Us! || sighist | doxygen

                  1 Reply Last reply
                  0
                  • B bryce

                    The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
                    Publitor, making Pubmed easy. http://www.sohocode.com/publitor

                    Our kids book :The Snot Goblin

                    A Offline
                    A Offline
                    Anna Jayne Metcalfe
                    wrote on last edited by
                    #21

                    :wtf: I have this strange urge to indulge in a bit of knife throwing practice when I see code like that!! ;) Anna :rose: Riverblade Ltd - Software Consultancy Services Anna's Place | Tears and Laughter "Be yourself - not what others think you should be" - Marcia Graesch "Anna's just a sexy-looking lesbian tart" - A friend, trying to wind me up. It didn't work.

                    1 Reply Last reply
                    0
                    • P paulb

                      Heh I got one here thats 14819 lines its written in C for an embedded system can you believe and is absolutely full of #ifdefs which makes it a nightmare to try and understand

                      J Offline
                      J Offline
                      Jorgen Sigvardsson
                      wrote on last edited by
                      #22

                      14819 lines!? That's a small application all by itself. Is it main()? ;) -- Weiter, weiter, ins verderben. Wir müssen leben bis wir sterben. I blog too now[^]

                      1 Reply Last reply
                      0
                      • L l a u r e n

                        errrrr i dont understand what ur trying to say? if a function has 2000 lines in the source file between start and end then its 2000 lines long ... nobody is trying to say whether its written well or not??!! sheesh


                        "there is no spoon"
                        biz stuff about me

                        P Offline
                        P Offline
                        Paul Watson
                        wrote on last edited by
                        #23

                        I am sure someone could re-write your post in one line... ;) regards, Paul Watson South Africa Michael Dunn wrote: "except the sod who voted this a 1, NO SOUP FOR YOU" Crikey! ain't life grand?

                        1 Reply Last reply
                        0
                        • B bryce

                          The rules: The longest function you can find , must be in old code code you're working on _today_ I've got here a Function called "Optimize" in the code i'm working on - its 1709 lines long, can anyone beat that ? Bryce --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
                          Publitor, making Pubmed easy. http://www.sohocode.com/publitor

                          Our kids book :The Snot Goblin

                          A Offline
                          A Offline
                          Atlantys
                          wrote on last edited by
                          #24

                          1170 lines. I think it nests down to 4 ifs and a switch, so there are a lot of cases to handle. And it's called recurseNodeNames(), so it gets called a LOT. :-D The kindest thing you can do for a stupid person, and for the gene pool, is to let him expire of his own dumb choices. [Roger Wright on stupid people] We're like private member functions [John Theal on R&D] We're figuring out the parent thing as we go though. Kinda like setting up Linux for the first time ya' know... [Nitron]

                          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