On 2021-01-27, Cameron Simpson <c...@cskk.id.au> wrote:

> Me either. Like grant, i fall into the "look at the stack trace and 
> think a bit, then put in print() calls or similar to show me whether 
> things are what I expect them to be when the code runs".
>
> I actually have a Computer Science degree, but I think there are 
> definition those who like debuggers and those who tend not to.

Me too (MS in CSci), but I can't remember the last time I used a
debugger. It may help that I "grow" my apps. I don't sit down, write a
3000 line program, and then try to debug the program. That just
doesn't work. It doesn't matter how much UML you can point to if a
couple of your basic assumptions turned out to be wrong.

Write small funtions, and add small chunks of code, and test as you go
to make sure things work the way you thought they were going to. If it
used to work, you've only added 5 lines of code, and now it doesn't
work, it's usually not hard to figure out what's wrong.

And don't be afraid to refactor stuff when your original approach
starts to smell -- if you just keep going it will only get worse.

Source control can also be a lifesaver if you get really confused.

--
Grant



-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to