---
title: "Yesx (@hewuhu) | Hashnode"
description: "RECORD SHARE GROWTH. Read the latest articles by Yesx on Hashnode."
url: "https://hashnode.com/@hewuhu"
---

@hewuhu

# Yesx

@hewuhu · china · Joined May 2022

RECORD SHARE GROWTH

### [Design Patterns(4)--Creational: Prototype Pattern-Nothing is too small in prototype](https://yesx.hashnode.dev/design-patterns4-creational-prototype-pattern-nothing-is-too-small-in-prototype?utm_source=hashnode&utm_medium=feed)

When creating an object in the prototype pattern, we will find an origin object as a prototype. And we clone the prototype to create a new object. They have the same prototype and share the data and methods. object.create() is the self-realization of...

1 min read · [yesx.hashnode.dev](https://yesx.hashnode.dev/design-patterns4-creational-prototype-pattern-nothing-is-too-small-in-prototype?utm_source=hashnode&utm_medium=feed)

[Oct 17, 2022](https://hashnode.com/posts/design-patterns4-creational-prototype-pattern-nothing-is-too-small-in-prototype/634d0f85331ca37305f962f3)

### [2022-08&09 Notes](https://yesx.hashnode.dev/2022-0809-notes?utm_source=hashnode&utm_medium=feed)

This note was written on Oct 8, 2022 - day off :). After I joined citi, I learned that foreign companies never work on Saturdays and Sundays, even if we are on holiday. So I escaped the horror of taking seven days off and working seven days. This yea...

4 min read · [yesx.hashnode.dev](https://yesx.hashnode.dev/2022-0809-notes?utm_source=hashnode&utm_medium=feed)

[Oct 9, 2022](https://hashnode.com/posts/2022-0809-notes/63426466b48a14e919a24760)

### [设计模式（三）——创建型：单例模式-数据管理哲学](https://yesx.hashnode.dev/6k66k6h5qih5byp77yi5lij77yj4ocu4ocu5yib5bu65z6l77ya5y2v5l6l5qih5bypleavsoanrueuoeeqhuwtsuwtpg?utm_source=hashnode&utm_medium=feed)

单例模式的实现思路 单例模式就是保证一个类仅有一个实例，并提供一个访问它的全局访问点。 一般情况下，当我们创建了一个类后，可以通过new关键字调用构造函数进而生成任意多的实例对象。那我们该如何保证一个类仅有一个实例？其实要做到这一点，就需要构造函数具备判断自己能否已经创建过一个实例的能力。 class SingleDog { static instance: SingleDog; show() { console.log("我是一个单例对象"); } static g...

2 min read · [yesx.hashnode.dev](https://yesx.hashnode.dev/6k66k6h5qih5byp77yi5lij77yj4ocu4ocu5yib5bu65z6l77ya5y2v5l6l5qih5bypleavsoanrueuoeeqhuwtsuwtpg?utm_source=hashnode&utm_medium=feed)

[Sep 20, 2022](https://hashnode.com/posts/6k66k6h5qih5byp77yi5lij77yj4ocu4ocu5yib5bu65z6l77ya5y2v5l6l5qih5bypleavsoanrueuoeeqhuwtsuwtpg/63292dd099624fc71cd52f73)

### [设计模式（一）——开始：再出发-道与术](https://yesx.hashnode.dev/6k66k6h5qih5byp77yi5lia77yj4ocu4ocu5bya5ael77ya5yan5ye65yrlembks4juacrw?utm_source=hashnode&utm_medium=feed)

设计模式之道 设计模式中每一个模式描述了一个我们周围不断重复发生的问题，以及该问题的解决方案的核心。这样，我们就能一次又一次地使用该方案而不必做重复劳动。 设计模式出现的背景，是软件设计的复杂度日益飙升。软件设计越来越复杂的”罪魁祸首“，就是变化。而在实际开发中，不发生变化的代码可以说是不存在的。我们能做的只有将这个变化造成的影响最小化——将变与不变分离，确保变化的部分灵活、不变的部分稳定。 所以，我觉得设计模式的核心思想就是封装变化。 在设计模式中SOLID设计原则为其指导理论，它可以帮助我们...

1 min read · [yesx.hashnode.dev](https://yesx.hashnode.dev/6k66k6h5qih5byp77yi5lia77yj4ocu4ocu5bya5ael77ya5yan5ye65yrlembks4juacrw?utm_source=hashnode&utm_medium=feed)

[Sep 15, 2022](https://hashnode.com/posts/6k66k6h5qih5byp77yi5lia77yj4ocu4ocu5bya5ael77ya5yan5ye65yrlembks4juacrw/6322dca18350c8888bf30318)

### [设计模式（二）——创建型：工厂模式-区分变与不变](https://yesx.hashnode.dev/6k66k6h5qih5byp77yi5lqm77yj4ocu4ocu5yib5bu65z6l77ya5bel5y6c5qih5byplewmuuwihuwpmos4jus4jewpma?utm_source=hashnode&utm_medium=feed)

浅谈构造器 构造器代码示例： class User { name: string; age: number; carrer: string; constructor(name: string, age: number, career: string) { this.name = name; this.age = age; this.carrer = career; } } const user = new User("suxiong", 24, "...

2 min read · [yesx.hashnode.dev](https://yesx.hashnode.dev/6k66k6h5qih5byp77yi5lqm77yj4ocu4ocu5yib5bu65z6l77ya5bel5y6c5qih5byplewmuuwihuwpmos4jus4jewpma?utm_source=hashnode&utm_medium=feed)

[Sep 15, 2022](https://hashnode.com/posts/6k66k6h5qih5byp77yi5lqm77yj4ocu4ocu5yib5bu65z6l77ya5bel5y6c5qih5byplewmuuwihuwpmos4jus4jewpma/6322dc56633ce488662d9cb6)
