Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-09-2005, 12:45 AM   #1
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
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
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 12:47 AM   #2
nofx
Too lazy to set a custom title
 
Join Date: Nov 2002
Location: Virgin Mary's womb
Posts: 16,826
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.
nofx is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 12:48 AM   #3
SpaceAce
Confirmed User
 
Join Date: Jul 2002
Location: Magrathea
Posts: 6,493
A is probably easier for a third party to read and understand but B is how I format my own code.

SpaceAce
SpaceAce is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 12:51 AM   #4
dcortez
DINO CORTEZ™
 
dcortez's Avatar
 
Industry Role:
Join Date: Jun 2003
Location: Vancouver Island
Posts: 2,145
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
dcortez is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 01:10 AM   #5
dodger21
Confirmed User
 
Join Date: Jan 2003
Location: Los Angeles
Posts: 2,680
I'm used to B.

A is easier to line up braces for someone else reading it.
__________________
icq: 237055440
dodger21 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 01:10 AM   #6
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
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?
__________________
* Mainstream ? $65 per sale
* new male contraception
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 01:12 AM   #7
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
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
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 01:21 AM   #8
SpaceAce
Confirmed User
 
Join Date: Jul 2002
Location: Magrathea
Posts: 6,493
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
SpaceAce is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 01:22 AM   #9
MBS Auto
Confirmed User
 
Join Date: Oct 2004
Location: Sin City Baby...
Posts: 1,725
I vote for C
__________________
Shoes and Boot
MBS Auto is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 04:09 AM   #10
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
Quote:
Originally Posted by MBS Auto
I vote for C
...............great
__________________
* Mainstream ? $65 per sale
* new male contraception
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 04:20 AM   #11
ytcracker
stc is the greatest
 
ytcracker's Avatar
 
Join Date: Dec 2002
Location: rip sean murray
Posts: 12,403
neither

its function not funciton you dyslexic slob
__________________
www.ytcracker.com | www.digitalgangster.com
i love you
ytcracker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 04:20 AM   #12
BackToMine
Confirmed User
 
Join Date: Nov 2004
Posts: 541
I prefer A
BackToMine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 04:21 AM   #13
BackToMine
Confirmed User
 
Join Date: Nov 2004
Posts: 541
Quote:
Originally Posted by ytcracker
neither

its function not funciton you dyslexic slob
idiot...
BackToMine is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 04:30 AM   #14
ytcracker
stc is the greatest
 
ytcracker's Avatar
 
Join Date: Dec 2002
Location: rip sean murray
Posts: 12,403
Quote:
Originally Posted by BackToMine
idiot...
who the fuck are you
i was kidding anyway
__________________
www.ytcracker.com | www.digitalgangster.com
i love you
ytcracker is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 04:51 AM   #15
Illicit
wtf ?
 
Join Date: Dec 2003
Location: GFY
Posts: 11,895
A is more professional. Code needs to be easily readable.
__________________
Insert Sig Here
Illicit is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 05:20 AM   #16
Hinc
Confirmed User
 
Hinc's Avatar
 
Join Date: Oct 2004
Posts: 2,577
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.
Hinc is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 07:53 AM   #17
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
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
__________________
* Mainstream ? $65 per sale
* new male contraception
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-09-2005, 08:49 AM   #18
MandyBlake
The one and only!
 
MandyBlake's Avatar
 
Industry Role:
Join Date: Nov 2002
Location: Atlanta, GA
Posts: 17,761
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
MandyBlake is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-10-2005, 12:06 AM   #19
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
Quote:
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
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-10-2005, 01:01 PM   #20
Zester
Confirmed User
 
Zester's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 5,344
bumpppppp
__________________
* Mainstream ? $65 per sale
* new male contraception
Zester is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-10-2005, 01:05 PM   #21
mortenb
Confirmed User
 
mortenb's Avatar
 
Join Date: Jul 2004
Location: Denmark ICQ: 7880009
Posts: 2,203
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..
mortenb is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.