Live data from Hacker News

PHP Addiction

marco.org

181–190 of 320 posts

Re: PHP Addiction

#181
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...

This strikes me as an example of the sunken costs fallacy.

Re: PHP Addiction

#182
post #154

The fear of making the "wrong" choice actually makes the familiar, mastered PHP more attractive. The multi-core reality means that the long-term languages will have a strong concurrency model. Clojure and Go are two languages with strong concurrency models that are building momentum and have potential to go mainstream. But for your first foray out of PHP, I would pick a language that has a large, well-established com…

I think that multicore support is unlikely to be the crucial feature that cements the success of the language of the future for simple CRUD web apps. Such apps are invariably not CPU-bound. Wide support on hosting providers, tooling, ease for novices, database access, etc. are far more important--which explains the success of PHP in the first place.

Re: PHP Addiction

#183
post #121

Is it my imagination or is Marco the king of writing blog posts that are quick reactions to whatever is trending on HN? The message you should get from this post is that familiarity with one's tools easily trumps any aesthetic flaws (consistency in parameter ordering, naming conventions, etc are really nothing more than aesthetic flaws and not "deep" [1] as the author suggests. After all, human language is inconsiste…

Desktop Linux is actually fucking fantastic if you are prepared to take up messing around with it as a hobby. It requires commitment, time, and and open mind, but fuck, I've just sorted out xmonad, I have my dotfiles syncing via git, and it's bloody amazing. Package management is bliss, and both pacman and apt shit all over homebrew (great as homebrew is), it's absurdly fast even on old hardware, it's free, it's got all the compilation tools, headers, and libraries I could need either already installed or a few keystrokes away. Not to mention the fact that it's beautiful: http://files.0xf.nl/screenshots/screenshot-2012-06-27.19%3a4...

Linux can be really, really awesome, if you're prepared to spend time making your work environment great.

Lastly, all this time is not wasted, you end up learning so much stuff that you can apply to every where else - because of my linux knowledge I often find myself helping out my friends who use OSX but don't understand things like headers and libraries.

Re: PHP Addiction

#184
post #95

Earlier quoted context omitted.

> Installing git and installing Heroku, you're only 2 lines of code away though. Which requires you to learn git.

OK, so here we have someone who knows PHP but not Git. Knowing PHP, probably they're a web developer and have also learned the standard stack there: HTML, CSS, Javascript, MySQL, and Subversion. And with the way the HTML5 family of technologies is exploding nowadays, that's no small feat. You're saying that learning Git is going to be the barrier to someone switching to Ruby? Naw, don't think so.

We're making different assumptions. You're assuming a well-rounded web developer that just wants to deploy, while I'm thinking more from the beginner developer perspective. We're both right with our assumptions applied.

Re: PHP Addiction

#185
post #129

Earlier quoted context omitted.

> The only thing actually wrong with PHP, is that it's popular but not cool. No, what's "wrong" with PHP is that other things that are better have come along since. That's not a fault of PHP, that's the nature of language evolution. > It runs half the Internet quite well COBOL runs tons of mission critical business services quite well. It doesn't mean that nobody's improved on COBOL or that you should use it for a ne…

> No, what's "wrong" with PHP is that other things that are better have come along since. The problem is, no, nothing else has. Node.js is awesome and fun, but far harder to set up for basic webpage serving. Python is awesome, but also has a huge learning curve to learn how to serve basic webpages with. And... I can't think of anything else. Perl? ASP? Java is a huge pain to set up and maintain. What other language o…

Nope, you are purely defining "better" as "how easy it is for someone completely ignorant to start making stuff".

Re: PHP Addiction

#186
post #177

Earlier quoted context omitted.

I guess I still am lost as to what frame of reference people are discussing here. What real host [1] doesn't let you run WSGI processes, or arbitrary processes? What happens if you need to make TCP connections, or run a websocket server? [1] This does not include Dreamhost, Bluehost or any of the other oversold shared hosting (please, feel free to search G+ and see complaint after complaint about them, especially rec…

Most people don't start writing Real Sites hosted at a Real Host. They start with a stupid little static home page as a hobby hosted for free by their ISP or a $2-3 a month hosting provider. Then they want to add just one dynamic feature (maybe include a header and footer for each page), and they're obviously not going to learn Python and work out what the hell a WSGI is and get a new, probably more expensive, hostin…

I don't disagree that Python/Go/C#/Ruby represents a bigger upfront learning and potentially cost investment. I think it pays off in functionality, development speed and flexibility in the long run is all.

Re: PHP Addiction

#187
post #121

Is it my imagination or is Marco the king of writing blog posts that are quick reactions to whatever is trending on HN? The message you should get from this post is that familiarity with one's tools easily trumps any aesthetic flaws (consistency in parameter ordering, naming conventions, etc are really nothing more than aesthetic flaws and not "deep" [1] as the author suggests. After all, human language is inconsiste…

>Desktop Linux is the reason people don't use Linux on the desktop. I'm sorry but it's truly awful and probably won't ever get better. In the absence of product direction you have us geeks making everything configurable

Have you tried Unity or G-S lately? I'm not as willing to argue G-S has as clear a direction as Unity, but they both ship with a very limited amount of configurability and they're both insanely easy to start using even without background knowledge.

Re: PHP Addiction

#188
I switched from PHP to node.js and haven't looked back since. And I know node has its shortcomings, but in time I have no doubt that they will be sorted out. Right now it does absolutely everything I need it to do and more.

A huge part of node's appeal to me (and many others, I'm sure) was the fact that I already knew javascript. Making the switch couldn't have been easier.

I used to defend PHP; but now when I look at PHP code, even well-written code, it just makes me go "ugh".

Re: PHP Addiction

#189

Earlier quoted context omitted.

You have just mixed HTML and server code. You fail.

That's php, just cleaner. If we don't recognize that as one of php's strength we're doomed to fail. Of course once you master it, you separate the code from the html and call it from the view like this: hello.nxt name = request.get('name','world') list = ['this','language','rocks'] response.render('hello.html',name,list) hello.html Hello {{ name.upper }} {% for item in list %} {{ item }} {% endfor %} But what do I kn…

Funny mixing PHP into HTML is one of the things I hate the very most. And is one of the first problems usually solved by PHP web frameworks. Well, templating is actually generally a primary component of "all pieces included" web frameworks in any language.

Re: PHP Addiction

#190
Perhaps someone should make 'PYP', a Python that's easy for PHP programmers.

Like PHP, .PYP files would be templates with no limits on mixing presentation and logic. The filesystem hierarchy provides the default URL-routing.

But, you get the regularity/power/compactness of Python wherever you want it. (Perhaps, every line in a .PYP file beginning with '\' is meaningfully-indented Python.) If you ever want to hijack a part of the URL-space from the filesystem, there are routing utilities to do that.

Would such a glide-path from PHP to Python be a good thing? Or bad? ("The barbarians are at the gates!")

Post reply on HN