Skip to content

Page 21

Software Craft8 min read

BP5 - Observer - Learn Design Pattern From Simple Things

Subscribers get notified the moment a new video drops. That's the Observer pattern - publishers and listeners fully decoupled.

#design-patterns#behavioral-patterns
Life4 min read

Bach Ma - From Conquering the Fear to Conquering the Mountain

Bach Ma National Park: a solo trip from fear to the summit. Rain, clouds, waterfalls, and the quiet reward of a rarely-climbed Vietnamese mountain.

#travel#life
Software Craft3 min read

BP4 - Handling Chain - Learn Design Pattern From Simple Things

A complaint travels through support tiers until someone handles it. That's the Chain of Responsibility design pattern explained simply.

#design-patterns#behavioral-patterns
Software Craft3 min read

BP3 - Command - Learn Design Pattern From Simple Things

As an army commander, you have to plan all the tasks for the soldiers, so that they can execute them. This process is called command.

#design-patterns#behavioral-patterns
Software Craft2 min read

SP3 - Tree - Learn Design Pattern From Simple Things

You need to store the leaves hierarchically, sometimes you will count the leaves. Tree will be a suitable structure to facilitate leaf counting.

#design-patterns#structural-patterns
Software Craft3 min read

CP5 - Singleton - Learn Design Pattern From Simple Things

Maintain one phone line indefinitely instead of repeatedly connecting and disconnecting. Learn the Singleton design pattern from simple things.

#design-patterns#creational-patterns
Software Craft4 min read

CP4 - Prototype - Learn Design Pattern From Simple Things

Having been with you for a long time, your robot has memories that regular manufacturing can't produce, now you want to clone it. Prototype will be your remedy.

#design-patterns#creational-patterns
Software Craft3 min read

BP2 - Strategy - Learn Design Pattern From Simple Things

As the coach of a strong team, you plan to attack to find a goal and then prioritize possession to preserve the score. This combination is called strategy.

#design-patterns#behavioral-patterns
Software Craft7 min read

SP2 - Decorator & Function Decorator & Closure - Learn Design Pattern From Simple Things

Ice cream gets better with extra flavor - and code gets richer with the Decorator pattern. Learn closures, function decorators, and object wrapping.

#design-patterns#structural-patterns