tags:

views:

1616

answers:

27

I am part of a small (read: two programmer) startup, and we are about to start developing a large (we estimate it will be about a year before customers will see anything) web application… And it's come time to pick a language.

Most of the experience I have is with Python, most of my co-worker's experience is in Java and C++, but they would like to learn Python.

But, if that was all there was to it, I wouldn't be posting here :)

My boss is worried that, if we commit to developing in Python, we will be increasing the risk that it will be hard to find new programmers or replace us if we get hit by a bus.

I have opinions on this matter, but I don't have any experience to back them up... So I'd like to know:

  • Are his concerns valid?
  • Do you have evidence that it's hard/easy to bring a new programmer on board if they don't have experience with the language/framework you're using?
  • Have you been in a similar situation, and have some wisdom you could share?

Thanks!

Edits

  • Thanks to dmckee for pointing out a similar question, http://stackoverflow.com/questions/954164/choosing-between-java-and-python
  • It would be easier for my current co-worker to learn Python than my replacement, because my current co-worker will have me sitting next to her (not to make myself out to be anything particularly special – but it's easier to learn something if you've got a teacher with experience)
  • Some have suggested that my boss is asking a silly question… But the reason I'm asking here is that I've got a lot of respect for him and his business sense (something I, as a programmer, have less of), so I want to take his concerns seriously and give him a good (read: "reliable and devoid of superstition") answer.
  • I don't want to suggest that we'd want to hire the next idiot Java developer… But I believe that there are more "good" (read: "maybe not superstar, but solid and competent") Java programmers in the world than there are Python programmers.
  • A few people have suggested that statically typed languages are easier to maintain. I'm willing to believe that, but only if someone can point me to evidence which supports it (I have maintained a large (25k LOC) Python application, and I don't think my task would have been significantly simpler had it been statically typed)

Accepted

Thanks, everyone, for your responses – they are much appreciated.

After reading through all the answers and linked articles, I have come to these conclusions:

  • When dealing with an established language, the most important factor should be experience (as learning a new toolkit will cost a lot of time, regardless of the language).
  • Without exception, everyone has said that any competent programmer can pick up Python (or any other sane language) in relatively short order, so we need not worry too much about being hit by a bus.
  • Assuming equal experience in Java and Python, Python seems to be the favorite choice for all the reasons you would expect: time to market, average programmer quality and syntactic clarity/expressiveness.
  • Some good arguments have also been made for Java, in that it's got more "stuff", especially enterprise "stuff", available (Python people: if you can't admit this, you're in denial), there are more experienced (and competent) Java programmers and Java can be faster.
  • Static typing, however, is not a good reason to consider either language, as for every person who says they think it's helpful there is another (or even two others) saying you're fine without it.
  • Python (or any language which can run on the JVM) is a good choice, because it leaves the possibility open of interacting with Java code down the road.

Again, thanks for the responses – they are very much appreciated.

+6  A: 

Obligatory TIOBE index reference. Python is definitely a safe bet.

Daniel Straight
Isn't TIOBE's "lines of code" metric a little misleading, particularly for "verbose" languages like Java? The fact I might be able to accomplish in two lines of (sanely-formatted) Python what takes ten lines of (sanely-formatted) Java does **not** indicate that Java is five times as popular!
Ben Blank
Um... "Observe that the TIOBE index is not about the best programming language *or the language in which most lines of code have been written*."
Daniel Straight
Thanks – I had looked at the TIOBE index, and it helped reassured me that Python was not, in any sense, a niche language.
David Wolever
+15  A: 

Python, of course. Get your boss to read those two great Paul Graham essays Beating the Averages and The Python Paradox.

fortran
+3  A: 

I would go with Java. It's probably worth the initial inconveniences in the long run. With a broader set of tools and available labor, it's probably the safer bet here.

Bryan Menard
Which tools does Python lack for web applications, for example?
Bastien Léonard
I wasn't speaking for web applications specifically; nor do I pretend to be a Python reference. But, more generally speaking, when tackling a common problem chances are it has been done in Java (and is often open source); I'm not so sure the "toolbox" is as full for Python.
Bryan Menard
An established IDE. An established ORM (like hibernate). etc etc.
Jaimal Chohan
@Jaimal Chohan: Established IDE == Komodo. Established ORM == SQL Alchemy. Not sure what you're saying.
S.Lott
For example, Java has 'ArrayList', 'LinkedList', 'Vector'; Python just has list(). Hope your Java developers pick the right one.
Casey
Java has established solutions that are well-tested, but clunky. Python has elegant libraries that J. Random Hacker wrote in a few days a few months ago, and hasn't touched since. Which one you choose depends on what you value.
Xiong Chiamiov
Does Python have anything like Jbpm and Quartz
Edwards
Java has several tools that make it one of the best choices for server side development; many are well-tested and definitely not clunky. Among them I include:* solid and featureful application servers, both free and commercial* plenty of well established frameworks for web mvc, ioc, persistence, ORM, templating, logging, messaging, job scheduling, transaction management and so on* tools for runtime profiling and monitoring* testing tools specifically aimed at web applications* extremely optimized and performant runtime
Massimiliano Fliri
+2  A: 

I've been there before. I had a simple web app to write once upon a time. The choice was between PHP and Python. I had started writing it using the turbogears framework in python. It was fun, learning python was a lot of fun, its a neat language.

Unfortunately, my boss thought the same thing as yours. What happens if I get lost in the amazon and no one is here to maintain it? Where do we get a python programmer? My response would be to let anyone tackle it, they'll probably have as much fun to learn the language as I had. But that did not satisfy him much...so it ended up getting redone in PHP instead. We have a whole team of PHP developers already on staff, so finding someone to pick up where we left off wouldn't be that big of a deal. Of course later on, we end up getting someone to pick my work up that didn't know python or php, so in hindsight it didn't really matter what language i had picked.

As far as the choice between java and python...i'd pick python.

KFro
+6  A: 

My advice: Don't do a large application in a dynamic language. Maintaining and refactoring when the line count goes to 10k and above is not fun. The compiler is your friend here.

erikkallen
I use both Python and C++ extensively, and which language I pick depends on the type of application I'm writing, but the expected line count doesn't enter into it. I can't think of any rationale to back this recommendation, even in devil's-advocate mode.
Glenn Maynard
I think it is still better to refactor a 10k lines of Python than 100k lines of Java...
fortran
Just a comment. Not I don't necessarily disagree with what you say. But Facebook was written in a dynamic language...php...massive massive application. Also, I have been on way too many staticly typed applications that are very very hard to maintain and refactor, so just because a language is static, doesn't mean its necessarily easy to maintain. An application written in a dynamic language MUST have unit tests. Period.
Amir
I also don't know if it's true, personally, but erikkallen does have the conventional wisdom on his side.
DigitalRoss
Line count should not be a reason for/against a langauge. And there are always producitivyt tools to do most of you refactoring for you.
Jaimal Chohan
The compiler is never your friend. it's just your temporary ally. Allies can become enemies. Friends do not.
Stefano Borini
I disagree on your point, dynamic languages, like any language are only hard to refactor when you write bad code. I have written both PHP and Python applications that are well over 10k LOC and I have never had any problems refactoring. It comes down to how you code, not the language.
MitMaro
Call me crazy, but, 10k lines is easily achieved and surpassed in most well built apps
Jeff
This really all depends on how the code is architected implemented.
Shane C. Mason
I've heard this argument before… But I'm in no position to make a judgement call on it because I've never maintained a large application written in a statically typed language. Could you point me towards some evidence in favor of it?
David Wolever
@Jaimal: Why's that? Lots of studies have shown that there is a direct correlation between lines of code and number of bugs, regardless of the language that code was written in… So it follows that you can reduce the number of bugs in a program by reducing the number of lines. And I would rather a language which produces a program with fewer bugs, wouldn't you?
David Wolever
Youtube is in Python. 10k lines? You've **GOTTA** be kidding. Learn to program (AND to unit-test;-).
Alex Martelli
@Alex: I have never said that 10k lines is a lot. Only that it's not fun to refactor a project of that size or above without the help of static typing. @Everyone: I know perfectly well that it's POSSIBLE to create complex application in dynamic language, but I PREFER to do it in static ones.
erikkallen
You need good tools to maintain any large application. Java tools tend to have good refactoring support which is crucial - does Python tools? (not facetious, but curious)
Thorbjørn Ravn Andersen
I disagree with you. We have a 50K+ lines of code in a PHP application running on our intranet and we have no problem refactoring it´s modules, even the majors.
Luiz Damim
+4  A: 
  1. Yes, his concerns are valid, but he has no cause for concern as there are plenty of Python developers around

  2. If you don't have much experience of cooking, is it going to hard for you to learn a new recipe? Yes. Would you give up and not bother at all? No. Same goes for coding, it'll be a learning curve for them, but you'll always find somebody to do the work.

  3. Your boss pays your wages. He sells the software you code. If it takes you longer to learn and code in Python, which is inevitably will, given the fact that there is a learning curve, then your boss sells less, he makes less money, your wages don't increase as much as they could do. Would you rather get paid less and learn a new language, or get paid more and learn a new language in your own time?

Jaimal Chohan
The obvious response to #3: the cost of learning Python (which is very small; I was writing productive code in just a couple days) will be offset by the long-term benefits of writing in Python rather than Java. (Of course, that assertion is based on a language debate which would be pointless to go into here.)
Glenn Maynard
@Glenn, I don't disagree, however, liken it to going in for surgery. Would you raherhave a 10+ years experienced surgeon working on you, or somebody fresh out of med school? The business you work for is the person under the scalpel. If you introduce a new tool, it might work better, or it might blow up and spew blood and guts all over the place, Its a risk, and when you can minimise risk its a good idea todo so. Espcially in a small comapny where you might not have a cash reserve to fall back on.
Jaimal Chohan
The risk ("chance of net benefit vs. loss") of learning Python is small. The more realistic risks are related to the tools (libraries, web infrastructure, etc.) you're using, and those risks exist in all languages. I'm not a Java programmer, so I can't offer any real comparisons here.
Glenn Maynard
@Jaimal Chohan: Bad analogy. Programming isn't like medicine. The risks are not comparable at all. Programming is *always* a learning exercise. If you weren't learning something new about language, environment or application, you'd be downloading. The only *no risk* software is a download. *Everything* else requires taking a risk on language, other technology or application requirements.
S.Lott
Back in university, a 3rd year course was developed in Python for Assignment 1. We had 2 weeks to do it and it involved some regular and GUI programming in pure Python. It was my first touch with the language and I learnt it fast. The other students in the class excel at it with even more nifty features features to the assignment. If a bunch of 3rd year CS students with little to no experience in Python who are juggling 5 courses per term can do it, then it will be a piece of cake for an experienced 9 - 5 developer.
Thierry Lam
We'll have to agree to disagree then. And the risks are comparable from a business perspective. If you do it differently, and it takes longer than I expcted or wanted, I loose money and opportunity by having a late to makret product. You're being increaibly naive if you think its not a risk. You're also being naive if you think that you can fully understand any langauge 'quickly' (understand means not just how to knock out code, but add performace tweaks, work around language difficiences, understand the performace and security impact of using any libraries etc)
Jaimal Chohan
@Jaimal Chohan: Those risks are NOT the same as the medical risks. They're not even close. Those are ordinary business risks. Late to market (from using a language like Java) is a risk, but not the same as someone dying. It's a known and small risk. ALL software development involves significant risks because ALL software development involves LEARNING. The only risk-free software is software you download. EVERYTHING else involves risks.
S.Lott
@S.Lott; I didn't say that carry on using Java would negate risk, I said "and when you can minimise risk its a good idea todo so. ". Staying with Java would minimise risk.
Jaimal Chohan
A: 

I think his concerns are valid considering that c++ and java developers can be found anywhere. Take a look at google they were forced to hire the creator of python. If I were your boss I would do the same thing. But, on the second note python is becoming more popular everyday and more and more websites out there are being developed in python.

Brian Agnew
@Brian did you do that same query for java language? It's going down faster than python.
Dustin
Hrm… Well, I would suggest that we offer Guido a job, but I don't suspect he'd be interested…
David Wolever
Google wasn't forced to hire the creator of Python. They hired him because he's (obviously) one of the best if not *the* best Python developers in the world. That's like saying that there are so few Java programmers out there that Sun was forced to hire James Gosling.
Imagist
@Dustin - I was responding to a comment re. popularity of Python. No assertion was made for Java. But it's interesting that it is going down, and I hadn't realised that.
Brian Agnew
Yes, and it's so hard to find Linux programmers that the Linux Foundation was forced to hire Linus Torvalds. It's pretty lucky he can find a job in this market.
Casey
+5  A: 

In my opinion, a "good" developer will be able to pick up any language... part of being a good developer is to know how to learn a new language.

Choosing between web languages depends entirely on the problem at hand. It's important to understand what supporting systems you application will run on. If you are going to have a MSFT Sql 2008 database on Windows server 2008, then you may want to consider asp.net and c#. If you are going to be running on linux, MYSQL and apache, another language may be a better fit. You'll find very large websites using any number of web languages:

MySpace: asp.net
FaceBook: php
drop.io: ruby

With python, you'll be working with a dynamic language which makes it absolutely imperative that you unit test. Java is statically typed and having the complier is a nice safety net to have in place. It's important to NOT pick Java just because the majority of your developers are comfortable developing in it. Pick the language that is best for your problem set :-).

My boss is worried that, if we commit to developing in Python, we will be increasing the risk that it will be hard to find new programmers or replace us if we get hit by a bus.

A good litmus test would be to go to monster.com and find all resumes that have [enter language here] on their resume. It may give you a better handle on the risk. But again. A good developer will be able to pick up a new language fairly easily.

Amir
Another way of looking at it: it's easier to learn a language than to become competent at a large codebase. A competent programmer can pick up any sanely-designed language and be writing useful code in a couple days. Learning your way around a large production application usually takes much longer.
Glenn Maynard
Do note that having a compiler doesn't mean you *shouldn't* unit test. I would almost call this a downside of having a compiler, as it tends to move you a bit towards that mindset.
Dustin
Thanks for the monster.com suggestion – I'm feeling kind of stupid for neglecting to think about that.
David Wolever
@Glenn: that's a good point, that the time it takes to learn a language is tiny in proportion to the time it takes to learn a large code base.
David Wolever
You used drop.io as the ruby example? Yellowpages.com, whitepages.com, GitHub and Hulu all run on Rails, I believe, and Twitter of course is a Rails/Scala mix.
Xiong Chiamiov
+16  A: 

Fear and Loathing and Language Politics


If your boss wants to hire programmers that can't learn a new language then that's the problem.

But getting a smarter boss is probably not on the table, so how about this:

  1. Agitate for Scala and Lift or Ruby on Rails.
  2. The boss complains.
  3. Agree with the boss that it's a bad idea. Try to keep a straight face.
  4. Compromise on Python.

:-)

There is an argument for Java, btw, but it's not: "I want to use the most popular language because that's what the grads know." Yes, a less popular language has fewer job seekers, but also fewer openings, so it all approximately balances out.

But back to the real argument for java...many other answers reference the conventional wisdom that statically typed languages are better for a large codebase. It's probably quite true, but startups are risky. I think becoming successful would trump any hypothetical what do we do down the road when we are the-next-netscape worry. Gee, in that case you have already won, so go find some great recruit, not just the next warm body that "knows" java.

And I don't think Twitter is going to have the slightest problem finding a Scala developer. In fact, I don't think anyone is having trouble finding developers.

DigitalRoss
Thanks for the comment – see the edits to my post for a bit more explanation.
David Wolever
I'm sure the boss isn't a PHB and you wouldn't just hire the next guy who could spell java; I don't think you are stupid, but I do need to make the answer entertaining enough for people to slog all the way through. :-) Also, I really do have a serious objection to this concept that's welded into every bosses brain, that they must hire a developer with "3-5 years experience" in some specific language. No! No! You want the *smartest* developer. In a week or two he will have language experience, but the other guy will still be stupid.
DigitalRoss
+1 for compromise:)
Thorbjørn Ravn Andersen
haha – very true, that entertaining answers are the ones that get the upvotes :)
David Wolever
+1  A: 

Before this starts the whole "my language is better than your language" debate, let me state up front - I currently write in Java. I have also written in C, C++, Perl, Pascal and a little in PhP (and am currently learning Objective C). If it was my decision, I would choose Java. The reasons are:

1) The best IDEs for Java are free (Netbeans and Eclipse) 2) Being typesafe on large projects is always a plus and a benefit - let the compiler do as much of the work for you as it can 3) In my experience, doing large projects in type-agnostic or soft-typed languages can be much harder than not, maintenance included (and according to Martin Fowler, mainenance is about 90% of the cost of software). 4) The libraries for Java are very rich, and the domain space is very well understood.

Now, do some of these apply to Python? Most likely. I cannot say personally. However, I do like Java as a language, and well written Java server code will perform as well or better than well written server code in another language - I have proven it several times at my current employment.

If the developers believe that the best technology is Python, then you should use Python. However, that is a technology decision that should be made based on available resources, what technology is going to be used to do what, etc.

And of course, the best advice I can give to anyone is to write good code no matter what language you end up using. Some languages are more forgiving of bad code than others, however if you and your team are disciplined about best practices and the like then the language will matter less than the eventual code base that you end up with.

aperkins
You, among other people, have suggested that Java is easier to maintain than Python… Can you point to any evidence to support that?
David Wolever
My evidence comes from personal experience. I have worked in softly typed, scripting style languages in the past (Python being one of these) and watched large projects expand beyond our ability to keep track of them. The majority of this was related to trying to handle a large project without a powerful IDE. I do know that Eclipse, for Java, is a very powerful IDE that works well once you get used to it (there is an adjustment period). However, if there is a powerful IDE for python that lets you follow references and the like, then I would say it is possible it could be good.
aperkins
Eclipse with PyDev (both free) makes a great editing combination - see http://stackoverflow.com/questions/81584/what-ide-to-use-for-python
Tom Leys
@aperkins - The combination I mentioned has intellisense, Debugging in the IDE and following references.
Tom Leys
Then, like many of the posters here, I would not be worried about either environment. At my current workplace, we do most development (except java) in VI - which to me sounds like as much fun as a root canal (having worked that way through most of my undergrad and grad school). Hence, my reticence at recommending it.
aperkins
My experience is that most Pythonistas use vim or emacs with ipython. It must be something about scripting languages and their association with quick-and-dirty little sysadmin tasks, or something.
Xiong Chiamiov
Well, I use Vim, but that's mostly because I've spent the last six years learning how to use it, so there isn't much you can do in Eclipse that I can't do with Vim (and there are some things I can do that you can't).I've tried learning a modern IDE, and I use NetBeans (with jVi) when I'm coding Java… But the learning curve just isn't worth it for me.
David Wolever
@Xiong That has been my experience as well.@David I have used Vim, Emacs(both console and windowed), Visual Studio (6.0 through 2005), vi, and Eclipse. Of them all, I prefer IDEs for large projects. I get code completion, unit testing integration, maven integration, console integration, intellisense, code following (going to a source from a method call), among other things. I have never seen Vim be able to do all of these things, although I am not an expert on it - I have used it sparingly in the past. That is what an IDE gives you, and for large projects that is invaluable.
aperkins
+8  A: 

Why not use take advantage of both platforms by using Jython ?

Write your lower-level entities and core objects in Java, and tie together in an agile, flexible fashion using Jython. That way you can easily leverage off the benefits of Java (the language) - static typing, associated unit test frameworks etc.

But using Jython to tie everything together means you can very quickly reassemble your project using the core objects but change the dynamics of it.

Brian Agnew
I had considered that, and may look into it more if we come across a sound technical reason to write code in Java. Thanks for confirming that I'm not crazy.
David Wolever
This type of mixing is plausible thanks to the wide adoption of the JVM. You can extend this notion even further and mix .Net CLR with JVM languages via IKVM. The commercial acceptance of virtual machines has opened the door for many types of inter-op that has historically been difficult. Long live the CLR and the JVM!
Todd Stout
Even if you end up doing everything in Java, I've found the Jython shell to be really useful for doing quick "what happens if I do *this*?" queries, like I tend to do all the time in Python.
Xiong Chiamiov
The JVM has a better runtime system than the various C engines, notably garbage collection. That usually pays off...
Thorbjørn Ravn Andersen
@Xiong: dang, that's a great idea. I usually end up using DrJava when I want to do "what ifs" with Java… And that's… Less than entirely ideal.
David Wolever
+2  A: 

IMHO, anyone suggesting you don't need unit tests in a static typed language (i.e. Java) is highly suspect.

Casey
True, but you get to make a pragmatic choice of the desired level of coverage, instead of being stuck at having to get 95%+ to get your code to even run for long enough to give a demo.
soru
@soru that's still a choice you can make. Code that is syntactically correct but semantically gibberish will still arise in java code. I rarely write tests without uncovering bugs.
Dustin
You should still have them, but you don't need as many. Never forget that the question is never "is it better to have all this production code and all these tests that just the production code", but "is it better to have less production code but a lot of tests than to have all this production code?". And, as always with non-trivial non-mathematical questions, the answer is "it depends."
erikkallen
+3  A: 

Why not use both? This maybe silly but alot of companies already did this.

  1. Develop the backend (db related and service related) with Java
  2. Developer the front-end (customer facing) with Python

EDIT

The rationale behind this is:

You want to pick up the statically type of Java. You want to make sure what goes in to the backend. You (usually) don't want a dynamically typed language for your service/back-end (especially if it is critical) because you don't want something creeps in your back-end without knowing what type it is. You can ensure what goes in to your backend/web service method beforehand with your unit testing. Another reason is normally backend does not change alot. You want the backend to be stable, robust and stay for a long period of time. Companies (usually) invest alot on the backend, because that is where the business logic lies, that's the part that produce cha-ching.

On the other hand you want something that enables you to change quickly on the front end. Because front-end is the layer that has human interaction. From my experience, front-end technology tends to change really quickly, human interaction requirements changed very fast and using Java for the front-end would be a complete waste (waste of time and money). Compare how productive it is to build a front end with any Java framework and dynamically typed language framework (e.g: rails, django, etc). And also another reason is that most of the time the testing for front-end is functionality testing because you want human interaction and feedback for the front-end. That's why I reckon dynamic language is a perfect fit for this.

Twitter is one example that took this approach. They develop the backend using Scala while the front-end is still using Ruby on Rails. Facebook is also another example that uses PHP on the front end and their data storage (Cassandra) is built using Java.

So I still reckon you are picking up the best of two worlds with this approach.

jpartogi
I think that using *both* languages is picking the worst of all worlds; giving you the cons of both languages combined. I think this approach only makes sense if you have independent teams working on both parts, because you can let each team decide for themselves which language suits their task. This is probably not the case in a team of two people.
Glenn Maynard
Thanks – that's a good suggestion and I'll keep it in mind, as it's possible that we'll be forced to code some parts in Java for technical reasons.
David Wolever
@Glenn: I'd agree it might not be the best initial game plan… But it's certainly an idea worth considering.
David Wolever
Twitter developed the backend using Ruby, and only when they were sure what sort of system they needed did they move to Scala. A startup (almost by definition) is not yet sure exactly what they need on the backend and so should stay as flexible as possible.
Tom Leys
@Tom: If you can learn from Twitter's experience and can do it from the beginning, why do we have to shy away from it?
jpartogi
@jpatogi: because I'll bet that Twitter /didn't/ know what they were doing from the beginning, so they got to work in an agile environment while they were learning.
David Wolever
+7  A: 

Time to market.

One of the main reasons why I propose python as a solution is the short time to market needed to produce an application. Java is so painful to develop with. Yes, you end up having a lot of ready to use jars, but in the end, the code you write is just gluing between these libraries, gluing that is painful with its static nature. You end up using all the Design pattern book not to write logic code, but just to fight against the static nature of the language.

On the other hand, python is faster. You can develop a working prototype in no time, and add on that prototype again in no time. The code you write is logic, not scaffold, and you don't need a World War II german tank parked on your RAM to ease all the useless typing you would have to do to do the most trivial things. Yes I am talking about Eclipse.

Java, on the other hand, probably scales better on a large number of developers, but my experience in a company with 2 teams of 6 developers each and around 100k LOC was very positive with python.

Stefano Borini
But in the OP's situation, will producing an app in Python be faster even when you have 2 developers who don't know Python?
jimyi
+1: A powerful IDE doesn't fix a verbose language.
S.Lott
@jimyi: Yes. The first week or two, Python will be slower. The second week or two it will be a dead heat. After that, Python will inexorably pull into the lead as more productive. It doesn't take long to learn the language. It does take a few weeks to learn how to use Google to learn the library.
S.Lott
Thanks for sharing your experience, and you make a good point about time-to-market.
David Wolever
Time-to-market is definitely worth considering. I had this debate frequently with my teacher in a Java web design class I just took. "I could do this in 1/3 the code and time, with less bugs!" I'd say. "But you can't use a scripting language in any *serious* application", he'd say. "But I can launch before you, get the market, and then have the budget to buy more servers for my cgi processes while you're still cursing at hibernate", says I. And /that/, I think, is important; it's not who's the best, but who launches first that succeeds, as long as it's not terrible.
Xiong Chiamiov
@Xiong: Most videogames are programmed via scripting languages on top of a very fast C engine. I am pretty sure your Java teacher will acknowledge that an industry moving millions and millions of dollars every year, with a "once on the dvd, no turning back" policy, it's pretty damn serious.
Stefano Borini
+1  A: 

...the risk that it will be hard to find new programmers or replace us...

Hard to find programmers? In this market?

I think you have your answer right there.

MGOwen
+1  A: 

I doubt that it will be much harder to find qualified Python developers. As mentioned good programmers can pick up other languages quickly, so I don't think replacements will be hard to find if you go with Python. That said, if I were you, I would show your boss why you think Python is the better choice over Java. Give them something that outweighs their smaller job pool argument.

Philip T.
+11  A: 

Old (2006), but good, from Joel:

"...the bottom line is that there are three and a half platforms (C#, Java, PHP, and a half Python) that are all equally likely to make you successful, an infinity of platforms where you're pretty much guaranteed to fail spectacularly when it's too late to change anything (Lisp, ISAPI DLLs written in C, Perl), and a handful of platforms where The Jury Is Not In, So Why Take The Risk When Your Job Is On The Line? (Ruby on Rails)."

and

"So for now, my advice is this: don't start a new project without at least one architect with several years of solid experience in the language, classes, APIs, and platforms you're building on. If you have a choice of platforms, use the one your team has the most skills with, even if it's not the trendiest or nominally the most productive."

Anyone who can program can get up to speed on a well-written code-base in any sane language. It's designing and creating that code-base that is the trick.

Just make sure you have an accurate self-assessment of your skills if you think you are up to the job of doing that for a large system.

soru
+1 for in-house experience!
Thorbjørn Ravn Andersen
Good link – thanks.
David Wolever
I've accepted this answer because it says, very nicely, what (after reading all the responses and articles) I now believe is key: picking the tool chain with which you've got the most experience.
David Wolever
ISAPI DLLs aren't that bad.
theycallmemorty
+1  A: 

I think everyone here has made some good points about why either choice could be a good idea.

At some point you and your boss are going to have to choose.

I suspect your boss is challenging you with the assertion of increased risk in order to have you present a compelling case for the choice.

A good way to respond to this challenge is to present an objective summary of the pro's and con's of either choice. Relate the pro's and con's to your business. Remember, compelling points that just don't relate to what you're doing are useless!

It's worth being honest about the pitfalls of either choice.

It's important to understand and appreciate your bosses concerns and openly address them, even should they not support your preferred option.

A little information on the job market trends for language skills could be worth including to offset the hit by a bus concern. In fact, demonstrating a commitment to relevant documentation is a great way of addressing that too, regardless of language choice.

I'd even include a few close but no cigar options that you've dismissed, with a brief explanation as to why, before doing the more in-depth analysis on these final two contenders.

Good luck, I hope we hear more in a year's time!

Don Vince
Thanks for the answer, Don.
David Wolever
+3  A: 

It's not learning the language per se that will hurt you. Anyone can learn Java or Python quickly. It's all the little bitty decisions about architecture. If you use Java, will you use Spring, Struts, Seam, or something else? Why? Will you use an ORM? Why, and how will it hook in to the layers above and below it. With Python, will you use Django, TurboGears, Zope?

In your first version, you'll probably settle on what you can get working in a reasonable amount of time. Odds are that there could be a far better way to do something but you just don't know it because you're not experienced enough in it yet. After a year you'll probably look back and say, "Holy smokes! Why did I do it that way?"

You should consider it a head start to use the language you're more familiar with, because you've already made all the silly little mistakes. If both of your levels of experience are the same, then you're probably fine either way.

Finding new hires either way should be no problem. At my current place, only 10% of our new hires have had any experience in our language, but the architecture was designed by a very experinced person. The new hires have been able to pick up things quickly.

As long as you, the more experienced, set the architecture you will be fine. Even within a couple of months of you beginning to code, a new hire should be able to pick up what you've laid down and run with it.

Shin
Cool – thanks for your answer. It's good to have more people confirm that it's OK if new hires don't know the language.
David Wolever
+5  A: 

I would go for Java -- better performance, better stability.

I know the whole Spring/Hibernate/J2EE is painful when you want to do something simple, but, as you satisfy more complex requirements you begin to realise that they thought of everything except ease of development.

My signal personal experiece might be what you could call the J2EE paradox. I had a pretty complex application written mostly in php with some vanilla Java backend. We needed to ship this out to other parts of the company but we didnt want them messing with the source code, or, get into a fight with thier architecture people about implementing a php/apache system in a universe of J2EE/Websphere so the decision was mad eto refactor the php front end to J2EE. This took just over a month (there is after all no better spec than a working piece of code!) the real surprise was the Java code base (by line count) was smaller than the php code base (including spring/hibernate config files as code). This did not really make sense until we looked more closly at the code. Java exception handling accounted for about 20% of the Java code. But most of the mvc and sql handling just disappeared or was done by a single line in the .xml files.

Even the exception handling bloat turned out to be a blessing. We got proper exception messages which identified the line of code and the problem. With php we either got "variable xxx not set" or nothing on the page. So debugging in the Java code took much less time.

J2EE is just to big a beast for small projects, but its just the job for industrial strength large projects.

((I suspect .NET is actually better but have limited experience of it.))

James Anderson
Stability? What do you mean by "stability"? Can you give specific examples?
S.Lott
Thanks for sharing the experience.
David Wolever
But, yes, can you explain what you mean by "stability"? Are you suggesting that python.exe will crash more frequently than the JVM, or… ?
David Wolever
Python itself is pretty reliable. But a modern J2EE package will seamlessly support a load balanced multi-site architecture which can provide years of uninterupted service. It used to be a joke that the meantime between failure of a Sun/Web[sphere|logic]/Oracle site was longer than the MTB of the business it served. The last J2EE system I worked on is still running even though the business that initiated the project no longer exists.
James Anderson
+1  A: 

I had the same decision.

I chose Python.

Why? The flexibility. Our requirements were -- at best -- murky. Realistically, they were incomplete. If you want to take an extreme position, they were little more than lies told by a vendor to an executive (who'd believe anything.)

The rest of language choice is almost a tie. Specifically, finding skilled people is a wash -- all skills are equally hard to staff. We're a staffing company and it's as hard to find Java people as it is to find Python or Informatica.

Bottom Line: Good people are hard to find, irrespective of skills.

S.Lott
+4  A: 

Are his concerns valid?

They might be in many languages (I'd be especially worried about functional programming languages: intrinsically wonderful but VERY hard to get people with real-life programming experience in, AND a huge hurdle to learn for most experienced programmers). They're not for Python -- any superb programmer can pick it up with incredibly small effort if they want.

Do you have evidence that it's hard/easy to bring a new programmer on board if they don't have experience with the language/framework you're using?

I could quote (but you could not verify;-) several situations of superb programmers being hired, early in Google history, mainly on the basis of their strength in Java and/or C++ -- and who easily picked up Python (Google's key general purpose languages are C++, Java and Python) and in some cases coming to see it as their primary language (though most probably don't go further than my own mantra: Python whenever I can, C++ if I really must -- maybe s/C++/Java/ in some cases;-).

We're not talking about run-of-the-mill programmers, the kind who are terrified of having to learn a second programming language (horrors!-): if that's what your management is daydreaming about -- cookie-cutter mediocre programmers that they can hire by the gross and lay off any time the phase of the moon is wrong -- Python's probably not their best choice (if that's the kind of people they're gonna be hiring, they're not going to make it big with ANY language, but they're likelier to get by with extremely popular languages).

As Paul Graham (whose ideal language is his own dialect of Lisp, NOT Python) points out in an essay that's already been quoted, you're going to get better programmers if you demand Python expertise (or, I would add, Objective C, Ruby, Erlang, Haskell, F#, Scala, O'Caml, Eiffel, APL-2, SML/NJ, Mozart, Boo, Scheme, Alice, LUA, Prolog, ...!-) than if you demand expertise in a "mainstream" language such as Java -- that's simply because the people who don't program because of a raging inner fire, but to put bread on the table, are NOT going to go for "niche" languages, they're gonna stick with the "tried and true" that's going to get them a temp job at burger-flipper hourly rates (which may be more than they deserve given the effectiveness of such programmers -- productivity ratios best:worst of 30:1 or more have been reported in many empirical studies!-).

Any SUPERB programmer is not going to find any difficulty learning Python (though they may not want to work in it if they can make huge incomes working in their chosen favorite language[s], of course;-). MEDIOCRE programmers wouldn't either, alas!-), were they to devote a modicum of effort to it, but apparently (let's hope it stays that way) most haven't, yet, "thanks" to the Python's community lack of interest and/or ability in marketing and evangelism (for a language to become a serious buzzword it needs either a huge marketing spend, like Java got back when Sun Microsystems still had money for that, or a community of enthusiast practitioners some of whom accidentally happens to have real marketing flair, like Ruby got in its time -- and other languages before then [Pascal, say, and C++]).

Have you been in a similar situation, and have some wisdom you could share?

I've often found myself "selling" Python to upper management A LOT back when I was freelancing (mostly based on it, though I could do many technologies, C++ first and foremost, and side issues such as technical management, development methodologies, &c, if the need arose). At that time there was no YouTube to point to, and Google's vast use of Python was hardly known at all (I learned about it only because my publisher, O'Reilly, let me know that the largest private purchaser of my Python books was this "Google" privately held firm.... thanks Tim!-). Nowadays, what with YouTube's reliance of Python being widely known, reddit.com's use of Python to port their originally-LISP code, Google App Engine, etc etc, you've got a ZILLION more useable "reference customers" than I did;-).

I didn't always succeed, I even sold and executed some consultancy contracts based on C++, MFC, win32, etc etc (same [hefty;-)] hourly rate as I charged for Python, but so MANY more billable hours per delivered function point, that I just couldn't resist the monetary allure of such contracts...!-), but, mostly, I did fine. Having experience and credibility in management roles as well as developer ones no doubt helped -- I could and did spin the same kinds of points I'm making here into profit-and-loss and return-on-investment terms.

Wisdom? I guess I should, given my advanced age, but I'm not gonna claim any -- just arrow scars in my back (you can always tell the pioneers by the arrow scars on their back!-) and the smile on my face (hinting at the success that Python brought into my life and the technical vicissitudes of every single company I was ever able to introduce it in;-).

Alex Martelli
Thanks for the wisdom, Alex – it's much appreciated.
David Wolever
+1  A: 

In my experience, Java is good for building cathedrals over the spans of centuries. If you want to be more agile than that consider Python (JPython to get the JVM).

See http://www.paulgraham.com/avg.html describing what made their start-up a success - using Lisp :)

Thorbjørn Ravn Andersen
Although, as Joel points out (http://www.joelonsoftware.com/items/2006/09/01.html), "the only people who followed his advice, reddit.com, pretty quickly found themselves re-writing in Python" :)
David Wolever
+1  A: 

I agree with all the points above. They're all valid.\

The real answer is it depends. I firmly disagree with the argument 'I won't be able to hire.....'. This simply does not pan out to be the case.

A year sound like an awfully long time - particularly if you're not getting any customer feedback in that time - this seems to be a much higher risk than which platform you choose.

In terms of productivity however, I find that a resonable programmer can be productive in Python in about a day. The expression of business scenarios os clearere also, as Python is a much more transparent language than Java - the question becomes 'how can I best express this in Python?', as opposed to 'how can I translate this to Java?'

In any event, the only way you're going to find out is to give it a go. I think you'll be stunned.

Good luck.

Ben

Ben Hughes
+2  A: 

There are plenty of Python programmers out there. Your boss needn't worry about being able to replace you. Furthermore, Python is a very easy language to learn, so even bringing on people with no Python experience shouldn't be a problem; I've taught Python classes and had complete newbies (with very little programming experience, even) writing non-trivial programs after just a day.

I develop in both Java and Python on a daily basis, and I can say without hesitation that I would choose Python for a web application without hesitation.

If your boss is worried, show him some examples of successful Python usage. See this for more examples.

Imagist
The 'successful Python usage.' link doesn't seem to work. any fix?
Liran Orevi
There are three links, and they all work for me. The links should be Google, Youtube, and Reddit. All three sites are well-known for using Python extensively.
Imagist
+1  A: 

One thing. If you take group of Java programmers and Python programmers - percentable, with no offence - the second ones will be more skillfull and smart. But It would be easier to find typical programmers (not genius one) with lower salary for Java, not for python.

bluszcz
+1  A: 

Java.

If I were the customer, I will pick the Java-based product instead of Python-based product. Simply because Java owns a very positive image of being high quality product.

Thanks to Sun's effective marketing strategy :)

janetsmith
Fortunately, though, we're writing a web app, so we'll be the only customer for the foreseeable future… So this isn't a consideration we need to make.
David Wolever