Strategy Pattern and Factory Pattern with Dota2 Heroes

In this post, I will introduce the strategy pattern and factory patterns using Dota2 Heroes as examples. Dota2 is a multiplayer online battle arena (MOBA) video game, a sequel to Defense of the Ancients (DotA), played in matches between two teams of 5 players. Each player independently controls a powerful character, known as a “hero”, with unique abilities and roles.

努力适应、感恩生活:在家工作三个月后的随想

在美国新冠疫情爆发之前,我偶尔也在家工作。因为我平时通勤的时间很长(单程90分钟),所以每次在家工作的时候,都觉得偷得浮生半日闲,可以用省下的时间读读书,做做瑜伽,或者睡个懒觉。我从来没想过在家工作会成为新常态,也没有做好在家打持久战的准备。同样没有做好准备的是我的猫,Maru,它估计在想“铲屎官怎么还不出门给我赚钱?她居然敢坐在我睡觉的御座上?能不能不要在我打盹的时候骚扰我啊!!!”

Adapt and Thrive: thoughts after working from home for 3 months

In the pre-COVID19 era, I used to work from home occasionally and treated it as a break from my long daily commute (90 min one-way). I spent the saved time reading, exercising, or sleeping. I never thought that working from home would be the new norm and I was not prepared for a seamless work & life, nor was my cat Maru – he was probably thinking “why is this hooman being not hunting outside? why is she still sitting on my sleeping chair? and stop disturbing my day-time nap!!!”