Page 2 of 3 FirstFirst 123 LastLast
Results 41 to 80 of 95

Thread: Note to community

  1. #41
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: Note to community

    Quote Originally Posted by Joacim Andersson View Post
    You mean you want API documentation even though we have inline comments in the source code which you don't have access to? Because these comments are so important, aren't they? Isn't that what this thread is all about?
    Exactly my point... EG seemed to indicate that API functions should be so well named along with parameters that we know what each one is that that any further extraneous documentation shouldn't be necessary... and he'd be right if we all had access to all the source code out there... but we don't... so we need that doucmentation at the call level to know what is what.

    Beyond that, as for inline comments, the code should be as self-documenting as possible... but it isn't always, and sometimes things can get confusing on just what exactly is going on... so in that case comments are good... but should be as concise and short as possible...

    -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??? *

  2. #42

    Thread Starter
    Lively Member
    Join Date
    Jul 2011
    Posts
    65

    Re: Note to community

    I think the arguments for not commenting our weak to be honest. Most of us appear to have worked in this field for a long time and have seen the horror that awaits if you don’t document or comment. I understand sometimes there is no need to comment clearly. However, in corp. America a lot of us work in teams or use source control; so now more than one person is dipping into the code. I can't just walk over to you when I have a question about your method. So comments really help, plus they should just be there anyway. It is just the best practice and most professional practice. Unless you’re coding a small project only you will touch outside of work, comment your code and document it.

  3. #43
    PowerPoster
    Join Date
    Feb 2006
    Posts
    24,482

    Re: Note to community

    I think it can be just as easy to overcomment with noise than to undercomment.

    Lots of programmers will add silly comments within a procedure that do little besides retelling what the next line does in words. Yet they fail to add useful comments that tell the reader about return value meanings or arguments passed by reference that are altered by the procedure.

    There are also times when you use or rely on a "trick" when calling non-native DLLs, etc. such as a pointer that gets updated by the call, the implicit presence of a final NUL just past the string length in BSTRs, etc.

    In VB6 the default member of a class is designated "out of band" by a source line that the IDE always hides. Adding a comment that says the member should be marked as default never hurts.


    Sometimes you are creating an example for posting to a forum as an illustration. Then you might want to add whitespace and comments to help illustrate the "steps" being performed by groups of statements in a procedure. This is an example of a comment there might be no need for in production code.


    I have found plenty of cases though where comments actually increase the cost of maintenance. If the logic changes and the comment doesn't get corrected it can cause headaches later when somebody else has to debug a problem down the road.

  4. #44
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: Note to community

    Code where I'm not going to comment:
    vb.net Code:
    1. bvMessage.ID.Enabled = False
    2.             bvMessage.LOOKUPID.Enabled = False
    3.             bvMessage.RULENAME.Enabled = False
    4.             bvMessage.MESSAGETEXT.Enabled = False
    5.             bvMessage.INVALIDFIELDID.Enabled = False
    6.             bvMessage.SUPPRESSED.Enabled = True
    7.             bvMessage.SUPPRESSEDDATE.Enabled = False
    8.             bvMessage.SUPPRESSEDBY.Enabled = False

    More code I'm not going to comment:
    vb.net Code:
    1. Using sqlConn As SqlConnection = New SqlConnection(Me.RequestContext.AppDBConnectionString)
    2.             Using sqlCmd As SqlCommand = New SqlCommand("USR_GETBATCHTYPEDATA", sqlConn)
    3.                 sqlCmd.CommandType = CommandType.StoredProcedure
    4.                 sqlCmd.Parameters.AddWithValue("@BATCHID", Me.BatchID)
    5.                 sqlCmd.Parameters.AddWithValue("@BATCHTYPEID", _BatchTypeCatalogID).Direction = ParameterDirection.Output
    6.                 sqlCmd.Parameters.AddWithValue("@TABLENAME", _BatchBaseTableName).Direction = ParameterDirection.Output
    7.                 sqlCmd.Parameters("@TABLENAME").Size = 255
    8.                 sqlConn.Open()
    9.                 sqlCmd.ExecuteNonQuery()
    10.                 sqlConn.Close()
    11.                 _BatchTableName = sqlCmd.Parameters("@TABLENAME").Value.ToString
    12.                 _BatchTypeID = New Guid(sqlCmd.Parameters("@BATCHTYPEID").Value.ToString)
    13.             End Using
    14.         End Using

    Code that I will comment (and did)
    vb.net Code:
    1. 'Get a list of suppressed and unsuppressed messages
    2.         Dim unsuppressedMessages As List(Of BatchValidationMessagesUIModel) = bvMessages.Where(Function(m) m.SUPPRESSED.Value = False).ToList
    3.         Dim suppressedMessages As List(Of BatchValidationMessagesUIModel) = bvMessages.Where(Function(m) m.SUPPRESSED.Value = True).ToList
    4.         Dim errorAnnotations = annotations.Value.Where(Function(a) a.Text.Value = "Record contains custom validation error(s).").ToList
    5.         Dim warningAnnotations = annotations.Value.Where(Function(a) a.Text.Value = "Record contains suppressed custom validation error(s).").ToList
    6.  
    7.         annotations.Visible = True
    8.  
    9.         'If there are unsuppressed messages, add to the annotations (the actual error will be a part of the system messages, which will prevent it from committing
    10.         If unsuppressedMessages.Count > 0 Then
    11.  
    12.             'If there isn't already a current notice about custom validations, then add it
    13.             If errorAnnotations.Count = 0 Then
    14.                 AddRowAnnotation(currentModel, AnnotationCategory.Unknown, "Record contains custom validation error(s).", False, BatchMessageType.GeneralError)
    15.             End If
    16.  
    17.             'Add the validaiton messages
    18.             For Each msg As BatchValidationMessagesUIModel In unsuppressedMessages
    19.                 AddRowAnnotation(currentModel, AnnotationCategory.Unknown, msg.MESSAGETEXT.Value, False, BatchMessageType.GeneralError)
    20.             Next
    21.         End If
    22.  
    23.         'If there are suppressed messages, add to the annotations - should be a warning, so that it can still commit
    24.         If (suppressedMessages.Count > 0) AndAlso (warningAnnotations.Count = 0) Then
    25.             AddRowAnnotation(currentModel, AnnotationCategory.Unknown, "Record contains suppressed custom validation error(s).", False, BatchMessageType.GeneralError)
    26.         End If

    Too much? too little? or just right? I'd fully expect anyone working at our company to be able to follow all three of those code examples... context or not... but then again, as I noted, what we do isn't for the typical entry-level types and as a result, our code reflects that.

    -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??? *

  5. #45

    Thread Starter
    Lively Member
    Join Date
    Jul 2011
    Posts
    65

    Re: Note to community

    This is overly wordy commenting but thats just my thoughts. Here is how I comment:

    Code:
     Private Sub frmGame_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'Reset
            ResetDisplay()
    
            'Initialize List
            Numbers = New List(Of Integer)
    
            'Start Timer
            BingoTimer.Start()
    
            'Generate Card
            For index = 0 To 41
                CardNumbers(index) = Rand.Next(1, 100)
            Next
    
            'Images
            imgGridBall(0) = "Images\Ball_1.png"
            imgGridBall(1) = "Images\Ball_2.png"
            imgGridBall(2) = "Images\Ball_3.png"
    
            'Build Grid
            BuildGrid()
        End Sub

  6. #46
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Note to community

    Honestly those comments don't do much in the way of adding anything at all. The code is just as descriptive as the comments so there really is no point in taking the time to write them in such a case.

  7. #47
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,988

    Re: Note to community

    I comment pretty much the way TG does.
    My usual boring signature: Nothing

  8. #48
    PowerPoster
    Join Date
    Feb 2012
    Location
    West Virginia
    Posts
    14,205

    Re: Note to community

    Quote Originally Posted by Shaggy Hiker View Post
    I comment pretty much the way TG does.
    I would say pretty much the same, I generally use comments only where the code would not speak for itself and generally related to a block or blocks of code

    Edit: In case it wasn't clear in my previous post I was referring to the comments in the post #45 for example
    Code:
            'Reset
            ResetDisplay()
    The function name is more descriptive than the comment and IMO such comments are a waste of space and time both in writing and reading. Really no reason to add a comment like that into such code.
    Last edited by DataMiser; Apr 22nd, 2013 at 08:36 PM.

  9. #49
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: Note to community

    I think that your own code in post #45 is an excellent example of where comments are not needed. The only thing your comments do is add extra noice and 6 extra lines to the event handler. What, in that particular example, is the benifit anyone would get from those comments that the code doesn't already provide? Why do you feel you need a comment that say "Start Timer" when the next line of code reads "BingoTimer.Start()"? The same goes with every single comment in your own example. They provide no additional help or explain anything you can't deduct by looking at the very next code line, all they bring are noice.

    Quote Originally Posted by mholmes_3038 View Post
    I think the arguments for not commenting our weak to be honest. Most of us appear to have worked in this field for a long time and have seen the horror that awaits if you don’t document or comment. I understand sometimes there is no need to comment clearly. However, in corp. America a lot of us work in teams or use source control; so now more than one person is dipping into the code. I can't just walk over to you when I have a question about your method. So comments really help, plus they should just be there anyway. It is just the best practice and most professional practice. Unless you’re coding a small project only you will touch outside of work, comment your code and document it.
    I don't work in corp. America, simply because I'm not an American, but yes people from outside the boundaries of America also work in teams.

    I think your argument for using comments are a bit weak to be honest.

    I've worked as a professional developer for more years than I want to disclose because it makes me feel old. In my experiance the single argument you bring up here for using comments is the one I say is the reason why you should avoid comments. Just the single fact that we do work in teams and we do use source control systems and many developers refactor the same code base makes comment misleading. The reason for that is that people use comments not only to describe their intention with the code but, as your example in post #45 also showed, the structure of the code. Well, when the code gets refactored and bits of lines move around or someone writes a new algorithm the comments are often left behind and becomes old and inaccurate. Later on someone starts to read the code, including the comments and just gets confused.

    My point is that comments are all fine and dandy in theory but in reality people don't update them when the code gets refactored. There is nothing developers hate more than old unattended code, so most professional developers spend more time refactoring old code than they spend their time writing new code. One of the main reason we do a lot of refactoring is to simplify and make the workflow easier to follow. In these cases having old comments that are now obsolete do more harm than good.

    There are of course a lot of bad programmers out there that write incomprehensible spaghetti code but in that case a few comments doesn't really help that much. It would be better if those people took the time to refactor and write clean comprehensible code instead of wasting their time trying to write comments that explains what their mess is doing, when in fact the comments more than likely just adds extra layers of noice above the already very poorly written code.

    If you feel that you need to stick in a comment to explain what a small piece of code is really doing maybe you instead should consider rewriting that code so it becomes easier to understand.

  10. #50
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    Re: Note to community

    Quote Originally Posted by techgnome View Post
    Code that I will comment (and did)
    [CODE]
    Here's my first stab, this is probably not quite encapsulating the knowledge in the best way, simply because I'm not familiar with the problem, but here goes (and yes, I am fully aware of the irony of using comments to explain why I wouldn't have comments...)

    vbnet Code:
    1. ' "Get a list of suppressed and unsuppressed messages"
    2. ' Your variable names tell me what these are, as well as having a simple predicate. Maybe it could be argues for two full blown methods:
    3. ' GetSuppressedMessages(bvMessages) and GetUnsuppressedMessage(bvMessage). Meh, I wouldn't feel that to be 100% necessary.
    4. Dim unsuppressedMessages As List(Of BatchValidationMessagesUIModel) = bvMessages.Where(Function(m) m.SUPPRESSED.Value = False).ToList
    5. Dim suppressedMessages As List(Of BatchValidationMessagesUIModel) = bvMessages.Where(Function(m) m.SUPPRESSED.Value = True).ToList
    6. Dim errorAnnotations = annotations.Value.Where(Function(a) a.Text.Value = "Record contains custom validation error(s).").ToList
    7. Dim warningAnnotations = annotations.Value.Where(Function(a) a.Text.Value = "Record contains suppressed custom validation error(s).").ToList
    8.  
    9. annotations.Visible = True
    10.  
    11. ' "If there are unsuppressed messages, ..."
    12. ' Well, how about writing the code exactly saying that, instead of obscuring it with counting and then
    13. ' comparing that count with some other value?
    14. If unsuppressedMessages.Any Then
    15.     ' "..., add to the annotations (the actual error will be a part of the system messages, which will prevent it from committing"
    16.     ' The part in brackets might fall in to the "comment why its the non-obvious way" part of my reason for commenting
    17.     ' The "add to the annotations part, however....
    18.     AddToAnnotations(unsuppressedMessages)
    19.  
    20. End If
    21.  
    22. ' "If there are suppressed messages, ..."
    23. ' Again, let's write our condition so it reads how you want to write the comment
    24. If suppressedMessages.Any Then
    25.     ' "...add to the annotations - should be a warning, so that it can still commit"
    26.     ' Sounds like we need to note that this is added as a warning, so I'll include that in the method name
    27.     ' Note that I've included the AndAlso check in this method, as it felt part of that logic -
    28.     ' another point about code that doesn't need comment is that you need to separate your concerns more carefully
    29.     AddWarningForSuppressedMessage()
    30. End If
    31.  
    32.  
    33. ' ...
    34.  
    35. Private Sub AddToAnnotations(unsuppressedMessages As List(Of Blah)
    36.  
    37.     ' "If there isn't already a current notice about custom validations, then add it"
    38.     ' So, we want to ensure that there's a custom validation notice? Okay...
    39.     EnsureCustomValidationNotice()
    40.  
    41.     ' "Add the validaiton messages"
    42.     ' What part of that isn't explained in the code?
    43.     For Each msg As BatchValidationMessagesUIModel In unsuppressedMessages
    44.         AddRowAnnotation(currentModel, AnnotationCategory.Unknown, msg.MESSAGETEXT.Value, False, BatchMessageType.GeneralError)
    45.     Next
    46.  
    47. End Sub
    48.  
    49. Private Sub EnsureCustomValidationNotice
    50.     If errorAnnotations.Count = 0 Then
    51.         AddRowAnnotation(currentModel, AnnotationCategory.Unknown, "Record contains custom validation error(s).", False, BatchMessageType.GeneralError)
    52.     End If
    53. End Sub
    54.  
    55. Private Sub AddWarningForSuppressedMessage
    56.     If Not warningAnnotations.Any Then
    57.         AddRowAnnotation(currentModel, AnnotationCategory.Unknown, "Record contains suppressed custom validation error(s).", False, BatchMessageType.GeneralError)
    58.     End If
    59. End Sub

    Okay, and once again without the comments?
    vbnet Code:
    1. Dim unsuppressedMessages As List(Of BatchValidationMessagesUIModel) = bvMessages.Where(Function(m) m.SUPPRESSED.Value = False).ToList
    2. Dim suppressedMessages As List(Of BatchValidationMessagesUIModel) = bvMessages.Where(Function(m) m.SUPPRESSED.Value = True).ToList
    3. Dim errorAnnotations = annotations.Value.Where(Function(a) a.Text.Value = "Record contains custom validation error(s).").ToList
    4. Dim warningAnnotations = annotations.Value.Where(Function(a) a.Text.Value = "Record contains suppressed custom validation error(s).").ToList
    5.  
    6. annotations.Visible = True
    7.  
    8. If unsuppressedMessages.Any Then
    9.     AddToAnnotations(unsuppressedMessages)
    10. End If
    11.  
    12. If suppressedMessages.Any Then
    13.     AddWarningForSuppressedMessage()
    14. End If
    15.  
    16.  
    17. ' ...
    18.  
    19. Private Sub AddToAnnotations(unsuppressedMessages As List(Of Blah)
    20.     EnsureCustomValidationNotice()
    21.  
    22.     For Each msg As BatchValidationMessagesUIModel In unsuppressedMessages
    23.         AddRowAnnotation(currentModel, AnnotationCategory.Unknown, msg.MESSAGETEXT.Value, False, BatchMessageType.GeneralError)
    24.     Next
    25. End Sub
    26.  
    27. Private Sub EnsureCustomValidationNotice
    28.     If errorAnnotations.Count = 0 Then
    29.         AddRowAnnotation(currentModel, AnnotationCategory.Unknown, "Record contains custom validation error(s).", False, BatchMessageType.GeneralError)
    30.     End If
    31. End Sub
    32.  
    33. Private Sub AddWarningForSuppressedMessage
    34.     If Not warningAnnotations.Any Then
    35.         AddRowAnnotation(currentModel, AnnotationCategory.Unknown, "Record contains suppressed custom validation error(s).", False, BatchMessageType.GeneralError)
    36.     End If
    37. End Sub

  11. #51
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    Re: Note to community

    Quote Originally Posted by techgnome View Post
    Exactly my point... EG seemed to indicate that API functions should be so well named along with parameters that we know what each one is that that any further extraneous documentation shouldn't be necessary... and he'd be right if we all had access to all the source code out there... but we don't... so we need that doucmentation at the call level to know what is what.
    Wait, so you're saying that if the libraries you used had better interfaces then you wouldn't need documentation? [Edit: re-reading your post, maybe this wasn't your point. If you need to read the source code of a method to know how to call it then, no, it doesn't qualify for not needing comments/documentation.] You may just be on to something there. I don't think that most of the libraries out there are written well enough that you can get away without comments. Certainly pointing out all the poor interfaces with their necessary documentation doesn't invalidate my point one bit.

    Let's try this one more time: Don't write the same old code but without comments, write code that doesn't need comments.

  12. #52
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    Re: Note to community

    Quote Originally Posted by mholmes_3038 View Post
    This is overly wordy commenting but thats just my thoughts. Here is how I comment:
    As a few others have said, those comments are largely restating the code without adding anything. There is one comment that adds some value, the "Generate card" comment on the loop. And you don't need to have a comment to say that. How about this:

    Code:
     Private Sub frmGame_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            ResetDisplay()
            Numbers = New List(Of Integer)
            BingoTimer.Start()
            GenerateCard()
            SetImages()
            BuildGrid()
        End Sub
    
        Private Sub GenerateCard
            For index = 0 To 41
                CardNumbers(index) = Rand.Next(1, 100)
            Next
        End Sub
    
        Private Sub SetImages()
            imgGridBall(0) = "Images\Ball_1.png"
            imgGridBall(1) = "Images\Ball_2.png"
            imgGridBall(2) = "Images\Ball_3.png"
        End Sub

  13. #53
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: Note to community

    Quote Originally Posted by Evil_Giraffe View Post
    Here's my first stab, this is probably not quite encapsulating the knowledge in the best way, simply because I'm not familiar with the problem, but here goes (and yes, I am fully aware of the irony of using comments to explain why I wouldn't have comments...)
    mine came out the way it did because:
    Quote Originally Posted by myself
    I'll write out the pseudo code/logic... then I proceed to develop the code around it.
    I was also working with code that normally is NOT touched by anyone for any reason, until now. the calls I was making were to product functions which I had no control over... And working with requirements that were extremely bizzare. Sure, I could have abstracted and made additional methods to make the code more readable, but to me an inline loop with a single line of comment it much more efficient and compact - I'd have to pass over the warningAnnotations to it - and yes, this is one of those rare cases where processing time is critical... the process I am injecting to is already clunky and slower than I would like. I should also note that this was quick and dirty code that I was just trying to get to work... I was working with undocumented APIs in our system, in uncharted waters, boldly going where no developer has gone before. Now, if I found myself doing those loops multiple times in different areas like that, sure, I would have then extracted it into a method...

    At any rate, that wasn't my point (so I'm not sure why I felt compelled to defend it... because to be quite honest, I'm not even really happy with it, but it works and filled the client's requirements, as odd as they were)... my point (which you actually then further emphasized) is that code, when written "properly" is self-documenting and there is no need to comment each and every little thing.

    -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??? *

  14. #54
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Note to community

    I'm definitely a commenting minimalist.

    Really well written code is largely self commenting but it does have to be really well written. TG, your code in post 44 was pretty good. I'd have probably written it myself and walked away with my head held high. But I also have to acknowledge that EG, by breaking out a couple of your loops and twists into helper methods, immediately made it more readable. The key was to make each method really, really small. That's actually surprisingly hard to do.

    When I was taught (way back in the 80s) nobody was concerned with code decomposition, gosub has only just started putting in an appearance and none of us were really sure what to do with it or why. As subs and functions came in most of us thought of it in code re-use terms so we'd break something out if we thought we'd want to call it from more than one place. But that still left big old lumps of code that carried out several different tasks because it just so happened that those tasks were always carried out together. It's only in the last 10 years or so that I've really started training myself to go in for "ultra-decomposition", which is all about code readability rather than code re-use, and I really struggle with it. I'm getting there but it's slow. I still want to just brain-dump what's in my head straight into a code window.

    Basically I think comments should be for anywhere where your code isn't obvious... and then only if you can't restructure it to make it obvious. That includes domain knowledge (e.g. All Category B orders are charged at £17.5% VAT), explaining the usage of a third party API - particularly one where the method names aren't obvious (e.g. the COM example on the previous page - it didn't need comments because it was COM, it needed them because the methods are obtusely named), explaining a non-obvious design or implementation decision (e.g. we're using windows API call to implement this menu because we want a variable depth (this example applies to VB6, not VB.Net))... and that's about it for me.

    @MHolmes, I'm afraid I have to agree with the others in this thread. The comments you've got are the absolute worst kind IMO. They add no clarity to the code what-so-ever and are just white noise. You'd have been better off decomposing a few bits out to helper methods, e.g. GenerateCard and SetUpImages. that would have removed the need completely.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  15. #55
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: Note to community

    Quote Originally Posted by Evil_Giraffe View Post
    Wait, so you're saying that if the libraries you used had better interfaces then you wouldn't need documentation? [Edit: re-reading your post, maybe this wasn't your point. If you need to read the source code of a method to know how to call it then, no, it doesn't qualify for not needing comments/documentation.]
    ehhh... yeah, that wasn't my point... I was talking about the xDocument comments that can be used in VS.NET... they aid in intellisense when consuming a method call, and can also be extracted to documentation that can tell me about the method... so then I don't care at that point what comments are or are not in the source code ... but that wasn't the original intent of this thread anyways, so it's probably moot.

    Quote Originally Posted by Evil_Giraffe View Post
    You may just be on to something there. I don't think that most of the libraries out there are written well enough that you can get away without comments. Certainly pointing out all the poor interfaces with their necessary documentation doesn't invalidate my point one bit.

    Let's try this one more time: Don't write the same old code but without comments, write code that doesn't need comments.
    Right there... that last line... that is the key... BUT... comments are still needed sometimes... if not to explain the logic, but to explain WHY that logic was used... I've seen something written in a certain way, uncommented (because the WHAT it was doing was obvious, but not the WHY) and looked at it, and thought, "Hey, if we rewrite it this way, it would be more efficient..." only to then break it... I don't remember the whatfors of it, but the end result was that it had to be put back to its original logic before it would work again... *shrug*

    -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??? *

  16. #56
    Smooth Moperator techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,531

    Re: Note to community

    Quote Originally Posted by FunkyDexter View Post
    I'm definitely a commenting minimalist.

    Really well written code is largely self commenting but it does have to be really well written. TG, your code in post 44 was pretty good. I'd have probably written it myself and walked away with my head held high.
    I'm glad someone would have... it was dirty code... believe me... that all came after three weeks of thrashing about trying to figure out how to make thingwork (as I noted above, I was in an area not normally touched by customizations, doing things most sane developers in our company wouldn't do) ... I'm not supposed to be doing any development... but this was so off the wall that I couldn't even figure out how to explain the design to the devlopers... so I had to do it myself and there was A LOT of "Well, let's try this... carp, that didn't work..."

    Quote Originally Posted by FunkyDexter View Post
    But I also have to acknowledge that EG, by breaking out a couple of your loops and twists into helper methods, immediately made it more readable. The key was to make each method really, really small. That's actually surprisingly hard to do.
    True... and had I really had more time, and the motivation... I might have refactored it out even more as he did... but at the same time, once I got it working, I was happy to jsut leave it the fork alone... not to mention that sometimes when you're too close to the issue, you can't see the forest for the trees (just what the heck does THAT even mean?)


    -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??? *

  17. #57
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,834

    Re: Note to community

    Wrong forum...

  18. #58
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    Re: Note to community

    Quote Originally Posted by techgnome View Post
    BUT... comments are still needed sometimes... if not to explain the logic, but to explain WHY that logic was used... I've seen something written in a certain way, uncommented (because the WHAT it was doing was obvious, but not the WHY) and looked at it, and thought, "Hey, if we rewrite it this way, it would be more efficient..." only to then break it...
    Yeeeeah, I think we're violently agreeing here.

    Quote Originally Posted by Evil_Giraffe View Post
    The only time comments should be required in .NET code is when you've done something non-obvious for a very good reason, at which point the comment should restrict itself to detailing WHY the obvious code was not written.

  19. #59
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Note to community

    and had I really had more time
    Ay, there's the rub. My comments should be taken in an "ideal world" scenario which, of course, isn't very realistic, particularly when we're talking refactoring rather than writing from new.

    I'll take working code delivered on time before I'll take elegant code delivered late and I'm also a firm believer in "if it aint broke, don't fix it". There was a thread floating around about a year or so ago which proposed that you should be constantly refactoring your code. I thought that was insane and just a recipe for introducing instability. You should refactor as rarely as possible and, when you do, keep your touch as light as possible. If adding some comments is a shortcut to clarifying archaic but stable code then I'd take the comments in preference to refactoring.

    Yeeeeah, I think we're violently agreeing here
    Fight! Fight! Fight! Fight!
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  20. #60
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: Note to community

    Getting back to the original point of this thread, I'd say that the OP is assuming that code that is posted on this site is representative of what we all do for our day job. It's not. I try to code clearly so that minimal commenting is required but I still use plenty of comments. That doesn't mean that I always do it when I'm posting a snippet to answer a question in a forum though.

    Also, one issue that I have with a lot of code is that, while it may be obvious from the code WHAT it's doing if it's well written, it's always so obvious WHY it's doing what it is or the way it is. I've encountered code many times that I can see what it's doing but it doesn't necessarily seem the best thing to do but I don't know if there's some specific reason that it's done that way. That's somewhere where commenting becomes important and you don't always know ahead of time what parts of your code will fall into that category. One thing to keep in mind is that a missing comment is far worse than a redundant one so I'd suggest erring on the side of caution, i.e. too many comments is better than not enough.

  21. #61
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: Note to community

    Quote Originally Posted by FunkyDexter View Post
    Ay, there's the rub. My comments should be taken in an "ideal world" scenario which, of course, isn't very realistic, particularly when we're talking refactoring rather than writing from new.

    I'll take working code delivered on time before I'll take elegant code delivered late and I'm also a firm believer in "if it aint broke, don't fix it". There was a thread floating around about a year or so ago which proposed that you should be constantly refactoring your code. I thought that was insane and just a recipe for introducing instability. You should refactor as rarely as possible and, when you do, keep your touch as light as possible. If adding some comments is a shortcut to clarifying archaic but stable code then I'd take the comments in preference to refactoring.

    Fight! Fight! Fight! Fight!
    Consider unit testing.

  22. #62
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    Re: Note to community

    Quote Originally Posted by jmcilhinney View Post
    Consider unit testing.
    Indeed, you should never be afraid to refactor. Unit tests are your safety net.

  23. #63
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Note to community

    Consider unit testing.
    For new code, yes, definitely.

    The problem is when you come across an undocumented method written several years previously and it's not obvious what it does or what side effects it has. As you gain some understanding of it adding a few explanatory comments is useful to the next developer (or possibly yourself) but refactoring it, even if you precede that with writing a unit test for what you think it's doing, is a bad idea unless there's going to be an end benefit that outweighs the risk.

    I remember refactoring an ugly method in one of my first development jobs. I can't remember the details now but basicaly this method was meant to return information about an order or customer or some such. The original implementation set and used some global variable which it really didn't need to set to achieve it's stated goal so when I rewrote it I left that out. I bet you can guess what happened next...


    Indeed, you should never be afraid to refactor
    You should always be afraid to refactor. Unit tests, TDD etc. help but there's always a risk.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  24. #64
    MS SQL Powerposter szlamany's Avatar
    Join Date
    Mar 2004
    Location
    Connecticut
    Posts
    18,263

    Re: Note to community

    Quote Originally Posted by dunfiddlin View Post
    If only MS had given us something like a flow layout panel or a table layou .... oh!
    fwiw - those are useless controls if you are going to do something like "add" or "remove" content during runtime.

    I had to re-invent my own with x/y and size-fitting logic that actually worked and worked smoothly...

    *** Read the sticky in the DB forum about how to get your question answered quickly!! ***

    Please remember to rate posts! Rate any post you find helpful - even in old threads! Use the link to the left - "Rate this Post".

    Some Informative Links:
    [ SQL Rules to Live By ] [ Reserved SQL keywords ] [ When to use INDEX HINTS! ] [ Passing Multi-item Parameters to STORED PROCEDURES ]
    [ Solution to non-domain Windows Authentication ] [ Crazy things we do to shrink log files ] [ SQL 2005 Features ] [ Loading Pictures from DB ]

    MS MVP 2006, 2007, 2008

  25. #65
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    Re: Note to community

    Quote Originally Posted by FunkyDexter View Post
    The original implementation set and used some global variable which it really didn't need to set to achieve it's stated goal so when I rewrote it I left that out. I bet you can guess what happened next...
    Well that's half your problem right there. What you did wasn't refactoring, it was rewriting. And you also deliberately changed the externally visible behaviour of the unit (by not writing to the global state).

  26. #66
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,834

    Re: Note to community

    Quote Originally Posted by Evil_Giraffe View Post
    Indeed, you should never be afraid to refactor. Unit tests are your safety net.
    Not here...changing working code to refactor it is not that easy. First you would have to justify why you are spending corporate resources on something that works. After you get it unit tested then the fun begins. At least an hours’ worth of turnover documentation starts it out. Write up the test plans for the business side and get them to test in UA. Do all the testing in staging again. Then schedule and perform post production move testing.

    I don't understand what all the resistance to comments I seem to be hearing is. Post #60 seems to bring us full circle. We have all voiced some personal feelings about comments and that's fine. During this thread I've been researching what the industry "experts" say about it. The majority consider them desired. Many of the points brought up here about useless comments can be seen and writing code to be self-documenting also. I think across the board comments are recommended.

    At any hoot sometimes I get the feeling there are more people here writing code as contractors, consultants, entrepreneurs and not that many firmly entrenched in corporate day to day IT support. It seems like me, me, me versus what is good for the ones paying for us. I might be all wet about that but it is my impression after many years at this site.

    Please don't take that the wrong way. I love this site and have gotten out more than I'll ever put back.

  27. #67
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: Note to community

    I think that we may have got a bit carried away with the refactoring. I would interpret the original statement:
    you should be constantly refactoring your code
    to mean the code you're currently working on. I wouldn't consider opening up the project for a production application just to see if I could refactor it and I'm not sure that many people would recommend it. Current projects are a different matter though.

  28. #68
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Note to community

    Well that's half your problem right there. What you did wasn't refactoring, it was rewriting. And you also deliberately changed the externally visible behaviour of the unit (by not writing to the global state).
    I may have changed it's extrenal behaviour but I didn't change it's contract with it's consumer. It's contract was to return the information and setting the global was not part of that, it was originally just an implementation detail. The problem was that successive developers had used the incidental change in global state, when that change ceased to occur their assumptions, and code, subsequently failed.

    Now think of that in the context of TDD. The purpose for which the method was originally written did not include setting that variable so the developer would not have written a test for that. Why would they? It was not part of the contract their method was writing for the consumer. TDD applied to the method would not have caught the change. Applied to the methods of the consumers it might have, but that may be outside your scope as a developer for the core method.

    And that's the point about refactoring, it's always dangerous. it always has been and it always will be. The whole arc of the growth of software development best practices is about minimising that risk. Not using IN/OUT variables, scoping variable as low as possible, separating update functionality from access functionality (subs vs functions), TDD, systems testing, commenting code... you name it. We do all those things in an attempt to minimise the risk of code breaking due to change. They all help but none is a silver bullet. And not refactoring code "for the hell of it" is just another of those measures. If there will be a genuine benefit from the refactoring and if it will outweigh the risk introduced then it's worthwhile, but refactoring for the purpose of one's own ego (which seems to happen a staggering amount) is bad practice.

    I wouldn't consider opening up the project for a production application just to see if I could refactor it and I'm not sure that many people would recommend it.
    I think we're basically on the same page. If I was being really pedantic I'd say that I wouldn't refactor my current code without applying the "risk vs reward" calculation either. Actually, that's not strictly true. I do it all the time on my own home spun projects because, well, that would be my ego creeping in. But I never seem to finish any of my home projects and I think that's one of the main reasons. On a client's project my impetus is to deliver a functional system in a reasonable time frame. Elegant, well written code is, of course, still important but it's secondary.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  29. #69
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Note to community

    Hmm. Interesting. The no-commenters produce the most comments in support of their decision not to comment. Great paradox in this I see! (Why haven't we got a Yoda smiley?)
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  30. #70
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,988

    Re: Note to community

    I'd like to respond to this point made in EG's code response to TG's example:

    Code:
    11.' "If there are unsuppressed messages, ..."
    
    12.' Well, how about writing the code exactly saying that, instead of obscuring it with counting and then
    13.' comparing that count with some other value?
    
    14.If unsuppressedMessages.Any Then
    As an answer to the question, how about: Because using .Any is about 15x slower than comparing .Count >0. Perhaps it doesn't matter since they are both quite fast, but here's a variation on a saying you have probably heard: Look after the milliseconds and the seconds will look after themselves.
    My usual boring signature: Nothing

  31. #71
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,297

    Re: Note to community

    Quote Originally Posted by Shaggy Hiker View Post
    I'd like to respond to this point made in EG's code response to TG's example:

    Code:
    11.' "If there are unsuppressed messages, ..."
    
    12.' Well, how about writing the code exactly saying that, instead of obscuring it with counting and then
    13.' comparing that count with some other value?
    
    14.If unsuppressedMessages.Any Then
    As an answer to the question, how about: Because using .Any is about 15x slower than comparing .Count >0. Perhaps it doesn't matter since they are both quite fast, but here's a variation on a saying you have probably heard: Look after the milliseconds and the seconds will look after themselves.
    Not only that but Any didn't exist before .NET 3.5 and some people may not know what Any does anyway. It may be obvious to some but it may not to others. That's part of what commenting is about: things seem obvious to you when you write them so you don't comment them but they may not seem obvious to others or even yourself some time later. I'm sure everyone has written what they thought was obvious code at the time and has then come back later and wondered what it was all about. Trying to write all good, self-documenting code is something to aspire to but not something that always happens in practice. If you comment your code then it's purpose is less likely to be obscured.

  32. #72
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    Re: Note to community

    Quote Originally Posted by Shaggy Hiker View Post
    As an answer to the question, how about: Because using .Any is about 15x slower than comparing .Count >0. Perhaps it doesn't matter since they are both quite fast, but here's a variation on a saying you have probably heard: Look after the milliseconds and the seconds will look after themselves.
    Disagreed. The Any function captures the intent of the logic much more clearly (which is why it was the language used in the comment). I would rather capture intent than speculatively micro-optimise.

    Before I micro-optimise at the expense of readability, I need to see performance data showing that there is a performance problem, showing that this particular piece of code is the bottleneck and have exhausted opportunities for macro-optimisation.

    But if you really must have those micro-seconds back, here:

    Code:
    If ThereAreAny(unsuppressedMessages) Then
    
    ' ...
    
    Private Function ThereAreAny(Of T)(list As List(Of T)) As Boolean
        Return list.Count > 0
    End Function

  33. #73
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Note to community

    I would rather capture intent than speculatively micro-optimise.
    I'd certainly agree with that. There are, of course, occasions where performance trumps readability but, in business software at least, they're pretty few and far between. The obvious exception is database queries. The database is ALWAYS a bottleneck so I'll aim for performance every time in my queries, even if that does mean using obscure tricks (a quirky update to avoid a triangular join is the one that immediately springs to mind).
    Last edited by FunkyDexter; Apr 23rd, 2013 at 10:06 AM.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  34. #74
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,988

    Re: Note to community

    Quote Originally Posted by jmcilhinney View Post
    That's part of what commenting is about: things seem obvious to you when you write them so you don't comment them but they may not seem obvious to others or even yourself some time later. I'm sure everyone has written what they thought was obvious code at the time and has then come back later and wondered what it was all about.
    This is what ALL my commenting is about. The number of times I have come back to what I thought was perfectly clear only to find it much less so is disturbingly high. I've tried to improve the quality of my comments, but to some extent I find that to be a fools game. You can never be certain what perspective the new viewer will come from, even if that new viewer is a later version of yourself. Therefore, it is nearly impossible to know what comment will be the key point that will crystalize understanding in the brain of the new viewer. Worse, writing too much is often as bad as writing too little, as it can be hard to wade through, so you can't write absolutely everything. This is a point I constantly wrestle with.


    @EG: I found that it did not capture the intent very well at all. Though I generally know what .Any does, I was a bit surprised to find that I wasn't sure what it meant in that particular case for a fraction of a second. Count > 0 is actually more clear to me than .Any, though I see no particular reason why that would be so, which suggests it is more due to the peculiarities of the individual or individual experience. Nonetheless, it is so.

    However, would you write slow code rather than fast simply because it is easier to read? That would be an argument for implicit conversions and option Strict OFF. After all, if you can be certain that a certain string holds a number, then MyString = 5 is considerably more readable than CInt(MyString) = 5, or any other proper conversion. Anybody can read the first variation without problem, but somebody new to programming would likely be unsure what CInt(MyString) was doing in the second variation. Option strict does prevent certain bugs from slipping in, but probably not bugs that you would allow anyways.

    Furthermore, if you are in the habit of reaching for the slower tool because it looks better to you, wouldn't you expect that performance is more likely to be an issue than it would for a person who is in the habit of reaching for the fastest tool? A fraction of a millisecond here and there usually makes no difference at all, until you end up working on a program where it does matter and you have to go back and re-work it because you neglected to do so on the first pass. In this case, I feel that .Any is less clear than .Count >0, but that's just a matter of opinion. Still, knowing that there is a difference of opinion there (and I'm clearly not alone in my view, since we aren't talking about code I initially wrote), wouldn't it be better to reach for the tool that works better?
    My usual boring signature: Nothing

  35. #75
    Wall Poster TysonLPrice's Avatar
    Join Date
    Sep 2002
    Location
    Columbus, Ohio
    Posts
    3,834

    Re: Note to community

    Quote Originally Posted by dunfiddlin View Post
    Hmm. Interesting. The no-commenters produce the most comments in support of their decision not to comment. Great paradox in this I see! (Why haven't we got a Yoda smiley?)
    WOW...that is sure turning out to be true. I wonder if there is something Freudian involved

  36. #76
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    38,988

    Re: Note to community

    This thread has gotten a bit long in the tooth, as have I, so I have forgotten who the non-commentors are? FD said he was pretty minimalist, but TG, DataMiser, JMC, and myself all said we comment fairly heavily. EG doesn't appear to have explicitly endorsed either camp, though he appears to be leaning towards minimal comments with some of his commentary on TG's comments. Who else falls into the minimal camp?
    My usual boring signature: Nothing

  37. #77
    PowerPoster Evil_Giraffe's Avatar
    Join Date
    Aug 2002
    Location
    Suffolk, UK
    Posts
    2,555

    Re: Note to community

    I'm not a "non-commenter", I'm a "if your code needs comments I'd prefer that - instead of writing the needed comments - you rewrote the code so it didn't need comments". This does, unfortunately, make it sound like I'm a "non-commenter" which is why I've spent most of this thread clarifying my position. [Edit2: If you want to bucket people into Non/Minimal/Heavy then I'm in Non, but only because I write my code in a certain way.]

    [Edit: I'm also the opposite to jmc in that I write far more comments in code posted on VBF than I do in my day job]
    Last edited by Evil_Giraffe; Apr 23rd, 2013 at 10:28 AM.

  38. #78
    Super Moderator FunkyDexter's Avatar
    Join Date
    Apr 2005
    Location
    An obscure body in the SK system. The inhabitants call it Earth
    Posts
    7,900

    Re: Note to community

    At any hoot sometimes I get the feeling there are more people here writing code as contractors, consultants, entrepreneurs and not that many firmly entrenched in corporate day to day IT support. It seems like me, me, me versus what is good for the ones paying for us. I might be all wet about that but it is my impression after many years at this site.
    I thought this was worth addressing. I really hope nobody here takes that attitude and think they're probably creating a rod for their own back if they do.

    I work as a contractor and I generally take the aproach that I want to make myself redundant as quick as possible. I don't mean I want to get laid off because the client doesn't want me anymore, but I want to get to a position where the client can let me go because they don't need me anymore. I want to have closed a gap for them and know it will stay closed in my absence. I want them to hire me back when they want a new project done and they remember my success from last time rather than because they feel they've got no choice because I left a mess so bad I'm the only person who can clean it up again. you can only hold a client hostage for so long before they wise up.
    The best argument against democracy is a five minute conversation with the average voter - Winston Churchill

    Hadoop actually sounds more like the way they greet each other in Yorkshire - Inferrd

  39. #79
    PowerPoster dunfiddlin's Avatar
    Join Date
    Jun 2012
    Posts
    8,245

    Re: Note to community

    you can only hold a client hostage for so long before they wise up
    Indeed, if the rumoured updates to W8 are anything to go by, even if you're Microsoft!
    As the 6-dimensional mathematics professor said to the brain surgeon, "It ain't Rocket Science!"

    Reviews: "dunfiddlin likes his DataTables" - jmcilhinney

    Please be aware that whilst I will read private messages (one day!) I am unlikely to reply to anything that does not contain offers of cash, fame or marriage!

  40. #80
    Angel of Code Niya's Avatar
    Join Date
    Nov 2011
    Posts
    8,598

    Re: Note to community

    Quote Originally Posted by Shaggy Hiker View Post
    This thread has gotten a bit long in the tooth, as have I, so I have forgotten who the non-commentors are? FD said he was pretty minimalist, but TG, DataMiser, JMC, and myself all said we comment fairly heavily. EG doesn't appear to have explicitly endorsed either camp, though he appears to be leaning towards minimal comments with some of his commentary on TG's comments. Who else falls into the minimal camp?
    I'm with EG. Let the code be the commenting. So.....when can we start persecuting each other on a bloody field of battle
    Treeview with NodeAdded/NodesRemoved events | BlinkLabel control | Calculate Permutations | Object Enums | ComboBox with centered items | .Net Internals article(not mine) | Wizard Control | Understanding Multi-Threading | Simple file compression | Demon Arena

    Copy/move files using Windows Shell | I'm not wanted

    C++ programmers will dismiss you as a cretinous simpleton for your inability to keep track of pointers chained 6 levels deep and Java programmers will pillory you for buying into the evils of Microsoft. Meanwhile C# programmers will get paid just a little bit more than you for writing exactly the same code and VB6 programmers will continue to whitter on about "footprints". - FunkyDexter

    There's just no reason to use garbage like InputBox. - jmcilhinney

    The threads I start are Niya and Olaf free zones. No arguing about the benefits of VB6 over .NET here please. Happiness must reign. - yereverluvinuncleber

Page 2 of 3 FirstFirst 123 LastLast

Tags for this Thread

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