Derek Zeng

Loneliness is the gift of life

Modern JavaScript loading techniques

The most common way to load JavaScripts in a webpage is to use <script> tag. However, since JavaScript has the potential to change html, the browser usually blocks the rendering of subsequent...

Read more

The years in Canada - Torontonian

(Kitchener, April 2018) When I drove down to Tim Hortons this morning, the CBC radio was reporting the bad weather now in GTA. It mentioned something like 400 flights were cancelled in Pearson airp...

Read more


所谓知行合一也就是理论与实践相结合。其实不用说也知道这个在科技发展中的作用是至关重要的。 可以做到实践并不是一件容易的事情,有些情况不是想想办法就可以解决的。比如,AI 需要大数据来验证模型。这些数据可能需要从数以百万千万的人的身上收集。这么大的用户基础世界上只有屈指可数的几家公司可以做到。 再比如说想做大规模项目比如说高速铁路。光有技术是不够的,还需要有大量生产经验和运维经验来证实技术。一...

Read more


以前上中学的时候大家听歌都是看歌手的。一个歌手唱了首好听的歌,我们就疯抢着去买它的磁带。当然磁带里还包含了他所有其他的歌曲,就算不那么好听,我们也会幸然接受。这就是所谓的追星/崇拜吧。 国外有个说法叫pop culture,就是你听了一个歌手的歌觉得很好听就会对他的一切全盘接受。过了一段时间后,你发现他的歌也就那么一首好听,就不再去爱他。很善变。 别人的歌好听,不代表他的人好。更何况有许多歌...

Read more

吐槽 ruby module

其实ruby真的不容易学,因为它有太多非主流的东西了。今天我就来说说 ruby module. ruby module 的主要用途无非就是给function 分类,给其一个命名空间。 比如 module M def self.hello puts 'world' end end module N def self.hello puts '世...

Read more

A brief history of time - my understanding of spacetime

I've been thinking about this for quite some time. The very meaning of stopping time is to stop the movement of everything. Thus, the definition of time has to be relative to the positions of thin...

Read more

Comparison of change detection of top 3 frontend framework

I have written about VueJs's change detection before. Recently, I created a simplified version here. In my opinion, it's an exemplary usage of observer/observable pattern in the frontend. In this ...

Read more

A case on performance optimization

One task I finished recently was to optimize the loading time of table of content(ToC). ToC is the most important API we are using. Currently, it loads the entire table of content before the initia...

Read more

Solving cross browser scrolling issue

An interesting task I was assigned recently was to fix the app in RTL mode. Our app is an react app built using webpack. When it's working in the RTL mode, the react app will be under <body dir...

Read more

Python built-in tools that you must know

This is a study note about Python basics. (based on python 3.6) itertools Helper functions returns iterator. import itertools as it Infinite sequence count, cycle, repeat c = it.count(10) print...

Read more

1 2 3 4 5