Live data from Hacker News

PHP Addiction

marco.org

61–70 of 320 posts

Re: PHP Addiction

#61
Really, I wouldn't worry about making the "wrong choice". I can identify with this, and I think its a reflection of perfectionism, which is not a good trait to have especially when you want to make something new. It takes years to master a language/web dev framework, and considering the pace at which web dev is moving these days, your mastery will be incomplete and slightly outdated by that time anyways. The point is, thats not the goal you should have in mind anyways. You can start from scratch with a new web framework and start being productive in a week, two weeks tops. After that, just use it for your projects and allow the experience of those projects to help you learn more about the framework/language.

Re: PHP Addiction

#62
post #4

Earlier quoted context omitted.

x3 - it's far simpler to learn due to consistency, more powerful to do both low & high level programming and a pleasure to work with. Just as simple to setup for web as php. Not real reason to be in knee deep php mess.

As easy as PHP in what sense? That Python is basically part of all OS' now or as easy as putting in in a .php file and uploading it to your server? I severely doubt it's as easy as the latter. I'd like to see an article that explains in less than 140 chars how to deploy a simple app as Hello World to the web in Python without the use of a framework like Django or Flask. Edit: In the amount of chars Twitter accepts, h…

Who cares? Honestly? I'm shocked and appalled that the measure of ease of a web development language is the trivialness of a Hello World. This willy-nilly nature of PHP leads to the disaster that it is today. The language and API are, at every turn, willy nilly. The projects that use them are constantly rewriting and refactoring to follow a new or better pattern or organization.

I haven't touched python in too many months to write it here, but it's not much harder than importing an http package, creating a two line handler and listening for connections. Now you have a much more realistic and robust system and your potential for applications is already hugely increased. (Write a websocket server in php, go on).

Here, I can write "Hello World" in an even easier language!

`cat "Hello World" > index.html`

Re: PHP Addiction

#63

Yeah, I wrote Tumblr in PHP, but I'm eager to abandon it. You know, it's just an easy to use, broken language that you can scale a site to 15 billion page views per month with. I'm sure my next project will need a better language, because it's going to scale to 400 billion page views per month, and PHP just isn't going to cut it. Hilarious suggestions contained throughout his post.

>> "you can scale a site to 15 billion page views per month"

You know what does that even better? C.

Oh, that's too painful? You want tools that make development easier and less error-prone?

Exactly.

Re: PHP Addiction

#64
post #33

Here is another point that highlights the problem: If I want to write a hello world application in PHP, it's neither as long as nor as short as Rather it's simply: hello world. Just type in those 11 characters in a text file and save it as hello.php. Now load it on your browser [or run it from command line] and it will print hello world. I don't think it can get any more simpler than that in other languages. PHP was…

Are you seriously basing a whole argument on what the hello world program looks like? That has nothing to do with actual real world programs. Mixing logic & presentation might make it easier to get something running quickly, but it's one of the downsides of PHP that these things get mixed up when they probably shouldn't for a project of reasonable size. The whole idea that it's an advantage of PHP that you can get something up and running so quickly is wrongheaded. Actually, it's much better if it requires some amount of thought and planning to code something up because that increases the likelihood that you'll do it right the first time and build on a solid foundation.

Re: PHP Addiction

#66
post #33

Here is another point that highlights the problem: If I want to write a hello world application in PHP, it's neither as long as nor as short as Rather it's simply: hello world. Just type in those 11 characters in a text file and save it as hello.php. Now load it on your browser [or run it from command line] and it will print hello world. I don't think it can get any more simpler than that in other languages. PHP was…

What people continue to fail to explain is why PHP needs to be replaced.

Why not improve it? After the millions of man hours that have gone into the plethora of open source PHP based frameworks and tools (aka, what powers the internet) - wouldn't we as a community want to improve the foundations rather then scrap them entirely?

You know, like what happened with Javascript...

Re: PHP Addiction

#67
post #33

Here is another point that highlights the problem: If I want to write a hello world application in PHP, it's neither as long as nor as short as Rather it's simply: hello world. Just type in those 11 characters in a text file and save it as hello.php. Now load it on your browser [or run it from command line] and it will print hello world. I don't think it can get any more simpler than that in other languages. PHP was…

I'm not convinced this is true. You see, way back in the day in 1997 when I was doing web dev, everything worked the way PHP does. ColdFusion, ASP (not ASP.net, ASP), PHP, and almost everything else that was seriously trying to do web pages worked that way. It took the community collectively a long time to stop seeing URLs as identifying anything but specific files. This is back when having those files be programs was still a bit of an innovation.

After 15 years of one of the biggest bursts of innovation the open source world has ever seen, and with such diversity in frameworks that the mind boggles, nobody has returned to this model successfully. I've got MVC-inspired designs coming out my ears, continuation-based designs, frameworks just beginning to incorporate web sockets deeply (instead of as an afterthought), GWT, ASP.net, and other attempts at building a fundamentally different model and compiling it into another, and everything under the sun... but no return to the page-is-program model.

I don't think it's the key to PHP's success, because even in the competitive-yet-very-fertile soil of the web framework world, nobody else can make it work anymore. I think it's vestigial, and nothing else.

(Personally I think the key is simply that everybody has deployed it, and since there's basically no way to force every web hosting company to support Language X simultaneously, PHP isn't going away until the entire concept of web hosting goes away. Which isn't anytime soon.)

Re: PHP Addiction

#68
post #14

Disclaimer: I'm a Rails programmer for work and hobby. Interested in learning something that isn't PHP to code your web applications in? Ok. You have a ton of options and this is a very exciting time to be a web developer. Do you want to lean towards stability and proven concepts and work within a full application structure? Look at Django and Rails. Do you want to serve up responses from a simple script without a lo…

+1, this is fantastic advice. I found that when I stopped reading about languages and instead just opened tutorial and _tried_ them my learning rate improved drastically. Pick a tutorial and go.

Re: PHP Addiction

#69

The only thing actually wrong with PHP, is that it's popular but not cool. And that's a terrible place to sit for any product. It runs half the Internet quite well, but if you went by the posting on HN, you'd think it was Windows Vista. I've probably read every article critical of PHP that has hit the front page of HN in the last few years, and the one thing they all have in common is the vague refrain that PHP is a…

> The only thing actually wrong with PHP, is that it's popular but not cool.

Hey now, we're all human. Even engineers. As soon as something becomes popular, it is no longer cool. Cool is the next popular. Cool is being different. That's just how things work.

Apache is slooooow (NGINX is cool!). MySQL is retarded (Postgres is cool!). PHP sucks (Python is cool!). Red Hat is lame (Ubuntu is cool!).

See a trend? The tech that sucks is the most popular and well established. The tech that's cool isn't popular. It has nothing to do with any objective qualities of platforms. It's all about being a part of the cool croud!

Remind you of high school much?

Now, if this is just a hobby, who gives a shit? Roll with the cool kids. If you're starting a business, be aware that the future welfare of your family is relying on your decisions. Think real hard about that.

Re: PHP Addiction

#70

The only thing actually wrong with PHP, is that it's popular but not cool. And that's a terrible place to sit for any product. It runs half the Internet quite well, but if you went by the posting on HN, you'd think it was Windows Vista. I've probably read every article critical of PHP that has hit the front page of HN in the last few years, and the one thing they all have in common is the vague refrain that PHP is a…

It isn't as much broken, as it is just a bit annoying. Just a bit. Not enough to make it really bad, but enough to irritate you.
Post reply on HN