Friday, July 6, 2012

PHP: The Language You Love And Hate

tl;dr

I use PHP and find that it works well for most jobs, but for others, not that great. Use the language that best fits the job!

PHP in the critic spotlight lately

Quite a few "PHP is good" and "PHP is bad" posts lately; even from people who, like me, use PHP, love it, and also hate it, have come out to say a thing or two

Well, if you read veekun's post, he's got something going there that I really want to point out, even though it really wasn't meant for the way I'm thinking about it; it's the toolbox. As engineers, it is our responsibility to build things. You can hammer in a nail with a wrench (haven't we all done that once before?), but obviously you should have used a hammer. Heck, you can even use a nail gun if it does the job better.

Languages Are Engineers' Tools In Their Toolbox

No, really. The more you know, the more knowledgeable and versatile you will be. And obviously if you have that knowledge, you'll know what "tool" is the right one. Steve Yegge's post on interview phone screens tells a wonderful tale of this. 
"Many C/C++/Java candidates, even some with 10+ years of experience, would happily spend a week writing a 2,500-line program to do something you could do in 30 seconds with a simple Unix command."
I'll let you read the article for the complete story, but it essentially explains that you can do a search and replace in many ways, but if you don't know how to use grep or python or even php you would be wasting lots of time on a quick job.

Now, I'm not saying to go and learn all the languages out there. I'm just saying that maybe knowing a little bit of a compiled language, scripting language, and a frontend language would help you understand better the full stack of whatever you are working on.