Live data from Hacker News

Ask HN: Bet the farm. Python or PHP?

news.ycombinator.com

91–100 of 106 posts

Re: Ask HN: Bet the farm. Python or PHP?

#91
post #34
post #28

I loooove Python. But if asked to "bet the farm" on a web app, I'd go with PHP because it's been successfully demonstrated again in again in every form of web app you can imagine. In a year, I'd recommend Python, but I still find Django and the other web frameworks a bit too immature and clunky to do things that PHP has been hacking with for years and years. As much as I hate to say it, for the Python community the w…

Code Igniter framework for PHP. Thanks. I'll take a look at that.

My personal gripe with Code Igniter is that it doesn't have a built-in templating language (this is by design).

I absolutely love Smarty (smarty.net) and highly recommend it and have used it in many projects so far.

There have been attempts to integrate Smarty into CI but I saw a benchmark that showed that combination was unacceptably slow and won't scale well.

Re: Ask HN: Bet the farm. Python or PHP?

#92
post #80

Earlier quoted context omitted.

You won't find any PHP hackers. The good PHP developers realized that PHP was a waste of their time a long time ago. All the novices have significantly lowered the average PHP developer's salary compared to other languages. Basically, there's no skill and no money in PHP, so the good people don't use it.

You won't find any hackers who use sweeping generalizations. Oh, wait! I'm a hacker. I use PHP. I use Python. I use C++. I use Java. I use JavaScript. I use Prolog. I use C#. I use whatever language or tool is best for the job and I innovate with them however I can. I love getting my hands on new SDKs for every language and framework, learning their quirks and implementing fun things with them. There is skill in any…

In fact, a "bad" language require significantly more skill to use successfully and securely.

You seem to be passing this off as an advantage, but that doesn't make sense. Let's say you make furniture for a living, and one day you intentionally slice your arm off. Now you brag that having one arm is better than having two, since you now "require significantly more skill" to do the same work you could do before.

That doesn't make you a better furniture maker. It makes you a cripple.

Using PHP is the programming equivalent of cutting off your arm. It makes work more difficult, more painful, and slower.

But to each his own.

Re: Ask HN: Bet the farm. Python or PHP?

#93
post #53

Earlier quoted context omitted.

You won't find any PHP hackers. The good PHP developers realized that PHP was a waste of their time a long time ago. All the novices have significantly lowered the average PHP developer's salary compared to other languages. Basically, there's no skill and no money in PHP, so the good people don't use it.

This is stated as an absolute where there are certainly good PHP developers that work at Yahoo and Facebook... still, a less extremely worded version of your statement is true.

upcoming.org was coded in PHP. That being said, anyone can code a website but creating a website of value that attracts users...

Re: Ask HN: Bet the farm. Python or PHP?

#94
post #80

Earlier quoted context omitted.

You won't find any hackers who use sweeping generalizations. Oh, wait! I'm a hacker. I use PHP. I use Python. I use C++. I use Java. I use JavaScript. I use Prolog. I use C#. I use whatever language or tool is best for the job and I innovate with them however I can. I love getting my hands on new SDKs for every language and framework, learning their quirks and implementing fun things with them. There is skill in any…

In fact, a "bad" language require significantly more skill to use successfully and securely. You seem to be passing this off as an advantage, but that doesn't make sense. Let's say you make furniture for a living, and one day you intentionally slice your arm off. Now you brag that having one arm is better than having two, since you now "require significantly more skill" to do the same work you could do before. That d…

You've really got a bad taste in your mouth regarding PHP. I'm sorry to hear that because it's just yet another tool. It only has to be as painful and slow as you make it when you use it. I hope you have a chance to revisit it sometime with a modern framework like Code Igniter or CakePHP. I used to have a shade of the type of biases you show now, but after we've made half a dozen MVC web apps using Code Igniter (and Django) I've had to change my tune.

Best of luck to you.

Re: Ask HN: Bet the farm. Python or PHP?

#96
post #38

Why two web servers (thttpd and apache) instead of just one, say lighttpd or nginx?

If I go with PHP, Apache will be running non-threaded. To run Apache/PHP as lean as possible, I'll take advantage of thttpd's polling to quickly serve up any static content I have to as many simultaneous connections as possible. I haven't taken a really deep look at lighttpd nor nginx. I see what you mean though, why would I use two distinctly different http servers where one would simply do? Could you give me some h…

Apache buys you two things: rock-solid, time-tested stability, and millions of words of writing both online and in print about administration and tuning.

Lighty and Nginx are both (like thttpd) leaner, potentially faster, and "sexier." Neither has the proven stability or community that Apache does, and neither is going to help much if your bottlenecks are at the application layer, rather than just shooting raw bits over a network cable.

Re: Ask HN: Bet the farm. Python or PHP?

#97
post #86

Earlier quoted context omitted.

Most of Google products were written in C++ or Java. GMail - Not Python AdSense - Not Python GMaps - Not Python Search - Not Python

source?

AdSense - http://www.reddit.com/info/6m9fi/comments/c04990m

Reference to Guice.

GMaps - my ex-TA was an intern at Maps team, she told me that mostly it is written in C++. She also told me how surprised she was when she found out that most big products were written in C++/Java instead of Python.

GMail - might want to ask Paul Bucheit, but I remember vaguely coming across a blog post/article saying that it is written in C++ and Java.

Joshua Bloch (Effective Java author) said that they developed in-house middleware that bridge Google's infrastructure with Java (BigTable, MapReduce were written in C++).

I suspect Google is using JNI to access C/C++ based framework/infrastructure.

So far, I only know 2 products written in Python:

1) YouTube (purchased)

2) Google Groups (semi purchased I think, from the people that brought you ClearSilver template in Python).

I heard YouTube had to integrate their code to Google's infrastructure, but I don't know if they had to re-write some stuff.

Re: Ask HN: Bet the farm. Python or PHP?

#98
post #94

Earlier quoted context omitted.

In fact, a "bad" language require significantly more skill to use successfully and securely. You seem to be passing this off as an advantage, but that doesn't make sense. Let's say you make furniture for a living, and one day you intentionally slice your arm off. Now you brag that having one arm is better than having two, since you now "require significantly more skill" to do the same work you could do before. That d…

You've really got a bad taste in your mouth regarding PHP. I'm sorry to hear that because it's just yet another tool. It only has to be as painful and slow as you make it when you use it. I hope you have a chance to revisit it sometime with a modern framework like Code Igniter or CakePHP. I used to have a shade of the type of biases you show now, but after we've made half a dozen MVC web apps using Code Igniter (and…

I used to have a shade of the type of biases you show now, but after we've made half a dozen MVC web apps using Code Igniter (and Django) I've had to change my tune.

The possibility exists that you just don't know enough about programming to make an informed decision.

Re: Ask HN: Bet the farm. Python or PHP?

#99
post #28

I loooove Python. But if asked to "bet the farm" on a web app, I'd go with PHP because it's been successfully demonstrated again in again in every form of web app you can imagine. In a year, I'd recommend Python, but I still find Django and the other web frameworks a bit too immature and clunky to do things that PHP has been hacking with for years and years. As much as I hate to say it, for the Python community the w…

Yup I have to admit CodeIgniter rocks. Made hacking in PHP worthwhile again.

Re: Ask HN: Bet the farm. Python or PHP?

#100
post #91
post #34

Earlier quoted context omitted.

Code Igniter framework for PHP. Thanks. I'll take a look at that.

My personal gripe with Code Igniter is that it doesn't have a built-in templating language (this is by design). I absolutely love Smarty (smarty.net) and highly recommend it and have used it in many projects so far. There have been attempts to integrate Smarty into CI but I saw a benchmark that showed that combination was unacceptably slow and won't scale well.

Thanks for the link to Smarty. I'm checking it out now.
Post reply on HN