Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is Python good for big software projects (not web based)? [closed]

Tags:

python

ide

Right now I'm developing mostly in C/C++, but I wrote some small utilities in Python to automatize some tasks and I really love it as language (especially the productivity).

Except for the performances (a problem that could be sometimes solved thanks to the ease of interfacing Python with C modules), do you think it is proper for production use in the development of stand-alone complex applications (think for example to a word processor or a graphic tool)?

What IDE would you suggest? The IDLE provided with Python is not enough even for small projects in my opinion.

like image 377
martjno Avatar asked Aug 30 '08 07:08

martjno


People also ask

Is Python suitable for large projects?

Python is substantially slower than other programming languages like Java , C++, PHP, Javascript , Swift, and others when it comes to execution time. This is a major concern for programmers when creating huge programmes with many lines of code. Python is a programming language with dynamic typing.

Why is Python not used for web?

Not native for mobile development Python is not designed for mobile environments, and some programmers consider it to be a weak language for mobile computing. Python is not an official programming language on Android or iOS. Python can still be used for mobile applications, although it takes a little more effort.

For what kind of project is Python for?

Basic 3 ways to use of Python in the real world are web and app development, Data Science and scripting. When it is all about web development, there are few popular frameworks but mostly used are Django (general use) and Flask (smaller projects).

Is Python not good for web development?

Not suitable for Mobile and Game Development Python is mostly used in desktop and web server-side development. It is not considered ideal for mobile app development and game development due to the consumption of more memory and its slow processing speed while compared to other programming languages.


2 Answers

We've used IronPython to build our flagship spreadsheet application (40kloc production code - and it's Python, which IMO means loc per feature is low) at Resolver Systems, so I'd definitely say it's ready for production use of complex apps.

There are two ways in which this might not be a useful answer to you :-)

  1. We're using IronPython, not the more usual CPython. This gives us the huge advantage of being able to use .NET class libraries. I may be setting myself up for flaming here, but I would say that I've never really seen a CPython application that looked "professional" - so having access to the WinForms widget set was a huge win for us. IronPython also gives us the advantage of being able to easily drop into C# if we need a performance boost. (Though to be honest we have never needed to do that. All of our performance problems to date have been because we chose dumb algorithms rather than because the language was slow.) Using C# from IP is much easier than writing a C Extension for CPython.
  2. We're an Extreme Programming shop, so we write tests before we write code. I would not write production code in a dynamic language without writing the tests first; the lack of a compile step needs to be covered by something, and as other people have pointed out, refactoring without it can be tough. (Greg Hewgill's answer suggests he's had the same problem. On the other hand, I don't think I would write - or especially refactor - production code in any language these days without writing the tests first - but YMMV.)

Re: the IDE - we've been pretty much fine with each person using their favourite text editor; if you prefer something a bit more heavyweight then WingIDE is pretty well-regarded.

like image 63
Giles Thomas Avatar answered Oct 17 '22 21:10

Giles Thomas


You'll find mostly two answers to that – the religous one (Yes! Of course! It's the best language ever!) and the other religious one (you gotta be kidding me! Python? No... it's not mature enough). I will maybe skip the last religion (Python?! Use Ruby!). The truth, as always, is far from obvious.

Pros: it's easy, readable, batteries included, has lots of good libraries for pretty much everything. It's expressive and dynamic typing makes it more concise in many cases.

Cons: as a dynamic language, has way worse IDE support (proper syntax completion requires static typing, whether explicit in Java or inferred in SML), its object system is far from perfect (interfaces, anyone?) and it is easy to end up with messy code that has methods returning either int or boolean or object or some sort under unknown circumstances.

My take – I love Python for scripting, automation, tiny webapps and other simple well defined tasks. In my opinion it is by far the best dynamic language on the planet. That said, I would never use it any dynamically typed language to develop an application of substantial size.

Say – it would be fine to use it for Stack Overflow, which has three developers and I guess no more than 30k lines of code. For bigger things – first your development would be super fast, and then once team and codebase grow things are slowing down more than they would with Java or C#. You need to offset lack of compilation time checks by writing more unittests, refactorings get harder cause you never know what your refacoring broke until you run all tests or even the whole big app, etc.

Now – decide on how big your team is going to be and how big the app is supposed to be once it is done. If you have 5 or less people and the target size is roughly Stack Overflow, go ahead, write in Python. You will finish in no time and be happy with good codebase. But if you want to write second Google or Yahoo, you will be much better with C# or Java.

Side-note on C/C++ you have mentioned: if you are not writing performance critical software (say massive parallel raytracer that will run for three months rendering a film) or a very mission critical system (say Mars lander that will fly three years straight and has only one chance to land right or you lose $400mln) do not use it. For web apps, most desktop apps, most apps in general it is not a good choice. You will die debugging pointers and memory allocation in complex business logic.

like image 35
Marcin Avatar answered Oct 17 '22 19:10

Marcin