Visual Studio Gets Achievements, Badges, Leaderboards 353
bonch writes "Microsoft has introduced a gamification plugin for Visual Studio that lets users win achievements and badges as they compete on leaderboards by writing code. The full list of achievements includes gems like 'Go To Hell' for using goto, and 'Potty Mouth' for using five different curses in one file. This is another example of Gamification, one of the latest trends to hit social media."
I miss GOTO...there I said it (Score:5, Insightful)
I know that the established programmer hierarchy would have me burned at the stake for even hinting at it, but I miss my old GOTO statement. Call it sloppy if you like, but a simple one line statement beats the shit out of the acrobatics I often have to do in Java to SIMPLY JUMP OUT OF THIS METHOD/LOOP TO A SINGLE SPECIFIC POINT IN THE PROGRAM.
break;} //shit, still doesn't go where I need it to
break;}
break;}
return;}
Now, cue the voices of 1,000 programmers looking for a non-existent "disagree" mod and screaming at the top of their girlie lungs on why GOTO is EVIL, EVIL, EVIL--as they parrot the professors who taught them that.
Re:I miss GOTO...there I said it (Score:5, Insightful)
Re:I miss GOTO...there I said it (Score:5, Insightful)
Oblig. KXCD [xkcd.com]
seriously — they're totally missing the poin (Score:5, Insightful)
The idea of gamification is to give little awards for postitive behavior — or at least active engagement with the site/product/tool/whatever. A few of these fit that (the badge for working on a Saturday or Friday night), but most of them are labels of shame for doing things like writing a single line of code that is several screens too wide.
Re:"Gamification" doesn't make dull things a game. (Score:0, Insightful)
As a gamer, I am not pleased with this trend.
As a gamer, you were never going to be affected by this were you?
Gotta get 'em all (Score:5, Insightful)
There are many players who simply have to collect every single achievement. Considering what these achievements are like (use 20 single-letter variables, write a 300-character line etc.) I hope their behavior won't carry over to programming...
Re:"Gamification" doesn't make dull things a game. (Score:3, Insightful)
"achievements" ruin everything - games included.
Re:I miss GOTO...there I said it (Score:5, Insightful)
The Linux kernel uses goto statements. About 95000 times..
In the absence of exceptions, goto is a great tool for simplifying and clarifying error handling.
In a language with exceptions, goto is much less useful. I won't say it's never useful, but if I'm ever tempted to use goto for anything other than jumping to an error handling block, I know I need to take a step back and rethink the structure of the code, because there's almost certainly a better way.
Re:seriously — they're totally missing the p (Score:5, Insightful)
man, not vendor (Score:5, Insightful)
Achievements should be defined by management, not the software vendor.
WTF? (Score:5, Insightful)
Why would I want my dev environment to have leaderboards and be "gamified"?
I'm glad it's only a plugin, but to me this is part of the annoying trend that everything we do needs to be tied into social media ... I mean, "they can also brag about their achievements on Facebook and Twitter". Why on earth does everything we do nowadays need to be tied into Facebook and Twitter?
I'm waiting for the first wave of toilets with integration to those sites ... then we will truly widespread "Twitter Shitters" and other bits of stupidity.
Then again, maybe I'm just old and uncool, and all of the cool kids are doing this ... but to me this just sounds like something which is utterly pointless.
I've been trying to recover from decades of hating (Score:4, Insightful)
Seriously, I have been trying to get over the MS hate that I've had since Windows 3. They're just another big company, trying to do what they can and at least they try to compete in new markets even though they routinely get shelled by the competition when they stray off the desktop.
But WTF?!?. Badges in Visual Studio? For real? They have no idea what they are doing. Are they chasing 15 year old developers to be? This is a company with 10s of billions in cash that can subsidize products like Xbox for years and years. This is fucking Bob in the IDE.
Re:I miss GOTO...there I said it (Score:1, Insightful)
Re:I miss GOTO...there I said it (Score:4, Insightful)
Sometimes algorithms have complex break conditions. You are arrogant to judge so quickly when all you have is a code snippet. I love these people who glance at some code and then say "you should refactor/redesign that" and offer no more than vague suggestions. In situations where I have the authority, I respond by assigning them the task they themselves suggested. Guess what I do when they fail at the very task they themselves so derogatorily suggested?
Re:What real men use.. (Score:4, Insightful)
Smart men use the tool that makes the job the easiest.
Re:I miss GOTO...there I said it (Score:4, Insightful)
Yes. We used to do that in some of our source code bases. I always like how "important programmers" at "big companies" think 'goto' is verboten, but don't notice switch statements with fall-through cases. Because they're sooo much safer ;)
So I reversed that situation, and our incidence of resource handling errors went down markedly. As did our incidence of logic bugs from failing to break out of a switch.
In my opinion, obscuring the logic you're trying to express by using a workaround involving an arbitrarily "approved" keyword, obscures the logic.
Re:I miss GOTO...there I said it (Score:5, Insightful)
People misunderstand the point of the whole "goto is evil" thing. It's not that jumping around in code is evil. No program of any real value can run sequentially from start to finish. You have to jump around to do anything useful. Conditional processing, iteration, function calls, and exception handling all involve jumps of one kind or another. Whether the language calls it "goto" or gives it a different name doesn't change the fact that it's a jump.
However, there are a set of logical, structured jump patterns that have been well defined over the decades which produce readable, understandable, debuggable, extendable, logical code. These patterns include the constructs I described previously. Some languages have specific keywords for these constructs, while others rely on the keyword "goto" for their implementation. There's nothing wrong with using "goto" to implement one of these logical patterns, if that's how the pattern is implemented in that particular language.
However, it is possible in languages that have a "goto", to execute a jump that is outside of these known patterns. These illogical, seemingly random jumps result in code that is confusingly obfuscated, and consequently more error-prone, as well as harder to extend.
So, when people say "goto is evil", they're really saying "unstructured jumps are evil". Using such a construct might accomplish what you're trying to accomplish, but it will generally do so at the expense of readability, maintainability, and extendability of the code.
And yes, any language, whether it has a "goto" or not, can be abused by a properly (un)skilled programmer to create a chaotic mess of spaghetti code.
Achievemnt Unlocked! Use a C99 Compliant Compiler (Score:4, Insightful)