Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Why We Choose Python (sixfeetup.com)
74 points by kevlened on March 7, 2013 | hide | past | favorite | 58 comments


I love Python, but it's a rubbish article I regret to have upvoted.

> Python is robust

This paragraph does not feature a word about robustness. There are mentions of speed and scalability and some sort of benchmark showing a case where Python is faster than Ruby or PHP. Conclusion: "It's also very fast".

The rest is less terrible but does not mention any of Python's shortcomings.


Are there any widely-used languages that aren't robust? That seems like kind of shallow praise.


Depends what you call robust. If you mean "strongly typed", PHP and Javascript come to mind immediately.


By robust, I mean the language/compiler has a strong test suite and the runtime is known to work reliably in production settings. I've heard horror stories about Sun's HotSpot JIT crashing frequently, but that was what, 10 or 20 years ago? Now that I think about it, Scala might be a modern example of that, but I haven't kept up with how they might have improved.


In this case, yes, real-world languages have a solid runtime/compiler. Though I'm surprised you have issues with Scala, at least the runtime part should be rock solid, given that it runs on a very much battle-tested JVM.


PHP has a test suite, but it's released with over hundred tests failing. See here: http://gcov.php.net/viewer.php?version=PHP_5_5


I made it as far as ".... Python is the language of choice for serious developers" before I bailed.

I love Python, but let's not make this a True Scotsman fallacy.


Thing is, Python is becoming rapidly the language of choice for scientists, statisticians, and other knowledge workers who only do a bit of development.


Its really just filling the vacuum Perl is leaving. I imagine if you had the choice to learn Perl or learn Python, you'd probably go with Python. The syntax and code just look so much more manageable.


That has no relation to the idea that "serious developers" use Python.


...but it will generate flame on HN.


For writing throw-away code that is. It's more of a scripting language than a development language. Unless you are a 'hawt' start-up in 'cisco'.


Please don't use the TIOBE index as a measure of language popularity. It's trash.

[Disclaimer: I love Python and if anything, it's more popular than TIOBE indicates. This comment expresses an opinion about TIOBE, not Python]


BASIC is more popular than JavaScript on it O.O


    Ratings

    The ratings are calculated by counting hits of the most
    popular search engines. The search query that is used is

        +"<language> programming"
I wonder why BASIC is so popular :)


I think I'll design a new language called 'computer'


Funny thing... that has a bias over syntax complexity of the language, easier to pick (and IMO better quality) languages wouldn't require to google about features that often. No wonder why Java is the first.


They are using "number of searches people initiate," but "number of hits in the search engine." I would think that the number of hits in the search engine wouldn't be a function of how often one is required to Google for an answer.


I know. I feel like such a rube when people ask if I have the BASIC programming fundamentals down, and I have to answer, "No." ;-)


I use python because it is functional psuedocode. Before I learned python, my sketches for algorithms on whiteboards looked like python.

Also, the community practices for coding style are so strong in Python that I can open up nearly any piece of code on the internet and have no problems reading it no matter how junior or senior the person was who wrote it. This is a big win for maintainability and one of the main reasons why I prefer Python over Ruby or Perl.


It would be strange if this guy had anything negative to say about Python since "Should you need assistance with your Python project, we'll be happy to help through a variety of professional services."


Why would you need assistance when "Python is easy to learn and use"?


One business metric that is worth considering is the cost of putting together a Python team vs., say, PHP. Here "cost" doesn't mean salaries as much as it means "cost function" or "difficulty score". Get away from Silicon Valley's reality distortion field and I think Python, today, might still have some issues in this regard.

I am not talking about finding one developer. I am talking about finding one, scaling to five and then beyond that.


Well, to be fair, SixFeetUp is based in Fortville, Indiana (a bit far away from the "reality distortion field" you mention).

Also, with more and more colleges switching to Python as their Computer Science major's language of choice, finding a team of competent Pythonistas is getting easier. I would think that it helps tremendously to be able to hire remote workers (especially since a town of 4,000 probably won't have more than a couple of people who are Plone experts, at most!)


Hah, Fortville is on the outskirts of Indianapolis, so we have a robust base of developers. Indiana's colleges produce a ton of IT students as well. We do also use remote developers, we are actually looking for a Python developer and a sys admin. Devs can be remote, the sys admin needs to be local. http://www.sixfeetup.com/company/jobs

Also some of the big local companies like to use Python including Angie's List.


I prefer Python for a lot of reasons. The reality of the matter is that, by some accounts, there are over ten times more PHP programmers than Python.

This is changing, which is good.


I always used to use Python as a metric of the quality of a developer. PHP on the resume - Meh. Python on the resume - now there is someone who cares enough about unusual languages to try one out, likes it and follows through. A strong developer.

Of course thats a bit harder now, I would look for a functional language on there these days.


The thing that keeps pulling me toward python is the ecosystem. NumPy, SciPy, Pandas, Mapnik, Cython, PyPy, IPython, Jython, Sage, PyQt/PyGTK, PyCuda/PyOpenCL. I rarely have trouble finding a tool that I need.

It is frustrating, because Ruby and Java are the standards where I work, and Clojure/Haskell are my favorite new toys. But I refuse to program in Java, and none of the others have ecosystems anywhere near as awesome as Python.


I agree about the awesome range of libraries for Python. But, in Clojure, doesn't access to the all the JVM libraries make up for this?


No, because JVM numeric libraries are awful, and, because the Clojure community leans toward things like web development instead of scientific computing, there are seldom Clojure wrappers available for them. Incanter, for example, isn't even maintained anymore.

It is a shame, because Clojure is a better language.


I can vouch for 'easy to learn': if you can already program in another language, learning Python is like being reintroduced to an old friend who has grown up quite a bit since you last met him.


I found the opposite. For example, I find it extraordinarily frustrating not to be able to know what kind of object something is by looking at the point in code where it is created; something like

variable = somefunction(inputParameter)

where variable did not exist before leaves me having to look up the documentation of somefunction to know what kind of object it is returning.


Documentation? We don't need no stinking documentation!

Try this variant:

    variable = somefunction(inputParameter)
    # the next line is a temporary debug statement
    print "variable has the following attributes:", dir(variable)
Or this one:

    variable = somefunction(inputParameter)
    help(variable)      # temporary debugging statement
Or this one:

    help(somefunction)
Or even this:

    variable = somefunction(inputParameter)
    print "the type is", type(variable)      # temporary debugging statement
A lot of API's use built-in objects, so quite often you don't even need anything more complicated than:

    variable = somefunction(inputParameter)
    print "variable is", variable
Using a Python-aware IDE like Eclipse PyDev might help too, but it's been a while since I've personally used it so I can't say off the top of my head what feature you want. Honestly, Python is so easy to use, you don't really need an IDE at all (of course this is just my opinion on something that's purely a matter of personal taste).


Hopefully, whoever defined somefunction did something like this:

  def somefunction(inputParameter):
      '''
      inputParameter: List of seven positive integers
      representing a poker hand
      Returns: A positive integer used to score that hand
      relative to all other possible hands, better hands
      receive higher scores.
      '''


You know they didn't. These are programmers we're talking about :)


Well, you'll hate it, but even after you discover what is the class of your object, you'll still have no idea what methods it implements, and what attributes it has. In Python any of that can (and do) change.

Sometimes that is frustating. I suffered a lot until I understood the Django's forms API. But this feature is worth the cost.


The secret is not to care and just hack away.


That does explain a great deal of the code and programmes I have encountered over the last decade :)


And one of the best features of Python: The community

The Python community allied with the good programming habits (aka PEP 8) really does the difference.


I LOVE PEP8. There it is I said it. I love that I can look at Python code I wrote eight years ago and it looks like I wrote it yesterday (apart from the fact I've got better and working with python).

Even better I can look at someone else's code and if they've bothered to follow PEP 8 I am straight in, understanding the code and not their formatting. It removed a cognitive load that in C++ just kills me.

It's bloody great.


I couldn't agree more, we actually posted on that a while back as well. We are huge code standards fans.

http://www.sixfeetup.com/blog/why-pep8-for-plone-development


I have been a PHP developer for more than 10 years. Since a couple of years Python has become my language of choice. I'm addicted to Python, every project I now start is in Python.

But I don't see any real valid reasons in the article to convince people. Do I have a valid reason? Probably not, every project has their own reason to use a specific language.

One valid reason to choose Python instead of PHP: Encoding. Never had any big problems in Python and a lot in PHP. Oh and multithreading.


> Encoding. Never had any big problems in Python and a lot in PHP

Encoding is rarely a problem in PHP. Use UTF-8 everywhere, make sure every part of the system uses it (the database server, the database client in PHP, the web pages, etc.). If you're going to work with e.g. Japanese characters, use http://www.php.net/manual/en/mbstring.overload.php


Agree, but sometimes you have to work with systems from other people. The fact that encoding issues can occur, means it will happen someday.


What kind of encoding issues are we talking about? I fail to see how PHP in itself should be specifically vulnerable to encoding problems.


You cannot write an article like this if you cannot first write an article on Python's warts

http://web.archive.org/web/20070202012909/http://www.amk.ca/...

http://www.rittau.org/python/warts

in fact I would love a warts wiki for frameworks, libraries and more. Python or not. Its important to have these debates out loud.


I once joined a project that had been going on for 5 years with >100K lines of Python. At any given time we had more than 25 programmers. In my two years on the project I never had a problem reading someone else's code - it was great for maintainability. Our project was used by hundreds of engineers on a critical path of a multi-billion dollar project. Anyone who thinks Python doesn't work for serious development doesn't know what they're talking about.


I just came here to praise python and hate on php, because that seems to be the popular thing to do. But I do like the idea of it being functional pseudocode, because my pseudocode usually starts approximating the syntax of the language, with progressively more erase marks and crossed statements due to getting a bracket wrong, or some other minor problem.

Note: Yes, I write source code on paper. Alot.


> [Python is] rivaling PHP to become the most popular interpreted language

Hahahaha. I love Python and loathe PHP but this is just ridiculous.


> Python is now one of the fastest-growing programing languages

I love Python but looking at the long term trends on TIOBE I am not sure I'd agree with the above statement http://www.tiobe.com/content/paperinfo/tpci/images/tpci_tren...


I thought that Google was migrating to more towards complied languages, (C++, Java, Go), and away from Python?


Quick, everyone copy Google.


Probably depends on what section of the company you are in. Some probably never use Python, while others may make heavy use of it. I've heard claims ranging from "it depends," to "mostly C++ / Java," to "only Python as a glue language."


Last I heard it was: "Python where we can, C++ where we must"


Link please?


Haha, no. We absolutely write new Python code daily and it's one of our core languages.


Thanks for the update. I was concerned that Guido leaving Google meant more than just Guido leaving Google.


this is so 2005




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: