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. My friend has written a function 831 lines long.

My friend has written a function 831 lines long.

Scheduled Pinned Locked Moved The Lounge
question
43 Posts 25 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.
  • H Hoornet93

    In my company i got the task to modify something in my friend Visual C code. Imagine my surprise when I saw a function 831 linel long!!! Do u know a longer function? Love is the law, love under will.

    B Offline
    B Offline
    Bjoern Graf
    wrote on last edited by
    #41

    I have to maintain a project that has been converted from VB to MFC :suss: And most of its functions have way more than 831 lines :omg:

    1 Reply Last reply
    0
    • J Jason Gerard

      I worked with someone that did that. The page was at least 5000 lines. I also worked with someone that used multiple connection objects in an ASP page to run multiple queries. A new connection for every query, and there were quite a few queries. It was all connecting to the same database. Quite sad actually. Jason Gerard "This almost never matters, except quite often."

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #42

      I took over a site from another company a couple of years ago. There were a few administration pages - just basic add, edit and delete. All of the variables were supposed to be page-level variables X| , and some mong had written a Sub to declare them all. Just:

      Sub DeclareVariables
      Dim oConnection
      Dim oRecordset
      Dim oImSuchAStupidT*sser
      ...
      End Sub

      Worse than that was the update procedures: To add a record, they would open a recordset on the whole table, call AddNew, set the columns, and then Update. To edit a record, they would open a recordset on the whole table, move through each record until they found the one they wanted, Edit, update the columns, then Update. To delete a record, they would open up a recordset on the whole table, move through each record until they found the one they wanted, and call Delete. The pages were so similar, this had to be a standard template. And this company was (and still is) promoting their web-development services! :omg: :wtf: I had to laugh, after I'd stopped screaming. :-D


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      J 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        I took over a site from another company a couple of years ago. There were a few administration pages - just basic add, edit and delete. All of the variables were supposed to be page-level variables X| , and some mong had written a Sub to declare them all. Just:

        Sub DeclareVariables
        Dim oConnection
        Dim oRecordset
        Dim oImSuchAStupidT*sser
        ...
        End Sub

        Worse than that was the update procedures: To add a record, they would open a recordset on the whole table, call AddNew, set the columns, and then Update. To edit a record, they would open a recordset on the whole table, move through each record until they found the one they wanted, Edit, update the columns, then Update. To delete a record, they would open up a recordset on the whole table, move through each record until they found the one they wanted, and call Delete. The pages were so similar, this had to be a standard template. And this company was (and still is) promoting their web-development services! :omg: :wtf: I had to laugh, after I'd stopped screaming. :-D


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        J Offline
        J Offline
        Jason Gerard
        wrote on last edited by
        #43

        Well, since we're trading horror stories of other peoples code. I worked with another fellow who, among other things, took 2 week to create a single ASP page with a form. The problem is, he used design time controls for everything and he named them intuitively a, b, c, aa, a1, etc... Needless to say, we had to rewrite it. It truly is amazing how other people code. Jason Gerard "This almost never matters, except quite often."

        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