Thread: How many lines of code shall one write per day at the maximum

  1. #16
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by Sebastiani View Post
    Hey, at least you don't have a hundred or so function with names like gtk_abs_thg_asp_var_creat_elem_rnd_dat_flt!
    I actually had to maintain a program once that had a function called Dont_Step_On_My_Blue_Suede_Shoes() ...

    I would have renamed it but it was used all over the place, and the code was beyond spaghetti, it was macaroni code.

  2. #17
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Quote Originally Posted by abachler View Post
    I actually had to maintain a program once that had a function called Dont_Step_On_My_Blue_Suede_Shoes() ...

    I would have renamed it but it was used all over the place, and the code was beyond spaghetti, it was macaroni code.
    That's pretty funny. I'm curious though, do remember what the function actually did?

  3. #18
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Sebastiani View Post
    I'm not suprised, actually. You really are a natural when it comes to writing, honestly. And come to think of it, I would even buy your book.
    A few people did, but it was easier to just pan handle; the book was obviously weird but freakin' awesome, I've really never seen anything like it. Unfortunately, the original text (done in groff, 'cause it outputs ps or pdf) seems to have been lost. I still have a paper copy, tho. It is mostly different kinds of prose with a loose theme, but there are some poems connecting things
    Code:
    WAS
    
    in the nucleus of another
    what i thot was me might be
    an undead winter,
    
    those blanks
    could be filled
    with the canvas 
    
    of 
    
    more mythology
    coming my way
    in the way
    of itselves
    
    twenty-six letters
    
    the ediface just trembled
    you know, was
    here where the words
    held
    
    [back, am i? -- ed.]
    
    plus one
         two three
    now i know
    
    [if you didn't
          would you have done it -- ed.]
    
    d o a
    to untangle with the alphabet,
        one letter at a time as 
    so they might have
    was, &
    built on that
    
    spelled out
    presspulledpush
    inflo, enza
        surrounding
    
    what the meta's for
    
    "nature"
    
    [and doesn't something scream out to you -- ed?]
    
    no end@this if
          ps con't:
    works in uncommon
    more than the sign
    in the middle on
    the other           end
    
    [i won't say it -- ed.]
    
    what i believe and
    what do we know
    [i'm not kidding -- ed.]
    touching
    touched
       !
    
    1.13.01
    Here's some more recent stuff (mostly):

    Marcus Concept

    I think "You Belong on the Mountain" was the last poem I ever wrote, almost two years ago. "did.txt", about candy-flipping*, ends with the enigmatic**:
    Code:
    she's right, i think about it
    high high hightty
    :w


    * the practice of combining LSD and E.
    ** but not for vim users
    Last edited by MK27; 09-15-2009 at 07:27 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  4. #19
    Malum in se abachler's Avatar
    Join Date
    Apr 2007
    Posts
    3,195
    Quote Originally Posted by Sebastiani View Post
    That's pretty funny. I'm curious though, do remember what the function actually did?
    Performed a deep copy of other functions work and claimed it as its own?

    I honestly don't recall exactly what it did but it was some sort of safety check on an industrial machine.

    just remembered. It checked that all the other stages were in sync and ready and passed all their checks before it started to process the next wafer. The company built and sold fab equipment for microchip foundries. I had to maintain the code for the microcontrollers that ran the machine.
    Last edited by abachler; 09-15-2009 at 06:58 PM.

  5. #20
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    Quote Originally Posted by MK27 View Post
    A few people did, but it was easier to just pan handle; the book was obviously weird but freakin' awesome, I've really never seen anything like it. Unfortunately, the original text (done in groff, 'cause it outputs ps or pdf) seems to have been lost. I still have a paper copy, tho. It is mostly different kinds of prose with a loose theme, but there are some poems connecting things
    Code:
    WAS
    
    in the nucleus of another
    what i thot was me might be
    an undead winter,
    
    those blanks
    could be filled
    with the canvas 
    
    of 
    
    more mythology
    coming my way
    in the way
    of itselves
    
    twenty-six letters
    
    the ediface just trembled
    you know, was
    here where the words
    held
    
    [back, am i? -- ed.]
    
    plus one
         two three
    now i know
    
    [if you didn't
          would you have done it -- ed.]
    
    d o a
    to untangle with the alphabet,
        one letter at a time as 
    so they might have
    was, &
    built on that
    
    spelled out
    presspulledpush
    inflo, enza
        surrounding
    
    what the meta's for
    
    "nature"
    
    [and doesn't something scream out to you -- ed?]
    
    no end@this if
          ps con't:
    works in uncommon
    more than the sign
    in the middle on
    the other           end
    
    [i won't say it -- ed.]
    
    what i believe and
    what do we know
    [i'm not kidding -- ed.]
    touching
    touched
       !
    
    1.13.01
    Here's some more recent stuff (mostly):

    Marcus Concept

    I think "You Belong on the Mountain" was the last poem I ever wrote, almost two years ago. "did.txt", about candy-flipping*, ends with the enigmatic**:
    Code:
    she's right, i think about it
    high high hightty
    :w

    Yep, that is pretty 'out there'! I especially like 'You Belong to the Mountain'. Very cool imagery.

    * the practice of combining LSD and E.
    Something tells me that the author may have been 'candy-flipping' when he composed that one.

    ** but not for vim users
    And why is that?

    Performed a deep copy of other functions work and claimed it as its own?

    I honestly don't recall exactly what it did but it was some sort of safety check on an industrial machine.

    just remembered. It checked that all the other stages were in sync and ready and passed all their checks before it started to process the next wafer. The company built and sold fab equipment for microchip foundries. I had to maintain the code for the microcontrollers that ran the machine.
    Interesting. It's funny, the odd things you find in even the most professional code! I remember once when I was reading the source for boost::spirit I came across a most unusual parser indeed: the pizza_parser! I think the generator for the object even returned the string "your favorite pizza" - or something to that effect. I guess it helps to have a sense of humor in this business, though.

  6. #21
    spurious conceit MK27's Avatar
    Join Date
    Jul 2008
    Location
    segmentation fault
    Posts
    8,300
    Quote Originally Posted by Sebastiani View Post
    Something tells me that the author may have been 'candy-flipping' when he composed that one.
    Gosh. Sadly, I have not had the opportunity in years. I just noticed there is actually a wikipedia entry for this:
    Candy flipping is a colloquial term, or drug slang, which refers to the psychoactive experience of combining LSD and MDMA[1] (or MDA, a related substance). These two chemicals have been used separately in past psychoanalytical and psychotheraputic experiments and even treatment. Together, these substances are alleged to allow the user to reach a psychological state in which they feel able to freely and critically analyse their emotions, personal belief systems, relationships (especially with any others who may be present) et cetera. However, for some, candy flipping often tends to be a purely recreational event.
    If "personal belief systems" includes certain convictions about how space and environment is apprehended by the subject, I will admit mine was "critically analysed" to an amazing extent. But, at the same time, I felt totally good about overcoming this mental block

    ps. the MDA is better than the MDMA
    Last edited by MK27; 09-15-2009 at 10:37 PM.
    C programming resources:
    GNU C Function and Macro Index -- glibc reference manual
    The C Book -- nice online learner guide
    Current ISO draft standard
    CCAN -- new CPAN like open source library repository
    3 (different) GNU debugger tutorials: #1 -- #2 -- #3
    cpwiki -- our wiki on sourceforge

  7. #22
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Ireland
    Posts
    8,446
    Quote Originally Posted by Sebastiani View Post
    I guess it helps to have a sense of humor in this business, though.
    Shorten your names. Almost always you get away with it.

    Code:
    //Analysis
    Anal performance;
    
    //Assembly
    class Ass { /*...*/ } myAss;
    But, my favorite...

    Code:
    int Assets::getValue() {
        double stop; // and against the -wall
        return value;    
    }
    edit: make it private for bonus points
    Last edited by Mario F.; 09-15-2009 at 09:34 PM.
    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. how to write save code?
    By sept in forum C++ Programming
    Replies: 6
    Last Post: 09-18-2007, 07:25 AM
  2. How to write source code documentation?
    By loobian in forum C++ Programming
    Replies: 2
    Last Post: 06-07-2005, 11:49 AM
  3. how to write code about delete process?
    By cc246 in forum C++ Programming
    Replies: 2
    Last Post: 04-15-2003, 08:23 PM
  4. True ASM vs. Fake ASM ????
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 7
    Last Post: 04-02-2003, 04:28 AM
  5. Simplified code
    By soonerfan in forum C Programming
    Replies: 2
    Last Post: 12-05-2001, 03:50 PM