Post on 27-Jun-2015
Embed Size (px)
DESCRIPTIONThis slide-deck is from a learning session given at Mutually Human Software in on February 2nd. It is a brief refresher and re-introduction for the concept of design patterns in the world of software development and what they mean to us as software craftsmen.
- 1. Discovering PatternsLearning Lunch 2012 Series Zach Dennis
2. The Purpose Of This LunchRe-introduce/refresh patternsSeek out, discover, and expose patternsShare internally, better our teamShare externally, better the world 3. Patterns 4. Patterns Are EverywhereNature Science Man-Made Art Soft ware 5. Soft ware Patternshigh-level concepts and abstractionsDomainProcessUX, IX, IAarchitectural frameworks programming languageslow level bit pushing 6. Even we dont see them, they existEven when we dont consciously applythem, we employ themEven when we cant articulate them,they still have a definition 7. 3 Categories Of Patterns Defined Intuitive Unknown 8. Defined PatternsIteratorModuleMove MethodMVCAccordion (UI) 9. We can discuss them, debate them,criticize them, employ them 10. Intuitive PatternsEmploy them without knowing itWe feel, sense, know them when theyrepresentHard to describe, articulateWork well for the individual 11. Unknown PatternsThey are presentBut were not aware of themWaiting to be discoveredCan have intuition associated with them 12. Intuition in the UnknownYou find some code that is awesome to work in.You try to share it with someone.You can only describe it as simple, well-factored, intuitive, easy to use, awesome, etc.You dont know why this code is great, it just is. 13. A Goal As CraftsmenDiscover unknown patternsExpose intuitive patternsDeepen our common language to share solutionsto types of problem setsBetter ourselves, our teamsBetter the world 14. If your language is empty, your buildings cannot be full.If your language is poor, you cannot make good buildingsuntil you enrich your language.If your language is rigid, your buildings must be rigid.If your language is florid, your buildings will be florid.Your language generates the buildings which you make, andthe buildings live or not, according to the life your languagehas.Christopher Alexander, The Timeless Way Of Building 15. A pattern communicates:intent, context (Brief what/why)problem statement (More in-depth what/why/examples)solution statement (How, When, Where)associated visualizations (soft ware visualizations usually suck) 16. A Simple DefinitionA pattern is something that recurs, canbe defined, has a rule which is sufficientfor repetition, and provides contextualinformation about when it may apply. 17. Pro-TipBecause a pattern exists does not makeit valuable.Even though it may be well defined,clearly communicated, and eloquentlywritten. 18. Pattern languages are a source of beauty andugliness. The depth or banality comes from thepattern languages in the builders mind.Christopher Alexander, The Timeless Way Of Building 19. Pro-TipWe should never approach buildinganything by thinking ahead that weregoing to use pattern X, Y, and Z.That is disastrous and a mistake ofinexperience or misunderstanding 20. Pro-Tip cont...Patterns arise from paying meticulousattention to function.It is function which drives patternusefulness, utility, and value.There are times we identify patternsahead of time, but that should onlycome after understand context andfunction 21. The Barn ExampleThis example is from Christopher Alexander, The Timeless Way Of Building 22. You dont work out the structural calculationsevery time you do it; once you are persuaded thatthis is a good way to build floors, you go on doing itthat way, until you have some reason to rethinkit. Christopher Alexander, The Timeless Way Of Building 23. A Useful PatternIs more than just repetition or ability torepeat.It is repetition with utilityFrom paying meticulous attention tofunction and context 24. Primed and ReadyTo share patternsTo find patternsTo discuss themTo debate themTo criticize themTo better our teamAnd then better the world 25. Some common examples Low level: Iterator, modules, classes, good variable/ method/class names, well named tests, behavior oriented tests, Side Effect Free functions, Value Objects Mid-level: MVC/MVP/Presenter-First, Responsibility layers, convention of directory structure, Service Patterns, Dumb Client, Data Context & Interaction, etc) High-level: Continuous Integration, Automated Tests, Git Workflow, Pivotal Tracker Workflow, Iterations Super high-level: Product development patterns like Feedback loops Stand-up, Iteration, Milestone/Release, Project Mgmt patterns like Weekly Budget, etc. 26. Open Discussion to:share any already defined patternsdescribe situations of intuitive patternsdescribe situations of unknownpatternswe can pull up codewe can draw on the whiteboards