AntiPatterns: Avoiding the Traps of Bad Design
Jeffrey RondeauSoftware Engineer
@JRondeau16http://jeffreyrondeau.wordpress.com
http://spkr8.com/t/64201
What is a design pattern?
What is an antipattern?
What is a code smell?
public const int Three = 3;
public const int Three = 4;
"If all you have is a hammer, everything looks like a nail."
Prioritize writing readable working code first
Favor safety and maintainability
If beginner: resist the urge to optimize
If expert: delay the decision to optimize
/* public class ContactValidator : BaseValidator { protected override ValidatorResult Evaluate(Contact contact) { if (contact.ValidationState != ValidationState.AwaitingValidation) { //TODO }
}
protected override ValidatorResult GetMaxValidatorResult() { throw new NotImplementedException(); }
public override string Name { //TODO Confirm name get { return "Temporary Name"; } } } */
client.GetMortgage().PaymentCollection().GetNextPayment().ApplyPayment(300.00)
client.ApplyMortgagePayment(300.00)
Jeffrey RondeauSoftware Engineer
@JRondeau16http://jeffreyrondeau.wordpress.com