Codeasy.net C# Beginner – Arrays: This Time I’m Ready!
Day 37 #100DaysOfCode
After stalling out last night working with arrays, I came at it today with fresh eyes and a fresh mind.
Continuing with what I started laying down yesterday in trying to fully understand just WHAT the program was doing at each step of the way, I finished writing comments to explain what every operation was doing.
Once I had the program theory down, that is, what it SHOULD be doing, I then had to figure out why it WASN’T doing it. I started writing a bunch of DEBUG lines that would display certain bits of information for me at key points in the program, but I wrote them in such a way that I could easily toggle them on and off.
Wait?! Did I just discover writing my own debug tool within the code? Oh, man! This is a game-changer! Now I can flag certain sections of my code to see if they are performing as expected or throwing out something else entirely.
I also learned that slowing down and checking each line, or section, as it is written is a much better way to go as I can catch things that throw errors quicker and not have to isolate it from a bigger block of code.
My debug game is most definitely +1 today!