Sep-08-2021, 02:45 PM
When I develop code, I do it in small steps, usually a method at a time, then make sure that the method works before moving on.
To do this, I will occasionally use a well placed print statement, but remove it once I am satisfied all is working as expected.
What is more valuable to me is to step through the method, checking all variable contents and program flow, step by step, using the debugger.
Too many print statements, or logger statements will make your code unreadable, or messy at best.
To do this, I will occasionally use a well placed print statement, but remove it once I am satisfied all is working as expected.
What is more valuable to me is to step through the method, checking all variable contents and program flow, step by step, using the debugger.
Too many print statements, or logger statements will make your code unreadable, or messy at best.