04-17-2023, 02:07 AM
(04-16-2023, 04:35 PM)OldMoses Wrote: I love the look of the code, with those ASCII picture comments of the keyboard. Cool stuff there, I've always been impressed by how you comment your code.
Thank you. My comments are just as much for me as they are for others reading my code (probably more for me as I get older!). As every coder knows going back to code you've written a few years back, heck sometimes even a few months back, can make you ponder, "What the heck was I thinking there?"
It only takes a few more minutes to document code well and you'll thank yourself in the long term. I can go back to any of my old code and find routines and methods I want to reuse without having to spend hours studying the code to re-learn what I already did.
It's hard to get into the habit of commenting but now I find I like writing the comments just as much as writing the code. I'm so used to it that it feels strange to me not to comment now.
When I was in the Marine Corps I had a 4 month gap between deployments. A three month 300 level advanced course in x86 Assembler at the base college just so happened to be starting. The professor (wish I could remember his name) commented his code so well you could read it like a book and know exactly what was going on. That's when I decided commenting was just as important as coding. Commenting is an absolute must in Assembler.