- [Instructor] Let's talk about some reasons
about why you should organize your code.
The first reason is that you mostly work in a team.
Right, sometimes you work in an individual project,
but most of the time we work with other people,
and when our code is not organized,
it's really hard for other people to collaborate with us.
It's also how to divide the work
so someone is working on something, on one file,
and someone walking on another file.
This helps reduce all kinds of merge conflicts in Git
and other painful synchronization.
The second thing is that when your code is organized,
you can reuse it.
You can take the logging library, for example,
and use it in several places in the code
instead of doing copy and paste,
or maybe manually writing the logs every time.
And finally, but not least,
it allows you to test the code easier.
Once your code is self-organized,
you have small functions with well-defined APIs,
it's much easier to test them than one big notebook
or even one big Python file with a lot of code in it.