1 Attachment(s)
Evil Code Monkey Coming In Visual Studio 2012
I was curious about when the next Visual Studio would come out. I know it went Visual Basic.NET 2002 then 2003, Visual Basic 2005, 2008 and 2010. I was wondering would it be a 2 or 3 year jump and see Visual Studio 2012 is coming. Found this article :
http://visual-studio-2012.com/
Apparently there is going to be an Evil Code Monkey in VS2012.
Quote:
IntelliSense now includes Evil Code Monkey™ which will point out your ugly code, shaming you into Googling the correct way to write it.
Attachment 83977
Re: Evil Code Monkey Coming In Visual Studio 2012
Lol, I'm not even sure if those features would ever be put into VS, but it'd be sweet if they did
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
JuggaloBrotha
Lol, I'm not even sure if those features would ever be put into VS, but it'd be sweet if they did
You would be surprised at some of the things Microsoft do! For that reason they should stay away from games and let the experts handle them (the games that is). :mad:
Re: Evil Code Monkey Coming In Visual Studio 2012
It'd still be better than the paperclip from MS Office.
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
baja_yu
It'd still be better than the paperclip from MS Office.
"It looks like you're bashing a MS Office feature. Would you like some help with that?" :bigyello:
Re: Evil Code Monkey Coming In Visual Studio 2012
If you're using .Net then all the monkey has to do is point at you.
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
EntityX
Apparently he's bugged. There's nothing wrong with the code in the screenshot.
Someone get another monkey to pick the bugs off him please.
Quote:
Originally Posted by Wossname_Corrected
If you're not using .Net then all the monkey has to do is point at you.
Fixed that for you.
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
wossname
If you're using .Net then all the monkey has to do is point at you.
Wait until Linux incorporates an Evil Code Monkey then you will be singing a different tune there mister!
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
Lord_Rat
Apparently he's bugged. There's nothing wrong with the code in the screenshot.
Someone get another monkey to pick the bugs off him please.
Are you sure? What if 'theList' is empty... or even null? The monkey is even pointing at the offending line :p
On topic... That would be an awesome feature, lol. It would be even better if it only showed up very briefly, and only when you're scrolling past it at a fast rate. You'd be like "Wait... what the HELL was that?", scroll back up and there'd be nothing there.
I like the 'Google it!' button though (although it would probably be 'Bing it!' if they actually did this), it makes sense. I'm pretty sure the first thing everyone does when they encounter an unknown error is copy/paste it into google.
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
NickThissen
Are you sure? What if 'theList' is empty... or even null? The monkey is even pointing at the offending line :p
Not necessarily, though. Of course you could add some code for validation into that routine, but it isn't always a good idea. The list is coming in as an argument. There are plenty of situations where it would make more sense to validate the input at a higher level and pass over the validation inside the method. If you can be certain of your input, then re-validation would be a waste.
This is an issue with the Code Analysis tool in MS. The code in that snippet would raise a flag (though not an Evil Code Monkey), as it stands, but it isn't necessarily the wrong way for the code to be written. Determining that is situational, not absolute, which is why it is just a flag. Would you really want a big ol' graphic popping over your code just to point out what is currently being pointed out by the Code Analysis tool?
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
Hack
Wait until Linux incorporates an Evil Code Monkey then you will be singing a different tune there mister!
Since Wosser is already working in Linux, then they don't really need an Evil Code Monkey, since they already have an Evil Script Kitty.
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
NickThissen
Are you sure? What if 'theList' is empty... or even null? The monkey is even pointing at the offending line :p
On topic... That would be an awesome feature, lol. It would be even better if it only showed up very briefly, and only when you're scrolling past it at a fast rate. You'd be like "Wait... what the HELL was that?", scroll back up and there'd be nothing there.
I like the 'Google it!' button though (although it would probably be 'Bing it!' if they actually did this), it makes sense. I'm pretty sure the first thing everyone does when they encounter an unknown error is copy/paste it into google.
You can't assume that is or isn't a problem. We don't have context. Ideally you'd check for that, but if this is a function that will only be called when you know the list is valid and not empty, you don't need to do size checking. And since the function isn't "in context" you can't tell.
I write functions like this all the time - when I know (at least "as designed") that there won't be a problem. It helps debugging too since if what I know isn't what happens, I get a debug break on the offending line with the offending variable and I check what the hell went wrong.
If the function IS going to be used with empty or null lists, I'd use it with proper error checking. (And ironically, throw an exception in code.)
In the release code, there's a try catch usually at the highest level just in case something slips through the net. =)
Edit: Side note - for problems like the one that's being solved with this function, I usually use built in methods anyway, such as .Find - Maybe the monkey is pointing out this is an education opportunity =)
Re: Evil Code Monkey Coming In Visual Studio 2012
That may be true, but the monkey is still right. As far has 'he' can tell, the code could throw an exception that is not caught. The code isn't wrong, but it could potentially be a problem, which is why I suppose you could call it 'ugly code'.
A decent evil monkey implementation would check all the calls to the method and see if there's any possibility of passing in invalid data. I think ReSharper for C# does things like that all the time; it can determine when code is unreachable, whether an if statement is always true or false, etc, across many levels of method calls. MS should talk to them before implementing the evil monkey ;)
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
Shaggy Hiker
Since Wosser is already working in Linux, then they don't really need an Evil Code Monkey, since they already have an Evil Script Kitty.
I just spend all my time pointing at web developers now. They are worthy of nought but contempt.
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
wossname
I just spend all my time pointing at web developers now. They are worthy of nought but contempt.
So you've been elevated to project manager status.
Re: Evil Code Monkey Coming In Visual Studio 2012
I've already got enough troubles with over-sensitive code analysis rules in our build. Here's some things that will break our build:
- Using/Imports statements are out of order.
- Two blank lines in a row.
- Not enough whitespace between the start of the comment and the comment token.
- Too much whitespace between the start of the comment and the comment token.
- Comments should be on top of a line, so don't try and leave a TODO at the bottom.
That's right, I've broken many a build by adding comments to a file. Curiously enough, the build happily allows me to commit code that throws NotImplementedException or has 500 TODOs. RAGE.
Re: Evil Code Monkey Coming In Visual Studio 2012
You need to figure out all the rules, then re-work the wording such that you can print them out in a bulleted list such as you have done, but changed so that taking the first letter of each bullet spells out WE ARE ANAL.
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
Sitten Spynne
I've already got enough troubles with over-sensitive code analysis rules in our build. Here's some things that will break our build:
- Using/Imports statements are out of order.
- Two blank lines in a row.
- Not enough whitespace between the start of the comment and the comment token.
- Too much whitespace between the start of the comment and the comment token.
- Comments should be on top of a line, so don't try and leave a TODO at the bottom.
That's right, I've broken many a build by adding comments to a file. Curiously enough, the build happily allows me to commit code that throws NotImplementedException or has 500 TODOs. RAGE.
How can you live with that lol. I can't see any point at all in any of those rules. I can understand coding standards but this is just insane... You're probably spending more time keeping to standards than actually writing code :/
Re: Evil Code Monkey Coming In Visual Studio 2012
Quote:
Originally Posted by
NickThissen
How can you live with that lol. I can't see any point at all in any of those rules. I can understand coding standards but this is just insane... You're probably spending more time keeping to standards than actually writing code :/
Welcome to Total Quality Management! :lol:
Re: Evil Code Monkey Coming In Visual Studio 2012
well you know, there is nothing stopping you from developing an add in for VS from VS2010.... and have an evil monkey plugin extension :)
Re: Evil Code Monkey Coming In Visual Studio 2012
Thanks for the interest in the site and +1 to NickThissen (and others) for spotting that the list could be null or empty. Seriously though guys, this article is a joke. This is a VB forum right? I'm amazed you're not forming an angry mob over my slagging of VB at the bottom there :p Unicorns anyone :)
Re: Evil Code Monkey Coming In Visual Studio 2012
"I'm amazed you're not forming an angry mob over my slagging of VB "
That's because unlike most proponents of other languages, WE know how to take a joke... we've been the butt of many a joke over the years... after all, VB is just a "toy" language, right?
-tg