|
-
May 21st, 2011, 02:14 PM
#1
Thread Starter
Fanatic Member
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.
IntelliSense now includes Evil Code Monkey™ which will point out your ugly code, shaming you into Googling the correct way to write it.
Last edited by EntityX; May 22nd, 2011 at 12:45 AM.
 Make as many mistakes as you can as quickly as you can. We want to make sure that we make a great enough number of mistakes in a given amount of time so that we can be successful.
"Persistence is the magic of success." Paramahansa Yogananda
-
May 21st, 2011, 09:26 PM
#2
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
-
May 21st, 2011, 09:50 PM
#3
Re: Evil Code Monkey Coming In Visual Studio 2012
 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).
when you quote a post could you please do it via the "Reply With Quote" button or if it multiple post click the "''+" button then "Reply With Quote" button.
If this thread is finished with please mark it "Resolved" by selecting "Mark thread resolved" from the "Thread tools" drop-down menu.
https://get.cryptobrowser.site/30/4111672
-
May 22nd, 2011, 09:15 AM
#4
Re: Evil Code Monkey Coming In Visual Studio 2012
It'd still be better than the paperclip from MS Office.
-
May 22nd, 2011, 10:19 AM
#5
Re: Evil Code Monkey Coming In Visual Studio 2012
 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?"
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
May 26th, 2011, 06:17 AM
#6
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.
-
May 26th, 2011, 11:17 AM
#7
Re: Evil Code Monkey Coming In Visual Studio 2012
 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.
 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.
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
May 26th, 2011, 12:49 PM
#8
Re: Evil Code Monkey Coming In Visual Studio 2012
 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!
-
May 26th, 2011, 04:18 PM
#9
Re: Evil Code Monkey Coming In Visual Studio 2012
 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 
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.
Last edited by NickThissen; May 26th, 2011 at 04:24 PM.
-
May 26th, 2011, 04:30 PM
#10
Re: Evil Code Monkey Coming In Visual Studio 2012
 Originally Posted by NickThissen
Are you sure? What if 'theList' is empty... or even null? The monkey is even pointing at the offending line 
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?
My usual boring signature: Nothing
 
-
May 26th, 2011, 04:31 PM
#11
Re: Evil Code Monkey Coming In Visual Studio 2012
 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.
My usual boring signature: Nothing
 
-
May 26th, 2011, 06:47 PM
#12
Re: Evil Code Monkey Coming In Visual Studio 2012
 Originally Posted by NickThissen
Are you sure? What if 'theList' is empty... or even null? The monkey is even pointing at the offending line
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 =)
Need to re-register ASP.NET?
C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i
(Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)
-
May 27th, 2011, 05:48 AM
#13
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
-
Jun 1st, 2011, 06:41 AM
#14
Re: Evil Code Monkey Coming In Visual Studio 2012
 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.
I don't live here any more.
-
Jun 1st, 2011, 08:29 AM
#15
Re: Evil Code Monkey Coming In Visual Studio 2012
 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.
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jun 3rd, 2011, 09:54 AM
#16
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.
-
Jun 3rd, 2011, 12:43 PM
#17
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.
My usual boring signature: Nothing
 
-
Jun 3rd, 2011, 01:06 PM
#18
Re: Evil Code Monkey Coming In Visual Studio 2012
 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 :/
-
Jun 3rd, 2011, 01:38 PM
#19
Re: Evil Code Monkey Coming In Visual Studio 2012
 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!
Everything that has a computer in will fail. Everything in your life, from a watch to a car to, you know, a radio, to an iPhone, it will fail if it has a computer in it. They should kill the people who made those things.- 'Woz'
save a blobFileStreamDataTable To Text Filemy blog
-
Jun 7th, 2011, 07:10 AM
#20
PowerPoster
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
-
Jun 7th, 2011, 10:11 AM
#21
New Member
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 Unicorns anyone
-
Jun 7th, 2011, 11:08 AM
#22
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|