View Single Post
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 01-15-2010 , 21:55   Re: [TUT] Code Styling & Good Programming Habits
Reply With Quote #36

Quote:
Originally Posted by Seta00 View Post
Nice tut, only thing I disagree is with the new line before opening bracket.
If you're a programmer, you can easily recognize identifiers that imply a code block, and the new lines before every block allow for less code to fit in one page.
Readability is far more important than line count. If you are worried about fitting more code on one page, reduce your font size . Furthermore, code looks ugly when there's not a new-line before an opening bracket. Yes, I can look at any code and still know what is going on but it is a hell of a lot easier to read with proper line-breaks, spacing, and indentation.


PHP Code:
public Uglyid ) {

}

public 
Niceid )
{


__________________
Bugsy is offline