Homepage
Open in app
Sign in
Get started
耶穌與我
數據分析
行銷角落
觀點
歐洲交換攻略
生活記錄牆
馬拉松
Tagged in
Codewars
Han's|Sharing
Christian x Rails Developer x Runner
More information
Followers
105
Elsewhere
More, on Medium
Codewars
陳炯翰
in
Han's|Sharing
Sep 30, 2020
Codewars Ruby Challenge — Day 30/30
用 Format 轉換十六進位:Best Practice 提供的方法是 “%.2X%.2X%.2X” % [r, g, b]…
Read more…
陳炯翰
in
Han's|Sharing
Sep 28, 2020
Codewars Ruby Challenge — Day 29/30
學習非線性思考:題目在 Codewars 的 Best Practice…
Read more…
陳炯翰
in
Han's|Sharing
Sep 27, 2020
Codewars Ruby Challenge — Day 28/30
多行鏈結:這算是 Coding Style 的部分,也是從助教 DC 那邊學到的,出社會後很多團隊其實會規範程式碼單行最多…
Read more…
陳炯翰
in
Han's|Sharing
Sep 27, 2020
Codewars Ruby Challenge — Day 27/30
刷題前先簡單看個討論:刷題網站在 Codewars 上分成 test 與 attempt,前者只給 1, 2 個測試,後者就會給到…
Read more…
陳炯翰
in
Han's|Sharing
Sep 25, 2020
Codewars Ruby Challenge — Day 26/30
blank? 方法需要掛 active_support:寫這題剛好遇到想判斷「Array 是否為空」,直覺想使用 blank…
Read more…
陳炯翰
in
Han's|Sharing
Sep 25, 2020
Codewars Ruby Challenge — Day 25/30
學習
include? 方法:
當我們要找出字串中是否有包含某字元,這樣相對簡單的判斷在 ruby 直接提供「include?」方法 —…
Read more…
陳炯翰
in
Han's|Sharing
Sep 23, 2020
Codewars Ruby Challenge — Day 24/30
ruby 中 group_by 用法:# 如果以「是否為奇數」的條件分組…
Read more…
陳炯翰
in
Han's|Sharing
Sep 22, 2020
Codewars Ruby Challenge — Day 23/30
雖然我們看起來 “should return false” 兩個是一樣的,但在測試時,是在比對 object_id…
Read more…
陳炯翰
in
Han's|Sharing
Sep 22, 2020
Codewars Ruby Challenge — Day 22/30
學習
select 上的篩選不一定是直接針對每個「||」:
在不管在 map, select, each…
Read more…
陳炯翰
in
Han's|Sharing
Sep 20, 2020
Codewars Ruby Challenge — Day 21/30
使用 attr_reader 與有明確命名的取捨:以這題來說龍哥考量的應該是「精簡的程式碼行數」對他來說 name 與…
Read more…