There is more than one way to write a piece of code it. However, there is one and only one way that gets the job done better than all others. Has Python won?
There are many ways to solve a problem. We share our own views in online communities, learn new methods and use the one that suits us the most.
Let's take sorting. For a given type of data, a specific algorithm may be the fastest. So, it's great from performance point of view.
But we're coming out of "performance" and into "maintainability." There could be several ways of solving a problem wherein the performance difference is negligible considering your use of the software. In that case, you select the method that suits you the most.
An example of this is variable, function or class naming convention. Two people might choose entirely different names for variables, methods or classes while writing the exact same program. Maybe they even choose a different way of expressing certain aspects of the program. Or, they might even choose two different programming languages!
Considering the performance of several methods equivalent, or the trade-offs between performance and maintainability acceptable, each individual choose the one that he is most comfortable with. See? There is more than one way to do it!
Now, I'm really going to talk something weird, so pay attention. The best method not only depends on pure performance or the problem, but also on your skills, your environment, your colleagues, your company and much more.
In a nutshell, even though a problem might have only one best solution, but that best solution need not be same for everyone! The best one depends on human factors too, which is different from person to person.
When a wise Perl Monk says, "There is more than one way to do it", he doesn't mind whether you programmed your solution in Python, Perl, Ruby or any new language that drops down from the sky. He would just say, "You found one of the several ways to do it."
Here, we look at Perl's idiom at a much broader scope. Instead of confining it to Perl, we've expanded it to programming in general. You could expand it to life in general.
There are a lot of things that make people happy However, there is one thing that makes him happier than all others, and that thing can differ from person to person. That's why Nature has so many beautiful things. Choose the one you want.
Moral: Never just rely on other's judgement about programming languages. Try it out for yourself. Does it work for you? It's ultimately you who are in need.
Disclaimer: By language wars, I mean only those "baseless" flame wars that take place. You'd only find people throwing stones at each other. However, healthy discussion about a language's merits and demerits compared to other languages is good.
Post a Comment