To keep our code at Google in the best possible shape we provided our software engineers with these constant reminders. Now, we are happy to share them with the world.
Many thanks to these folks for inspiration and hours of hard work getting this guide done:
Flaw #1: Constructor does Real Work
Flaw #2: Digging into Collaborators
Flaw #3: Brittle Global State & Singletons
Flaw #4: Class Does Too Much
Good stuff, none of the links work though :)
I have constructors that take an XPathNavigator instance that contains the configuration for that class.In your view, is it legitmate to have this sort of XML navigation work in the constructor?
This comment has been removed by the author.
Sorry, fixed the links
Thank you for your good post.I have a question about "Flaw #2: Digging into Collaborators" and "Dynamic type casting"."Dynamic type casting" means casting from one interface type to another interface type in Java or C#. Or I think QueryInterface() of COM does same thing.My question is that:Casting the interface,which is passed in, to another interface conforms to Flaw #2, Or Not.Thanks.Hyun Chang Lee.
The comments you read and contribute here belong only to the person who posted them. We reserve the right to remove off-topic comments.