CochranSanityCheck() method

I am writing a custom CochranSanityCheck() method.  Here's what I have so far....

If anyone has ideas for improvements, please let me know....

public void CochranSanityCheck()

{

                if(RequirementsNotDrivenByBusiness())

                                throw new FalseAssumptionException("Why?");

 

                if(OverEngineered())

                                throw new MaintainabilityThreasholdExceededException("Performance may be an issue as well…");

 

                if(UnderEngineered())

                            throw new MinimumFlexiblityThreasholdNotMetException("Were business requirements met?");

 

                if(HasSingleton () || HasGlobalsWithState())

                                throw new PotentialForCorruptStateException("Come on…. you are a better dev than this….");

 

                if(HasUnnessasryState())

                                throw new StateComplexityGrewExponentiallyException("It's clear you do not like your fellow developers.  This will really make them suffer when there is a bug and they have to read your code.");

 

                if(DependenciesNotInjected())

                                throw new NotTestableException("It's clear you do not like yourself.  Please make an appointment with a therapist");

 

}

Ebook Download
View all
Learn
View all