views:

1748

answers:

17

I'm a C++/C#/.NET developer.

I'm looking for something new and fun. Also I want to develop some web applications. So my question is: is it worth to jump into Python (what is so good about it?), or you recommend me something else (what is so good about something else)?

A: 

yes, its always good to learn something new, even if just out of pure curiosity..

But since I don't know that much about python on the web, I thought I should recommend something else based on the fact you are interested in something newish, and on something web related:

So, something else: Ruby on Rails is quite the interesting new thing

you can find a list of Why Ruby on Rails on this blog, my favorite being:

  1. Ruby on Rails provides a consistent approach to building web applications with an out of the box architecture. Traditionally starting a new web application is a fairly heavy weight process, you typically need to survey and choose your various software components to solve the common architectural problems of persistence, logging, build scripts, application configuration, web tier components and workflow. With the Rails framework these decisions are already made for you, so you can get on to understanding the business problem and quickly build a working system. You become productive in minutes not weeks or months.

Here is an excellent video on the why Ruby on Rails can be seen as cool

[Edit] for the down voters, the question was asking if we recommend something other than Python and why, I think it means we can recommend something other than Python for his web development search for knowledge.

Ric Tokyo
Does saying "Ruby is to Python what Visual Basic .NET is to C#" make sense ?
controlbreak
I don't think it does hehe..but thats just me..
Ric Tokyo
+1 (plus I have to find one good post from you to upvote ;) 8 down, 7 to go: http://stackoverflow.com/questions/359727#486543 ).
VonC
+1  A: 

Sure, it's always worth learning new languages because they might help you to think differently about some things, which will make you a better developer, and python is fairly easy to get to grips with. Dive into Python is a free online book which is pretty good to help you get started if you've already got experience with other languages (as you appear to).

As for what's so good about it? Well, I wouldn't say it's much better or worse than many other languages, it just has different features. Spend a day or two working through the book, then you'll know enough to draw your own conclusions.

Greg Beech
+2  A: 

yes it's worth the time for learning it. consider it's widely supported and has a vast community behind it.

Stefano Driussi
Let it be noted that I don't agree that the documentation is poor. I think it is very good. What more can you expect?
Magnus Hoff
It's just an opinion, maybe I should have said "not as accurate and vast as MSDN which i'm used to". Sorry didn't meant to offend anyone.
Stefano Driussi
No offense taken. I just disagree. :)
Magnus Hoff
I also think the Python documentation is very good.
Dan
+1  A: 

I would say python is a good choice. It's easy to learn and a powerfull language for things like file handling and web applications. It also have an easy syntax. If you just wan't to write web apps, I might recomend perl, which is better then python for those things, but personaly I think perl have a hard syntax to read. Ofcourse, that's becouse I have serious holes in my perl knowledge.

martiert
+33  A: 

It is worth it to Dive into Python!

Seriously. Python will complement your toolbox. After learning enough of it, you will find that you script things that you previously did by hand as well as things that were too tedious to express in your current languages.

It is not a golden hammer -- nothing is -- but it complements your current languages very well.

Magnus Hoff
A: 

And for web development with Python I would recommend Jython ( http://www.jython.org ), which can be easily integrated to the Java platform. It's a object oriented Python, written in Java.

Björn
+2  A: 

Yes, it is worth it! Python has the potential to change the way you think about programming, focusing on the problem, rather than fighting the language constructs.

Sure, you'll find some stumbling blocks, as with everything new, it won't always make sense at first, it might even frustrate you for not conforming with the norm in most other languages, but it's worth the effort to learn.

hasen j
+16  A: 

I'd say Python is well worth learning for a couple of reasons, one of which is specifically pertinent to your existing .Net background.

  • The first reason is that Python is a good system (without getting into debates about its specific merits) and has a strong, growing community. It's not the only game in town but Python would be a good choice if you were to pick one of the open-source dynamic languages.

  • The second reason is that you can use IronPython (a native .Net implementation of Python) with the .Net libraries, which allows you some re-use of your existing .Net experience. It also allows you to embed IronPython as a scripting language within a .Net application, or build an application with a mixure of C# and Python code. There is also a Visual Studio plugin called IronPython Studio that lets you use it from Visual Studio, either as a standalone IDE or integrated with a wider VS install. From this perspective it complements your existing .Net development.

Python is quite easy to learn. When I first used Python I could go from a standing start with no previous experience to writing a multithreaded server (FWIW, an emulator for a web camera) in 6 days, while doing a full time Computer Science degree at university.

If you are working on Windows, get Activestate Python, which is a canned distribution with a number of useful goodies like ODBC, COM and Win32 interfacing libraries, a wrapper library for MFC and a tool called 'COM MakePy' that generates Python wrappers from type library metadata (think: scripting Excel from Python). It also has a great body of Python documentation organised into a chm file and a nice Python-aware editor with basic IDE and debugging functionality. Between this and IronPython, Python is pretty much a first class citizen on Windows - arguably Python has the best Windows support of any of the dynamic languages.

ConcernedOfTunbridgeWells
I would also add one good reason to the list:It is really is the simplest language to fool around - try some concept, do something ad hoc without the need of writing a dozen of helper libraries, even if it's not the best language for the ultimate solution for a problem, it is one of the best languages to check how well something would work (or if it works at all)
Kimvais
+1  A: 

Since you mention that you are a C++/C# developer I assume that you haven't dabbled with any scripting language. So addition of scripting language to your skill set repository will be a good learning. So for that reason I think it is worth your effort to learn Python.

sateesh
A: 

I think it is worth to learn Python because it offers a nice combination of functional and object-oriented features. Coming form a C++/C# background you probably haven't done a lot of (or any?) functional programming. Python allows you to play with it, without forcing you to do it. (Of course Python isn't the only language in this regard, but probably one of the easier ones to pick up, coming from an OO background.)

Picking up some experience with functional programming will give you a whole new set of problem solving techniques, which will be helpful in other languages as well.

The vast included library and it's broad availability (especially on *nix systems) also makes Python a good choice for system administration and automation of all those little tasks on has to do.

Therefor I recommend Python both for learning something new as well as getting tasks done.

Christian Berg
+7  A: 

Yes. Learn Python.

I find I build functionality around five times as fast in Python as in C# or VB.NET. There's simply less typing and hassle to it.

Enough about productivity: let's talk about fun. Python lets you play with dynamic typing, functional programming techniques (hello, generator comprehensions!) and brain-benders like monkey-patching and metaclasses. There's a safety net, though. Instead of having to comprehend an entirely new style of programming, however — I'm looking at you, Erlang — you can have your fun without abandoning the familiar Algol-style object oriented language features you've been using all these years in more traditional languages.

Speaking of safety nets: there's no need to abandon your investment in the .NET framework. Download IronPython. You can use all your .NET classes from Python code. You can use Python as an embedded language for rapid development and user extensibility. Hell, you can use Python just to test your code in a hurry. For example:

# Gather reports by their traceback, if any
exception_counts = {}
for record in records:
    try:
        RunParser(record)
    except Exception, ex:
        exception_counts.setdefault(cls.Exception.ToString(), 
                                    []).append(record)

# Print a report sorted by crash rate, descending. 
report_lines = [(len(records), ex) 
                for (ex, records) in exception_counts.items()]
report_lines.sort()
report_lines.reverse()
for count, traceback in report_lines:
    print "%d: %s\n" % (count, traceback)

That tries the parser on all my records, and tells me what crashed the most. It took me about five minutes to write. I dread to think of how long it'd have taken me in C#, though I figure some commenters will show off their skills. :)

Added a fair bit later:

Luke commented about Python's block style, which is indented rather than delimited. I admit once thinking that Python's use of indentation as syntax was an abomination. Then I tried it, and liked it a lot.

I've been writing a lot of C# lately. I've already blown some time trying to figure out from where a closing curly brace was missing. Like I said to Luke: both block styles have their failure modes.

If indentation as syntax is the worst thing your language throws in your path today, you're having a really good day.

Garth T Kidd
I really love "the idea" of Python. However, I never really came to terms with the required space indentation. At one time I was trying to pick up Python I copied some example code into PyDev which removed all the indents. I couldn't run the example. Haven't we learned from MAKE files?
Luke
Luke, I've been even more stuffed by C, C++, Java, and C# when a curly brace goes missing or an extra is added. Both styles of blocks (indented and delimited) have failure modes. The benefit of Python's style is that more running code fits on your screen.
Garth T Kidd
But with curly braces you at least know there is a compound coming up and when it ends. If its space indented and you put every line (by accident) on position 0, go figure out what goes where. With curly braces you can at least write an auto-indent function. Try doing that with Python code... :)
Luke
Oh. And I'm not sure but I think programming is not about the amount of lines of code you can fit on your screen at one time. I could be wrong. I've seen condensed code like that. It usually looks like a big ASCII character dump rather than something that invites to read and understand.
Luke
A: 

The answer "Is it worth learning this language" is always yes.

Lars Wirzenius
Given infinite time, sure, but there are a *lot* of languages out there...
Garth T Kidd
@Garth: "there are a *lot* of languages out there" What's your point? It's impossible, so do nothing? Or perhaps you have something else in mind? Could you expand on your comment with some actionable advice?
S.Lott
I think Garth's comment is clearer than the answers. If I get him right he refers to the limited resource "time" which means you still have to make choices. In this respect, the answer doesn't help because the author of the question has already decided to learn something new but has to make a choice
tharkun
Not to mention that since you don't have infinite time, you could spend all your time learning languages and no time coding anything. That doesn't sound like a win. Besides, what's the point in learning a dead, obsolete language?
Beska
Getting jobs that still pay really well if you're willing to maintain code written in them is one point. COBOL programmers, God love them, are being called out of retirement to fix stuff because no one else knows the language.
Joe McMahon
+1  A: 

For me, I had the same question before. I'm a .NET developer and looking for something new. While I read about Python and its trends, what is capable of, and who use it, I decided to learn it.

Have look; http://www.python.org/about/quotes/ http://www.python.org/about/apps/

Ahmed
+4  A: 

Have a look to Django. I don't know if it's better than Ruby On Rails (since I don't know Ruby) but Django is quite sure one of the best python web development platforms available.

happy_emi
+2  A: 

I love Python. I feel like it was built for me. And that IMHO is the biggest reason why you should try to experiment with lots of languages, to find one that really fits your style and to learn new tricks other languages use. It makes the whole coding experience much better.

You can apply that to many areas of life actually :)

Sebastjan Trepča
+1  A: 

Just throwing in my two cents, but I've found that Python was, and still is, a wonderful experience. Although I can't debate its relative merits to any other language, I can assure you that Python is really fun to work with, especially when you absolutely have to have something pumped out right now. The syntax can almost be described as pseudo-code, and I mean that in a good way. Try it out. You won't be sorry.

Andrew Szeto
+2  A: 

i get surprised how many programs use python sometimes which i expected were in c or something similar. i think it is defintely worth it and should not be dismissed as weak just because it is scripting.