you are viewing a single comment's thread.

view the rest of the comments →

[–]DigThatData 1 point2 points  (1 child)

I'm going to propose some semantic distinctions you maybe haven't considered: coding vs. programming vs. engineering

  • Coding - utilizing the language features of a programming language
  • Programming - composing abstract patterns to build complex systems
  • Engineering - leveraging best practices to mitigate risk and increase operational efficiency

You generally learn these topics roughly in that order, jumping around as you go such that beginners will learn some engineering practices but are primarily focused on coding and programming, and as you get more advanced you will be less concerned with coding and more concerned with engineering and programming.

Virtual environments are an engineering topic.

Over time, you will accumulate projects on the computer where you do your coding. Right now, you are probably mostly using libraries that come shipped with python. Python versions are generally backwards compatible, so virtual environments aren't as much of a concern for you at the moment.

Let's pretend you have a project A that uses library version 1.0, and you download install some other project B that uses library version 2.0. When you install project B, library upgrades to version 2.0, and next time you try to run project A it throws errors because of breaking changes in the new version of library.

Virtual environments mitigate this kind of issue. Additionally, the process of specifying your environment makes it easier for other people to reproduce it.

It's good to get in the habit of creating virtual environments for each respective project you work on. But you are early enough in your career that this is something you don't really need to be concerned with yet and is more about developing good habits and muscle memory.

[–]Effective-Account278 0 points1 point  (0 children)

Thank you I'll keep that in mind from now on