Results 1 to 22 of 22

Thread: Evil Code Monkey Coming In Visual Studio 2012

  1. #1

    Thread Starter
    Fanatic Member EntityX's Avatar
    Join Date
    Feb 2007
    Location
    Omnipresence
    Posts
    798

    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.
    Name:  EvilCodeMonkey.png
Views: 15825
Size:  26.1 KB
    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

  2. #2
    PowerPoster JuggaloBrotha's Avatar
    Join Date
    Sep 2005
    Location
    Lansing, MI; USA
    Posts
    4,286

    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
    Currently using VS 2015 Enterprise on Win10 Enterprise x64.

    CodeBank: All ThreadsColors ComboBoxFading & Gradient FormMoveItemListBox/MoveItemListViewMultilineListBoxMenuButtonToolStripCheckBoxStart with Windows

  3. #3
    PowerPoster Nightwalker83's Avatar
    Join Date
    Dec 2001
    Location
    Adelaide, Australia
    Posts
    13,344

    Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by JuggaloBrotha View Post
    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

  4. #4
    Next Of Kin baja_yu's Avatar
    Join Date
    Aug 2002
    Location
    /dev/root
    Posts
    5,989

    Re: Evil Code Monkey Coming In Visual Studio 2012

    It'd still be better than the paperclip from MS Office.

  5. #5
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Talking Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by baja_yu View Post
    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

  6. #6
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    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.

  7. #7
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497

    Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by EntityX View Post

    Name:  EvilCodeMonkey.png
Views: 15825
Size:  26.1 KB
    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.
    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)

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by wossname View Post
    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!

  9. #9
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by Lord_Rat View Post
    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.

  10. #10
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by NickThissen View Post
    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

  11. #11
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by Hack View Post
    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

  12. #12
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497

    Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by NickThissen View Post
    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)

  13. #13
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    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

  14. #14
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by Shaggy Hiker View Post
    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.

  15. #15
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by wossname View Post
    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

  16. #16
    You don't want to know.
    Join Date
    Aug 2010
    Posts
    4,578

    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.

  17. #17
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,109

    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

  18. #18
    PowerPoster
    Join Date
    Apr 2007
    Location
    The Netherlands
    Posts
    5,070

    Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by Sitten Spynne View Post
    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 :/

  19. #19
    PowerPoster abhijit's Avatar
    Join Date
    Jun 1999
    Location
    Chit Chat Forum.
    Posts
    3,228

    Re: Evil Code Monkey Coming In Visual Studio 2012

    Quote Originally Posted by NickThissen View Post
    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

  20. #20
    PowerPoster
    Join Date
    Aug 2003
    Location
    Edinburgh, UK
    Posts
    2,773

    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

    MVP 2007-2010 any chance of a regain?
    Professional Software Developer and Infrastructure Engineer.

  21. #21
    New Member
    Join Date
    Jun 2011
    Posts
    0

    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

  22. #22
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    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
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width