Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Search - "stylecop"
-
In C# using "this."
WHY? It doesn't help with readability. It just clutters up the code and adds nothing.
It should never be a required prefix.
What makes it worse is, Visual Studio greys it out because its not required!
Then there is stylecop. This got enabled on our project which generated 3000 build errors because of missing "this."9 -
Couple of the senior devs were reviewing some legacy service code, vilifying everything that was done. Too many files, not enough files, too many lines of code, etc. Standard Monday-Morning-Quarterback nonsense. Then they came across Thread.Sleep() in various exception handlers. The passive-aggressive -bleep- hit the fan. 'Idiot', 'Moron', "People don't know how to code..", etc. dog-pile rants for a good 5 minutes.
I thought "Code is only a couple of years old and had very little changes..I'll bet the original developer is still here."
So I look at the change history and sure enough the original developer was one of the dog-pilers, and the other dev changed the code just last year. Comments like "Major refactoring", "Increased Performance", etc and the changes were only removing comment blocks, and other stylecop suggestions. Oh...there was one change was Thread.Sleep(6000) to Thread.Sleep(1000). I guess that did technically "increase performance"
Would I get fired if I said "Shut the -bleep- up you -bleep-ing -bleep- heads" ? Hmm...probably. Better keep my opinions on devrant. -
Today, I applied StyleCop Analyzer to our project codebase.
over 40k of warnings sounds like fun :D2