Slide 1

Slide 1 text

Discovering Patterns Learning Lunch 2012 Series Zach Dennis

Slide 2

Slide 2 text

The Purpose Of This Lunch Re-introduce/refresh patterns Seek out, discover, and expose patterns Share internally, better our team Share externally, better the world

Slide 3

Slide 3 text

Patterns

Slide 4

Slide 4 text

Patterns Are Everywhere Nature Science Man-Made Art Software

Slide 5

Slide 5 text

Software Patterns low level bit pushing high-level concepts and abstractions programming languages frameworks architectural UX, IX, IA Process Domain

Slide 6

Slide 6 text

Even we don’t see them, they exist Even when we don’t consciously apply them, we employ them Even when we can’t articulate them, they still have a definition

Slide 7

Slide 7 text

Defined Intuitive Unknown 3 Categories Of Patterns

Slide 8

Slide 8 text

Defined Patterns Iterator Module Move Method MVC Accordion (UI)

Slide 9

Slide 9 text

We can discuss them, debate them, criticize them, employ them

Slide 10

Slide 10 text

Intuitive Patterns Employ them without knowing it We feel, sense, know them when they’re present Hard to describe, articulate Work well for the individual

Slide 11

Slide 11 text

Unknown Patterns They are present But we’re not aware of them Waiting to be discovered Can have intuition associated with them

Slide 12

Slide 12 text

Intuition in the Unknown You 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 don’t know why this code is great, it just is.

Slide 13

Slide 13 text

A Goal As Craftsmen Discover unknown patterns Expose intuitive patterns Deepen our common language to share solutions to types of problem sets Better ourselves, our teams Better the world

Slide 14

Slide 14 text

“If your language is empty, your buildings cannot be full. If your language is poor, you cannot make good buildings until 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, and the buildings live or not, according to the life your language has.” Christopher Alexander, The Timeless Way Of Building

Slide 15

Slide 15 text

A pattern communicates: intent, context (Brief what/why) problem statement (More in-depth what/why/examples) solution statement (How, When, Where) associated visualizations (software visualizations usually suck)

Slide 16

Slide 16 text

A Simple Definition A pattern is something that recurs, can be defined, has a rule which is sufficient for repetition, and provides contextual information about when it may apply.

Slide 17

Slide 17 text

Pro-Tip Because a pattern exists does not make it valuable. Even though it may be well defined, clearly communicated, and eloquently written.

Slide 18

Slide 18 text

“Pattern languages are a source of beauty and ugliness. The depth or banality comes from the pattern languages in the builder’s mind.” Christopher Alexander, The Timeless Way Of Building

Slide 19

Slide 19 text

Pro-Tip We should never approach building anything by thinking ahead that we’re going to use pattern X, Y, and Z. That is disastrous and a mistake of inexperience or misunderstanding

Slide 20

Slide 20 text

Pro-Tip cont... Patterns arise from paying meticulous attention to function. It is function which drives pattern usefulness, utility, and value. There are times we identify patterns ahead of time, but that should only come after understand context and function

Slide 21

Slide 21 text

The Barn Example This example is from Christopher Alexander, The Timeless Way Of Building

Slide 22

Slide 22 text

“You don’t work out the structural calculations every time you do it; once you are persuaded that this is a good way to build floors, you go on doing it that way, until you have some reason to rethink it.” Christopher Alexander, The Timeless Way Of Building

Slide 23

Slide 23 text

A Useful Pattern Is more than just repetition or ability to repeat. It is repetition with utility From paying meticulous attention to function and context

Slide 24

Slide 24 text

Primed and Ready To share patterns To find patterns To discuss them To debate them To criticize them To better our team And then better the world

Slide 25

Slide 25 text

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.

Slide 26

Slide 26 text

Open Discussion to: share any already defined patterns describe situations of intuitive patterns describe situations of unknown patterns we can pull up code we can draw on the whiteboards