Re: Formatting -- defining sections of code

From: Date: Sat, 15 Dec 2012 13:43:28 +0000
Subject: Re: Formatting -- defining sections of code
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-319892@lists.php.net to get a copy of this message
On Dec 14, 2012 9:49 AM, "Andy McKenzie" <amckenzie4@gmail.com> wrote: > > Hey folks, kind of a strange question here. > > Basically, I've been trying to move my style from "self taught" to "Oh > yeah, there IS a standard for this." One of the things I frequently > want to do is define sections of my code: to take a simplistic > example, "this outputs everything that needs to be in file A, this > outputs what needs to be in file B," and so on. > > Up until now, I've used my own standards (generally "#### > SectionName", since it's easy to search for). But it occurs to me to > wonder; IS there a standard for this? Most likely, the programming > world being what it is, there either isn't one or there are lots of > competing standards, but I'd be interested to know... > > Thanks, > Andy > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Actually, yes. Write smaller functions that do only one thing. DRY. Refactor. Etc. Php include is cheap. Use the file system and names to organize things. And if you aren't using a decent IDE or CMS, start now.

« previous php.general (#319892) next »