嗨,我是 Fly,用 Ruby 寫 Chatbot 並挑戰30天分享心得
為確保不會沒靈感
每日含 Ruby 主題文章增加內容
https://github.com/leo424y/clean-code-ruby
Comments
Bad:
do_stuff
# do_other_stuff
# do_some_more_stuff
# do_so_much_stuff
Good:
do_stuff
Bad:
# 2016-12-20: Removed monads, didn't understand them (RM)
# 2016-10-01: Improved using special monads (JP)
# 2016-02-03: Removed type-checking (LI)
# 2015-03-14: Added combine with type-checking (JR)
def combine(a, b)
a + b
end
Good:
def combine(a, b)
a + b
end