RuboCop 0.80: Ruby static code analyzer and code formatter
21–30 of 54 posts
Re: RuboCop 0.80: Ruby static code analyzer and code formatter
#22Earlier quoted context omitted.
I would ask if you're doing Ruby, or object oriented design? Because the first rule of SOLID is Single-Responsibility, and there is this great concept frequently repeated in the OO design circles of Ruby conference talks, "I just want to send a method to an object." I can't say for sure that your method longer than 5 lines is breaking this rule, but if I was a betting man, I'd bet it's breaking one of those rules. Ch…
I appreciate this detailed response, but I'm afraid if it takes an essay to respond to a simple question of "why break out if more than 5 lines", and the reader with 15 years of programming experience who's well-versed in half a dozen general purpose prog langs still haven't got a clue after reading it, it suggests to me that this is cargo-cult programming. Ruby is not the first language that has OOPish constructs, b…
Please don't feel like I'm talking down to you. We are the same. I don't even use these tools, and my methods are very often too long.
Re: RuboCop 0.80: Ruby static code analyzer and code formatter
#23In my opinion RuboCop is too strict. Every code standard analyzer takes some tweaking to get it set up for a particular project and team standards, but RuboCop needs changing of a ton of rules to make it even usable in a reasonable fashion. I love it because it brings some order to a meta-everything world, but it'd be nice if it came with a reasonable set of rules by default
Every RuboCop rule is reasonable. That is, you can look up the reason and see if you agree or not. Our team has overridden about a dozen rules (we bumped up line length and class length), but I find most of the default rules are fine. Out of curiosity, what rules are unreasonable to you?
Re: RuboCop 0.80: Ruby static code analyzer and code formatter
#24Since the project hasn't been discussed much on HN, we changed the URL from https://github.com/rubocop-hq/rubocop/releases/tag/v0.80.0 to the project page.
Re: RuboCop 0.80: Ruby static code analyzer and code formatter
#25In my opinion RuboCop is too strict. Every code standard analyzer takes some tweaking to get it set up for a particular project and team standards, but RuboCop needs changing of a ton of rules to make it even usable in a reasonable fashion. I love it because it brings some order to a meta-everything world, but it'd be nice if it came with a reasonable set of rules by default
Every RuboCop rule is reasonable. That is, you can look up the reason and see if you agree or not. Our team has overridden about a dozen rules (we bumped up line length and class length), but I find most of the default rules are fine. Out of curiosity, what rules are unreasonable to you?
Re: RuboCop 0.80: Ruby static code analyzer and code formatter
#26Earlier quoted context omitted.
The thing about that is, what's reasonable for you and your team is not always reasonable for me and my team. Case and point, 80 character line limit: this was a reasonable limit when command lines were not usually rendered inside of high-res framebuffers, I have my font set to 12 point M+ font, which is a narrow width font, so my terminals are set to open at 180 characters wide and it only takes up half the width of…
> Case and point, 80 character line limit: this was a reasonable limit when command lines were not usually rendered inside of high-res framebuffers, I have my font set to 12 point M+ font, which is a narrow width font, so my terminals are set to open at 180 characters wide and it only takes up half the width of my screen. Use three terminals? No, seriously, you can pack even more information into the screen than you…
I use standard Linux tools for development, and none of the tools themselves have any column standard. Probably text-only emails are the only thing that have a "standard" of 80 columns.
> most terminals on GUI machines start up for the first time with 24 rows and 80 columns
This doesn't really mean anything. I don't think there's anybody who leaves the terminal as it is, as even on a modest 1080, that'd be one quarter of the screen area.
Re: RuboCop 0.80: Ruby static code analyzer and code formatter
#27Earlier quoted context omitted.
The thing about that is, what's reasonable for you and your team is not always reasonable for me and my team. Case and point, 80 character line limit: this was a reasonable limit when command lines were not usually rendered inside of high-res framebuffers, I have my font set to 12 point M+ font, which is a narrow width font, so my terminals are set to open at 180 characters wide and it only takes up half the width of…
80 characters is nice for side by side buffers. Also, lines that are too long horizontally are difficult to scan (especially if they are much longer than the lines around them) and can benefit from some work on vertical layout.
I get the difficult to scan point (although I find it subjective) but the side-by-side argument is optimizing for a comparatively small use case.
Re: RuboCop 0.80: Ruby static code analyzer and code formatter
#28Earlier quoted context omitted.
80 characters is nice for side by side buffers. Also, lines that are too long horizontally are difficult to scan (especially if they are much longer than the lines around them) and can benefit from some work on vertical layout.
How much time do developers spend on side by side buffers? I get the difficult to scan point (although I find it subjective) but the side-by-side argument is optimizing for a comparatively small use case.
Re: RuboCop 0.80: Ruby static code analyzer and code formatter
#29Earlier quoted context omitted.
80 characters is nice for side by side buffers. Also, lines that are too long horizontally are difficult to scan (especially if they are much longer than the lines around them) and can benefit from some work on vertical layout.
How much time do developers spend on side by side buffers? I get the difficult to scan point (although I find it subjective) but the side-by-side argument is optimizing for a comparatively small use case.
Re: RuboCop 0.80: Ruby static code analyzer and code formatter
#30Earlier quoted context omitted.
80 characters is nice for side by side buffers. Also, lines that are too long horizontally are difficult to scan (especially if they are much longer than the lines around them) and can benefit from some work on vertical layout.
How much time do developers spend on side by side buffers? I get the difficult to scan point (although I find it subjective) but the side-by-side argument is optimizing for a comparatively small use case.