I’ve been using Python for quite a while now, and that too almost everywhere - in my projects, courses, internships, jobs, and even my Master’s thesis. It’s so ubiquitous that it almost feels like a snake that is following me and telling me not to bite into an apple. (In accordance with this seemingly contrived example I’ve never used anything running macOS, but that’s for entirely different reasons; it has nothing to do with any animosity towards Apple products).

However, I never really learned how to write Python code through any structured courses or tutorials; it was purely while working on problems of certain natures for which Python felt perfect. But over time, the more scripts I wrote, the more I thought about how useful it’d be to learn to write Python code properly. Finally, I did some basic courses and went through some tutorials on certain libraries to get a fairly decent understanding of some good practices to be followed while writing Python scripts, modules, and packages. After getting some initial know-how, the rest was about adapting to situations and using suitable code templates to follow the use cases properly.

One of the things I did while writing Python code was creating a default file named scratch.py in any directory where I wanted to test some of my code. It wasn’t really thought through much but was the first thing that came to mind while using Python. Write some code in a logical manner, import its module in a test file, iterate over possible mistakes, and fill in the gaps.

To take it up a notch, I installed PyCharm - an IDE aimed towards Python development - and played around with some of its settings and controls. I realized that the IDE gave an option for creating scratch files in our project for testing some of our written code; I was quite amazed that the creators of the IDE came up with exactly the same name for a test file as the one I was using. I think it indicates that as long as we’re on the same page when it comes to a thought process, maybe the names we think of also follow the same pattern.

In any case, PyCharm is really useful for Python development in a smooth and more organized way. Enough of breakpointing around with hacky means!