The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.
1. The lounge is for the CodeProject community to discuss things of interest to the community, and as a place for the whole community to participate. It is, first and foremost, a respectful meeting and discussion area for those wishing to discuss the life of a Software developer.
The #1 rule is: Be respectful of others, of the site, and of the community as a whole.
2. Technical discussions are welcome, but if you need specific programming question answered please use Quick Answers[^], or to discussion your programming problem in depth use the programming forums[^]. We encourage technical discussion, but this is a general discussion forum, not a programming Q&A forum. Posts will be moved or deleted if they fit better elsewhere.
4. No politics (including enviro-politics[^]), no sex, no religion. This is a community for software development. There are plenty of other sites that are far more appropriate for these discussions.
5. Nothing Not Safe For Work, nothing you would not want your wife/husband, your girlfriend/boyfriend, your mother or your kid sister seeing on your screen.
6. Any personal attacks, any spam, any advertising, any trolling, or any abuse of the rules will result in your account being removed.
7. Not everyone's first language is English. Be understanding.
Please respect the community and respect each other. We are of many cultures so remember that. Don't assume others understand you are joking, don't belittle anyone for taking offense or being thin skinned.
We are a community for software developers. Leave the egos at the door.
At its core, Microsoft is a company that makes its money the old fashioned way: by creating products of value that people willingly part with their money to use. They stand as a bulwark against the data mongering and user exploitation that Google and Facebook see as the future of humanity.
Never really thought much about it, but very true.
A Fine is a Tax for doing something wrong
A Tax is a Fine for doing something good.
So, since code analysis is included in Visual Studio these days, I figured I'd give it a try. It kicks out endless errors and warngings, every single one of which so far is either wrong or I would have to write far worse code just to make it understandable to the analysis tool in order to make it shut up.
The biggest single one so far is that it doesn't recognize that I'm doing a null check or some other check and calling a method that will throw the right exception or that I'm using an assert. I'm not template crazy like most folks these days, but my collections and various other things are templated. I try to keep as much code out of line as possible, and things like throwing exceptions are one of those. But that means it complains about every single place where that happens because it doesn't understand I'm dealing with the problem already.
Given that this already causes many hundreds of issues in headers that will be seen basically everywhere directly or indirectly, and I'm not about to hack my code up with hundreds of suppressions before I even really get started, that pretty much makes it useless for me.
When you write code to work around lackings in the code analyzer, and make your code more complex and less readable just to make it shut up, that's really letting the tail wag the dog. As I understand it, this is hardly specific to the VS analyzer either.
I was also disappointed with it. It did find a few things, but I had to disable various errors and warnings just to find them amongst all its drool. It was a while ago that I used it, but I seem to recall that it was obsessed with using smart pointers and tagging functions noexcept. I think it's a plug-in that Microsoft took from a third party. In any case, I'd already written one[^], though it only understands the subset of C++ that I use.
And, even worse, if you are writing a large, multi-platform system, where different compilers/tools are going to be used, and they will all have their own error/warning codes, it will just be a mess. Creating a macro to hide the suppression mechanism won't help with the error codes.
I guess you could say that only one platform will get code analysis but that doesn't seen practical.
Anything that is unrelated to elephants is irrelephant Anonymous - The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944 - Never argue with a fool. Onlookers may not be able to tell the difference. Mark Twain
Yep, a picture of person who can complete a sentence. Oi! these puns have felon hard times.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
Do the Thieves Guild first: serious sneak - and the Grey Fox cowl - really helps with the Dark Brotherhood questline. Kill anyone you want in front of the guards wearing it, take it off and they stop hunting you. It's also possible to keep the Boots of Springheel Jak, which helps a lot as well.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
AntiTwitter: @DalekDave is now a follower!