which pattern is better and why?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Zester
    Confirmed User
    • Jul 2003
    • 5344

    #1

    which pattern is better and why?

    [HTML]
    Pattern A:
    ----------
    funciton bob()
    {
    if(penis=>999)
    {
    block
    }
    else
    {
    block
    }
    }



    Pattern B:
    ----------
    funciton bob(){
    if(penis=>999){
    block
    } else {
    block
    }
    }
    [/HTML]
    * Mainstream ? $65 per sale
    * new male contraception
  • nofx
    Too lazy to set a custom title
    • Nov 2002
    • 16826

    #2
    B

    its more compact...

    Often times I wonder why
    There's love and hate, theres live or die.
    When sickness comes I must decide:
    When feelings go, theres suicide.

    Comment

    • SpaceAce
      Confirmed User
      • Jul 2002
      • 6493

      #3
      A is probably easier for a third party to read and understand but B is how I format my own code.

      SpaceAce

      Comment

      • dcortez
        DINO CORTEZ™
        • Jun 2003
        • 2145

        #4
        I usually go for A - somehow with B, the starting brace is often missed.

        A also lends itself to cutting and pasting blocks (omitting the conditional logic).



        -Dino

        Comment

        • dodger21
          Confirmed User
          • Jan 2003
          • 2680

          #5
          I'm used to B.

          A is easier to line up braces for someone else reading it.
          icq: 237055440

          Comment

          • Zester
            Confirmed User
            • Jul 2003
            • 5344

            #6
            Originally posted by SpaceAce
            A is probably easier for a third party to read and understand but B is how I format my own code.

            SpaceAce
            --------------------
            why?
            * Mainstream ? $65 per sale
            * new male contraception

            Comment

            • Zester
              Confirmed User
              • Jul 2003
              • 5344

              #7
              i just don't understand why all the programers I asked say they use B and at the same time say A is better in most of the ways
              * Mainstream ? $65 per sale
              * new male contraception

              Comment

              • SpaceAce
                Confirmed User
                • Jul 2002
                • 6493

                #8
                Originally posted by Zester
                --------------------
                why?
                A is easier for someone else to follow. B is more compact and more elegant. Style A is like speaking in short, stubby sentences and style B is more like natural speech or writing.

                A = I know a guy. He has a penis > 999. I think I will cock block him. He has it coming.

                B = I know a guy with a penis that's at least 999. I'm going to cock block him.

                SpaceAce

                Comment

                • MBS Auto
                  Confirmed User
                  • Oct 2004
                  • 1725

                  #9
                  I vote for C
                  Shoes and Boot

                  Comment

                  • Zester
                    Confirmed User
                    • Jul 2003
                    • 5344

                    #10
                    Originally posted by MBS Auto
                    I vote for C
                    ...............great
                    * Mainstream ? $65 per sale
                    * new male contraception

                    Comment

                    • ytcracker
                      stc is the greatest
                      • Dec 2002
                      • 12403

                      #11
                      neither

                      its function not funciton you dyslexic slob
                      www.ytcracker.com | www.digitalgangster.com
                      i love you

                      Comment

                      • BackToMine
                        Confirmed User
                        • Nov 2004
                        • 541

                        #12
                        I prefer A

                        Comment

                        • BackToMine
                          Confirmed User
                          • Nov 2004
                          • 541

                          #13
                          Originally posted by ytcracker
                          neither

                          its function not funciton you dyslexic slob
                          idiot...

                          Comment

                          • ytcracker
                            stc is the greatest
                            • Dec 2002
                            • 12403

                            #14
                            Originally posted by BackToMine
                            idiot...
                            who the fuck are you
                            i was kidding anyway
                            www.ytcracker.com | www.digitalgangster.com
                            i love you

                            Comment

                            • Illicit
                              wtf ?
                              • Dec 2003
                              • 11895

                              #15
                              A is more professional. Code needs to be easily readable.
                              Insert Sig Here

                              Comment

                              • Hinc
                                Confirmed User
                                • Oct 2004
                                • 2577

                                #16
                                Penis malfunction debugging error....wtf !!!
                                webmaster @ adultlist. com

                                AdultList.com - Directory Listings, Advertisements, Hardlinks

                                Loasex.com - Directory and old school TGP - taking submits

                                A few sales/opportunities:
                                High Quality Guest Posts For Sale

                                Network of Aged sites for sales. Get in touch on the email above for info.

                                Comment

                                • Zester
                                  Confirmed User
                                  • Jul 2003
                                  • 5344

                                  #17
                                  Originally posted by ajpiii
                                  A is more professional. Code needs to be easily readable.
                                  there you have it
                                  code needs to be readable and editable, yet short
                                  * Mainstream ? $65 per sale
                                  * new male contraception

                                  Comment

                                  • MandyBlake
                                    The one and only!
                                    • Nov 2002
                                    • 17761

                                    #18
                                    A is much easier to go into and read but i prefer B
                                    Mandy's Playhouse
                                    Her First Fat Girl
                                    If you're interested in promoting my sites, ICQ me! 178411921

                                    Comment

                                    • Zester
                                      Confirmed User
                                      • Jul 2003
                                      • 5344

                                      #19
                                      Originally posted by MandyBlake
                                      A is much easier to go into and read but i prefer B
                                      why do you prefer B?
                                      * Mainstream ? $65 per sale
                                      * new male contraception

                                      Comment

                                      • Zester
                                        Confirmed User
                                        • Jul 2003
                                        • 5344

                                        #20
                                        bumpppppp
                                        * Mainstream ? $65 per sale
                                        * new male contraception

                                        Comment

                                        • mortenb
                                          Confirmed User
                                          • Jul 2004
                                          • 2203

                                          #21
                                          I use B, but you can't really say which one is the best. It is down to personal preference. Each programmer has their own unique coding style, like designers has their ways..

                                          Comment

                                          Working...