GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   which pattern is better and why? (https://gfy.com/showthread.php?t=414015)

Zester 01-09-2005 12:45 AM

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]

nofx 01-09-2005 12:47 AM

B

its more compact...

SpaceAce 01-09-2005 12:48 AM

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

SpaceAce

dcortez 01-09-2005 12:51 AM

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).

:2 cents:

-Dino

dodger21 01-09-2005 01:10 AM

I'm used to B.

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

Zester 01-09-2005 01:10 AM

Quote:

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?

Zester 01-09-2005 01:12 AM

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 :Oh crap

SpaceAce 01-09-2005 01:21 AM

Quote:

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

MBS Auto 01-09-2005 01:22 AM

I vote for C :)

Zester 01-09-2005 04:09 AM

Quote:

Originally Posted by MBS Auto
I vote for C :)

...............great

ytcracker 01-09-2005 04:20 AM

neither

its function not funciton you dyslexic slob

BackToMine 01-09-2005 04:20 AM

I prefer A

BackToMine 01-09-2005 04:21 AM

Quote:

Originally Posted by ytcracker
neither

its function not funciton you dyslexic slob

idiot...

ytcracker 01-09-2005 04:30 AM

Quote:

Originally Posted by BackToMine
idiot...

who the fuck are you
i was kidding anyway

Illicit 01-09-2005 04:51 AM

A is more professional. Code needs to be easily readable.

Hinc 01-09-2005 05:20 AM

Penis malfunction debugging error....wtf !!!

Zester 01-09-2005 07:53 AM

Quote:

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

MandyBlake 01-09-2005 08:49 AM

A is much easier to go into and read but i prefer B

Zester 01-10-2005 12:06 AM

Quote:

Originally Posted by MandyBlake
A is much easier to go into and read but i prefer B

why do you prefer B?

Zester 01-10-2005 01:01 PM

bumpppppp

mortenb 01-10-2005 01:05 PM

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..


All times are GMT -7. The time now is 10:25 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123