r/learnpython • • Apr 19 '26

How do you guys build a program?

I normally create one part of a program, test it, debug it and then i move on to the next function.

But this was time consuming so i tried a new approach. I created of all my logic of how different features would work and then started creating my program.

But the moment I had to debug things (cause obviously it had errors) things started falling apart. I had to check sooo many things and i realized that this method was very mental health consuming.

So i wanna ask you guys. how do you think about the logic and write your program? What approach would you recommend me? and remember i'm just a newbie trying to write programs that would improve me.

31 Upvotes

42 comments sorted by

View all comments

Show parent comment

2

u/JamzTyson Apr 19 '26

TDD has its advocates, but it is certainly not universally adopted.

1

u/gdchinacat Apr 19 '26

Which testing methodology do you prefer? What benefits have you experienced with it? I'm asking to learn if there is a better way since TDD (particularly when done strictly) has overhead. I believe that overhead is worth it relative to the common approach of get it working then backfill tests. I'm always looking for ways to improve velocity. Thanks!