Better VBA 10 - To comment or not to comment

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ธ.ค. 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.

  • @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. ;)

  • @HeapKhim
    @HeapKhim 3 ปีที่แล้ว +1

    Very Good.

  • @stevensexton5801
    @stevensexton5801 3 ปีที่แล้ว

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