10 ms·
The web server is explicitly for development purposes. It is not meant for production. > It strikes me that adding more tools that incompetent web developers c
by maratd 13y ago
The web server is explicitly for development purposes. It is not meant for production.
> It strikes me that adding more tools that incompetent web developers can abuse is what got them there in the first place.
This is profoundly ridiculous. It's the equivalent of saying Home Depot shouldn't sell power tools because some do-it-yourselfer might saw his foot off.
Just because a tool can be misused is not an argument against it nor its inclusion.
- dd3141 13y agoThis. Can't agree more.
- mehwoot 13y agoJust because a tool can be misused is not an argument against it nor its inclusion. I used to believe this, but now I couldn't disagree more. People can and do misuse things all the bloody time, and the more you enable them to do that, the worse your tool is. How people use what you make is every bit as important, possibly even more important than the technical merits of what you make. I'd rather a builder use a second hand hammer to nail something than try doing it with a jackhammer.
- Karunamon 13y ago>People can and do misuse things all the bloody time, and the more you enable them to do that This is an excuse for educating people, not an excuse for kneecapping the majority due to an ignorant minority. This is the kind of thinking that plagues the GNOME3 devs and gets ridiculed so often around here. The user is an idiot so let's remove features. I don't see many people harshing on Rails for the inclusion of WEBrick.
- Freaky 13y agoRuby, you mean - it's part of the standard library.
- TeMPOraL 13y ago> People can and do misuse things all the bloody time and the more you enable them to do that, the worse your tool is. In terms of avoiding accidents I agree, but in general, I don't like this kind of thinking. One man's misuse is another man's hack. The flipside here is that the more you limit and subdivide a tool, the worse your tool becomes. I'd also rather see builder using something else than a jackhammer to nail stuff, but then I also want him to have access to one if he needs it, and I strongly want people to stop shouting "omg you can't use X to do Y, because X was not meant to do Y". First principle of hacking: tools do not have inherent purpose, they can be used to do whatever we want; they only can be better or worse at a particular task. The world didn't collapse into logical contradiction the last time I cut pizza with a sound card, because of lack of any other sharp tool nearby.
- nnq 13y agoyep. it's amazing when in Python you can end up with "ok", working and maintainable code simply because the languages' severe "handicaps" prevent idiots and "chronic intellectual masturbators" from over-over-over-complecting everything. I guess Java does the same thing for "enterprise idiots & masturbators" and this is why it's still so successful. ...for some people, making them use a tool that purposely handicaps them is the best thing you can do ...until it turns back to byte you because you now have to use it yourself for a job it doesn't fit, simply because you need library xyz and an easy interface to system abc :)
- g8oz 13y agoI don't hear people complaining about Python's builtin webserver. Maybe thats because Python only attracts people who do things correctly right?
- pekk 13y agoPython's stdlib webserver is terrible and not to be used. You WILL hear Python people say this I don't see why you decided to pick a fight about Python, though - Python seems to be a sore point for PHP defenders and I really don't know why
- samastur 13y agoPython doesn't have a builtin webserver, but there is one in standard library of CPython. I've yet to see an article that would argue that its existence is a proof that you should be using Python now.
- girvo 13y agoThen you missed the point of the article, and also obviously don't use PHP regularly. It's a super handy feature.
- collyw 13y agoNope, Python attracts plenty of idiots as well. It is especially popular among self taught bioinformaticians, who write really bad code.
- einhverfr 13y ago> People can and do misuse things all the bloody time, and the more you enable them to do that, the worse your tool is. By that measure, PostgreSQL is a horrible database. After all look what happens when I do this: CREATE TABLE foo ( id serial not null unique, bar text primary key ); CREATE TABLE foobar ( chunk_id serial not null unique, foos foo[] ); INSERT INTO foobar (foos) values (array[row(1, null)::foo, row(2, '1323')::foo, row(3, '2222')::foo]); select * from foobar; I mean my gods. Such horrible misuse of a relational db!
- orf 13y agoNo its like saying Home Depot shouldn't sell power tools to children who don't know how to safely use them. Unless the web server displays a huge red message every time it is run saying "Don't even think about using this in production" you can bet that it will be.
- maratd 13y ago> Unless the web server displays a huge red message every time it is run Uhh... this is the first line the web server spits out: PHP 5.4.0 Development Server started at Thu Jul 21 10:43:28 2011 The manual isn't exactly vague on this point either: http://us3.php.net/manual/en/features.commandline.webserver.php http://us3.php.net/manual/en/features.commandline.webserver.... So we got the warning already in there, what else would you like?
- orf 13y ago20 words of that manual were dedicated to letting people know its not for use in production. Un-highlighted and buried at the end of a paragraph that I initially skimmed over and didn't even read. No attention is directed at it in any way. So the server outputs a message. Great. Is it huge, red and says "do not use me in production"? No. Its a standard version banner.
- Gigablah 13y agoThere's no pleasing you, is there? Maybe we should add some <blink> and <marquee>?
- bmoresbest55 13y agoI don't the person is being a pain. People will not heed a warning that is not clear and apparent. It's like the warning on the side a hot cup of McDonald's coffee. It's not paid any attention if it's not really, really, ####-->REALLY CLEAR<--#####.
- orf 13y ago
- userbinator 13y ago> The web server is explicitly for development purposes. It is not meant for production. Doing that would mean the dev/prod environment is different, which is not that great of an idea. Keeping them as similar as possible leads to less chance of "but it worked on the dev server" sort of problems.
- Windwaker 13y agoIt seems to me that PHP is pushing the built-in webserver to allow for accessibility, or "plug-and-play" if you will. Instead of having to go through having a LAMP setup everywhere you go, you can test code on the fly.
- acdha 13y ago> This is profoundly ridiculous. It's the equivalent of saying Home Depot shouldn't sell power tools because some do-it-yourselfer might saw his foot off. You're incorrectly characterizing the argument: it's actually like saying Home Depot shouldn't sell power tools without safety guards, fuses, emergency shutoffs, SawStop, etc. PHP has a number of misfeatures which make it extremely easy for all but the most vigilant of developers to make mistakes with security consequences (https://eval.in/108854 https://eval.in/108854 was making the rounds just this morning) or simply increasing the likelihood of creating bugs (i.e. the inconsistent parameter ordering across the similar array_* functions). Most of these complaints date back to the late 90s but now are much harder to make both because the core developers don't take them seriously and because there's now a huge backwards compatibility problem. The most interesting development in PHP is the HHVM hack mode or similar concepts where an actively-maintained codebase can opt-in to safer behaviour. For the sake of anyone who has to secure code on the internet, I hope this catches on. EDIT: See slide 15 onward in http://www.slideshare.net/skamerman/ipc-2013-high-performance-php-with-hiphop http://www.slideshare.net/skamerman/ipc-2013-high-performanc...
- fleitz 13y agoHere's all you really need to know with PHP, ask a PHP developer how to test for equality. Maybe how you test for equality shouldn't depend on an ini file... just sayin... Perhaps testing for equality doesn't need a 3 page answer... in most languages it's a pretty straightforward answer... primitive types use == and objects use either isEquals or operator overloading.
- xd 13y agoWhat do you mean by depend on an ini file? I wasn't aware there was any settings for equality testing there..
- codygman 13y agoI'm as critical of PHP as anyone, but I couldn't find any settings to change how equality works in the language here: http://www.php.net/manual/en/ini.list.php http://www.php.net/manual/en/ini.list.php
- dscrd 13y agoIs it really built-in to the language or just a library? Or is that boundary fuzzy with PHP?