First of all, why Docker?

At some point, I'm tired of installing these different applications on my mac. I need c++, python, ruby, mysql, postgresql etc all for different purposes. And once a while you will need a new version of all the packages. Having Docker removes the issue of having to dig into the code and fix every dependency once a while. Moreover, when I really need to fix something, since everything is documented in Dockerfile, it's easier for me to debug.

(閱讀全文......)

I've never notice that there's actually a formula for Fibonacci series. The only time I've ever written a program to calculate F(n) for Fibonacci was when I was learning how to use dynamic programming to reduce runtime.

(閱讀全文......)

Rails 中的 Hash 不是真的 Hash?

不知道你有沒有注意過,在 rails 中無意識用到的 Hash 可能跟正常在 ruby 中的 Hash 不太一樣。舉例而言在 controller 中常用的 params 你可以進行以下操作:

(閱讀全文......)

最近嘗試 webpacker + rails 的設定的時候在引入 bulma 這關就卡了超久,所以決定將我最後的設定分享出來。

(閱讀全文......)

前陣子開始研究 rails 原始碼時看到很多關於 debug 的技巧,便有感而發想寫些關於 rails debug 的紀錄。稍微介紹一下我平常在 debug 時常用的兩個 gem,pry 以及 byebug

(閱讀全文......)