Python works fine in teams. Whether a language works in large teams is largely a factor of how well the team works together, and has little to do with the language.
I currently work on a large Django app, and in my previous job I worked on a large Java project (desktop app, not web, but still appropriate to this discussion), and I'm kind of torn between agreeing and disagreeing with the author.
While I enjoy Python over Java, and have ample experience working with other dynamically-typed languages like Ruby and Objective-C, I'm still not convinced of which is better (static vs. dynamic). Sometimes in Python-land, I do think that it would be nicer to have static types and a compiler to prevent some errors; I don't like Java's type model, but Scala has a decent type system that doesn't get in the way but prevents a lot of errors.
That said, I think the successes/failures of using Python or Java have more to do with a team's experience and background. I feel like this article would be better titled "Straying from Java makes me nervous", since the author seems to mostly be saying, "I have experience with Java. I don't understand/have experience with Python. Thus, I'm more comfortable writing Java code." I think experienced Python developers learn to work with/around most of the "problems" he perceives; Python is not Java and requires a different approach to programming.
I also had to chuckle a bit at this line:
Java has a well thought out hierarchy of checked and runtime exceptions.
I think most would agree that Java's exception hierarchy is confusing at best, and that checked exceptions were a worthwhile but failed experiment that doesn't really make code more robust (I suppose they do if used properly, but how many Java programmers use exceptions properly?).
I've worked on teams using Java and I'm currently working on a team using Python. All things considered, I would say that the Python code is much more precise and far easier to understand than the Java code that my other teams produced. The whole "There should be one-- and preferably only one --obvious way to do it" mantra helps immensely.
I agree with the author's point about PyDev... my team has been using PyCharm for the past few months and its been AMAZING!!!
The author's point about Python's exceptions, in my opinion, isn't a very good one. In the Java world, most checked exceptions (exceptions that are listed after the 'throws' keyword on method definitions) are usually just caught and re-throws as runtime exceptions anyway. It is widely thought that Java shouldn't even have checked exceptions and instead use an exception system closer to what Python's is currently. See this article for more about Java's checked exceptions..
All in all, I think that working in a team setting with Python vs. Java - I prefer Python. I worked in teams doing Java for 6 years and on a team doing Python for 6 months and I've seen some massive productivity benefits from the clean, readable syntax of Python.
Indeed, Python does work in large teams, but if you're comparing it to other languages it definitely has shortcomings. For one, there are more team-related tools for things like C# and Java. I've worked in Eclipse on large projects in both Python and Java, and team integration worked better in Java, specifically the doc generation and auto-formatting.
But the one thing I really liked about working on a large Python project was it's readability. In Java I was going to the coders much more often to have them explain code, but Python was easier to understand. Of course, this may also be due to how the two projects were coded, who coded them, and my aptitude in the two languages.
发布评论
评论(4)
Python 在团队中工作得很好。一种语言是否能在大型团队中发挥作用,很大程度上是团队合作程度的一个因素,与语言关系不大。
Python works fine in teams. Whether a language works in large teams is largely a factor of how well the team works together, and has little to do with the language.
我目前正在开发一个大型 Django 应用程序,在之前的工作中,我正在开发一个大型 Java 项目(桌面应用程序,不是 Web,但仍然适合本次讨论),我在同意和不同意作者的观点之间左右为难。 。
虽然与 Java 相比,我更喜欢 Python,并且拥有使用 Ruby 和 Objective-C 等其他动态类型语言的丰富经验,但我仍然不确定哪个更好(静态与动态)。有时在Python领域,我确实认为拥有静态类型和编译器来防止一些错误会更好;我不喜欢 Java 的类型模型,但 Scala 有一个不错的类型系统,不会妨碍但可以防止很多错误。
也就是说,我认为使用 Python 或 Java 的成功/失败更多地与团队的经验和背景有关。我觉得这篇文章的标题最好是“偏离 Java 让我紧张”,因为作者似乎主要是在说,“我有 Java 经验。我不理解/没有 Python 经验。因此,我更轻松地编写 Java 代码。”我认为经验丰富的 Python 开发人员会学习如何处理/解决他所感知到的大多数“问题”; Python 不是 Java,需要不同的编程方法。
看到这句话我也忍不住笑了:
我认为大多数人都会同意 Java 的异常层次结构充其量是令人困惑的,并且检查异常是一个值得但失败的实验,它并没有真正使代码变得更健壮(我想它们如果使用得当,但是有多少 Java 程序员正确使用异常?)。
I currently work on a large Django app, and in my previous job I worked on a large Java project (desktop app, not web, but still appropriate to this discussion), and I'm kind of torn between agreeing and disagreeing with the author.
While I enjoy Python over Java, and have ample experience working with other dynamically-typed languages like Ruby and Objective-C, I'm still not convinced of which is better (static vs. dynamic). Sometimes in Python-land, I do think that it would be nicer to have static types and a compiler to prevent some errors; I don't like Java's type model, but Scala has a decent type system that doesn't get in the way but prevents a lot of errors.
That said, I think the successes/failures of using Python or Java have more to do with a team's experience and background. I feel like this article would be better titled "Straying from Java makes me nervous", since the author seems to mostly be saying, "I have experience with Java. I don't understand/have experience with Python. Thus, I'm more comfortable writing Java code." I think experienced Python developers learn to work with/around most of the "problems" he perceives; Python is not Java and requires a different approach to programming.
I also had to chuckle a bit at this line:
I think most would agree that Java's exception hierarchy is confusing at best, and that checked exceptions were a worthwhile but failed experiment that doesn't really make code more robust (I suppose they do if used properly, but how many Java programmers use exceptions properly?).
我曾在使用 Java 的团队中工作,目前我在使用 Python 的团队中工作。考虑到所有因素,我想说 Python 代码比我的其他团队生成的 Java 代码更精确、更容易理解。整个“应该有一种——最好只有一种——明显的方法来做到这一点”的口号有很大帮助。
我同意作者关于 PyDev 的观点...我的团队一直在使用 PyCharm过去的几个月真是太棒了!
在我看来,作者关于 Python 异常的观点并不是很好。在 Java 世界中,大多数检查异常(在方法定义中的“throws”关键字后面列出的异常)通常只是被捕获并作为运行时异常重新抛出。人们普遍认为 Java 甚至不应该检查异常,而应该使用更接近 Python 目前的异常系统。 有关 Java 检查异常的更多信息,请参阅本文。 。
总而言之,我认为在团队环境中使用 Python 工作与使用 Java 相比——我更喜欢 Python。我在 Java 团队中工作了 6 年,在 Python 团队中工作了 6 个月,我发现 Python 干净、可读的语法带来了巨大的生产力提升。
I've worked on teams using Java and I'm currently working on a team using Python. All things considered, I would say that the Python code is much more precise and far easier to understand than the Java code that my other teams produced. The whole "There should be one-- and preferably only one --obvious way to do it" mantra helps immensely.
I agree with the author's point about PyDev... my team has been using PyCharm for the past few months and its been AMAZING!!!
The author's point about Python's exceptions, in my opinion, isn't a very good one. In the Java world, most checked exceptions (exceptions that are listed after the 'throws' keyword on method definitions) are usually just caught and re-throws as runtime exceptions anyway. It is widely thought that Java shouldn't even have checked exceptions and instead use an exception system closer to what Python's is currently. See this article for more about Java's checked exceptions..
All in all, I think that working in a team setting with Python vs. Java - I prefer Python. I worked in teams doing Java for 6 years and on a team doing Python for 6 months and I've seen some massive productivity benefits from the clean, readable syntax of Python.
事实上,Python 确实可以在大型团队中工作,但如果你将它与其他语言进行比较,它肯定有缺点。其一,有更多与团队相关的工具,例如 C# 和 Java。我曾在 Eclipse 中使用 Python 和 Java 处理过大型项目,并且团队集成在 Java 中效果更好,特别是文档生成和自动格式化。
但我真正喜欢从事大型 Python 项目的一件事是它的可读性。在 Java 中,我更频繁地去找编码员,让他们解释代码,但 Python 更容易理解。当然,这也可能与这两个项目的编码方式、编码人员以及我对两种语言的能力有关。
Indeed, Python does work in large teams, but if you're comparing it to other languages it definitely has shortcomings. For one, there are more team-related tools for things like C# and Java. I've worked in Eclipse on large projects in both Python and Java, and team integration worked better in Java, specifically the doc generation and auto-formatting.
But the one thing I really liked about working on a large Python project was it's readability. In Java I was going to the coders much more often to have them explain code, but Python was easier to understand. Of course, this may also be due to how the two projects were coded, who coded them, and my aptitude in the two languages.