Submitted by Anonymous on Wed, 01/06/2010 - 07:39.
A perfect example of procedural programming. ...have you ever heard about "Tell, don't ask" principle ?
Yep, all books should be promote good practice, but that doesn't seem the case as most of books i have read seems to focus to get the point across through examples and miss out best practices:). Than you other category of specialized books which promote best pratices.
However, the correlation that you have given with the link doesn't seem to match here with this example.
The link that you mention refers to other object' state and work on it, which should be avoided.The getters are setters
are usually generated and having a validation code out there doesn't make sense to me.
Reply
daily quotes
Programming is not a zero-sum game. Teaching something to a fellow programmer doesn't take it away from you. I'm happy to share what I can, because I'm in it for the love of programming.
"Tell, don't ask" principle
A perfect example of procedural programming. ...have you ever heard about "Tell, don't ask" principle ?
Yep, all books should be promote good practice, but that doesn't seem the case as most of books i have read seems to focus to get the point across through examples and miss out best practices:). Than you other category of specialized books which promote best pratices.
However, the correlation that you have given with the link doesn't seem to match here with this example.
The link that you mention refers to other object' state and work on it, which should be avoided.The getters are setters
are usually generated and having a validation code out there doesn't make sense to me.