Comment

Comment by simias

> I've hit similar issues to those mentioned in the article and it absolutely infuriates me when I have to jump through hoops (or worse, reduce the readability of my code) to push well thought out code that communicates intent, only to fall foul of a robot that doesn't understand nuance.

I don't use Ruby but I faced similar issues with Rust's clippy and rustfmt. But I still think it's better than the alternative.

Every time I'm tempted to override one of these links/formats because I feel like my way is better I like to remind myself that it's going to set a precedent for the other devs on the project, and it's only a matter of time before one of us does something that the others don't like and it's only a matter of time before we return to pointless arguing about coding style and inconsistent code formatting.

>Consistency is merely a tool, the goal should be readability/maintainability.

That's the thing though: consistency is somewhat objective (and enforceable), readability and maintainability not so much.

TFA is a good example of this: they argue that explicitly returning "nil" is more readable and better communicates intent but I suspect (once again, not being a Ruby coder myself) that other experienced Rubyists could respond that everybody knows that a method finishing without an explicit value ends up returning nil, and that adding explicit code to do is is just clutter and distracts from the important things.

parent simias 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton