I was also surprised that so many of these tools are Windows-only since PHP is usually the P in LAMP.
Well LAMP refers to servers. Not that there wouldn't be any Linux IDE's or developers, but Windows still dominates on desktop. I also do development and coding on Windows, but work on remote files hosted on Linux server, and don't even try to make the code to support Windows as Linux dominates so much on servers.
You probably didn't work with large enough projects then. You do know optimization is a bit more than making a script that tests whether print() or echo() works faster?
First of all you need to know what are the bottlenecks on the script, and this includes SQL queries and working with data or files, or remote connections. You work to optimize those queries first. If you still need to go further, you start putting some data in memcache so you don't need to always run the same queries. Knowing what queries are the bottlenecks is how you can improve your database structure too. Are writing operations taking too long? Maybe you should have a master sql server for writing and slaves for reading data. Are you fetching data over the internet or doing some heavy queries that is causing the page for the user to load slowly - maybe it's time to fork the work to separate process and let the page load faster for the user.
All this comes really relevant when running actually large sites, and this is where the professional IDE's shine.
Actually that might include the database queries and such too, as he specifically said what lines are most resource-intensive and such. Xdebug is the answer here and I think most IDE's support it, either directly or via hack-it-in. Now it doesn't provide lighter weight hints (that's your job as a programmer), but it shows you a lot of information about the bottlenecks.
That was a bit badly worded sentence, but I mean everything else I use is on Windows too. And since Windows has great IDE's, why would I dual-boot.
But on a related note, sometimes I have actually taken a quick round of plants vs zombies or similar quick game while waiting for large database queries to run.
Personally I wasn't really happy with Eclipse or other open source solutions. The GUI plain and simply sucks, isn't that good to customize and provides too less information and actions. People say its a powerful tool once you learn to use it, but why should I spend time on that when there are better alternatives (and which provide more features)?
Personally I've tried pretty much all of the IDE's mentioned in this article and finally went and bought WaterProof's PHPEdit. In my opinion, it's the most comprehensive PHP IDE there is. - Debugging options are *great* (like comparing vi to Visual Studio) - GUI shows lots of information, but doesn't bloat it - panels roll in and out when they're needed (if wanted) - GUI is totally customizable, there's scripting language to do it too. One of the first options I did was change ctrl+s to save local version, save cvs version and publish testing machine version, but not publish on live site, all on press of ctrl+s. On toolbar I added a separate button to publish the new version on live site. - Another point about the great debugging options that the article mentions too, you can simultaneously debug PHP and Javascript. This is something you really miss in other IDE's once you've tried it. - PHP files usually have mixed PHP, HTML, JavaScript and SQL. Once you move your cursor over a single block, it highlights and colors with the correct language and makes the other languages a little bit more transparent - you can easily see for example all blocks of JavaScript or SQL code. - Preview lets you view what your site looks on all IE, Firefox, Safari and Opera - Too many other features to list which I think should be in all IDE's, but are not:) And haven't even got around to learning all things yet.
Now that being said, it is probably too heavy for a PHP coder that isn't coding professionally. Many amateur C++ programmers go just with Dev-C++ too, but professionals and those coding for living almost always appreciate the powerful suite that Visual Studio is. Proprietary tools stay in business because of this - they're much more polished and complete than their open source alternatives. And if you're working on it professionally, paying for the good tools doesn't really matter that much if it saves you time and from headache.
I use Windows for other work and gaming at the same time as I develop PHP, and my favorite IDE (WaterProof's PHPEdit) isn't available for Linux. Why wouldn't I use Windows? That being said the files are always saved both locally and remotely at the same time, and run on Linux servers.
Because they have already optimized most of the IO and DB related things. Since Facebook is one of the largest sites in the world, even small changes make huge changes with what infrastructure and server amounts they need. And in this case the improvement is 50%.
PHP is a lot better environment to develop new features quickly and doesn't get you into so many security pitfalls. And they're already using C++ for some parts of the site:
HipHop allows us to write the logic that does the final page assembly in PHP and iterate it quickly while relying on custom back-end services in C++, Erlang, Java, or Python to service the News Feed, search, Chat, and other core parts of the site.
The common suggestion is to just rewrite Facebook in another language, but given the complexity and speed of development of the site this would take some time to accomplish.
As a programming language, PHP is simple. Simple to learn, simple to write, simple to read, and simple to debug. We are able to get new engineers ramped up at Facebook a lot faster with PHP than with other languages, which allows us to innovate faster.
While theres already several libraries intended for creating windows and interfaces with PHP, and to put them together into an executable file, this might greatly improve that area in PHP too. While being faster as well, being machine code it protects your code too.
Along with making it work with Apache Web servers I hope someone works on this aspect too. PHP is really nice and fast to write. *ducks from the c/c++ coders*
Viruses are so 90's on all operating systems anyway. Most malware now a days comes via vulnerabilities like exploits, or in this case a vulnerability in certificate system.
No, what he meant is that the crapware like Norton Antivirus trial preinstalled on a Windows computer could be used to subsidize the cost of OEM Windows. If Windows costs $50, and the manufacturer gets $50 back to preinstall those trial programs, the actual Windows costs $0 for the manufacturer. Then they can sell the actual computer without Windows tax.
I don't have some OSS philosophy either. The reason I mentioned why H.264 is not much use for Firefox is because of all the forks of it.
Mozilla License indeed does allow putting in closed source code, but they obviously cannot release that proprietary code as open source. This means only the official Firefox will be able to use H.264 - any Linux, Mac OS X, FreeBSD or other fork in Windows will not be able to do so. Not that I care that much, I use Opera (though they're against H.264 too and want to use Ogg, but Apple and Microsoft aren't going to do that)
I haven't missed that point. My point is, maybe it's not good that Apple is all of hardware company, software company and a marketplace, having vested interest in locking down their devices, locking down their software, and strictly controlling all of it via their App Store (which generates them even more money)
MS develops the OS and lets other companies to develop the hardware, and then lets other developers to freely develop application and games for it. In my point of view, that is more open, free and better environment.
Everyone is able to develop for their platform and distribute applications and games in a way that suits them.
This has been especially helpful for the developers of apps that contain trojans, not to mention the drive-by-download virus writers.
So do you instead prefer fully-locked-down, all apps from our App Store PC's? Do you prefer a fully-locked-down environment and living in a police nation to save you from those who abuse the freedom?
It's funny that people always complain about DRM, locked-down consoles and proprietary standards and want more open and free, but when it's about Apple then it doesn't matter anymore. btw, you can blame Apple for HTML5 video never going to happen - they're pushing hard towards H.264, which is never going to be reality for Firefox because it can't be distributed in the source code.
At some point this will most likely be true for OS X too - maybe even on the next major version.
What exactly are you smoking?
Why do you think it's so out of the question? Apple is already doing it on every other device they have, and it's good market for them.
I do hate the full integration with Google accounts and services though, I don't want to login to my Google account just to use my phone (and save all the information and possibly GPS position and so on at Google's servers). I can just boot my Windows Mobile, type PIN and it doesn't try to integrate me in to any other bullshit or be in constant contact with MS servers.
Yeah you could get the source, but it's pain in the ass to set up the environment and even then you don't have the drivers and stuff for your phone, so it's pretty much out of the question.
Microsoft is actually one of the most open player there, in terms of what you can do with their devices. Sure, their OS and programs isn't open source, but you are allowed to run and install anything you want on your devices (both desktop Windows and Windows Mobile). Everyone is able to develop for their platform and distribute applications and games in a way that suits them.
Now I don't understand where Google comes with this, since as I understand you're allowed to run anything you want on Android. Their OS being open source isn't that much more better than Microsoft though, as it's generally pain in the ass to get compiled and you don't get the drivers and everything else required to run it on your phone manufacturers device.
But Apple definitely is a problem here. They're blatantly restricting everything you can install on iPhone and iPad and need to buy all the software from their App Store. And for developers it's hit-and-miss to get their apps there and takes many months. At some point this will most likely be true for OS X too - maybe even on the next major version.
I was also surprised that so many of these tools are Windows-only since PHP is usually the P in LAMP.
Well LAMP refers to servers. Not that there wouldn't be any Linux IDE's or developers, but Windows still dominates on desktop. I also do development and coding on Windows, but work on remote files hosted on Linux server, and don't even try to make the code to support Windows as Linux dominates so much on servers.
Then you're doing it the hard way and wasting time, because there are much more elegant real debugging solutions too.
You probably didn't work with large enough projects then. You do know optimization is a bit more than making a script that tests whether print() or echo() works faster?
First of all you need to know what are the bottlenecks on the script, and this includes SQL queries and working with data or files, or remote connections. You work to optimize those queries first. If you still need to go further, you start putting some data in memcache so you don't need to always run the same queries. Knowing what queries are the bottlenecks is how you can improve your database structure too. Are writing operations taking too long? Maybe you should have a master sql server for writing and slaves for reading data. Are you fetching data over the internet or doing some heavy queries that is causing the page for the user to load slowly - maybe it's time to fork the work to separate process and let the page load faster for the user.
All this comes really relevant when running actually large sites, and this is where the professional IDE's shine.
Actually that might include the database queries and such too, as he specifically said what lines are most resource-intensive and such. Xdebug is the answer here and I think most IDE's support it, either directly or via hack-it-in. Now it doesn't provide lighter weight hints (that's your job as a programmer), but it shows you a lot of information about the bottlenecks.
That was a bit badly worded sentence, but I mean everything else I use is on Windows too. And since Windows has great IDE's, why would I dual-boot.
But on a related note, sometimes I have actually taken a quick round of plants vs zombies or similar quick game while waiting for large database queries to run.
I agree with you, Eclipse is too much work. I want to work with my PHP code, not the IDE. Personally I use Waterproof's PHPEdit and love it.
Personally I wasn't really happy with Eclipse or other open source solutions. The GUI plain and simply sucks, isn't that good to customize and provides too less information and actions. People say its a powerful tool once you learn to use it, but why should I spend time on that when there are better alternatives (and which provide more features)?
Personally I've tried pretty much all of the IDE's mentioned in this article and finally went and bought WaterProof's PHPEdit. In my opinion, it's the most comprehensive PHP IDE there is. :) And haven't even got around to learning all things yet.
- Debugging options are *great* (like comparing vi to Visual Studio)
- GUI shows lots of information, but doesn't bloat it - panels roll in and out when they're needed (if wanted)
- GUI is totally customizable, there's scripting language to do it too. One of the first options I did was change ctrl+s to save local version, save cvs version and publish testing machine version, but not publish on live site, all on press of ctrl+s. On toolbar I added a separate button to publish the new version on live site.
- Another point about the great debugging options that the article mentions too, you can simultaneously debug PHP and Javascript. This is something you really miss in other IDE's once you've tried it.
- PHP files usually have mixed PHP, HTML, JavaScript and SQL. Once you move your cursor over a single block, it highlights and colors with the correct language and makes the other languages a little bit more transparent - you can easily see for example all blocks of JavaScript or SQL code.
- Preview lets you view what your site looks on all IE, Firefox, Safari and Opera
- Too many other features to list which I think should be in all IDE's, but are not
Now that being said, it is probably too heavy for a PHP coder that isn't coding professionally. Many amateur C++ programmers go just with Dev-C++ too, but professionals and those coding for living almost always appreciate the powerful suite that Visual Studio is. Proprietary tools stay in business because of this - they're much more polished and complete than their open source alternatives. And if you're working on it professionally, paying for the good tools doesn't really matter that much if it saves you time and from headache.
Bad troll is bad. No one who *professionally* works with PHP and in other web development uses freaking Notepad.
I use Windows for other work and gaming at the same time as I develop PHP, and my favorite IDE (WaterProof's PHPEdit) isn't available for Linux. Why wouldn't I use Windows? That being said the files are always saved both locally and remotely at the same time, and run on Linux servers.
Because they have already optimized most of the IO and DB related things. Since Facebook is one of the largest sites in the world, even small changes make huge changes with what infrastructure and server amounts they need. And in this case the improvement is 50%.
But most likely wasn't serious. Theres lots of these short nginx one-liners in other stories too.
He said they were struggling just to get half a percent more performance with Apache. That had nothing to do with "HipHop".
In reality their CPU usage dropped average 50%
With HipHop we've reduced the CPU usage on our Web servers on average by about fifty percent, depending on the page.
PHP is a lot better environment to develop new features quickly and doesn't get you into so many security pitfalls. And they're already using C++ for some parts of the site:
HipHop allows us to write the logic that does the final page assembly in PHP and iterate it quickly while relying on custom back-end services in C++, Erlang, Java, or Python to service the News Feed, search, Chat, and other core parts of the site.
The common suggestion is to just rewrite Facebook in another language, but given the complexity and speed of development of the site this would take some time to accomplish.
As a programming language, PHP is simple. Simple to learn, simple to write, simple to read, and simple to debug. We are able to get new engineers ramped up at Facebook a lot faster with PHP than with other languages, which allows us to innovate faster.
And I agree with them on those aspects.
While theres already several libraries intended for creating windows and interfaces with PHP, and to put them together into an executable file, this might greatly improve that area in PHP too. While being faster as well, being machine code it protects your code too.
Along with making it work with Apache Web servers I hope someone works on this aspect too. PHP is really nice and fast to write. *ducks from the c/c++ coders*
Definitely interesting project.
Norton needs more processing power than anything could provide.
Viruses are so 90's on all operating systems anyway. Most malware now a days comes via vulnerabilities like exploits, or in this case a vulnerability in certificate system.
But everyone on slashdot always tells that Linux and Mac OSX have no vulnerabilities, that it's only on Windows!
No, what he meant is that the crapware like Norton Antivirus trial preinstalled on a Windows computer could be used to subsidize the cost of OEM Windows. If Windows costs $50, and the manufacturer gets $50 back to preinstall those trial programs, the actual Windows costs $0 for the manufacturer. Then they can sell the actual computer without Windows tax.
Or is China obsessed with kdawson? We can never know.
I don't have some OSS philosophy either. The reason I mentioned why H.264 is not much use for Firefox is because of all the forks of it.
Mozilla License indeed does allow putting in closed source code, but they obviously cannot release that proprietary code as open source. This means only the official Firefox will be able to use H.264 - any Linux, Mac OS X, FreeBSD or other fork in Windows will not be able to do so. Not that I care that much, I use Opera (though they're against H.264 too and want to use Ogg, but Apple and Microsoft aren't going to do that)
I haven't missed that point. My point is, maybe it's not good that Apple is all of hardware company, software company and a marketplace, having vested interest in locking down their devices, locking down their software, and strictly controlling all of it via their App Store (which generates them even more money)
MS develops the OS and lets other companies to develop the hardware, and then lets other developers to freely develop application and games for it. In my point of view, that is more open, free and better environment.
This has been especially helpful for the developers of apps that contain trojans, not to mention the drive-by-download virus writers.
So do you instead prefer fully-locked-down, all apps from our App Store PC's? Do you prefer a fully-locked-down environment and living in a police nation to save you from those who abuse the freedom?
It's funny that people always complain about DRM, locked-down consoles and proprietary standards and want more open and free, but when it's about Apple then it doesn't matter anymore. btw, you can blame Apple for HTML5 video never going to happen - they're pushing hard towards H.264, which is never going to be reality for Firefox because it can't be distributed in the source code.
What exactly are you smoking?
Why do you think it's so out of the question? Apple is already doing it on every other device they have, and it's good market for them.
I do hate the full integration with Google accounts and services though, I don't want to login to my Google account just to use my phone (and save all the information and possibly GPS position and so on at Google's servers). I can just boot my Windows Mobile, type PIN and it doesn't try to integrate me in to any other bullshit or be in constant contact with MS servers.
Yeah you could get the source, but it's pain in the ass to set up the environment and even then you don't have the drivers and stuff for your phone, so it's pretty much out of the question.
Considering how Jobs got the idea for iPad, it's no surprise.
Microsoft is actually one of the most open player there, in terms of what you can do with their devices. Sure, their OS and programs isn't open source, but you are allowed to run and install anything you want on your devices (both desktop Windows and Windows Mobile). Everyone is able to develop for their platform and distribute applications and games in a way that suits them.
Now I don't understand where Google comes with this, since as I understand you're allowed to run anything you want on Android. Their OS being open source isn't that much more better than Microsoft though, as it's generally pain in the ass to get compiled and you don't get the drivers and everything else required to run it on your phone manufacturers device.
But Apple definitely is a problem here. They're blatantly restricting everything you can install on iPhone and iPad and need to buy all the software from their App Store. And for developers it's hit-and-miss to get their apps there and takes many months. At some point this will most likely be true for OS X too - maybe even on the next major version.