Library v.s. Framework
終於看到一個簡單明瞭的分類方試 會 call 你的 method 的叫 framework, 只有你會 call 他的 method 的叫 library >- Framework: If you have code in a jar that you import a...
There are only 2 hard things in Computer Science
> There are only two hard things in Computer Science: cache invalidation and naming things. > -- Phil Karlton https://martinfowler.com/...
What’s Object Marshalling?
## What’s Object Marshalling? Object Marshalling 將資料轉換,用在不同程式間傳輸,就稱為 Object Marshalling (序列化) 例如 Sidekiq 會把 Object 變成 JSON 存進 ...
Conway's Game of Life
今年 Ruby Kaigi 看到 Matz 參加 live pair 做 Conway's Game of Life,才發現我常常聽到這個詞但從來沒去研究這到底是啥、為何這麼多人都知道 所以去查了一下,原來是一個模擬細胞生存的遊戲,吸引人的點在於這個遊戲可以有很多變體...
Mutation in Ruby, it tells why more and more people like pure functional (immutable function)
Some mind blown examples: ```rb [1] pry(main)> list = Array.new(5, "foo") # => ["foo", "foo", "foo", "foo", "foo"] [2] pry(main)> list[...
Metaprograming 做 after method callback
Magic ```ruby class Example def self.after(*names) names.each do |name| m = instance_method(name.to_s) # override ol...
About testing
unit test, integration test, acceptance test 有什麼不同呢? unit test 就是 test 最基本的東西,例如一個 function ,藉由確定每個 function 的正確性來確保程式正常運作 integration t...