Python vs. C#: Business and Technology Tradeoffs

About This Blog

This site is for  entrepreneurs.  A full RSS feed to the articles is available.  Please subscribe so we know you're out there.  If you need more convincing, learn more about the site.

Community

Google+

And, you can find me on Google+

Connect on Twitter

Get Articles By Email

Your email:

Google

Blog Navigator

Navigate By : 
[Article Index]

Questions about startups?

If you have questions about startups, you can find me and a bunch of other startup fanatics on the free Q&A website:

Answers.OnStartups.com

Subscribe to Updates

 

30,000+ subscribers can't all be wrong.  Subscribe to the OnStartups.com RSS feed.

Follow me on LinkedIn

OnStartups

Current Articles | RSS Feed RSS Feed

Python vs. C#: Business and Technology Tradeoffs

 


This is the second in a series of articles looking at the merits of Python vs. C# for startups.  The first article is here (though it is not necessary to read the prior article to get value out of this one).

Let’s jump right into a series of arguments (and counter-arguments) for both sides.  Note that some of these arguments are not your “standard fare” programming debates.  I’m actually looking at the choice from the perspective of real startups (mine and others).  This is not an academic exercise for me.  Though it’s unlikely I’m going to make a platform “switch” (because of a vested interest already), this issue continues to come up with startups that I’m advising.  Also, this list is by no means an exhaustive treatment of the issues at hand.  Just the ones I found particularly interesting or relevant.

Python vs. C#: Understanding The Tradeoffs
 
  1. Open Source Is Good:  Python has the advantage for being open source.  If the same language had been offered by some closed company (without the resources of Microsoft), my decision would already be made.  I’m a strong believer that successful languages and platforms require an ecosystem for long-term viability.  And, long-term viability is important for software product companies because the value being created often won’t be realized until year 3-5.  Ecosystems require either a very large player with resources and conviction to see it through (like Microsoft), or a passionate community that is motivated to keep the technology supported and evolve it.  C# has the former, Python has the latter.  If I had to choose based solely on this criteria, I’d pick Python.

  1. Dynamic vs. Static Languages:  This topic has been debated to death in the blogosphere so I’m not going to repeat it here.  Suffice it to say that Python is a more dynamic language than C# (and C# is more dynamic than something like C++).  From a pure language design perspective, it doesn’t really matter to me that much whether a language is dynamic or static.  I’m more interested in the implications of that tradeoff (see below).  Having worked in dynamic languages before (though nowhere near the power and expressiveness of Python), I can see the appeal.  In my limited experience, I have found that some of the dynamic languages require a “higher grade” developer to construct robust, scalable and sustainable applications.  It can be done, but it’s easier to shoot yourself in the foot because things are so easy and fast.  

  1. The Cost Of Compiling:  C#, being a static language generally has a build/compile step.  Some people hate this, others don’t.  In my opinion, though the build process certainly adds a small micro-step to the development process (and impacts productivity), I kind of like being able to let the compiler do it’s thing.  This catches a large body of stupid syntax mistakes.  Many argue that one should have a litany of unit tests anyways, and that these unit tests are much better at catching actual errors in the code than a compiler.  This is true, it is important to have unit tests and they will catch more errors than a compiler.  But, what the compiler gives me (by way of testing) is essentially “free” (or near free).  Simply by working within the constraints of the language, the compiler tells me things that are actually useful.  I don’t have to develop unit tests to get there.  Don’t get me wrong, I love unit tests (I really do), but having a compiler find some stupid stuff is a helpful thing.  

  1. Building Binaries:  Call me old school, but I have been writing software long enough to appreciate the ability to “package” my code in a form that is inconvenient for the casual user to tinker with and reverse-engineer.  Yes, I do realize that in .Net, it takes a good obfuscator to accomplish this, but that’s OK.  As a builder of commercial software, the “naked code” platforms like Python bother me a bit because I essentially have my naked code somewhat exposed.  As a software company, this source code is a core asset and something I’ve made considerable investment in.  Even as a hosted software company, I may elect to take parts of my platform and have it run elsewhere.  The ability to build binaries lets me distribute my IP with some protection.  Not to say I may not need to provide source anyway, but at least I have a choice.  If I had to choose between the two, I prefer being able to build binaries instead of having to distribute naked source code.

  1. Performance:  For most of the companies I’m involved in, performance is not that the dominant criteria.  Though C# may have a slight edge in this respect, this is not an important consideration for the kinds of applications I’m talking about (consumer and business applications on the web).  What C# may provide in performance, it takes away in the cost of infrastructure software (since it can’t run on open source).  Said differently, C# may take less server resources for the same volume of concurrent users, but you’re paying for Windows on those servers so in many cases, it likely comes out to a wash.  Not something I lose sleep over.

 
  1. Does Mainstream = Mediocrity?  This is one of the most troubling aspects of the topic.  I have read claims that one of the reasons to pick Python over C# (which is more “mainstream”) is that it provides competitive advantage.  By picking something like C# (which is mainstream), I’m lining up with the masses and doing the same thing as everyone else.  I’d like to push back on this a bit.  Simply picking the popular choice does not necessarily cause mediocrity (though the danger is certainly there).  Further arguments suggest that if I were to pick Python, I’d be able to attract a better class of programmer to the company.  Maybe.  I would argue that the best programmers are those that can understand the merits and tradeoffs of technical choices and can appreciate that there is no clear answer here.  If they’re going to pick a startup simply because it happened to choose Python (and that’s their pet language), I would question the judgment and/or experience of the programmer.  From a startup’s perspective, value is created from a combination of exceptional technical skills (i.e. “the better programmer) and some business instincts and customer intuition.  Some of this also has to do with the type of startup.  If I were doing really, really complicated things (like security/encryption, artificial intelligence, etc.) than the better technical skills win out.  But, I’m building software for people, so the other stuff is important.  As for the mediocrity argument, I’m not yet convinced that simply the act of choosing a mainstream language means you’re going to find mediocre people to work on the team or that you’re going to create mediocre solutions.  I just don’t see evidence of that.

  1. Programmer Productivity:  I have heard strong (and convincing) arguments that Python is a more productive environment for programmers.  This results from a combination of the dynamic nature of the language, the elegance of the syntax and the availability of a large set of libraries of pre-written code that can be reused relatively easily.  I also believe that the sheer volume of code to solve a similar problem is lower in Python and C# (primarily because of syntax decoration and boilerplate code required in C#).  Can’t argue that.  Programmers are likely more productive in Python, all things being equal.  The learning curve is also not quite as steep (as compared to C#).  On the flip side, I worry a little about larger and longer projects and whether or not languages like C# lend themselves better to team-based development, and projects that are large and span multiple years.  Though I can’t (and won’t) make the argument that C# is better for bigger, longer projects I think the potential for this to be true is certainly out there.  But, if programmer productivity were the sole decision criteria, I’d pick Python.

  1. Popularity and Precedence:  One of the key factors I look at when making decisions like this is searching for precedence.  Faced with similar decisions and similar needs, what have other (smart) people done?  I also weigh startups that have succeeded higher (in terms of looking for precedence).  My informal reading on this topic indicates that a lot of the successful startups (successful in the sense that they built products that worked, were bought by companies or have meaningful revenues) pick Java, C++, C# and PHP.  RubyOnRails shows up a lot in conversations with new startups, but not enough time has passed to really know what the outcome of that choice will be yet.  I just don’t see that many “household names” (in startup world) being built on Python.  This worries me.  The language has been around long enough to have gained traction and is clearly immensely popular in many context  – but just not in the context I care about most:  Startup software companies building a commercial product that hope to be acquired or go public some day.  Based on what I have seen, if I were picking solely on this criteria (and this is a subjective assessment), I would pick C#. (Note:  If you’re reading this and know of a startup that has used Python successfully, feel free to leave a comment).

  1. Valuation Impact:  As unfortunate as it is, the choice of development platform/language can and does impact the valuation of a startup.  The reason is that potential acquirers care about this stuff.  As well they should.  Not because there are right or wrong answers, but because the choices you make affect the “integration” cost for them.  If they are a big Java shop and you’re written everything in Python (or C# for that matter), and they are buying you for your IP, they’ll factor the cost of this assimilation into the purchase price.  If the cost/risk is high enough, it may actually prevent you from getting an acquisition offer in the first place.  On a related note, if you’ve build everything in C# and the acquirer hates (or competes fiercely) with Microsoft, chances are, this will impact your odds of being acquired.  This is where it becomes a bit of a numbers game.  If I were playing the odds, I’d pick a more mainstream language as the odds of it negatively impacting valuation are lower.  Of course, it’s also important to remember that the biggest impact on valuation is whether or not you have created a useful product that makes money.  For purposes of this discussion, I’m assuming that an equally gifted development team would be just as likely to create a working product in C# as they would in Python.


I’m going to cut this off here as there’s a lot to think about and talk about.  In the next installment in the series, we’ll look at surrounding components (like web frameworks and third-party libraries) and how they might influence the decision making.  As always, if you have thoughts or ideas on any of the above, please comment.  The purpose of this exercise is not to defend one side or the other, but to take enough of a stand as to spark some discussion. 

I also plan to synthesize some of the exceptional comments I’ve already been getting on the topic into a fourth (and final) article on the topic.  Hopefully you’ll have found this series helpful.

Posted by on Tue, Jul 25, 2006

COMMENTS

I would add the REPL to the list of things that increase a Python programmer's productivity. The interpreter improves my productivity very significantly.

On the C# side, maybe I would add the IDE into the equation somewhere. There are good Python IDEs, but none as good as Visual Studio. I don't like IDEs (VIMmer myself), but in a team environment they may be important.

posted on Tuesday, July 25, 2006 at 10:24 AM by Bill Mill


I was going to mention that you overlooked the big issue of 3rd party tools and libraries. But then I saw that you're going to discuss that in your next installment.

IMO, this is an extremely important aspect of this decision. One of the reasons I like Java so much is its abundance of 3rd party tools and libraries. You name it: web frameworks, pie graph generators, XML/XSL parsers and processors - and, most importantly, advanced IDE's with automated refactoring capabilities - Java's got it. And usually several to choose from! (At this point, I'm loathe to choose to work in a language that doesn't have a refactoring IDE - or a plugin for Eclipse.)

From what (little) I know of Python, it's in good shape in this regard too. As far as C#, I don't know that development scene enough to answer.

But this issue definitely keeps me from doing development in less mature languages like PHP and such.

And during a recent discussion with another developer friend of mine who was raving to me about caml/ocaml, he had to concede that it was a weak language if you did much GUI development.

posted on Tuesday, July 25, 2006 at 10:39 AM by DAR


Just FYI, I think Google uses Python quite a bit.

posted on Tuesday, July 25, 2006 at 11:06 AM by


I'd like to stress how much I agree with Bill on pointing out that the REPL is a huge time saver while programming ... especially when you're working on something "very new."

The ability to interact with your code live is a huge bonus to me ... I'm currently working on a rather large (and complicated -- to me) project in Java, and which I had this tool available .. there are some OSS programs that try to replicate this in Java, but none really come close.

posted on Tuesday, July 25, 2006 at 11:42 AM by Steve Lianoglou


Woops .. I can't believe I wrote "... and which I had this tool available ...".

"which" is meant to be "wish" .. yeesh ... I thought I had drank enough coffee by now ...

posted on Tuesday, July 25, 2006 at 11:44 AM by Steve Lianoglou


re: Building binaries. py2exe and nsis make it trivial to build a non-source distributable which feels native to windows users. Doing this leaves open your ability to give source to a linux or mac user if you want to test the cross platform waters.

posted on Tuesday, July 25, 2006 at 12:01 PM by cariaso


RE: Performance, I tend to find myself on data and computationally intensive projects. Performance is usually very important for me. Saying that Windows is a slower environment has some, but little, validity. To add perspective, if you look at the Java versus Python debate, both languages are platform independent, but Java can be made to run as fast as C.

(As an aside, I wonder how fast C# is on mono. My company is using mono in some places, with limited success, but we have not had to worry about speed there yet.)

RE: 3rd party tools, both sides have many. .NET’s offerings tend to be proprietary instead of open source, just like the platform itself. There are open source .NET projects, but they tend to be copy cats from other open source projects originally build in another language (usually Java, e.g. Lucene.NET, NAnt, NUnit, SharpHSQL, and so on).

A startup I recently worked for used python, Java, and C++. This multi-language approach seems like a good choice if your startup has many pieces that interop asynchronously. Even in this situation I would use the same language for the first six to twelve months, for a few reasons. This company recently had a successful acquisition.

posted on Tuesday, July 25, 2006 at 12:53 PM by Adam Smith, of xobni.com


One more thing: popularity is also important on the language family level.

C# is more popular than python, but Java is also more popular than LISP or any other weakly typed language. The latter fact has an impact on the C# versus python debate, for two reasons:

1) Code can be reliably ported from Java to C# with little more than regex-like rules. (C# supersets Java.)

2) There are more .NET big companies out there than python companies, but there are also many Java companies. Such companies would prefer a .NET acquisition than a python acquisition.

posted on Tuesday, July 25, 2006 at 1:00 PM by Adam Smith, of xobni.com


re: binaries: I managed a team in a large software company that routinely delivered very large mixed Python/C++ binaries. We use a "roll our own" approach to packaging Python but it essentially involved bundling up all of the compiled .pyc files into zipped tarballs (.pyz extension) and then having a simple shell script unzip these and run the application. I believe it took one of our developers a couple days to implements and it worked impeccably for many years. We were shipping Python "binaries" long before any of the current packaging tools.

posted on Tuesday, July 25, 2006 at 1:09 PM by rav124


"there are also many Java companies. Such companies would prefer a .NET acquisition than a python acquisition"

jython.org has been a bit too quiet for a while, but provides an excellent integration of python and java. See my comments on it here http://cariaso.livejournal.com/29055.html

beyond that, python has now been implemented in several languages, the original C (Cpython), Java (jython), Python (PyPy), and .net (IronPython). Having so many independent implementations help to flush out spec ambiguities, and helps ensure someone else has already resolved many interlanguage issues.

posted on Tuesday, July 25, 2006 at 1:21 PM by cariaso


I have to disagree with your logic on the first point. I tend to believe that although being open source appears to be a strength at first, Imany times it can be more of a liability. Open source communities tend to be more fickle and will jump ship more often. I've seen this with several products that I came to rely on in the past 5 years. Although they tend to still be alive and well, the amount of effort put into developing and furthering them has dwindled to nothing. This does me no good since I don't have time to support these products myself.

Also, don't forget that closed source languages like C# and Java have HUGE communities outside of the companies that create and maintain the language. This is often overlooked as everyone assumes that open source (oftentimes being solely a community effort) must have better communities than closed source alternatives. This just isn't the case.

Anyway, a very nice set of articles. It is a hard decision to make as both languages/platforms stack up nicely against each other. I personally prefer static languages and choose to use C#. I also use Java for my "day job" and have found that even though we claim to be cross platform capable, not a single customer runs our system on anything other than Windows. So when you finally get to the cross platform debate, be sure to include similar statistics along with the costs of supporting more than one platform.

Keep up the good work.

posted on Tuesday, July 25, 2006 at 2:26 PM by


When I was researching programming languages I came across the fact that Google used a huge amount of Python in its apps (including crawler). A quick search brings me to a few URLs. The first one is from Greg Stein from Google:

http://www.sauria.com/~twl/conferences/pycon2005/20050325/Python%20at%20Google.notes

In it it says "We consider Python to be our 'secret sauce'" which I think is quite important.

Regarding protection of your code, this is something that is very important to some people. One of my companies is SourceGuardian and we protect PHP code with our software (Others like Zend and Ioncube offer the same thing). When I investigated Python I found that it also has the ability to create exe's and one of my team tested it and said that it works well. We also added in a level of obfuscation using our own systems just to make sure!

I have never personally used C#, so its difficult for me to comment on it, either positively or negatively, but I can say that I continue to be amazed by how great Python is

posted on Tuesday, July 25, 2006 at 2:49 PM by


oh, and just looked on the Google jobs site. This is the kind of thing they seek:

"Experience in scripting in a major scripting language such as Perl or Python. Python is desirable."

So, whilst not a startup now, Google shows what Python is being used for

A quick Google for Python success stories also brought up a load of sites

posted on Tuesday, July 25, 2006 at 3:05 PM by


Developers with a Java background should be more productive faster in C# than in Python since the syntax is almost identical. They would need to focus on how the Java libraries are implemented in .net

posted on Tuesday, July 25, 2006 at 3:57 PM by Denis The SQL Menace


And for what it's worth.... I don't think the fact that Google uses Python makes any difference. I'm certainly not Google and either are you. And I wouldn't be surprised to learn that Google specifically didn't use .NET or Java because they consider the "owners" of those two languages to be competitors.

But to me the comment "no one cares about Python anymore... Ruby is the new hotness" sums up the attitudes of many open source programers. They are quick to move to whatever is today's hottest buzzword. Big companies like Sun and Microsoft don't work that way. So although you run the risk of the owning company pulling the plug down the road for closed source languages, the threat of your open source language de jour being abandoned by the open source community seems much more likely. Especially since I've seen this myself several times.

posted on Tuesday, July 25, 2006 at 6:06 PM by


For a non tech person all the comments on this thread are exceptionally informative. Many thanks to all the contributors.

posted on Tuesday, July 25, 2006 at 6:53 PM by


Something else to consider is the level of committment that Microsoft itself is making to Python. Till about 2 years ago, most all knowledge base articles were prefaced with either being C++ or VB centric. Now I see a great deal of Python based glue logic showing up in their articles. Technical articles from MS on WMI is about 50/50 C++/Python and less VB.

Not only that but the .Net environment is now heavily influenced by the IronPython team. It just might be that Python maybe become the preferred choice for that development framework.

One last point. Of the teams that have some stature in using Python it really is a mixed bag. In most cases these teams are using lower level C++ and MFC classes for grunt work stuff and overalying those functions with the Python code for the higher level logic and presentation.

posted on Tuesday, July 25, 2006 at 7:38 PM by John McGinnis


Mr. Bravado, Shamus,

Yes Ruby (especially w/Rails) seems to be the lastest thing since sliced bread for the programming staff. I've delved into to it myself to see what the hoopla was about. What I find it has a good deal of merit.

However I also find a few warts. The expressiveness is too much like Perl 5 in some ways. Only the number of ways of doing X is cut down unlike Perl. In the case of Rails, I find too much in the way of 'and magic occurs right here' in the underlying code. Being the fuddy duddy I am, I still prefer explictness. (Though truth be laid bare, decorators in Python have the same problem).

All that being said, one item that has not been touched on is the accessories that come with a language or not. In my early youth on PDP8's if you wanted a math library for C; you either waded thru Knuth's 'Algorithms' rolling your own, wrote a C wrapper to the Fortran code or bought a third party library. The point is does whatever language you use have the libraries you need?

C#, acceptable though web toolkits looks to be mostly 3rd party. Java, well it has grown up with an eye to network usage so out of the box it does well on the web especially client side web. Ruby, great for web work. But if I were developing a SNMP backend I don't think I would pick it. PHP surprisingly has a wealth of 3rd party scripts and can do system level work though not well. Python can do all of these fuctions. Web, SNMP, Templates, HTTP servers, URL screen scraping. All of it. Some better than others.

Once you have the language down, speed is the next concern. Can the prototype be developed fast enough to make that next meeting with your 'Angel' investors? In some cases that might leave the compiled languages at a disadvantage. IP protection? Forget PHP then. In my view then you are left with Java, Python or Ruby. Or possibly a mix of any two.

posted on Tuesday, July 25, 2006 at 8:07 PM by John McGinnis


You might want to also look at a language called Boo. It is Python inspired and runs on top of the .NET framework. I am not sure how it compares to IronPython, but it does seem to have some interesting features which I am not sure are available in CPython or IronPython.

posted on Tuesday, July 25, 2006 at 10:02 PM by Joshua Volz


I think the litmus test has two parts:

1. Can you build it?

Shiny new language X might be cool/interpreted/dynamic, but a track record of delivering on passe/compiled/static old language Y shouldn't be underestimated. Ideas are cheap. If you are a startup, you need to turn your ideas into code that works. Until you cross that barrier, there is no product. Turning the concept into working code is a process that you should make as easy for yourself as possible. Choose the Y that you know (and are successful with) over the X that you don't, even if it isn't as sexy. Finding programmers, acquiring companies, etc. is a secondary problem. You need to build the software first, even if it is on a more boring platform. There will never be a shortage of people to take a good idea from a relatively crusty platform to the Next Great Thing.

2. Can the customer run it?

Platforms like .NET and J2EE have an (arguably undeserved) advantage over Python and Perl due to the inertia of corporate IT environments. My experience is that the web-is-the-platform (hence who cares what language we use?) architecture collapses as soon as a paying customer appears who wants to bring the software in-house.

posted on Tuesday, July 25, 2006 at 10:46 PM by sean8223


a question for John McGinnis. John, why did you say "IP protection? Forget PHP then." ? Just curious - I agreed with the majority of your post, but would just like some clarification on this point.

posted on Wednesday, July 26, 2006 at 3:02 AM by


Fixit,

This is a personal prejudice on my part. PHP itself has little in the way of protecting the source if you needed to distribute the code. The byte compilers I have seen available I just have not felt comfortable with. Comfortable in the sense of the end result not being robust. I ran across invocation errors and code fragments that just did not sit well in a 'compiled' state even though the base PHP code was rock solid.

That was 6-8 months ago. And again that is a personal perception.

posted on Wednesday, July 26, 2006 at 12:02 PM by John McGinnis


Thanks John. Was just curious. Feel free to contact me at sourceguardian if you want to play with our latest version - I'd be curious to see if you experience the same problems. Our research into Python is that the code protection solutions out there are good enough for distribution of code too

posted on Thursday, July 27, 2006 at 3:48 AM by


C# is ECMA 334 & ISO/IEC 23271 standard and CIL is ECMA 335 - ISO/IEC 23272 standard. Mono is one implementation of these standards as is dotGNU. So C# isn't as proprietary as would at first appear. The biggest productivity impact is the libraries and the time it takes to come up to speed in using those libraries. And then there is IronPython which is an implementation of Python for CIL enviornments and it runs with both MS .Net as well as Mono. (Don't know about dotGNU).

BTW: love the series of articles. I too am struggling with similar philosophical and technical issues.

posted on Thursday, July 27, 2006 at 7:42 AM by Eugene


>f you’re reading this and know of a startup that has used Python successfully

reddit comes to mind. It's not successful yet in the sense of making the founders rich, but it's already profitable.

posted on Thursday, July 27, 2006 at 1:43 PM by Zak


My POV is that language usually selected _after_ platform has been selected and its a no-brainer then: use C# on Windows and Python elsewhere. See my post here.

posted on Friday, July 28, 2006 at 1:43 AM by


Oops, the URL is http://maxischenko.in.ua/blog/entries/93/python-vs-c-follow-your-platform/

posted on Friday, July 28, 2006 at 1:44 AM by


I'm part of a trading desk that develops automated trading strategies. We went through a start-up phase building the desk from zero P&L to a good degree of prosperity today (3 years in, with 110% YoY growth). In that time we faced (and still do) pressures that are probably familiar to a start-up: turning ideas into shipping product (profitable trading strategies), making investors (senior management) happy, and adjusting rapidly to shifting customer demands (an unpredictable market). Let me give you my take on this debate.

Our business is an idea business: we get a trading idea, implement it in code, test it historically, and if it works, let it loose to trade on the market. We continuously follow its trading results to adjust and refine it.

Speeding the idea-implement-test-results loop is crucial. We must minimize the amount of time it takes to a) translate ideas into working code, b) discern if those ideas match reality, c) make corrections, and d) try again. Rapid feedback permits constant small adjustments of orientation and quickly surfaces incorrect assumptions.

For the first two years we used Java as our research and development language. It worked. No one looked at us funny. 3rd party libraries abound. Eclipse rocks. Safe choice. Etc.

However, we discovered that there is a limit to how quickly we could implement an idea in Java. There's a certain amount of boilerplate required to code up a new idea. Certainly, we developed libraries and APIs to reduce this time, but we could not eliminate it. Let's call this boilerplate "language imposed time." Java, and its cousin C#, has a moderate amount of language imposed time. C++ and C have higher amounts still.

Since the inception of the desk, we had been using Python for data manipulation and general "duct tape" work and had liked it a lot, but never considered it suited for "real work." What changed was a new hire that, with little prior programming experience, sat down and created a brand new strategy from scratch in half the time it normally took us in Java.

Wow. If a newbie could be 2x more productive with Python than us experienced guys, what could we do? A lot it turns out: research ideas code up in a quarter of the time it took before. We've gained so much time back that we're able to explore alternative ideas previously out of reach.

It's not just programmer productivity I'm talking about. The implications of the time gain are what are most important. You become more agile and adjust to conditions more quickly. You can explore multiple avenues of opportunity because the costs are so much lower. For us, Python has low language imposed time and permits more ideas to be explored in less time speeding our innovation loop. Big win for us.

Any language, platform, etc, represents a set of compromises so it's a matter of knowing what you're giving up in exchange for the benefits you're receiving. In our business, rapid development of working and profitable trading strategies dominates most other concerns. This heavily favors the productivity a dynamic language like Python provides. If I were writing medical imaging software, correctness and safety would be more important and guide my language choice towards the Java's and C#'s of this world.

I would be very interested to know what the original poster believes is most important to him and the start-ups he advises. What is he willing to trade off and why?

posted on Saturday, July 29, 2006 at 6:51 AM by ss


I find this kind of discussion of this language vs. that language utterly ridiculous. What difference does it make in the end? Is a house built better because the contractor used Delta power tools rather than Makita? Do you see how pointless this argument of python vs c# is?

posted on Saturday, July 29, 2006 at 1:49 PM by DA


I find this kind of discussion of this language vs. that language utterly ridiculous. What difference does it make in the end? Is a house built better because the contractor used Delta power tools rather than Makita? Do you see how pointless this argument of python vs c# is?

I totally disagree. If you sit down for drinks with a contractor (and I have) they love talking shop about their tools. Anyone involved in a professional enterprise uses tools and evaluating them and comparing and contrasting is a key part of the process (I'd argue a *fun* part of it, but some might not see it that way).

C++, C#, Python, Ruby, Java, et al are all tools and the comments all go toward presenting compelling arguments supporting (or dismissing) one or another. The choice of language and the level of abstraction it offers makes a *huge* difference in productivity and the amount of work you have to do to get to where you want to get and you have to revisit the decision for each and every project to take make sure you're using the best tool for the job.

It's a critical part of starting a project, product, or company since you have to live with it for years to come.

posted on Sunday, July 30, 2006 at 12:29 AM by Ramin


It is also worthy of note in terms of python success stories is Bit Torrent was developed (quickly) with python. A lot of the smaller client still use it. That does point out the lack of robust GUI support for python.

posted on Thursday, August 10, 2006 at 11:59 AM by Albert


If you want many of the nice, wrist-friendly features of Python in addition to a lot of the resources and libraries that .net provides, then I'd recommend Boo. It's a great new language that includes many of the things that make Python easier on the wrists (type inference, duck typing) combined with many of the strengths of C# (static typing). I highly recommend checking it out. Even though it is a relatively new language, development is continuing on it.

http://boo.codehaus.org

posted on Wednesday, November 15, 2006 at 5:59 AM by Marcus


Ramin,
I must disagree with you as you analogy is flawed. Comparing the language to the tools is not quite accurate. The language is more aptly compared to the building materials used instead of the tools. The tools would include things like the IDE. With this corrected analogy hopefully you can see choice of building material is very important. Using 2x4's vs 2x6's will have a big impact on insulation properties (thicker wall cavities) and cost. Is this important? Absolutely.

Unfortunately, too many scripting language fans make the same flawed analogy in order to justify the use of their pet language instead of a higher performance language like C++.

I'm sorry but slower is slower and speed is important.

posted on Sunday, November 19, 2006 at 10:31 AM by Chris


bubu

posted on Tuesday, November 28, 2006 at 11:37 AM by John Anderson


Hello everybody,

I am developing a ashnah php interpreter with built in xml, database, regular expression support.
ashnah server has all like xampp package but altogther it is one megabyte size and all in one server.
you are welcome to my sitewww.ashnah.com and make comments.

posted on Saturday, January 06, 2007 at 9:20 PM by ashraf


Obfuscators for Python code are now available. For example, there is one at http://pawsense.com/python..obfuscator/
which you don't even have to install to use for free.

After you obfuscate your Python code you can build it into an .EXE, as prior commentors mentioned. If you don't want to distribute it as an .EXE, you can distribute it as (a) byte-compiled .PYC file(s) which only require a compatible Python interpreter (which again is free, and not difficult to distribute.)

The obfuscation options for Python are growing.

posted on Sunday, January 14, 2007 at 9:56 AM by Chris


Why choose? Pick both! Don't you know there's Ironpython out there? This is python fpor the .NET framework. Yoiu can use python wherever you want and, if you need better performance in some small compute-intensive parts, just write them in c# (or VB whatever .NET language for thet matter). Soon you'll be able to write (Iron)python with Visual Studio, with forms designer included, so there's really no reason to choose one or the other. Using both in the same project is extremely easy.

posted on Tuesday, February 13, 2007 at 1:11 PM by Luis


One of the great things about I like about python is being able to test code with the interpreter interactively, but recently i found theres a C# Interpreter project called CSI at
-
http://www.codeproject.com/csharp/csi.asp
-
that I've just noticed while browsing the net, anyways IMHO I think it would be nice if C# could implement an interpreter officially that would help testing out code faster.

posted on Sunday, March 04, 2007 at 3:30 AM by Jason


For successful startups being acquired, you can't get a better example than YouTube, and YouTube is almost entirely written in Python: http://mail.python.org/pipermail/python-dev/2006-December/070323.html

posted on Tuesday, April 24, 2007 at 4:24 PM by Rick Copeland


<p> This is a very informative article. I appreciate all the insights provided by this forum. To respond to the request for information on companies using Python, I found <a href = "http://www.eweek.com/article2/0,1895,2100639,00.asp"> this article from eWeek that could be the interest of some of you. </p> <p> As another example of successful implementation of enterprise level application using Python, ITA, a Cambridge, Mass., provider of airline IT software and services, has adopted Python to build key components of its airline reservation system that is used by companies like Air Canada, Alaska Airlines, Alitalia, Continental Airlines, US Airways, Star Alliance, Galileo International, Kayak, Orbitz and others. ITA has about 200,000 lines of Python code in use in its production software. According Dan Kelley, Director of Application Integration, "(Python) it's definitely an enterprise-caliber language in terms of stability, scalability [and] the ability to have a large number of people work together on a project." Kelley also said [Python is] definitely viewed internally here by some of the best computer scientists in the world, people from MIT's AI [artificial intelligence] and CS [computer science] labs, as enterprise worthy,". </P> <p> P.S. Not only doesGoogle use Python heavily along with C++ and Java, it also hires the creator of Python as full time employee spending 50% his time on Python. This shows the commitment of Google to Python. </p>

posted on Saturday, August 25, 2007 at 11:47 PM by StumbleOnThis


1. Open Source Is Good
--In addition, ever tried to get a bugfix on a closed source library where you're not paying oodles per year? I thought so. It's well nigh impossible. Batteries included mean every library under the sun is included in python or freely available, and usually actively maintained (something a lot of the available C++ libraries are missing).
2. Dynamic vs. Static Languages
--Dynamism is a very powerful tool. Additions such as pychecker give you all the advantages of the statically typed language, with few of the failings. It also makes your programs shorter. And as studies everywhere show, total lines of code is *highly* correlated with number of errors in the program, across languages. The more terse and powerful language will have less errors for the same functionality.
3. The Cost Of Compiling
- The compile step really hurts flow when you start getting build steps in there that are minutes long. Python *IS* compiled. Its the .pyc files. You just don't have to specifically call the compiler. running python is like pushing F5 in Visual Studio. It compiles, then runs if it successfully compiles. Adding in pychecker gives you almost all the static type checking that languages such as C/C++ get, and you get none of the casting errors of those languages.
4. Building Binaries
--Ship .pyc files. Build monolithic EXE's using something like cx_freeze or py2exe. Use one of the various obfuscators before compiling. You'll be just as secure as the C# code. You don't have to ship a single .py file. Email me if you need help understanding this approach
5. Performance
--Performance wise, I'd say python is actually a beast compared to C#. Here is a test of that: I want you to try to connect up some custom unmanaged C/C++ code to a C# program. Now connect up the same code (either writing the glue code yourself, or SWIG). Which was faster? Oh yeah, the python process was. Which runs faster?, they're about the same. Python's great profiling capabilities allow you to quickly and easily add a C/C++ module in and call into it. You just take that one part of your program that's slow, and ba da bing, your entire app is fast. (I'm actually a C/C++ programmer originally....python is just such a better object system, it ends up being the high level code whenever I'm writing apps these days, with specific parts that are slow redone in C/C++ if needed).
6. Does Mainstream = Mediocrity?
-- People who are highly proficient at technical tasks continually refine themselves with activities designed to sharpen the saw. The more training activities they do makes them better. That's why you buy the python programmer over the C# programmer: He's much much more likely to train himself on new things (for free), as they are so much more available and easy to use in outside projects. There are *plenty* of C# outside projects there, but it currently doesn't have near the percentage adoption as python does in sheer numbers of outside projects (remember, python is used for system maintenance as well as application development).
The biggest issue here for me is that *you get too many applicants for a C# listing*. The search cost alone through those applicants is astounding. There probably are some good people in there, but the 100 resumes you get from a python listing are a lot easier to reasonably evaluate than the 1000 resumes you get from a C# search.

7. Programmer Productivity
--Libraries are the only code-reuse system shown to work over any length of time. Python is the *bees knees* at library development. It has a self documenting format that is 1/5th as much typing as the javadoc style stuff C# requires (or javadoc itself), therefore much more likely to be used. The REPL allows you to interrogate the classes and functions directly, leaving you no need to actually have the documentation separate from the code at all.
Having worked on both large scale .Net/VC6/Python and C/C++ Unix programs, the large scale python programs are the most maintainable by far. One of the reasons why is that there is *no explicit typing* to cause type mismatch. Adapting between types (or design meetings to deal with that) is a huge source of issues with languages such as C#. You only have to satisfy polymorphism interface requirements, (which you can validate with pychecker) with python, which means you have very flexible api's which are hard to screw up. Again, the REPL is essential here as well, as it allows you to play with other people's code to see if changes are going to break things, compared to C#, where you're going to spend awhile just getting things to compile after a merge before you can even begin to understand if you broke things.
Unit test are easier to write in python (it's the dynamism again), but C# has some nice suites as well.
8. Popularity and Precedence
-- Those languages were simply mature earlier than python. For instance, python web frame works only completely matured in the last 12-18 months. Beforehand everything was ghettoized. Some of them were quite functional (Zope, Django, Turbogears), but are only now working together. Rails is *still* ghettoized.
In addition, several companies *have* used python a lot/exclusively: eShop, Collabnet, Google (they have SWIG bindings on many if not all of their C++ projects), RackSpace, Siena, ILM (aka Industrial Light and Magic, the people who did special effects for Star Wars...) and more.
9. Valuation Impact
C# *sharply* penalizes you for companies that work on unix based servers. Mono doesn't really work that well, as its hard to install on some platforms, and not everything is supported. So you're screwing yourself over as C# isn't cross platform. While there are certainly libraries of python that aren't cross platform, the VAST majority of it is.
Secondly, python can be embedded in many many languages, and also can run *in* the JVM (Jython). It is by far more interoperable. Once/if IronPython becomes more of a real .Net language, python will even be as integrated as C# there.

posted on Monday, January 14, 2008 at 12:13 PM by Michael Langford


A couple of start-ups that have used Python: 
 
- Reddit 
 
- Justin.tv

posted on Friday, December 19, 2008 at 9:10 PM by Asim Jalis


Comments have been closed for this article.