News for hackers. Stuff that matters.
Re:20 Years of .NET by 29athrowaway on Monday February 14, 2022 @07:28AM (#30331195)
I liked working with FxCop and StyleCop.

I liked seeing the expressions of frustration when developers that were sloppy with their coding style were no longer able to get away with code that didn't meet the coding standards.

When it was adopted it literally made some people scream in frustration, and I loved it for that.

The default ruleset of StyleCop is absolutely brutal and unforgiving with messy code.

Re:20 Years of .NET by JackMorgan on Monday February 14, 2022 @07:36AM (#30331270)
I tend to be of the camp that if a tool can automatically detect issues, they usually aren't that important of an issue. The real messes that lose money can't be cleaned with a formatter or detected with a tool.
Re:20 Years of .NET by 29athrowaway on Monday February 14, 2022 @07:57AM (#30331450)
Some problems could be fixed by autoformatting, some others could not because they involved a decision.

For example:

- StyleCop validated variable names beyond just casing, and forced you to decide how to comply.

- StyleCop validated the number of arguments in methods, the length of a method and the length of statements.

- StyleCop would identify situations when a variable should be created for a expression.

Every large mess starts as a smaller mess, and that smaller mess is usually low quality code.

Re:20 Years of .NET by EVa5I7bHFq9mnYK on Tuesday February 15, 2022 @02:35AM (#30343770)
I was tasked with running an autocorrector on all our code once in 6 months. On average, out of thousands problems it detected, 1-2 came out as real hard bugs, that would never been caught by programmers or the testing team. 1-2 bugs for a day of work is not that bad.