ResistingCOMPLEXITYwith Adam Wathan
View Slide
$gardener = new Gardener; $gardener->water($plant);
const names = ['Blair', 'Sam', 'Kelly'] names.reverse() // ['Kelly', 'Sam', 'Blair']
const names = "Blair, Sam, Kelly" names.split(', ') // ['Blair', 'Sam', 'Kelly']
$date = new DateTime; $date->format('l'); // 'Wednesday'
$gardener->water($plant);
ACANAGARDENERWATERPLANT.$gardener->water($plant);
ACANA{OBJECT}{METHOD}{PARAMETER.}( )$object->method($param);
ACANARRAYREVERSEnames.reverse()N
ACANASTRINGSPLITDELIMITER.names.split(', ')
ACANASTRINGSPLITDELIMITER.names.split(', ')BEUSING
ACANA{OBJECT}{METHOD}{PARAMETER}.object.method(param)BEUSING( )
METHODS AREAffordances
A ARRAYnames.reverse()NCAN REVERSEDBE
ACANADATEFORMATTEDFORMAT STRING.$date->format('l');BEUSING
ACANUSERSAVED.$user->save();BE
ACANA{OBJECT}{METHOD}{PARAMETER}.$object->method($param);BEUSING( )
ACANAGARDENERWATEREDPLANT.$gardener->water($plant);BEUSING
ACANAGARDENERWATEREDPLANTBEUSING
ACANPLANTWATEREDBE
$plant->water();
AGENT NOUNSEliminating
a·gent noun/ˈājənt noun/a noun denoting someone or somethingthat performs the action of a verb, typicallyending in -er or -or, e.g., worker,accelerator.
ENCAPSULATIONPromoting
CONQUERING YOURFear of Facades
$date = new DateTime('now', 'America/Chicago'); $date->format('Y-m-d H:i'); // 2018-07-25 09:00 $date->setTimezone('Australia/Sydney'); $date->format('Y-m-d H:i'); // 2018-07-26 00:00
MATTERErgonomics
PUSH SIDE WORK TOEvent Listeners
GOD OBJECTSBreaking up
NEW CONCEPTSUncovering
FUNCTIONMaybe you just need a
Thanks!@adamwathanhttps://adamwathan.me