Monday, December 29, 2008

Reinventing the wheel with square blocks


I feel like a fool, after learning the regex i thought that it would be a good idea to write your own regex and validate your own stuff. But little did i know that there's always a best practice out there, and unless your better than the rest or it's something that you need 100% intimate knowledge of, i.e. your core business.

Often times it's wise not to reinvent the wheel using square blocks. Instead type whatever heck that you want to do using mighty Google and wait for it's results. Usually you can find whatever you want in the first page. And it's a perl script, you can be sure they have some module somewhere in the holy maze of CPAN which can do what you want to do and better.

Why better? Because it have been tested and released with a version tag and whatever version it is, it's still better than your version 0 of the same code you're writing. And it will often handle the usual crap that you will soon encounter if you decide that you like your own code better because of the formatting makes it look pretty and shit.

And the you will have to feel like a total fool for the second time when you finally have to crawl back to the superior code and install it over and redoing the testing again because you have an ego problem to begin with.

0 comments: