View Single Post
Old 03-01-2010, 08:50 AM  
Varius
Confirmed User
 
Industry Role:
Join Date: Jun 2004
Location: New York, NY
Posts: 6,890
Quote:
Originally Posted by kush View Post
I've heard the "why php" from programmers before. My question is "why not?" So many of the common scripts are written in it, and it works great, and it's something that most of us who know anything about programming at least partially understand. It's this familiarity that I want on my web server. Now if it's some stand-alone app then it's not such a big deal, but if it's on my server or my money-making sites, I want to be able to understand it and possibly change small variables or whatnot.

Also this has been touched on, but I think having well designed databases with optimized queries and efficient code is very important. Otherwise your $XXX-X,XXX month lightning fast server could crawl. Learning about a programmer's ability to optimize code/db's is important. "Just working" isn't always good enough.
On PHP I agree, rare are the circumstances I find when it won't do the job; normally in those cases, I opt for Python. An example of this is a bounce mail management module I once made to work with Qmail. At the time, doing it with PHP would have been a mess and not very efficient. Python, on the other hand, was better supported by Qmail and fit the goal nicely. PHP vs. ASP vs. Coldfusion on the other hand, I have yet to see a solid argument that ASP/CF were better than PHP.

I think PHP gets a bad reputation because it is so easy to learn and very lax on structure (ie. you don't need to declare variables and types among other things) that it amounts to a huge number of unqualified programmers using it without actually knowing the fundamentals first.

As for database / query optimization, I think that is EXTREMELY important. I have seen code from many people even here on GFY, who others recommend as good coders, who had no idea what an index was or how to use them. They have never heard of InnoDB or the EXPLAIN command (talking MySQL here). They didn't see a problem because their code worked with a 5000-row table, but once that table grew say to 50,000 rows and began to crawl, their answer was "most people will never have that many rows".

Read a lot of case studies about database structures and sql queries, performance tuning and ask people more experienced than yourself for help/advice. It doesn't matter how good your code is if your database is the bottleneck.
__________________
Skype variuscr - Email varius AT gmail
Varius is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote