Thursday, February 10, 2011

Best practices? there is no such thing.

There's one thing everyone knows about Perl: There's more than one way to do the same.
And that, that same single thing, is viewed as a good thing for pro-perl people, and as a bad thing for anti-perl people.
There are obviously good ways to do something, and bad ways. There can be better ways. But there's no way a single way should be the best.
Perhaps, and only perhaps, there could be a best known way to do something. Perhaps Bresenham's algorithm was the best one to draw a line, until a better one came. Which is the best one nowadays? Well, it depends on the lenght of the line. And on the slope. And on the machine executing it.
I'm sick of hearing people preach of best practices to do something or the other where using these best practices means a much larger code to write, bloat, inefficient code, etc, while providing absolutely nothing better than a different way to do it. They sure are better in some cases, but not always. And when something is not always better, even if there is a single case of not being better, it's of course not the best.
Anyway, having a best something would, by definition, kill all innovation and improvements, because... how could someone even imagine doing something better than the best?

No comments:

Post a Comment