kpi-web-guild / django-girls-blog-OlenaEfymenko

django-girls-blog-OlenaEfymenko created by GitHub Classroom
MIT License
1 stars 0 forks source link

Learn pythonic concepts #11

Closed webknjaz closed 1 year ago

webknjaz commented 1 year ago
OlenaYefymenko commented 1 year ago

I have also decided to add more practice - writing in Python + theory. I would try VS Code, if I need to test some script quickly. Because, for Vim, I considered need more time for experience. In VS Code I faced problem by executing Run Codein the workspace, after modifying script, output don't update. Only after Run Python File, output changes. From user (without creating workspace) modifying in scripts are displayed correct after command Run Code. I searched in Google this answer, but have doubts:

Run Code is provided by the extension Code Runner, which will only show the result in OUTPUT and not accept input.

While Run Python File in Terminal is provided by Python extension, it will open a terminal panel in which your Python interpreter is automatically activated, then runs python3``[hello.py](https://hello.py/)(macOS/Linux) or python``[hello.py](https://hello.py/)(Windows). It both displays outputs and accepts input.

What do you think could be the problem? The cause may be in the path that needs to be updated in Settings?

And a general question, that is now more often used in companies (IDE, text editors)? Should I switch completely to Vim?

webknjaz commented 1 year ago

I almost don't use VS Code myself and never use it to run Python programs. I always use the terminal where I understand the environment state because it's fully under my control. I know which env is activated and sometimes use the full path to the desired interpreter if needed. So if you use VS Code for editing, you can try using its terminal to run stuff or run the scripts through a separate Kitty session. It's up to you. You can also dig deeper into setting up a more integrated experience with VS Code, this is not something I looked into much.

Some companies or rather teams may be using certain code editors or IDEs in which case, many people are able to help each other because the environment is mostly similar/identical.

Most of the time, it is allowed to use anything you're comfortable with. Choosing Vim is a deeply personal choice made consciously. You may use it or not but it is is useful to be generally familiar with it. You may end up having to use it on remote systems where it's often available by default while you won't be able to keep using graphical tools there. This is the source of its importance.

You can keep it as a tool for writing commit messages when using Git (setting EDITOR=nvim should do) from the terminal and that's enough to keep the basic usage skills sharp. This is just an aspect of letting yourself feel comfortable working with the terminal.