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?"
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.
--
MPH
http://blog.dcuktec.com
'If consumed, best digested with added seasoning to own preference.'
The C++ FAQ addresses this question here:
<url: http://www.parashift.com/c++-faq-lite/big-picture.html#faq-6.5>
Cheers & hth.,
- Alf
As far as I'm concerned, I'd put it the other way round : where would I
use C/C++/Java over Python ?-)
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.
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.
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...
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.)
-- david