Friday, June 10, 2011

My answer to "Dmitri: is this agile development? do you have your idea / plan documents?"

This is my answer to a Question on Support site for LampCMS project


One more programming tip I can share, but this is a top secret trick, dont tell anyone.

Sometimes I just create an new blank php file, give it the name of class it's going to be, then just write some comments in the comments block describing what it's going to do, including as much details as possible and then just save it and it will just sit there for awhile.
I may even include a few methods with no body, just comment blocks.

For example

protected function main(){
        $this->getInput()
        ->parseData()
        ->validate()
        ->saveData()
        ->updateUser()
        ->sendEmails();
}


This could be all I need to later take it from there. This is actually the important part, the actual methods can be written later but the main() methods I have to write as I think about the steps involved in this one feature. This is called a top-down design. This may be a true secret to being a good programmer. This is certainly what separates a good programmer from a beginner. Beginners don't do a top-down design, they tend to do the opposite - sometimes refereed to as bottom-up design, which is the wrong way of doing things

A little blank php file, not doing anything but waiting for me to implement it when I get to it.

No comments:

Post a Comment