Your Local Environment

Confused by the title? Don’t worry, this isn’t some tangent about the importance of conservationist efforts to your local environment. Today, I want to talk about the importance of your local development environment (the one on your computer)!

Local Environment?

Your local development environment is essentially everything on your computer that makes creating, testing, and debugging your applications possible before pushing it to a common code base. This can consist of local database setups, integrated development environments (IDEs) such as Visual Studio Code or IntelliJ, virtual environments, and more. It is important to have all of this setup properly with the requirements for your project installed.

How do I know what I need?

Many of these decisions are ultimately made by you—or, your employer if you’re joining a company to work on their products—and are heavily dependent on the needs of your project, but I’m happy to provide some suggestions and my personal favorites.

Database - Personally, I use MySQL (a relational database management system), GraphQL (a data query and manipulation language for APIs), and TablePlus (a GUI tool for relational databases). I suggest learning the difference between relational and non-relational databases (here is a good starting point) and weighing the pros/cons for your application. Once you’ve done that, you can find out what good languages and tools are best for that type and match your needs such as PostgreSQL or MariaDB for relational or MongoDB or Google Cloud Firestore for non-relational.

IDE - Personally, I use Visual Studio Code for all of my development needs. However, this Wikipedia page has some really good information about IDEs generally used for each language and comparing them, so you should definitely check it out when deciding.

Configuring Environment

Ensuring that your environment is configured properly for your purposes is important. For example, whenever I install a new version of PHP, I need to place it somewhere in my computer and copy the path to it into my PATH variable. If I don’t do this, I can’t use PHP from the command line (the computer doesn’t know where it is!). If I have two versions of PHP, it’s important to note that Composer (a dependency manager for PHP) should use whichever version is first in your PATH variable. This is just one consideration for a specific case, but I think it highlights the importance of properly configuring your environment for your purposes. What that looks like exactly will depend greatly on your tech stack, so you’ll have to do some research when you’re starting a project.

Virtual Environments

For a long time, I didn’t know about virtual environments. And when I finally learned about them, I brushed them off as “unnecessary” because everything mostly worked on my local machine. However, I’ve now come to understand and embrace the utility of virtual environments, especially as it pertains to Python and containing package installations to specific purposes instead of the whole machine. Additionally, working on setting up Python virtual environments on my computer and writing a custom batch script to handle them made me learn about a cool feature of Python that I didn’t know about before: if you have multiple versions installed, you can use a specific one by doing something like (for me) py -3.9. All of that being said, I highly recommend learning about virtual environments, how to use them in your tech stack, and possibly even looking into containerized solutions like Docker.

Final Words

This can all be fairly confusing and individualized, so I suggest taking it slow and giving yourself a little grace if you struggle. If you’re struggling to decide or need some help finding out how to do something, then feel free to reach out to me and I’ll do my best to help.

要查看或添加评论,请登录

Jacob Knox的更多文章

  • Having Structure and Direction

    Having Structure and Direction

    Something I wish I knew from the very start is the importance of having structure and direction in learning and in…

  • Good Coding Practices

    Good Coding Practices

    In this edition, I’d like to go into significantly more detail about good coding practices, which was #2 in my first…

  • Story Time: API Key in Repo

    Story Time: API Key in Repo

    In my previous article, Best Lessons Learned to Date, I brought up the importance of keeping your secrets (#7) and a…

    1 条评论
  • Best Lessons Learned to Date

    Best Lessons Learned to Date

    When I first started to code, I was naive and simply hungry to consume as much (mostly) useless knowledge about as many…

  • Welcome to Oops2Ops: Coding Stories!

    Welcome to Oops2Ops: Coding Stories!

    First, thank you for taking the time to look into what the heck this new newsletter I'm starting is. I appreciate that…

社区洞察

其他会员也浏览了