Live data from Hacker News

Ask HN: Bet the farm. Python or PHP?

news.ycombinator.com

51–60 of 106 posts

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

#51
post #37
post #12

Earlier quoted context omitted.

Wow. Lots of questions. Thanks! On a plan to make the social aspect work, is there a finite list of ways to choose from? I don't believe there's really only one way. It definitely seems that "social networking" could have a negative effect on my plan yet I hope to do things a little differently. There will be some socializing benefits.

When I say "how" I don't mean are you going to use OpenSocial or anything like that. I mean when you implement it, how are you going to make it useful?

I don't mean to be coy, but it comes down to giving people something that 1) removes, transfers, or simply defers pain and 2) simply increases happiness.

I would think that's useful in some way to some people at least some of the time.

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

#52
post #25
post #21

Earlier quoted context omitted.

Single namespace in PHP - Ouch. You can gracefully get around this with classes perhaps? Any thoughts on PHP frameworks? On Python, I've heard that TurboGears is a pretty good framework as well. I remember reading somewhere that you don't run Django, it runs you. Any fiction in that?

you don't run Django, it runs you I use Django (GeoDjango actually) at my full-time job, and love it. My progression was PHP -> Python -> TurboGears -> Pylons -> Django. I can say with confidence that it is the best of them all. Yes, many choices have been made for you, but they have been made in an elegant, Pythonic way, and you retain the ability to get under the hood to a healthy extent.

May I ask why you switched from Pylons to Django?

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

#53
post #17

Earlier quoted context omitted.

I guess, for a lot of people, PHP would be easier to dive into than Python? I get your point; without any other knowledge, you'd be better off selecting from a pool of Python developers than PHP developers when looking for good hackers. Correct? Although I would be able to somehow separate the good hackers from bad by initially chosing Python, would you say that good hackers would also stay clear of opportunities whe…

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.

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

#54
post #6
post #4

Why throw away Perl? You already know Perl, and Perl has lots of things that PHP and Python don't. Before you ditch Perl, look at DBIx::Class, Moose, and Catalyst. And the other 10,000 libraries on CPAN. Then look at the 500 or so libraries available for PHP. Perl has a really insane library culture, and it's very hard to give that up. I like the syntax of other languages better (Lisp is my favorite), but it's hard t…

I really would like to use PHP or Python in a big project to at least get some experience. I tell ya, I do love Perl. With limited exposure to PHP and Python, could you elaborate on some of the things PHP and Python are lacking compared to Perl?

Most fundamentally, PHP combines Perl's array and hash data structures. Although you can access name/value pairs as even and odd array elements, code that doesn't need both sets of properties will run slower and consume more memory because a structure implementing both sets of properties is implemented automatically.

Why use a languge like that when you're already familiar with Perl?

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

#55
post #54
post #6

Earlier quoted context omitted.

I really would like to use PHP or Python in a big project to at least get some experience. I tell ya, I do love Perl. With limited exposure to PHP and Python, could you elaborate on some of the things PHP and Python are lacking compared to Perl?

Most fundamentally, PHP combines Perl's array and hash data structures. Although you can access name/value pairs as even and odd array elements, code that doesn't need both sets of properties will run slower and consume more memory because a structure implementing both sets of properties is implemented automatically. Why use a languge like that when you're already familiar with Perl?

Thanks. I didn't know about PHP's array/hash combo.

Would there be nothing for someone familiar with Perl to learn from using a language like Python?

I appreciate your thoughts.

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

#56
post #27

Python. It is more powerful with an extremely flat learning curve. In other words, you don't hit many walls with it. When you want to do something more powerful, the answer is 'right there'--it fits the brain. This is a bit dated but may help: http://www.artima.com/intv/prodperfP.html

Learning curve is flat but with caltrops...

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

#57
Python has functions as first-class objects, very simple namespaces (files/folders), generators, and a cleaner syntax not to mention a thriving, growing community, much more helpful/intelligent (at least in my experience) than PHP's.

PHP has a lot of coders that are one step about script-copy-pasters.

No questions about it - Python is the way to go.

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

#58
post #8

Python... both languages are along far enough that they will meet all four of your points, but people that program in python are on average better programmers than PHP programmers. So it makes hiring good hackers easier by eliminating many of the bad hackers. Other than that, if you like the syntax of PHP, it is as good as python as long as you program using the MVC paradigm. Personally I like the syntax of python a…

I would agreee Python really is 'that language'.

Python brought me back from a bored and frustrated programmer using Java to a hacker. I have programmed in Java since then and have been much better as a result of my work with Python.

PHP in my opinion is a very weak option today, and I think you would be crazy choosing it in 2008. I worked extensively in it about 8 years ago, but it's time has passed.

Like you mentioned, consider using MVC with Python. The separation between business logic and display code is priceless, and I guarantee if you do not clearly break apart these two you will run into huge problems.

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

#59
post #25
post #21

Earlier quoted context omitted.

Single namespace in PHP - Ouch. You can gracefully get around this with classes perhaps? Any thoughts on PHP frameworks? On Python, I've heard that TurboGears is a pretty good framework as well. I remember reading somewhere that you don't run Django, it runs you. Any fiction in that?

you don't run Django, it runs you I use Django (GeoDjango actually) at my full-time job, and love it. My progression was PHP -> Python -> TurboGears -> Pylons -> Django. I can say with confidence that it is the best of them all. Yes, many choices have been made for you, but they have been made in an elegant, Pythonic way, and you retain the ability to get under the hood to a healthy extent.

I have used Django at a well known web company and then at a startup and many other projects.

Django is fantastic, and 'it runs you' would only hold true if you used the basic features and built in admin system and nothing else.

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

#60

I spent a lot of time bellyaching about this when starting my company - looking at PHP, Perl (preferred by the devs), and Python (preferred by the advisers I trust). In the end, we went PHP, and it was hugely lucky - we were able to hire a couple of devs on very short notice because we were in PHP, even though we use a less popular framework called Qcodo. After they were hired, I asked them what they thought, and the…

If you're hiring candidates that wouldn't consider learning a new language to join an interesting startup -- well, good luck!
Post reply on HN