Click here to Skip to main content
15,887,477 members

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrassing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
AnswerRe: SA1122 : CSharp.Readability Pin
Eddy Vluggen14-Jun-16 3:21
professionalEddy Vluggen14-Jun-16 3:21 
GeneralRe: SA1122 : CSharp.Readability Pin
Kornfeld Eliyahu Peter30-May-16 6:34
professionalKornfeld Eliyahu Peter30-May-16 6:34 
GeneralRe: SA1122 : CSharp.Readability Pin
Eddy Vluggen30-May-16 6:52
professionalEddy Vluggen30-May-16 6:52 
GeneralRe: SA1122 : CSharp.Readability Pin
Kornfeld Eliyahu Peter30-May-16 7:33
professionalKornfeld Eliyahu Peter30-May-16 7:33 
GeneralRe: SA1122 : CSharp.Readability Pin
PIEBALDconsult30-May-16 6:37
mvePIEBALDconsult30-May-16 6:37 
GeneralRe: SA1122 : CSharp.Readability Pin
Eddy Vluggen30-May-16 6:44
professionalEddy Vluggen30-May-16 6:44 
GeneralRe: SA1122 : CSharp.Readability Pin
Deflinek30-May-16 7:30
Deflinek30-May-16 7:30 
GeneralRe: SA1122 : CSharp.Readability Pin
Eddy Vluggen30-May-16 7:53
professionalEddy Vluggen30-May-16 7:53 
Deflinek wrote:
If you don't like this particular rule just disable it.
It is there for a reason, which may or may not be valid, but I do want to know the reasoning behind it. My liking is irrelevant, I want to weigh the implications of both scenario's.

Deflinek wrote:
I actually use string.Empty as it is more readable for me. Shorter code =/= more readable (try only single letter class members...).
No, it is not more readable for you. You might prefer it, but it is not more readable. It takes more symbols to convey the same information, meaning your brain will have to do more validation.

v equalz Onehundredandeighty plus sixtynine
is not more readable than
v = 180 + 69;
That's not even a matter of preference. I do admit that shorter code is not more readable by definition; it does not help if things are obfuscated, but that's hardly the case here, is it? We are simply re-using a long-accepted version of "empty string" (known as such in various languages), instead of calling a (static?) member on an class (which is local to the language, without adding any benefits that are known to me).

Deflinek wrote:
There are other rules that I find annoying however.
It is not that I find it annoying, I'm challenging its validity.

Deflinek wrote:
Overall quality of our code significantly improved when we stared threat CA warnings as errors
No arguing that, every warning is one too many.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

GeneralRe: SA1122 : CSharp.Readability Pin
Deflinek30-May-16 8:10
Deflinek30-May-16 8:10 
GeneralRe: SA1122 : CSharp.Readability Pin
Eddy Vluggen30-May-16 8:23
professionalEddy Vluggen30-May-16 8:23 
GeneralRe: SA1122 : CSharp.Readability Pin
Deflinek30-May-16 9:11
Deflinek30-May-16 9:11 
GeneralRe: SA1122 : CSharp.Readability Pin
Eddy Vluggen30-May-16 9:25
professionalEddy Vluggen30-May-16 9:25 
GeneralRe: SA1122 : CSharp.Readability Pin
V.30-May-16 9:41
professionalV.30-May-16 9:41 
GeneralRe: SA1122 : CSharp.Readability Pin
Eddy Vluggen30-May-16 9:58
professionalEddy Vluggen30-May-16 9:58 
GeneralRe: SA1122 : CSharp.Readability Pin
Richard Deeming1-Jun-16 2:50
mveRichard Deeming1-Jun-16 2:50 
GeneralRe: SA1122 : CSharp.Readability Pin
Eddy Vluggen1-Jun-16 3:01
professionalEddy Vluggen1-Jun-16 3:01 
GeneralRe: SA1122 : CSharp.Readability Pin
Rob Grainger14-Jun-16 0:25
Rob Grainger14-Jun-16 0:25 
GeneralRe: SA1122 : CSharp.Readability Pin
Rob Grainger14-Jun-16 0:30
Rob Grainger14-Jun-16 0:30 
GeneralRe: SA1122 : CSharp.Readability Pin
Stefan_Lang24-Jun-16 2:58
Stefan_Lang24-Jun-16 2:58 
GeneralRe: SA1122 : CSharp.Readability Pin
David A. Gray1-Jul-16 21:29
David A. Gray1-Jul-16 21:29 
GeneralRe: SA1122 : CSharp.Readability Pin
F-ES Sitecore6-Jul-16 23:01
professionalF-ES Sitecore6-Jul-16 23:01 
GeneralRe: SA1122 : CSharp.Readability Pin
sibling1231-Sep-16 1:37
sibling1231-Sep-16 1:37 
GeneralRe: SA1122 : CSharp.Readability Pin
Eddy Vluggen1-Sep-16 3:46
professionalEddy Vluggen1-Sep-16 3:46 
GeneralYes, I know it's 2016 Pin
PIEBALDconsult26-May-16 17:04
mvePIEBALDconsult26-May-16 17:04 
GeneralRe: Yes, I know it's 2016 Pin
Brisingr Aerowing27-May-16 2:55
professionalBrisingr Aerowing27-May-16 2:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.