DEV Community

Cover image for Be Lazy and Increase Your Productivity: A Shell Discussion
guto
guto

Posted on

Be Lazy and Increase Your Productivity: A Shell Discussion

Have you ever stopped to think on how many occasions you've faced the following question: how could I improve my "productivity" as a developer? Here, the objective will be to highlight some points that you can take with you for a better lifestyle and reuse of your time, even if the word productivity is not yet a "correct" term (the term I seek to express). The title of this article may be a little curious, but I'm already advancing that it's not meant to be taken literally.

Note
This is a simple opinion article (even the first one) that I am publishing, so please know that nothing said here is something like "a definitive truth" or something like that, after all, I will only be raising points and questions for you, Dear reader. Know that any healthy discussion is more than welcome here.

Daily

Every day each person has at least one goal to accomplish, whatever it may be, which starts at the time of awakening and "should" be accomplished by nightfall. These goals are not necessarily work tasks or anything like that... They are just discreet wishes that each of us has, goals to achieve in a short period of time (or not). At the end of the day, it's these small goals that make us move every day.

The title that probably caught your eye refers to the concept of laziness.

Laziness

Noun

  1. having or showing an unwillingness to work. "Many people start the course with a bang, but trail off after a while because of laziness, insufficient curiosity, or lack of motivation."
  2. the fact or quality of encouraging idleness. "We relaxed in the laziness of the warm afternoon, watching as the sun began to set."

The concept of laziness is seen as a way of expressing someone who, in the inserted context, would have aversion to meeting their goals, however, the concept I want to bring is someone who would have aversion to meeting repetitive goals ( yes, generally). When we talk about someone who doesn't like to repeat the same things over and over again, doesn't like to live in the same flow of tasks or prefers not to repeat a certain action more than once, we are talking about the type of person I want to bring to the our context.

Right, but how would a person like this imply the development of productivity? Simple: people who don't like to do the same thing twice would rather "get someone to do it for them". The specific point is that this "someone" I just mentioned would be none other than our computer friends. Lazy developers prefer to automate processes instead of always repeating the same things, therefore, the energy spent is no longer to carry out the same activity every day, but to find a solution that can meet this need.

Automatic pilot

Now that you understand what kind of people this article is aimed at, I hope your doubts have been clarified (so far). Maybe it's time for you to turn on autopilot and look around at the amount of tools you can use to improve your development process.

The point in question is: with the advancement of technology and the increase in the ease of access of the population, the creation of new technologies that seek to help in people's daily lives is immense. Look around at the number of devices that make you stay connected to the Internet, whether directly or indirectly, having an impact on your life. There are many of these devices, but you as a developer may not use or even realize the powerful tools you have in your hands for consistent energy expenditure.

When I talk about tools, I'm not talking about huge platforms or highly end-user oriented tools that will make direct use of that software... I'm not even talking about other software that you should probably use to organize your schedule (they are important and necessary, but, I want to go deeper)... I'm talking about tools that for years were the beginnings of what we know as computers, which were known as the only ways to use them. Yes, I'm talking nothing less than your terminal.

Terminal

Going back to what boiled down to the main human-computer interaction interface that existed a few decades ago, we know that terminals became popular and are still used today (or at least they should be).

1981 IBM 5150 PC

The image above depicts a 1981 IBM 5150 PC.

Currently, terminal emulators seek to simulate the interactions that occurred in times when a "black screen with green letters" was the only visual interface style presentable by monitors. Obviously terminal emulators are very user friendly, allowing different customizations and expanding the imagination of those who will use them (if you are interested in learning some ways to customize your terminal emulator click here and access one of my past articles).

The point I want to highlight here is: these have always been the main interfaces to be used when working with computers (in general terms). Its interface is based on an input of commands that are processed and an explicit output resulting from the processing of these commands. There is usually a bit of a misunderstanding on the part of general users to think "okay, but if technology has evolved so much, why should I continue using something like this" or "it's a waste of time to use something outdated", but I already anticipate that they are misled into thinking that way.

The main argument that favors the use of terminal emulators is simplicity. There is no middle ground, access area lock, rendering time or bad animation (whatever is a common problem of a general purpose GUI). The commands are executed, you control the computer as you wish and manage the main activities of your daily life.

There are several solutions that seek to bring real experiences similar to the use of interfaces in terminal emulators, it is not difficult to find some software that makes its appearance elegant, being able to navigate with arrows or something like that. The point at hand is: obviously the use of a graphical interface aimed at an end user is more "pleasant", after all, it was created to be used by a general user.

Okay, so does that mean that for me to increase my "productivity" I have to use a terminal emulator? No! I'm saying that exploring the use of some tools through the terminal emulator can be a new and enjoyable experience, which in the future will turn out to be of its own benefit (after all, you managed to learn something new and put the mouse aside for a bit , and could even be a benefit to your health, right?).

Scripts

Ok, the use of a terminal emulator may not be to everyone's liking, I confess, but know that mixing its use with other tools can be a powerful combination, one of which is the use of scripts! Yes, scripts in the sense of instruction orders!

Terminal emulators work on a high level of abstraction layer so that the user can execute commands to be interpreted by a shell interpreter and sent to the kernel, performing communication with the hardware. The process itself is done literally with layers of abstraction. Every command you run is checked, interpreted, and executed according to the constraints previously set in your interpreter.

Abstraction layers in the kernel

The image above shows how a user's input (executed command) is made, being sent to the shell interpreter and subsequently executed.

If you use any system that is based or inspired by UNIX (such as Linux distributions, macOS, FreeBSD, OpenBSD and BSD's in general) know that you have a powerful tool to use: scripts for your shell interpreter.

The famous shell scripts that have as main interpreters (better known) GNU Bash, Zsh, Fish, TCSH among many others, have ways of executing commands (working as a programming language) directly, enabling the creation of automation routines, shortening configuration processes, among other different ways so that you can increasingly automate your development routine.

The scripts can be created in different ways, used for infinite possibilities, opening up a huge range for your learning. At this point, I will leave my mentions to the main people responsible for producing excellent quality content on the use of shell scripts and the Linux world in general:

These guys are amazing when it comes to the Linux world.

Of course, if you want to learn a little more about Linux and still prepare for a Linux Professional Institute certification, know that there is an excellent guide that will help you along the way, the famous lpi4noobs written with a lot of love and affection by the one who is writing the article you just read!

Conclusion

Learning to better utilize the tools you have around you is the best thing. Be curious, seek to learn about the use of different technologies. At the end of the day, nobody likes to perform a repetitive task on a daily basis as a developer, so maybe it's time to explore new paths and understand that this whole learning process is part of it.

I hope you enjoyed the article, I wrote it as a way to express a little more about a perspective resulting from the observation of published content related to the term "productivity", which I still consider to be a wrong term. Finally, the intention was to leave a little of the technical content itself and take a look at the environment in which we are inserted.

Be happy, thanks for reading this far.

Top comments (0)