3 ms·
Great question. I would say just read the source of whatever libraries you like to use, and let your inner sense of "smell" guide you. Since you mentioned Ruby
by tboyd47 10y ago
Great question. I would say just read the source of whatever libraries you like to use, and let your inner sense of "smell" guide you.
Since you mentioned Ruby, start by reading Rails itself. For all the hate people have for it, I believe it really is a solid exemplar of above-average code. Reading through the ActiveRecord source just after Rails 3, and seeing the way it was semantically organized by feature via included modules, was an inspiring moment for me as a coder. It was probably the first time I'd seen code that was simultaneously practical, modular, and readable.
You should never trust people's statements about what techniques are good and bad in a language. It's called "code smell" because you can judge it for yourself without having others dictate a judgment for you. Just like you can decide for yourself whether something smells bad or good.