In the recent project, we’ve mentioned about one question:

why do we do our imports as relative paths rather than absolute paths? It’s not easy to figure out what’s the correct path.

We then start discussing what the pros and cons are for using an absolute path or relative path. To my best knowledge, I always voted for the relative path, cause that won’t cause a problem when we try to deploy the service into different file paths. But the con is that we need first to figure out what’s the correct import path. But using an absolute import path is the contrary.

Read more »

Use ESLint and Prettier to format your code in TypeScript


I think ESLint[1] is an essential thing when you try to create a project using JavaScript/TypeScript. That would be an excellent tool to parse the potential issues in your code.

Let’s check the philosophy of ESLint:

  • Everything is pluggable:
    • Rule API is used both by bundled and custom rules
    • Formatter API is used both by bundled and custom formatters
    • Additional rules and formatters can apply at runtime
    • Rules and formatters don’t have to be bundled to combine
  • Every rule:
    • Is standalone
    • Can be turned off or on (nothing can be deemed “too important to turn off”)
    • Can be set to a warning or error individually
  • Additionally:
    • Rules are “agenda-free” - ESLint does not promote any particular coding style
    • Any bundled rules are generalizable
  • The project:
    • Values documentation and clear communication
    • Is as transparent as possible
    • Believes in the importance of testing
Read more »


這篇主要是用來提醒自己, 在美國搬家要注意的相關事項. 畢竟還尚未成為美國公民之前, 在美國國內的搬家相關係法律還是需要遵守, 像是 告知義務

Change of Address Information
We strongly encourage you to update your address with USCIS to ensure you receive all correspondence and benefits from us in a timely manner and avoid possible delays related to your case.

Changing your address with the U.S. Postal Service will not change your address with USCIS. Please update your information with both USCIS and USPS.

Read more »


剛來美國信用記錄非常重要, 我還記得剛過來的時候, 因為沒有任何信用紀錄, 所以在申請信用卡的時候基本上都是被打槍, 只有極少數幾家不需要 SSN 不需要考慮你的信用紀錄的發卡行有提供申請的服務, 但會不會過還是不知道.

目前美國有三大信用局分別是 EQUIFAX, Experian, 跟 TransUnion. 我目前有開 Experian 的帳號, 其他兩家沒什麼接觸, 所以也不太知道他們的狀況. 而會對 EQUIFAX 關注的最主要原因就是因為日前沸沸揚揚的賠償事件 [1][2]. 2017 EQUIFAX 由於被 Hack [3][4], 造成將近 1.47 億筆個資洩漏. 紛紛擾擾兩年之後, 最後結果終於出來了.

Read more »


Why Spinnaker?

在開始使用 Spinnaker 之前, 先來了解一下它是什麼東西, 為什麼要使用它, 以及它能為我們整合開發上帶來什麼好處.

Netflix 推出這個開源的 project 用來做為 Continuous Integration (CI) 之後的發佈動作 (Continuous Delivery, CD) 最後一哩路. 而 Spinnaker 在 Github 上面對自己的定位:

Spinnaker is an open source, multi-cloud continuous delivery platform for releasing software changes with high velocity and confidence.

Read more »


趁著老婆生日的機會, 全家往南邊跑, 除了慶生之外, 也順便去看看傳說中的 Apple Park. 不看不知道一看嚇一跳. Apple Park 真的有夠大, 超級大, 世界無敵大. 不禁感嘆: Apple 真有錢 QQ. 先來一點介紹跟比較圖.

Apple Park


• Apple 總部大樓,環境優美。由 Steve Jobs 生前規劃, 設計靈感來自於 Jobs 對 Stanford University 的回憶, 充滿了可以激發合作和創新性的氛圍。
• Apple Park 所在地原先是佔地 500 萬平方英尺的柏油混凝土路面, 現已被鬱鬱蔥蔥的植被覆蓋,有超過 9000 株橡樹、紅杉和 37 種 不同類型的果樹,以及其它產自本地的耐旱性樹木。

Read more »


AMEX 是我覺得相當不錯的一家信用卡發行公司, 當申請某張信用卡通過的時候, 有機會可以快速拿到當下申請的信用卡卡號 (Instant Card Number). 根據很多網路上大大提供的資料, 是有可能在 instantly approved 的時候出現這個畫面.

Approved Screen

但本魯從來沒看到過這個畫面 GG. 不過有其他方式可以拿到當下你申請的信用卡卡號. 在 AMEX 官網裡面, 提供了一個 View Card Number 的選項. 如下圖:

Read more »


What’s a DFM?

Speaking of Dynamic Feature Module, we need to mention a little bit about the Android Application Bundle (*.aab) format first.

An Android App Bundle is a new upload format that includes all your app’s compiled code and resources, but defers APK generation and signing to Google Play.

Google Play’s new app serving model, called Dynamic Delivery, then uses your app bundle to generate and serve optimized APKs for each user’s device configuration, so they download only the code and resources they need to run your app. You no longer have to build, sign, and manage multiple APKs to support different devices, and users get smaller, more optimized downloads.

– from Google Developer

Read more »


How does it work?

Have you ever wondered what the quickest and easiest way to apply a change in your App immediately is? Many people have the first thought on their mind is to use the instant run installation from Android studio. That would be one possible solution.

But what if I ask you, can you do that without any installation and directly apply a new change to your project? You may say, how could that be possible? Yes, it’s possible to adopt changes without any installation. How to do? Let me show you. You can see the demo video below. I use the command-line tool to update the content of a TextView in the App quickly.

Read more »


I recently run into a problem that I would like to convert a video clip to a gif file cause I did the screen recording from my laptop, but the file size is too large (> 100MB) to upload to my blog. So, a reasonable solution is probably to shrink the size either by trimming the video or translating the video file to another format; for example, a possible format to upload is a gif file.

Here I would show you how to do it. It’s pretty simple. Thanks, @Alex Dergachev’s gist.

Read more »