You are not logged in.
Pages: 1
Does anyone else get really disappointed when they see a really nice app (such as Deluge or ADeskbar, etc) that is written in python or java?
They always use a lot of memory and cpu compared to apps written in a compiled language.
So, why do people write apps in these languages? Is it for portability (in the case of Java) or just because it's easier than other languages? Or is it just because nobody cares because most peoples' computers are too fast to care?
And can't you get a "compiled" python by using cython?
I'm just wondering why one would even start a project in python?
*Disclaimer: I have written python code, but not intended as an actual desktop app. Just number-crunching type stuff that you run once in a while.
Last edited by pogeymanz (2011-03-07 14:20:59)
Offline
I'm just wondering why one would even start a project in python?
You're really comparing dynamic and compiled languages. There are a host of reasons why one would want to use one over the other. But neither is a panacea.
Compiled languages may take longer to develop with, but will usually perform better. Dynamic languages may have shorter development time (especially with a language like Python which has a huge standard library), but will usually perform worse.
Some may also find it more fun to write Python code than C. That counts too.
*Disclaimer: I have written python code, but not intended as an actual desktop app. Just number-crunching type stuff that you run once in a while.
You just asked why anyone would start a project in Python, but you have?
Education is favorable to liberty. Freedom can exist only in a society of knowledge. Without learning, men are incapable of knowing their rights, and where learning is confined to a few people, liberty can be neither equal nor universal.
Tu ne cede malis sed contra audentior ito
Offline
Short answer for python use, quick, simple and relatively easy in comparison to others, the sheer numbers of libraries available are very appealing too (more so than Java)
Why did you develop using python, it might be the same answer?
Offline
No, i don't get disappointed.
The apps written in Python don't use lots of memory nor CPU. It's true they use more memory and maybe a bit more CPU, but really what's the big deal? Today we have PCs capable of having at least 8GiB of RAM, so memory shouldn't be a big issue, and neither CPU.
Other people have already explained the advantages. Python is an easy but powerful language that produces a code (imo) more readable than other languages. It is also portable and has a vast set of built-in libraries that boost your productivity a lot.
Cython makes it easier to use C code with Python.
So in conclusion, you probably only have these nice apps because the language the developers choose for their applications (in this case Python) allowed them to focus on new cool features instead of "wasting" time with things that would have no value for the end-user.
Offline
Does anyone else get really disappointed when they see a really nice app that is written in python or java?
No, I don't get really disappointed when I see a really nice application.
In my opinion, a "really nice app" would be an application that looked and behaved rather natively (such as Qt or GTK, using my color and icon theme...), ran quickly and responsively, and does what I need it to do.
Personally, I have found Python applications that meet those requirements. I haven't really found any Java applications that meet those requirements, but if I did, I'd still look for alternatives, because I'm dissatisfied with Oracle as a company.
So, why do people write apps in these languages? Is it for portability (in the case of Java) or just because it's easier than other languages? Or is it just because nobody cares because most peoples' computers are too fast to care?
I'm a computer science graduate, a master of software engineering student, and a professional software developer. I recently wrote my first application in Python. I was blown away with how incredibly easily and quickly I was able to write it. Python allowed me to spend time thinking about what I want my application to do instead of how I'm going to write it in code.
I used a new (to me) language (Python), a new toolkit (wxPython), and a new GUI RAD application (wxGlade). My application may be faster in a compiled language, but I doubt anyone would notice. People have confirmed that it runs on Linux, Windows, and Mac, even though I only wrote it and tested it myself in Linux. Also, it uses the native toolkit, icons, and shortcuts on each platform. (GTK, Windows API, Cocoa)
I don't believe Python applications are too slow. Instead, I believe bad code (in any language) is slow.
Currently, I'm rewriting my application in C++, but am still using wxWidgets and wxGlade. (If anyone is interested why, please let me know) Development is going painfully slow.
Offline
Not only is writing and reading an application in python easier, but also debugging is (in my opinion) easier. Try it ...
larch: http://larch.berlios.de
Offline
In my humble opinion, what makes an application slow is not the language it is
written in, but the algorithm it computes. Its bottlenecks are more easily
identified if the programmer feels comfortable with the language and python
really is comfortable to write.
If you really run into hardware bottlenecks using python, you still have the
option of writing the performance-critical parts of your application in C (or
similar) and have python call this optimized code. Best of two worlds!
My conclusion: Don't let the programming language influence your opinion on a
program... except it's written in perl ;P
Offline
Yes, I'm really disappointed that Freenet, I2P and OneSwarm are written in Java. The big thing about Java was that it was "write once, run anywhere", but it has never been really true. C programs are portable to more architectures and require less resources.
I don't know about ease of development; but writing in Java certainly isn't a guaranty for readability (and thus maintainability.) Also as already pointed, Java programs use non-standard GUIs, which sucks, especially when I'm using a dark theme and some stupid app opens a window with a WHITE background... :]
It's true that as years go by, all this waste becomes less visible because computers get faster and have more RAM, but it's still waste.
Offline
I'll defend my use of python by repeating that the scripts I wrote are intended to run, do their thing, and stop. I agree that python is easy. The issue is that some of these apps are intended to continue running forever, such as desktop docks, or deluge. My scripts only occupy resources when I'm actively doing "work."
My code runs, calculates a few things, then spits out a text file. The use-case is totally different.
Of course, I realize that having an easy language is great for getting stuff done. I was just wondering if that's really the reason that apps are moving toward python, and you guys have pretty much confirmed that for me.
Offline
Yes, I'm really disappointed that Freenet, I2P and OneSwarm are written in Java. The big thing about Java was that it was "write once, run anywhere", but it has never been really true. C programs are portable to more architectures and require less resources.
I don't know about ease of development; but writing in Java certainly isn't a guaranty for readability (and thus maintainability.) Also as already pointed, Java programs use non-standard GUIs, which sucks, especially when I'm using a dark theme and some stupid app opens a window with a WHITE background... :]
It's true that as years go by, all this waste becomes less visible because computers get faster and have more RAM, but it's still waste.
The real problem with Freenet isn't that it's written in java, it's that its creating a bazillion threads and opening an equal amount of connections, causing a denial of service to pretty much every node with default settings.
Or at least that's what the problem was when I tried it, things may have improved since then.
I haven't tried I2P so I don't really know anything about it performance wise.
Oneswarm is based on Azureus, which is indeed a bit of a resource hog. Too bad tbh.
Offline
I used to like using Python more, but these days I do find myself disappointed when I see applications requiring it. It's nice to have handy as a simple scripting tool, so I suppose that I use Python in the same way that you (OP) do.
And I've never been a fan of Java in general; it hasn't been installed on my computer(s) for years now.
I've seen young people waste their time reading books about sensitive vampires. It's kinda sad. But you say it's not the end of the world... Well, maybe it is!
Offline
Pages: 1