Why do you use python?

S

sk

What would be your answer if this question is asked to you in an
interview?

a modified version might be:
"Where would you use python over C/C++/Java?"

(because my resume says I know C/C++/Java)?
 
J

Jaime Buelta

What would be your answer if this question is asked to you in an
interview?

a modified version might be:
"Where would you use python over C/C++/Java?"

(because my resume says I know C/C++/Java)?

I also know C/C++/Java so...

I'd say that I can be much more productive in Python that in those
other languages.
I can do the same with , let's say, 5 lines of Python that with 15 or
20 lines of C/C++/Java (maybe a little less in Java), with much less
errors.
I can produce clear code, so it's easier to understand when other
person will look at it.
I can produce a prototype much faster
I can focus more on the problem and less on the coding...
I can make cross-platform code (well, also with Java)

I would use it as much as possible, but specially for:
* Complicated script-like actions, in spair of bash scripts, which
it's great for simple , OS related operations, but to manage workflow
it's sometimes confusing.
* Rapid prototyping. Check ideas.
* Tests automation

I try to use Python as often as possible, as my "default language", as
I think I can't be more productive, which it's usually the most
important parameter in software development. Of course, if there is a
good reason not to use it, then it's not the adequate tool. But But I
tend to ask myself "Is there a reason for not using Python?" instead
of "Is there a reason for using Python?"
 
M

Martin P. Hellwig

sk said:
What would be your answer if this question is asked to you in an
interview?

a modified version might be:
"Where would you use python over C/C++/Java?"

(because my resume says I know C/C++/Java)?

I would say where I can, where 'can' is depending on the problem,
already implementations and requirements.

On the other hand, when I go to a restaurant I usually don't tell the
chef which brand of knives he has to prepare my meal with, even though I
prefer Globals knives for my own use.
 
B

Bruno Desthuilliers

sk a écrit :
What would be your answer if this question is asked to you in an
interview?

a modified version might be:
"Where would you use python over C/C++/Java?"

As far as I'm concerned, I'd put it the other way round : where would I
use C/C++/Java over Python ?-)
 
J

Jaime Buelta

* sk:
[title "Why do you use python?]
What would be your answer if this question is asked to you in an
interview?
a modified version might be:
"Where would you use python over C/C++/Java?"
(because my resume says I know C/C++/Java)?

The C++ FAQ addresses this question here:
<url:http://www.parashift.com/c++-faq-lite/big-picture.html#faq-6.5>

Cheers & hth.,

- Alf

Mphfffff

Even I have some agreement that the choice of a language it's more a
business-driven issue I REALLY don't like that the techie weenie
shouldn't be heard. Talks a guy that programmed a GUI on Motif using C
(plain old C) in 2003 and takes almost forever (one year and a half),
instead of using any other graphical toolkit because "we can't afford
to expend time on learning new languages"...
I think time to development (usually related to "mystical" bugs well
hidden in layers and layers of code) it's an important thing to take
into account.
 
T

TerryP

For me a language is a language for the most part, doesn't matter...

Python is a language I choose for any of several reasons:
0.) It is easy to setup dependent packages on both BSD, Linux, and
Windows
1.) Most important things already have a Python binding somewhere
2.) Working in Python is fun
3.) Python scripts are more portable between OSes then compiled
executables.

I find that Python makes me very productive, and lets me worry more
about the engineering side of the art. However, I'm just as happy
using C or a portable subset of sh. Unless it means writing Swing
layouts by hand.
 
D

Dennis Lee Bieber

shouldn't be heard. Talks a guy that programmed a GUI on Motif using C
(plain old C) in 2003 and takes almost forever (one year and a half),

Lucky you...

I emulated a Ramtek 9300 (think that was the model) graphics engine
using GKS (for display lists, and ability to turn "layers" on/off
without regenerating all the data) on top of plain DECWindows/Xt
library, with no layout utility. Around 1990 (I date it by the fact
that, on return from the 7 week two site deployment of the application,
I decided my old cameras had gotten too burdensome, and bought a Canon
EOS 10s, 35-105 & 100-300 lenses, and a photo vest that I could wear
onto the flights)

Emulation was needed as the data generation program had to have
minimal changes -- we replaced the Ramtek library with a package that
formatted the Ramtek instructions as text strings, sent them via VAX/VMS
mailboxes to the emulation program... Oh, and the main data generation
program really was a set of some 50 programs that were invoked in
"random" order, each drawing certain data elements onto a single window
-- so there had to be a common graphics application to maintain the
window...
 
J

Jaime Buelta

        Lucky you...

        I emulated a Ramtek 9300 (think that was the model) graphics engine
using GKS (for display lists, and ability to turn "layers" on/off
without regenerating all the data) on top of plain DECWindows/Xt
library, with no layout utility. Around 1990 (I date it by the fact
that, on return from the 7 week two site deployment of the application,
I decided my old cameras had gotten too burdensome, and bought a Canon
EOS 10s, 35-105 & 100-300 lenses, and a photo vest that I could wear
onto the flights)

        Emulation was needed as the data generation program had to have
minimal changes -- we replaced the Ramtek library with a package that
formatted the Ramtek instructions as text strings, sent them via VAX/VMS
mailboxes to the emulation program... Oh, and the main data generation
program really was a set of some 50 programs that were invoked in
"random" order, each drawing certain data elements onto a single window
-- so there had to be a common graphics application to maintain the
window...

Hahahaha, I souposse that I must consider myself EXTREMELY
lucky... ;-)

Anyway, each tool has its time, and we should try to use more-or-less
adequate and available tools of our time...
 
S

Simon Forman

What would be your answer if this question is asked to you in an
interview?

a modified version might be:
"Where would you use python over C/C++/Java?"

(because my resume says I know C/C++/Java)?


Mark Miller has some adages posted on his homepage. [1] One of my
favorites is this:

"A Computer's Perspective on Moore's Law:
Humans are getting more expensive at an exponential rate."

Python saves you human-time.

Python allows you to write software that runs, is readable, can be
maintained and modified easily, etc... far better than any other
language I've ever used.

You can write working code, and read and understand already-written
code /faster/ in Python than any other language I've ever used.


Use Python. I would use C (to write Python extensions) only where
profiling had shown a definite hotspot, and then only when there were
no better algorithmic choices available. I would never use C++ or
Java.


(N.B. I've managed to be gainfully, and blissfully, employed
programming in Python for about six years now. I've passed on
otherwise interesting jobs because the folks involved were using
something other than Python.)

I'm actually working at a startup at the moment that originally hired
me to "do python" and then decided to use PHP because more of the team
(two out of three) knew it and didn't know python. I figured "what
the heck, it's been awhile, and it will look good on my resume" so I
have stuck with them.

PHP isn't as horrible as I remembered, but it's still horrible.
/Everything/ is horrible compared to Python. WTF is wrong with
people? (Disclaimer: Smalltalk and LISP are not horrible... *grin*)

Anyway, I wouldn't say all that in an interview, heh, but that's my $0.02.

My strong advice to you or any programmer is, don't bother
interviewing with a company that's not already committed to using
Python as their main language (modulo extraordinary circumstances.)

[1] http://www.caplet.com/adages.html
 
D

david

I liked your disclaimer (I'm done a lot of commercial Common Lisp),
and I agree with your comments regarding python. I've turned down
recruiters who have offered otherwise interesting positions, but Java
was being used. This is just personal, and I'm not going to disparage
anyone who enjoys Java, C++, whatever. But for me, dynamic languages
(particularly python and Lisp) are so far ahead of anything else.

-- david
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,181
Messages
2,570,970
Members
47,537
Latest member
BellCorone

Latest Threads

Top