Code writing, although an important part of the programming process, is by no means the only one. It is one thing to write a program or a site, but it's another thing to make it work for users or on a server. Here's an incomplete list of questions that you'll have to answer once you get into development:
- How do I get onto the server?
- How do I upload code to the server?
- How do I launch a website?
- How do I navigate on the server?
- How do I edit files on the server?
- How do analyze problems in the site's functionality?
- How do analyze the system when it freezes (e.g., if it runs out of space or memory, or has issues with a loaded disk or network)?
These questions become especially interesting because the vast majority of servers do not have Windows installed, but rather Linux without a desktop environment. When you connect to the remote machine, you will see a flashing cursor running in the terminal (a special program which the connection is made through).
This is a command line where you can enter different commands, run programs, analyze the system, and generally perform all the usual operations that are done on a home computer. Some people will find this interface to interact with the system rather archaic, but that's only at first glance. Using text offers many advantages:
- It significantly saves on resources, which is especially important for server environments
- The ability to automate any action. Not only can commands be executed, but they can also be written to a file and executed all together
- Virtually unlimited access to system features
- There are more features available in many programs
Command line skills will help you solve all kinds of tasks more easily and boost your level as a developer. You can easily run and debug a site on a remote machine, as well as optimize daily work on your computer:
- You need a command line to run code in any language
- You need a command line for collaborative development
- Even those who work exclusively with the frontend part of an application also need a command line. The entire modern frontend toolkit consists of dozens of console (i.e., command-line) utilities, such as Gulp, Webpack, Babel, and so on...
Starting from the next lesson, I'll start bringing in listings and tell you how to set up the environment. It's important not to just run through it, but also to try to execute all of these commands yourself and in the Hexlet environment.