Coding Bro

代码笔记哥的博客

TypeScript 技巧笔记

TypeScript Tips

Below are my personal notes on TypeScript. What is TypeScript and its relationship with JavaScript? See this article on Wiki.

JavaScript 技巧笔记

JavaScript Tips

Below are my personal notes on how to efficiently and smartly use JavaScript functions and features. “this” keyword In the code snippets below, assume there are already controllers wrapping them, ...

编程好习惯

Good Programming Habits

以下是我总结的一些编程好习惯 DRY (Don’t Repeat Yourself) Rule 利用添加parameters的方法实现DRY getPresidencyTerm(isWholeLife: boolean, term: number) string { if (isWholeLife) { return "终身制"; } else if (term) { ...

Mac上配置Python3虚拟开发环境

Configure Python3 Dev Environment on Mac with Virtualenv

自带的python2 首先,当你在Mac的命令行下敲python回车后,你一般会看到如下信息 Python 2.7.10 (default, Aug 17 2018, 19:45:58) [GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.0.42)] on darwin Type "help", "copyright", "credits...

Debug Experience

代码除错经验

2019 Jan 4 Why sometimes we don’t want to return a promise, instead just calling a promise? ie. return selection.save().then(() => { const action = selection.checked ? Action.BadActionCheck...

A series of Promise

Promise 系列讲

In computer science, future, promise, delay, and deferred refer to constructs used for synchronizing program execution in some concurrent programming languages. They describe an object that acts as...

iTerm2 oh-my-zsh Setup

iTerm2 oh-my-zsh 的设置

Mac’s own terminal environment has some issues, such as cannot split into panes, does not distinguish file and directory names. Setting up iTerm2 and oh-my-zsh can give you a good way of using the...