Fully Comment and Classified Add-In Wizard Created Code

Idea created by rfairhur24 on Feb 1, 2013
    New
    Score10
    • rfairhur24
    When the Add-In Wizard creates code for Visual Studio it creates code that is generally critical to the functioning of the Add-In; however, in at least the case of a Button, the wizard includes an uncommented line of code that deselects all other active tools when the button finishes.  This action is an optional behavior and removal of that line of code has no negative effects on the behavior of the button, but that line of code has no comment to describe what it does or that it is optional.  I don't generally question or delete wizard created code or check it for optional behaviors that I would want to disable or enable.  Such optional code has on more than one occassion proven critical to getting the Add-In to behave the way I expect.

    Other code created by the wizard is not optional or is highly recommended for retention, but this code is also not commented to indicate its importance.  After a lot of user code is created these lines of code may be mistaken for user created code or mixed together with user created code in a way that leads to their unintentional deletion or modification.

    I suggest that the wizard include comments for each line of code that are classified as:

    REQUIRED, RECOMMENDED, or OPTIONAL.

    That way programmers can more easily distinguish between code that they can feel free to remove or mofify from code that should be left alone.  This should be followed by a comment that describes what each line of code actually does.  This is as important or more important that the TODO comments currently inserted by the wizard, and in some case help guide a programmer in the completion of the TODO section.