Surprising post title? Unfortunately, the reality is even more surprising! I thought for a long time about whether to write this post and how to write it so that no one would feel offended by what I want to say. Briefly and to the point, a future Junior Java Developer must know the basics of computer operation.

Preface

About the fact that Java language alone is not enough I have written before, now I will add that the basics of computer operation are an essential basis. I also wrote about it, what is needed for programming. Why are basic computer skills so important? Because the natural, only and everyday working environment of a programmer is the computer, or more precisely, the operating system on which the programmer works.

In my opinion, every future junior Java programmer should know the environment in which he will work on a daily basis. In my opinion, the problems result mainly from a lack of knowledge and skills in using a computer, e.g.:

  1. Lack of knowledge of the operating system we are working on.
  2. Lack of knowledge of basic keyboard shortcuts.
  3. Fear of using terminal/console/command prompt.

Knowledge of the operating system we work on

Without it, it will be very difficult to program, and I don't mean knowing the technical elements of the system, such as thread sharing or the type of file system. I mean navigating the file system using file explorer, you need to know where the main drive is, where the software is installed and where the user's home directory is. Environment variables that are set for development tools and that are read by the software.

Navigating through the file system

  • I'm writing here about navigation using a graphical tool for browsing files and directories. You should know how to search for files and directories, move between directories, create, edit and delete files. What is the use of such knowledge? For example, packages in Java are directories and classes are files. If we have a non-standard error with a file, we need to know how to find it and fix the error. Non-standard problems occur surprisingly often. Most developer tools can be installed from a wizard or simply unpacked in a location of your choice. I prefer to unpack the tools and run them manually from the command line. You need to know where the tool is installed so that you can run it and/or find configuration files that you need to change yourself. While on this topic, I recommend installing/unpacking the tools in one directory, e.g. dev, on the main disk; I do not recommend placing everything on the desktop. My directory structure is:
    • ~/dev – main directory for development,
    • ~/dev/install – tool installation versions – offline,
    • ~/dev/docs – documentation, books – offline.
    • ~/dev – main directory for development,
    • ~/dev/install – tool installation versions – offline,
    • ~/dev/docs – documentation, books – offline.

Environment Variables

  • W telegraficznym skrócie, to informacje o położeniu zainstalowanych narzędzi. Na przykładzie narzędzia IntellJ przedstawię jak wiele zmiennych musielibyśmy samemu utworzyć, gdyby nie paczka z IntelliJ. Zapytasz zapewne, to po co mi wiedza o zmiennych środowiskowych? Potrzebna jest do niestandardowej konfiguracji wersji różnych narzędzi, a taka konfiguracja jest bardzo częsta. Sam IntelliJ zawiera wbudowaną wirtualną maszynę Java (JVM), narzędzia Maven i Gradle, gdyby ich nie było, to bez dodatkowej instalacji niemożliwe było by programowanie i budowanie projektów opartych o język Java. Bez tego programista musiałby samemu ręcznie ustawić zmienne środowiskowe dla Java (JAVA_HOME), Maven (np. MAVEN_HOME), Gradle (np. GRADLE_HOME). Do tego dochodzi np. Spring Boot, gdzie mamy wbudowany serwer Tomcat, bez tego trzeba ustawić TOMCAT_HOME. Przykład zmiennych środowiskowych:
    • JAVA_HOME=~/dev/java/jdk/11.0.9-zulu
    • MAVEN_HOME=~/dev/tools/maven/3.6.1

Knowledge of basic keyboard shortcuts

Working without keyboard shortcuts is possible, but very tedious. IntelliJ tool puts a huge emphasis on using keyboard shortcuts. In IntelliJ, almost everything can be done without using the mouse just by using keyboard shortcuts. Here I write about such basic shortcuts as CTRL + C - copying files and/or text, CTRL + F - searching for files and/or text. Sometimes it happens that you can't use the mouse and you need to copy some text or file, then shortcuts are helpful. In IntelliJ, a useful shortcut is "Double Shift" - search everywhere or ALT+Insert - generate code. Every future junior Java developer needs to know the "text editor/office" shortcuts.

Useful keyboard shortcuts

Fear of using terminal/console/command prompt

At the very beginning, I would like to mention that I cannot imagine working without the command line. Most configurations for installed development tools can only be done via terminal/console/command line. A future junior Java programmer should become familiar with the command line as soon as possible, because it will accompany most of his or her work. What will you need the terminal for? To run an application written in Java, to run the application server in the mode and configuration we choose. An example would be an application written in Spring Boot, it will be possible to run it from IntelliJ, but often "more control and/or custom startup" is needed, then we will use the command line. Most databases will be run from a terminal. When working with, for example, a three-tier application written in Java, I use the command line to run the Tomcat application server, the PostgreSQL database and the Gradle tool, which places the application on the Tomcat server. Often, to add a new function to an existing application, we need to run several modules, a database, an application server, etc.

Summary

To sum up, when working as a programmer who creates applications/systems, we will have to know our working environment very well (operating system, keyboard shortcuts, command line), not only from the user side, e.g. the operating system, but also use the command line to configure various elements of our own applications and programming tools. The above-described elements are the necessary basis. Going deeper into the topic, we are heading towards the programmer as the so-called DevOps, which deals not only with software development and coding, but also knows how to run a server and configure the work environment.

Zdjęcie autorstwa Oleksandr Pidvalnyi z Pexels.