Page 3 of 3
Posted: Tue May 23, 2006 12:10 pm
by RobertGonzalez
scottayy wrote:It's also come to my attention that people think PHP (mysql too) is a toy for web developers. I don't know why people have came to this assumption. Perhaps because it's so popular and (relatively) easy to learn? The bottom line is it's a very powerful and capable language.
Nice points. As for the idea of LAMP (specifically PHP and MySQL being a developer toy) I would agree with that perception. I think the basis of this is that both are free, open-source applications. In a world of pricey software apps, people are still reluctant to give credit to apps that don't cost an arm and a leg. I was talking with a developer/DBA friend of mine who told me that the reason their company nver looked at MySQL was becuase the support agreement didn't cost enough. "If they only charge that much it means that either their product is a short-sighted effort or they have not idea what they are getting themselves into. Either way, we want no part of that." So if MySQL would have charges more, they may have been looked at as an enterprise level app.
PHP is certainly moving along as an enterprise grade application, with Zend having recently begun key partnerships with Oracle and other well known large companies. In fact, Oracle has now dedicated entire areas of their monthly magazine and parts of their website for PHP development and deployment with PHP. Sun is even giving PHP props as it looks to develop software that takes advantage of both PHP and Java. BUt a lot of folks just don't give it credit.
As far as PHP as a programming language... one of the things that saved me at first was that I could write extremely dirty, inefficient code and still get away with it. But as I started moving into more advanced stages of development, the crap wouldn't cut it anymore and I had to get better at core development practises. That is something that I love about PHP. It is scalable to the enterprise AND the developer. It is flexible, forgiving and understandable, which for me, as a new developer, were probably the most vital aspects of the language.
Posted: Tue May 23, 2006 4:32 pm
by timvw
scottayy wrote:
It's also come to my attention that people think PHP (mysql too) is a toy for web developers. I don't know why people have came to this assumption. Perhaps because it's so popular and (relatively) easy to learn?
Visual Basic had the same 'toy' reputation because it was easy for beginners to get started (and write lots of ugly code).
MySQL has always had a problem with data integrity. I remember that when i defined a datetime column, and inserted the value '9999-99-99 12:12:12' it accepted the value and stored it as '0000-00-00 00:00:00'. A database should NEVER, NEVER modify/'correct' my data. Luckily this has been changed since MySQL5.
Posted: Wed May 24, 2006 11:55 am
by KalvinB
You shouldn't be learning "habits" (aka syntax) from languages. You should be learning concepts. I started with Apple BASIC and still use the same concepts (for, while, if, etc never go out of style) but I certainly don't format my code the same way. In fact, the longer I used any language the more my coding style changes for that language. I code PHP differently than I code C++. They're different tools. You don't use a screwdriver the same way you use a hammer.
If you're picking a language because of it's syntax then you're probably not going to be much of a good programmer. If you need the restrictions of a language to use as a crutch to avoid the responsibility of writing good code then you probably won't be much of a good programmer. Don't be afraid of writing hideous, broken code. That's how you get better.
Wasn't it Jefferson who said "whoever gives up efficiency for safety deserves neither?" There's no reason your code can't be safe and efficient without relying on the compiler to make your code safe for you.
When I'm trying to figure out how to do Y in language X I don't consider the language when looking for information about Y. Unless Y is language specific.
You should pick a language solely on what you need to do. Languages are tools. You have to pick the right tool for the job.
If you want to do projects that PHP is suitable for then learn PHP.
When you first start out, your programs will be ugly and stupid. This is normal. Don't worry about how it looks. Worry about what it does and how to make it do what it does better. Then worry about making it pretty. Unless you are a genious, the ugly phase of your projects will not go away for several years. For some, they learn ugly habits instead of concepts, and it never goes away.