3 ms·
There's similar advice in the Ruby Style Guide - https://github.com/bbatsov/ruby-style-guide#no-comments https://github.com/bbatsov/ruby-style-guide#no-comments
by bozhidar 12y ago
There's similar advice in the Ruby Style Guide - https://github.com/bbatsov/ruby-style-guide#no-comments https://github.com/bbatsov/ruby-style-guide#no-comments
Comments often go out-of-sync with the code, so I think it makes a lot of sense to prefer writing comprehensible code instead of trying to explain with comments something totally incomprehensible.
- AlisdairO 12y agoIt's weird to me how people will slate low quality code, but think it's okay (or inevitable) to let comments go out of date. If your comments aren't useful, delete them. If they are, keep them up to date. It's part of behaving responsibly towards the rest of your team just as much as writing readable code is.