Better VBA 10 - To comment or not to comment

Поделиться
HTML-код
  • Опубликовано: 18 сен 2024

Комментарии • 6

  • @wilsonfineart
    @wilsonfineart 3 года назад +1

    Great video. That example you provided with the headers in Excel data actually happened to me. I remember how difficult it was to figure out.

  • @HeapKhim
    @HeapKhim 3 года назад +1

    Very Good.

  • @TSSC
    @TSSC 3 года назад +1

    I agree with many of your comments (pun intended) but personally often add both comments of type “why” and “what”. Especially, I always add a comment at the top of the procedure or function explaining what it does. If needed, I also include a comment to the arguments and what is returned (for a function). Countless times - when modifying code I haven’t touched for many years - I’ve praised myself for having added “what” comments … especially in long procedures. Also, it’s not always that the variable names, or procedure/function names, are self explanatory. Ideally they would, perhaps, be … but then they wouldOftenBeQuiteLong (often much_longer_than_this_rather_long_explanation).
    ‘ Just my view

  • @standman007
    @standman007 3 года назад +1

    Thanks very much. Currently I am dealing with the code written in 2001!

    • @codekabinettcomen
      @codekabinettcomen  3 года назад +1

      I also still maintain code written in 2000/2001 (by me). Most of it would be a good "bad" example for the Better VBA series. ;)

  • @stevensexton5801
    @stevensexton5801 3 года назад

    Excellent video!
    Depending on the complexity of Sub or Function I include a comment showing usage example.