Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

AntiPatterns: Avoiding the Traps of Bad Design

443 views

Published on

Antipatterns highlight the most common problems the software industry faces. In this session I will explain what an antipattern is, go into detail on some of the most common ones, and show you how to fix them.

Published in: Software
  • Be the first to comment

  • Be the first to like this

AntiPatterns: Avoiding the Traps of Bad Design

  1. 1. AntiPatterns: Avoiding the Traps of Bad Design Jeffrey Rondeau Software Engineer @]Rondeau16 http: //jeffreyrondeamwordpress. com
  2. 2. http: //spkr8.com/ t/64201
  3. 3. What is a design pattern?
  4. 4. What is an antipattern?
  5. 5. What is a code smell?
  6. 6. .< : . , , » ! I’ . é~ _ _ «x ’ . "/O _ 5 . _ . '§‘.3I_ - _ ‘ ‘ 1 ~ . ' ’ ‘ ‘fl / ' ‘ > _ l
  7. 7. public const int Three = 3;
  8. 8. public const int Three = 4;
  9. 9. Gornpletze Original Ivlotion Picture Score lvluaic Gnlnpoaued By QALPI-I I= AQI'VIIcI-IAEL
  10. 10. "If all you have is a hammer, everything looks like a nail. "
  11. 11. Prioritize writing readable working code first
  12. 12. Favor safety and maintainability
  13. 13. If beginner: resist the urge to optimize
  14. 14. If expert: delay the decision to optimize
  15. 15. r . .I4 .5 . .A. , , .- . . Purl: va. / Ll/ Ir“ ' ,1) . tan . a I. ‘ In In .1 a I. .. ate . . 4 ; . I- » . ... «
  16. 16. /* public class Contactvalidator : Basevalidator { protected override ValidatorResult Evaluate(Contact contact) { if (contact. Va1idationState I: Validationstate. AwaitingVa1idation) { / /TODO } } protected override ValidatorResult GetMaxValidatorResu1t() { throw new NotImp1ementedException(); } public override string Name { / /TODO Confirm name get { return "Temporary Name"; } }
  17. 17. *'*or~. .i*<«' ’ I '01‘ -1»: g’ ‘ ‘ 3 fi .5 “Cl
  18. 18. *3.‘ -‘-‘. ‘. .'= '.-; '.r»‘_. ~n. u.J5._'. vu «d . ‘r _ ‘ v u « = .—-3- :5 ". '». %¢nL-'5 v---«~' -*. = «’ 1-’ ST; -': .*
  19. 19. 3.. .
  20. 20. client . GetMortgage () . PaymentCollection () . GetNextPayment () . ApplyPayment (300 . 00)
  21. 21. client . ApplyMortgagePayment (300 . 00)
  22. 22. Jeffrey Bandeau Software Engineer @JRondeau15 httptll E9EEEEYEOIId$fl'l1a1M@EdpIESS. C01El

×