Dont Be STUPID Grasp SOLID          Anthony Ferrara        MidWestPHP 2013
DISCLAIMERS
None Of These  PrinciplesAre Limited To OOP
These ArePrinciples Not Laws(Well, Some Are)
function hash_password($password = NULL, $salt = NULL, $salt2){    if($password === NULL)        return FALSE;    if($salt...
STUPID
SingletonsTUPID
SingletonsTight CouplingUPID
SingletonsTight CouplingUntestable CodePID
SingletonsTight CouplingUntestable CodePremature OptimizationID
SingletonsTight CouplingUntestable CodePremature OptimizationIndescriptive NamingD
SingletonsTight CouplingUntestable CodePremature OptimizationIndescriptive NamingDuplication
The RuleOf Three
SOLID
Single Responsibility PrincipleOLID
Single Responsibility PrincipleOpen Closed PrincipleLID
Single Responsibility PrincipleOpen Closed PrincipleLiskov Substitution PrincipleID
Single Responsibility PrincipleOpen Closed PrincipleLiskov Substitution PrincipleInterface Segregation PrincipleD
Single Responsibility PrincipleOpen Closed PrincipleLiskov Substitution PrincipleInterface Segregation PrincipleDependency...
Law of   LeakyAbstractions
Law ofDemeter
Principle Of LeastKnowledge
Principle Of  LeastAstonishment
Principle Of GoodEnough
Anthony Ferrara   joind.in/8219    @ircmaxellblog.ircmaxell.comme@ircmaxell.comyoutube.com/ircmaxell
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Don't Be Stupid, Grasp Solid - MidWestPHP
Upcoming SlideShare
Loading in …5
×

Don't Be Stupid, Grasp Solid - MidWestPHP

4,758 views

Published on

Slides from my MidWestPHP talk on 3/3/2013

Published in: Technology
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
4,758
On SlideShare
0
From Embeds
0
Number of Embeds
90
Actions
Shares
0
Downloads
30
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

Don't Be Stupid, Grasp Solid - MidWestPHP

  1. 1. Dont Be STUPID Grasp SOLID Anthony Ferrara MidWestPHP 2013
  2. 2. DISCLAIMERS
  3. 3. None Of These PrinciplesAre Limited To OOP
  4. 4. These ArePrinciples Not Laws(Well, Some Are)
  5. 5. function hash_password($password = NULL, $salt = NULL, $salt2){ if($password === NULL) return FALSE; if($salt === NULL) $salt = config_item(encryption_key); $password = (string) $password; $salt = (string) $salt; $ci =& get_instance(); $ci->load->library(encrypt); $salt2 = $ci->encrypt->decode(base64_decode($salt2), config_item(encryption_key2)); return crypt( hash_hmac(whirlpool, $password, hash(sha512, crypt($salt, $6$rounds=100[000$ . hash(sha256, $salt) ) . $ ) ), $2y$12$. $salt2 .$ );}
  6. 6. STUPID
  7. 7. SingletonsTUPID
  8. 8. SingletonsTight CouplingUPID
  9. 9. SingletonsTight CouplingUntestable CodePID
  10. 10. SingletonsTight CouplingUntestable CodePremature OptimizationID
  11. 11. SingletonsTight CouplingUntestable CodePremature OptimizationIndescriptive NamingD
  12. 12. SingletonsTight CouplingUntestable CodePremature OptimizationIndescriptive NamingDuplication
  13. 13. The RuleOf Three
  14. 14. SOLID
  15. 15. Single Responsibility PrincipleOLID
  16. 16. Single Responsibility PrincipleOpen Closed PrincipleLID
  17. 17. Single Responsibility PrincipleOpen Closed PrincipleLiskov Substitution PrincipleID
  18. 18. Single Responsibility PrincipleOpen Closed PrincipleLiskov Substitution PrincipleInterface Segregation PrincipleD
  19. 19. Single Responsibility PrincipleOpen Closed PrincipleLiskov Substitution PrincipleInterface Segregation PrincipleDependency Inversion Principle
  20. 20. Law of LeakyAbstractions
  21. 21. Law ofDemeter
  22. 22. Principle Of LeastKnowledge
  23. 23. Principle Of LeastAstonishment
  24. 24. Principle Of GoodEnough
  25. 25. Anthony Ferrara joind.in/8219 @ircmaxellblog.ircmaxell.comme@ircmaxell.comyoutube.com/ircmaxell

×