views:

592

answers:

17

How many of you moved from one language to Python and found it more enjoyable and generally more "fun" to code than before? Or maybe you tried Python and thought: "It is not for me, I stay with my C++/Java, Python is too simple/overrated/etc."?

I moved from PHP to it(and to Django framework) and I code my projects faster, appreciating Python every workhour. I know it is not a big "revelation", but I'm curious: how many people discovered Python in similar way?

A: 

I've done it with Ruby, but I imagine Python would be nice too. I'm learning some Python as part of my job.

James Deville
A: 

I myself have some background developing PHP web applications, and I stumbled upon the django framework around 0.96 and tested it out and thought it awesome. Python has a lot of neat stuff, is easy to read (code = documentation as they claim). I have been waiting for the 1.0 release, but now that it's here I intend to fully explore all the possibilities.

I must admit I've been holding back because I haven't really had opportunities (before django) to use just python, and perhaps also partly because it's not as tried-and-true as a lot other languages out there. I still think it's here to stay (duh), and will only gain momentum, even among people that view it as "just another scripting language".

Christian P.
A: 

I did. I learned it to give a presentation for a class in college and really enjoyed it. Then I started coding more in it and programming because even more fun.

The same thing happened when I discovered Groovy.

Steve Losh
A: 

I found python, and particularly pygame (python with SDL wrappers) to be a really fun and satisfying experience. I wouldn't use it for everything, but certainly it's become my language of choice for playing with simple ideas or demos.

Richard Franks
+2  A: 

When I started my current job, I was a nutcase for Perl and really chafed at Python for a few months. The lack of curly braces and terminating semicolons was really what bugged me the most, I think...

After about six months, I looked back at some of my old Perl code and wanted to cry. And that's when I really started to fall in love with Python.

Now I find that Python does a very good job of just getting out of the way and letting me write code. I find it more readable than Perl or Ruby, delightfully terse compared to Java, and very, very happily less painful than C/C++. The lack of super-strict compile-time type checking encourages the practice of writing good automated tests.

There's a very good essay comparing "Safety Languages" and "Freedom Languages" that's worth a read. I definitely come down on the side of "Freedom Languages" in general.

After a few years of doing almost 100% Python for work, I've noticed that it's really spoiled me and that I'm reluctant to code in other languages if I can help it.

Mike Pirnat
A: 

I found it had the biggest effect when I went back to c++. I now reach for boost/containers a lot more than when I was thinking in 'c'

Martin Beckett
A: 

You''ll really know how good python is when you'll have to switch FROM python !

Pierre-Jean Coudert
+2  A: 

I'm still picking it up, using it to create a simple website with a postgresql backend as part of an automation project. There is also a C++ deamon running against the same database as part of the project.

I love going into python and writing something really groovy that uses the [..] operator to create a list. The ways that you can mash lists together is so incredibly powerful. I also like the way that generators (and their delayed processing / reading of files) is so cleanly integrated into the language so you can get background reading of files / db for "free"

I think the output code looks really clean and with pylint / eclipse / pydev I find it easy to spot my mistakes in the code.

Tom Leys
A: 

I still haven't "switched" but i've been using it much more now. i had to learn it for my internship and found that i really like it. i bought the book "Core Python Programming" by Wesley Chun which is really helpful if you are the type of person who like to have a book handy (even though there is tons of help online). now with any project i'm given in class i think "this would be much easier in python" :)

+1  A: 

Python definitely has its uses, and you can solve problems quickly and easily and the solution looks pretty! The use of indentation for marking blocks is a very good and appealing idea.

I've seen quite complex software written in Python, and I quickly got into the code to analyze how it works, and how to fix certain problems. It's definitely easy to adopt if you know any decent programming language, and it is probably also easy to learn as a beginner.

However, as a C++ programmer I miss appropriate tools to check my code before running it (i.e. by "compiling" it). There are tools to check python modules, but those won't work as reliable as I would have expected (although I only used pychecker; I must admit that I don't know of any similar tools). Python is a dynamically typed scripting language; as such I also miss an option that is similar to VB's "Option Explicit" (i.e. checking whether variables and members that are used are indeed defined before). And sometimes I miss the possibility to explicitly define the type of a variable.

MP24
+3  A: 

From C to C++ to Java to Python has been an exercise in things getting better all the time. Each step has removed mountains of useless overheads and sources of confusion.

Moving from non-object to object world allows for potentially big design simplifications. The encapsulation principle keep things understandable.

Moving from explicit memory management to garbage collection removes all of the silly overheads of wrong or missing deletes and the attendant crashes. Back in '02 I got an email from someone involved in writing a web server (really!) and it just wouldn't work for more than 20 minutes. "Let me guess," I said, "You're writing it in C++." They were amazed that I could guess the environment from the crashes they were seeing.

Moving from static to dynamic programming has made it even easier to create tidy, clean, working software. I really like prototyping and designing in Python. When the customer demands it, I can then convert to Java with confidence that the design will be really rock-solid.

I flirted with Perl, but the object model didn't make enough sense -- it was so clearly an after-thought that I couldn't get used to it. When I started learning Python (back in '02) there weren't a lot of alternative dynamic languages in wide use.

I really like the Python "standard of excellence": The API should be so simple that you can bang away in the interactive interpreter. If your constructors or methods are too complex to type interactively, you have work to do.

I spent too long with Java -- I tend to develop API's that are too complex to exercise interactively. I'm trying to achieve that level of elegance where I can cut and paste the interactive session into the docstring to make nice, simple doctests.

S.Lott
A: 

I wouldn't say I've moved from other languages to it exclusively (my day job involves C/C++ in an embedded environment), but I do use it a lot. For example, we had a tool that was written years ago which listened to UDP debug information from a bit of kit we built. There were a load of niggles with it (no way to filter messages, extend it, sort the list of debug messages etc.), but we'd lost the source!

As a side project I re-wrote a basic version in a few hours. Since then I've eapidly expanded it's functionality and we now use this in place of the existing one. The interesting thing for me is that none of our team would've dreamed of re-writing it, but because it took so little time, I was able to write it off as part of the debugging for a particular problem report. If I'd tried to do the same in C or C++ or whatever, I'd probably still be at my desk scratching my head :-)

Jon Cage
+5  A: 

I've been programming since 1979, and python has captured my imagination like no other language I've used. When programming in anything else, I always ask compare the way I have to do it to the way I'd do it in python. Working in other languages is only hard because I'm spoiled. Horribly spoiled.

I referenced some python code in my article on using meaningful identifier names. I showed how changing the names of variables (and naming constants) enhanced readability and made further readability/usability steps obvious. I ended up with a simple list comp that replaced an inobvious function. When the article became a chapter in the book ''Clean Code'', they rewrote the examples in Java. I was shocked at how much less readable the solution was, and of course they couldn't convert it to a list comp at all. I understand why they did it, but I feel that it really diminished the impact.

Common Tim Ottinger whines:

"What do you mean, no nested functions, no generators, no list comps? How can anybody work in [nonpython] without these basic language features?"

"Wow, reflection in [nonpython] really sucks compared to Python!"

"All I want to do is pass the instance method to that function, why should that be hard?"

"I could do this in two easily-readable lines in python. Why does it take 20 lines in [nonpython]?"

"Wow. Your class takes up an awful lot of vertical space. I hate scrolling back and forth."

Tim Ottinger
Could you provide a link to the original article? I have the book on order, and would like to compare the difference between python and java.
digitala
Original is at http://tottinge.blogsome.com/meaningfulnames/ but was extracted as a separate article at http://agileotter.blogspot.com/2009/03/simple-act-of-using-better-name-instead.htmlHope you enjoy it.Tim
tottinge
+2  A: 

After being a C developer for more than 15 years, I recently took up Python development. Luck would have it that I could land a position on a team within my company that does Python exclusively and I haven't looked back. I am still as effective on C, however I find Python coding to be much more enjoyable.

EmmEff
A: 

I went to Python from Delphi and did not feel any enlightement (often cited by former Java devs). I enjoyed fun, productivity, appreciated clean syntax and rich standard library, but I did not feel any extras. But later I had to learn Java and I quickly understood why people rush away from Java to more dynamic languages. After a year of work with J2EE I decided to look for an all-python job, found it and do not want to do any other things anymore.

zgoda
+1  A: 

Moving to Python after doing years of Java programming seemed like a revelation to me. The usual edit-compile-run-debug-cycle is so much faster.

Unfortunatly, I haven't found a really good free IDE at that time. Now, there is a plugin for Eclipse available.

My opinion is that developing big projects within a bigger team is better within the Java domain, however, small projects like tools, converters, simple services etc (everything a single person or a small team can achieve) are better to implement in Python. It's more agile :)

akr
+1  A: 

As you may have noticed by my activity in the Python tag, I am using Python a lot. It's documentation is very different from PHP but I do enjoy it.

The important thing whenever you compare two languages is not to be biased, I made a post comparing Python to PHP which basically holds my views and observations.

Teifion