Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Another thing I don't like about Ruby is how much the community has embraced the Clean Code brand of readability snake oil.

This also puts me off every time, and I've dealt with people who embrace this a lot as a Ruby programmer. Fortunately, you can ignore them and still enjoy writing Ruby code the way you want.



I inherited a project where this was taken to the extreme. We have a class that's used to calculate final pricing taking into account discounts, coupons, shipping fees (or free shipping). Each one of those values was implemented as methods but then we have a call like: method_a - method_b + method_c, but it turns out, method_a may be adding shipping_cost for it to then be subtracted out in method_b. We ended up refactoring this and removing all the needless methods and just have a simple inline calculation. Definitely not "clean".




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: