8 ms·
Ok, so here it goes. I haven't commented on this site for over a year. Full disclosure: I am an average programmer compared to many here. I come to this site t
by chez17 14y ago
Ok, so here it goes. I haven't commented on this site for over a year.
Full disclosure: I am an average programmer compared to many here. I come to this site to improve my self and read about what brilliant and amazing things you all do. Now you have a reference.
I use PHP on a daily basis, have been for years. I am a freelance developer who has been able to carve out a living with a lot of hard work and a lot of luck. I just met the right people at the right time. Over the last 7 years since I started developing professionally, I have seen nothing but people shitting on PHP constantly. I am in no way suggesting PHP is a perfect language, but I still never get the hate. It just seems so ivory tower to me sometimes. Let's look at reality.
I'm starting a small project for a client. They are keeping track of all their scheduling and doing all their reporting in excel. They want to move this to the web with basic security so the right people can see the right information with ability to access it from anywhere. That's it. You know what works for that? PHP does. It works fine and it works on almost any server in the entire world with no issues. I don't need a .vimrc file with a million special configurations, I don't need a hot new framework where my time is spent figuring out how to do basic CRUD operations, it won't matter if PHP is statically typed or not, it won't matter if... you get the idea. I just need to start developing and getting this project done so this business can start saving time and money. That's what matters most to me.
PHP works, and it works damn well for millions of situations every day. No one is suggesting you use PHP to build a super computer. If your project requires something different than use something different. PHP is not the "Nickleback" of programming. PHP is useful. PHP is practical. PHP is easy, and that's not a bad thing. Facebook, the biggest site in the world, uses PHP. Think about that.
Finally, let's use his tool analogy. PHP is a double-clawed hammer. What if your job was to remove nails from wood all day? What a wonderful tool a double-clawed hammer would be! You wouldn't have to worry about which way the hammer is facing! That would save you real time and real effort. It's the right tool for that job. Tools are about how you use them. If someone uses a tool incorrectly it's not the fault of the tool.
PHP can use improvement. Every language can. I imagine a meeting of otherwise incredibly smart people sitting around in smoking jackets and sipping fine brandy standing around with smug smiles on their face. "PHP is horrible!" One will say. "Hmmmm... Yes... Quite..." A small laughter emerges. They all pat themselves on the back and enjoy their intellectual circle-jerk. All the while countless developers are using it every day for the right reasons making real applications that help real businesses save real time and real money. Laugh at me all you want, I get Christmas cards from my clients. They like me just fine.
- Retric 14y agoThe setup time issue is an advantage of PHP over many languages. But, I will let you in on a little secret, once you know how to do it 'setup' time is a drop in the bucket on all platforms. And in the rare case where it might otherwise be hard, people setup a shell environment they can use as the template on any project and it just works. That said, there are popular languages worse than PHP for most web development tasks, Java for example.
- kintamanimatt 14y agoBash is another example! I've always wanted to create a web app using Bash on Balls [1] [1] https://github.com/jayferd/balls/ https://github.com/jayferd/balls/
- chez17 14y agoThat was one point in favor of PHP, and it was a small one. I'm competent enough to set up any environment if the project required it. However, some hosting companies won't even let you do that. A client might have purchased a small package that won't even let you ssh in to do anything. That's a real life scenario that you have to consider. PHP works there.
- lukeschlather 14y agoPHP will always have an edge. If you want to do something stupidly simple, no other language can match. <?php $hackernews=file_get_contents("http://news.ycombinator.com); $hackernews =str_replace('Hacker','Interwebz',$hackernews); echo $hackernews; ?> Now that's horrible code, it has a dozen bugs aside from the security issues, but I would go so far as to say when I need to do something stupid like that quickly, nothing matches the simplicity of PHP. It's downright elegant. Not to say you should write a webapp in it, but I think you're wrong; there's intrinsic overhead in using a Real Language. It has nothing to do with "knowing how to do it," doing things properly takes time, a half-assed but mostly functional solution can be whipped up in minutes.
- deleted 14y ago[deleted]