DEV Community

Cover image for What, Why! Always know the "What" and "Why".
Tahir Raza
Tahir Raza

Posted on

What, Why! Always know the "What" and "Why".

Sometimes we as programmers tend to just do stuff for the sake of completing a task which is fine in most cases but sometimes we do something without enough knowledge and break our production servers. Yes, sad but true, we do that sometimes.

In today's quick blog post I just want to emphasise on one thing: Always, always know what are you doing and why are you doing that.

I will try to paint the picture with some real life examples.

In our day to day work we sometime encounter ourselves where we have to use a software and tweak it's configurations according to our needs. These configs are generally a common place where we seem to just bypass and do what we find first.

What, why?

The most common example I can think of right now is configuring a web server according to your needs. Usually we tend to just goolge for our needs and copy-paste the first stackoverflow result.

For example tweak a lot of configs for an nginx FastCGI to name a few buffers, it's size param etc etc. But before you touch that piece of code make sure you know what FastCGI is, what buffers are and what does it really mean to change these configs.

Another example, supervisor configs.

If you have ever used supervisor (if not read here) you'll know we have to configure it how it should consumer or run a command. And we can provide options like:

  • --limit = X
  • --memory-limit = Y
  • --time-limit = Z

All these configurations actually have a very meaningful impact on how supervisor should treat a command.

So before you try to tweak anything in your configurations make sure you give it a few minutes to read about it and you should know why you are doing it.

Top comments (0)