Skip to content

Tag

#Coding

23 posts

Tech

Verify vs Cert: The Python Requests Handbook

Understanding SSL/TLS in Python Requests: The 'verify' and 'cert' arguments explained with interactive animations.

#Coding #Security
Tech

SP7 - Proxy - Learn Design Pattern From Simple Things

The boss wants the employees to focus on work and not get distracted by social media. So he decides to block some websites on the corporate network during working hours.

#Coding
Tech

SP6 - Object Pool - Learn Design Pattern From Simple Things

Producing planes on a large scale is expensive, but fortunately the manufactured raw parts are always stored in the pool, thereby reducing duplication in the production process.

#Coding
Tech

SP5 - Facade - Learn Design Pattern From Simple Things

There are many departments in the building and you feel confused! By opening the entrances from the facade according to purposes, you simply follow the pre-arranged flow.

#Coding
Tech

SP4 - Mixer - Learn Design Pattern From Simple Things

You are a dog farm owner who manages the properties of all dog breeds. The number of crossbred dogs is increasing every day because of the emergence of new breeds!

#Coding
Tech

BP10 - Mediator - Learn Design Pattern From Simple Things

In the discussion room without a teacher, you can speak or listen, but when you speak you need to make sure that everyone can hear. Therefore, a loudspeaker is a useful tool.

#Coding
Tech

BP9 - File History - Learn Design Pattern From Simple Things

Undo and redo are common features in editing software. They look simple on the surface, but how do they work internally? How do you design structure and behavior for them?

#Coding
Tech

BP8 - Visitor - Learn Design Pattern From Simple Things

Have you had a chance to watch The Spy Gone North? The spy infiltrated North Korea's secret locations, and collected its secrets effectively by applying the Visitor Pattern!

#Coding
Tech

BP7 - Template Method - Learn Design Pattern From Simple Things

Porsche and Lamborghini are the children of Volkswagen. Their manufacturing process uses the same structure because they both implement the Volkswagen Template Method.

#Coding
Tech

BP6 - State - Learn Design Pattern From Simple Things

Have you ever thought about the ATM logic? How is ATM logic organized to cover all cases without any misses? Do you feel confused when handling many operations on many states?

#Coding
Tech

BP5 - Observer - Learn Design Pattern From Simple Things

Some students in a class are attentive, but others are easily distracted. The teacher is indifferent to them; for her, they are all observers and she just performs her duty.

#Coding
Tech

BP4 - Handling Chain - Learn Design Pattern From Simple Things

As a laid-off employee, you prepare for a series of top companies, and then attempt to apply one by one (only apply the next if the current is rejected) until one hires you.

#Coding
Tech

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.

#Coding
Tech

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.

#Coding
Tech

CP5 - Singleton - Learn Design Pattern From Simple Things

Apply singleton to maintain a single phone line between the two sides indefinitely instead of repeatedly establishing and disconnecting multiple phone lines for efficiency.

#Coding
Tech

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.

#Coding
Tech

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.

#Coding
Tech

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

Having ice creams (popsicle, cone) and curious about how good it will be with extra flavor. For the most authentic experience, you should dip your ice creams in each flavor.

#Coding
Tech

CP3 - Builder - Design Pattern From Simple Things

Building a house involves bringing together many parts, each house has its own specific requirements, you need a builder who can easily implement what you want.

#Coding
Tech

BP1 - Gun (Iterator) - Design Pattern From Simple Things

There are bullets that need to be fired one by one in a specific order. You need a tool to set it up neatly and easily upgrade later.

#Coding
Tech

CP2 - Comparison between Factories: Simple Factory & Factory Method & Abstract Factory - Design Pattern From Simple Things

Simple Factory is da best, Factory Method and Abstract Factory are cumbersome, complicated and stupid?

#Coding
Tech

CP1 - Vending Machine (Factory) - Design Pattern From Simple Things

Different beverages are scattered in different stores, it's too tiring to run through each store to find your beverage. You wish all beverages were sold in one place.

#Coding
Tech

SP1 - Adapter - Learn Design Pattern From Simple Things

Having many devices that need to connect to your Macbook leads to too many cables. You need a tool to replace all those cables.

#Coding
You found a tiny easter egg. Keep poking around!