~

The Hunt for Perfect Tool

Published: September 19, 2024

Modified: September 28, 2024

Duration: 3 min

Words: 487

React vs Vue? Django vs Express? Node vs Python? X vs Y?

We all know the pain of this question or phenomenon. It's painful because we want to use the best tool, and some claim X is better, while others claim Y is better.

After going through various searches to find the best tool, I came to realize that you will not be satisfied with any answer.

Everything is built for a specific purpose. It has a group of developers who develop the product for a certain group of people. It has its own philosophy on how the product will be built.

As developers, we have certain standards for the tools we use. For example, we might consider things such as:

  • Performance, resource usage, and security
  • Community support
  • Whether it's built by a community or a company
  • Whether it's backed by a company
  • Whether it's opinionated or not

In this hunt for finding the best tools, one of the worst realizations is that the tools that are really better are not always used in the industry. The tools with flaws have widespread adoption because, in the industry, people don't care about these things. If it works and can build the product they want, they will use it. They don't care much about resource usage, etc. This is why Node is prevalent, even though one of its creators has said it has design flaws.

Another thing is the community. If something is good, very soon there will be a community around it. If there's a problem in the tool, it will be hard to get rid of that tool because it is used in so many places and used by so many people.

After all this, what should we do?

For me, the answer is the following: Don't learn tools, learn concepts. Specifically, learn concepts that are transferable to other tools, and the good news is that most concepts are transferable. Tools come and go, but concepts remain.

Here's an example:

Error Handling

Look at the following C code.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#include <stdio.h>
#include <stdlib.h>

int main() {
    FILE *file = fopen("nonexistent_file.txt", "r");
    if (file == NULL) {
        perror("Error opening file");
        exit(EXIT_FAILURE);
    }
    fclose(file);
    return 0;
}

In C, error handling is typically done by returning an integer other than 0 or NULL to indicate an error. Then, you have to manually check the returned integer and handle the error.

Now, look at the following Python code.

1
2
3
4
5
6
try:
    file = open("nonexistent_file.txt", "r")
except FileNotFoundError as e:
    print(f"Error: {e}")
else:
    file.close()

In Python, you have constructs like try and except to handle errors. If the file does not exist, the statements under except execute.

While these two pieces of code look different, the concept remains the same:

  • Provide a way to determine if an error has occurred.
  • Provide a way to take action if an error occurs.
discussion