Live data from Hacker News

Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

news.ycombinator.com

51–60 of 89 posts

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#52
post #49

Earlier quoted context omitted.

Im not clear what makes you think the OP is a non-technical person? The question he phrased was the exact question that he should have asked, what is unfortunate (but unsurprising, given the complexity of the answer) is that nobody seems to be answering it clearly. He asked: "How will it impact my webapp if it is written in Python and not PHP" That is a fantastic question, and it deserves better responses than the 'l…

"gives me a great deal of faith that he is in fact technically inclined, technically able and has some development experience." I'm sure he has development experience. But too limited an amount. It is a valid question, but I don't think any response provided here can properly demonstrate to him the value of a language like Python over a language like PHP. No more than someone could teach him to fly a plane in the spa…

"I don't think any response provided here can properly demonstrate to him the value of a language like Python over a language like PHP. "

Oh, I entirely agree. The practical differences between them in a web application just aren't that important.

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#54
post #13
post #2

I do not know what you mean by a "robust" web application, but in my experience Python libraries (for example feedparser) are of higher all-around quality. Less pitfalls, means fewer bugs and faster development.

What I mean by 'robust' is scalable and usable.

And what do you mean by scalable and usable? :) Scalable in what sense? Usable by who?

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#55
If you know PHP and CodeIgniter well, and don't know Python very well, then it will take it longer to write in Python.

If you move to something like Tornado (python), Twisted (python) or node.js (javascript) then you might be able to get more performance out of your app, but really only if think moving to that level of complexity is necessary for you app.

In general, it's best to go with what you know. Yahoo! uses a lot of PHP as does Facebook. Since you mentioned CodeIgniter specifically, you're already well down the path of using a framework that allows you to write modular and reusable code with PHP.

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#56
post #48

Earlier quoted context omitted.

"Can PHP do this?" well, as you've pointed out yourself, yes it can. "for years PHP has been lacking this, so the point stands." Im sorry? I must be missing the point. How does the presence (or absence) of a particular language feature prove or disprove the point that bkrausz made originally? ".. ...it ignores the tremendous advantage that using good tools can provide." not really. well, kind of. so the thing is that…

"Im sorry? I must be missing the point. How does the presence (or absence) of a particular language feature prove or disprove the point that bkrausz made originally?" Yes, you are missing the point. I refer to closures, the feature at the core of functional programming, not just any "particular language feature". Functional programming is an extremely powerful tool to wield, and has been absent from PHP since its inc…

[deleted]

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#57
post #48

Earlier quoted context omitted.

"Im sorry? I must be missing the point. How does the presence (or absence) of a particular language feature prove or disprove the point that bkrausz made originally?" Yes, you are missing the point. I refer to closures, the feature at the core of functional programming, not just any "particular language feature". Functional programming is an extremely powerful tool to wield, and has been absent from PHP since its inc…

yeah, closures are good. we really do appear to be having two different discussions, Im neither claiming that PHP is 'better' than Python nor am I arguing against functional programming. I am simply arguing that the most important thing in a project is the quality of the developers, not the language they chose; and that given a good developer and a choice between PHP and Python I would almost certainly find the relat…

"I am simply arguing that the most important thing in a project is the quality of the developers, not the language they chose"

I agree with the first part, but I think the language choice is integral to just how good those good developers can be.

I don't believe for a minute that a great developer can develop in PHP without being seriously crippled by it.

Functional programming has a tremendous amount of value outside of async/multi-threaded environments that cannot simply be replaced by other means. There are real limits to the amount of modularity one can achieve without functional programming, and modularity is key to great programming. I'd point you again to this paper: http://news.ycombinator.com/item?id=1482797

The state and history of the software industry at large only demonstrates that the majority of software developers in key technical positions within the industry are and have been less than great.

But if your argument is that PHP is "good enough" given a bunch of average developers... well then, yes, probably. Certainly plenty of good software has been written in PHP. I'd just argue that with the right developers it's far less than optimal, and that the choice of language could easily be the difference between the success and failure of a complex project.

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#58
post #34

Earlier quoted context omitted.

a coder who is currently being 'forced' to write marginally better code in Python than he would in PHP because of the language constructs, or a coder who understands good code design and knows how to apply it? That's an esoteric question. A good coder wouldn't choose PHP in first place, unless there are pressing reasons (i.e. a legacy code-base). Consequently you can speed up your hiring process simply by weeding out…

LOL 'No true scotsman...' FWIW my hiring process rarely includes a request that candidates propose the language that they will perform their work in. (oh, and its not an esoteric question. It is a deeply practical one. I desperately want to hire good, pragmatic coders, not people who are only capable of writing good code if they are in an environment that makes it easy)

Well, you probably want your coders to create and maintain an environment that makes it easy to write good code in. PHP has no place in such an environment.

Moreover it's highly unlikely that a good coder would apply for a PHP job in first place.

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#59
post #58

Earlier quoted context omitted.

LOL 'No true scotsman...' FWIW my hiring process rarely includes a request that candidates propose the language that they will perform their work in. (oh, and its not an esoteric question. It is a deeply practical one. I desperately want to hire good, pragmatic coders, not people who are only capable of writing good code if they are in an environment that makes it easy)

Well, you probably want your coders to create and maintain an environment that makes it easy to write good code in. PHP has no place in such an environment. Moreover it's highly unlikely that a good coder would apply for a PHP job in first place.

> Well, you probably want your coders to create and maintain an environment that makes it easy to write good code in. PHP has no place in such an environment.

I agree with the second part, but I think the first part is wrong.

I think he wants coders to create and maintain software that the company will use on a daily basis, in which case, PHP is perfect for that.

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#60
I've been creating sites for a number of years now and have used php since the days of putting perl scripts in your cgi-bin. I'm just now starting to learn python. Here's mho.

If you use php, check out symfony. Codeignighter is crap once you get to know you way around symfony. Php is something I feel comfortable using and know my way around. I use it for all my web sites.

The reason I am learning python is to use the app engine. It looks like a cleaner language then php and seems to be slightly more powerful.

I think it would come down to 1) does your developer know php, python, or both? Let him develop in whatever language they choose. 2) where are you gonna do with it? I think there's a time and place to use php and to use python.

Post reply on HN