Why aren't there...
-
Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
Because the latter should never exist.
-
Because the latter should never exist.
Neither should many things - but they do (and i disagree anyway, there is a legitimate reason for commenting out code). it would be real nice if I could comment out code and it appeared in the IDE differently to programming comments
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
How about this excellent tool then. Look under the Comments Extender. The other extensions are also very handy. http://www.axtools.com/products-vs2010-extensions.php[^]
-
Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
Because it might become redundant.
-
How about this excellent tool then. Look under the Comments Extender. The other extensions are also very handy. http://www.axtools.com/products-vs2010-extensions.php[^]
Thanks, I'll take a squiz!
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
This is the place for #ifdefs.
Peter Wasser Art is making something out of nothing and selling it. Frank Zappa
Hmm - good point. That's quite nice for blocking out code. thanks
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
Because the latter should never exist.
So do bugs.
FILETIME to time_t
| FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy -
So do bugs.
FILETIME to time_t
| FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchyRight, but I personally don't purposely plant them throughout my code.
-
Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
In addition to #ifdef, I mostly use
#if 0
#endifWhich gets over the problem of a block of code you're killing temporarily but want to leave in place for reference - and it has /* comments */ in it. Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
-
Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
Right, but I personally don't purposely plant them throughout my code.
That's what you always say!
FILETIME to time_t
| FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy -
Because the latter should never exist.
AspDotNetDev wrote:
Because the latter should never exist.
I agree! That's what Version Control is for! You *do* have version control on your project, don't you?
'As programmers go, I'm fairly social. Which still means I'm a borderline sociopath by normal standards.' Jeff Atwood 'I'm French! Why do you think I've got this outrrrrageous accent?' Monty Python and the Holy Grail
-
Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
_Maxxx_ wrote:
'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
Or even 'They say they don't want this bit anymore, but I reckon a month or two down the line they'll want it back again'.
Every man can tell how many goats or sheep he possesses, but not how many friends.
-
Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
Although dingleberries are to be avoided, we all know IRL people get lazy/forgetful and they happen so, yes, I could see a use for a specialized dingleberry comment. Lacking such a thing i tend to simply place a TODO in the comment, e.g.
//TODO : remove once no longer needed for reference
//
//public void foo()
//{
// DoALLtheThings();
//}Pedis ex oris Quidquid latine dictum sit, altum sonatur
-
Two types of comment? The 'Here's some information about this code' comment and the 'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
_Maxxx_ wrote:
'I'm commenting out this code because it probably isn't required but I want to keep it here for a bit, just in case' comment?
Or even 'They say they don't want this bit anymore, but I reckon a month or two down the line they'll want it back again'.
Every man can tell how many goats or sheep he possesses, but not how many friends.
Many years ago I worked for a software house who were contracted at a local business. On my first day I was introduced around and the team leader gave me an easy job to get stuck into - a simple report program that required the addition of an extra column containing a computed value. easy peasy. A couple of weeks later I got a request to change a report - to remove a column that wasn't required from a report. I looked back through what passed for a changelog in those days, and found that about every 2-3 weeks, for the past year, this report had been changed - usually adding a column or removing it. I queried the boss, who told me to just do what they asked, as they were paying for our time. I did so, but followed up, spoke to the people making the requests. turns out two departments used the same report - one needed the calculated column, the other sent the report out, and did not want the calculation to be shown to their customers. Clever old me changed the report request to ask if the column was required or not. There you go, saved the client hundreds of dollars a month. My boss - not happy. The client - very happy. I ended up leaving the software house and worked permanently at the client for nearly nine years. There's probably a moral to that story.
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
According to FXCop, there are: //// I typically use /* ... */ for commenting out old code (very temporarily, before the source control fundamentalists punch me). I wish those nested properly, though.
I ran straight to VS - but //// just looks the same as // but with more /s I also use /*..*/ but what would be nice would be something like /! .. !/ which performed the same function as /*...*/ but a) the ide could display differently, and b) could also surround other comments.
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')