Академический Документы
Профессиональный Документы
Культура Документы
Get Complex?
Why Does Code Get Complex?
LACK OF
High Cohesion & Low Coupling
high cohesion
when smaller pieces of functionality are strongly
related to each other within some code boundary
How well does that one thing stick to doing just one thing
func'on
1
func'on Closely related
func'on
func'on
MyDailySchedule MacDailySchedule
wakeUp() complex on()
brushTeeth() ashPreJyLights()
caeine() runOS()
work(code) sleep()
eatDinner() o()
createCourseraCourse()
lateSnack(cookies)
loseWeight() less complex
nap()
dragOutOfBed()
If we change how
Credit credit card processing
Shopping Charge card
Card is done, shopping cart
cart
Processing code wont change
Changing iPhone BaJery Changing LG G5 BaJery
complex
less complex