Related Entries

Remove duplicate jars
Simple MongoDB+Java example
Lightweight JSP development environments
jEdit with jGoodies
Jython is great

« One year in Rashtrapati Bhavan
» Googlego!

Java, Python and Russ

Good writeup by Russ on why he decided to go back to Java. Surprisingly, his reasons made me realise why I decided against Java!

Russell Beattie notes his thoughts about Python from a Java fan's perspective and concludes against Python. It is a pretty good read. Good luck Russ.

I've slightly different views on this.

Russ has concerns about varying quality of documentation. I agree with him. Nevertheless, Python's core documentation is the best I've seen for any programming tool. It is well written, well structured and consistent. When I learned Java, I got fed up trying to zig zag between the varying styles across even core Java documentation. I guess Java had some “designed by a committee” issues.

Russ prefers tons of available Java books/documentation as opposed to using newsgroups and mailing lists. Here, I've to disagree. comp.lang.python is the best newsgroup out there. And the support I get, in terms of quality and speed, I can't buy elsewhere. Java has plenty of books. Other than Bruce Eckel's “Thinking In Java”, all others I've seen are best suited for trash can.

There is not much standard J2EE-like web application framework in Python. I think that is a good thing. I still can't understand why there are so many different implementations of J2EE standard. If Java vendors have any sense, they should stop making competing implementations and develop more generic frameworks like Struts.

Russ has concerns that “Python will regularly drop down to the underlying platform. (Remember why you moved to Java in the first place?)”. Funny thing is I dropped Java in 2000 and chose Python because of the same reason. Yes, Java doesn't let me get to underlying platform easily, but for cross platform apps, I was forever debugging in multiple platforms. My friends tell me Java 1.3 onwards it is much better. Then again, my needs at the time were not for 100% cross-platform behaviour, but sufficiently cross-platform. GNU C would've been enough.

Development speed and low maintenance load provided by Python quickly outweighed supposedly cross-platform promise of Java.

About database access, I mostly work with Oracle, MySQL and PostgreSQL. Python's DBI is a good enough standard for my needs.

Maybe if I work for a software product company that have issues with sharing source code, I will pick Java. However, if I run a software company, my priorities are going to be always development speed and maintenance costs. Not readily jumping into buzzword band-wagon.

Anyway, corporate sponsorship is probably going to benefit Python. I'm on two minds on this. Companies are beginning to realise they don't have money to invest in latest and greatest technologies. They need whatever that works. Without fuzz. This might trigger good interest and user sponsorship for languages like Python, Ruby and REBOL.

Then again, US economy is in the current state because too much money was spent on vaporware, stupid PowerPoint Presentations and advertisement :-) It takes a while to throw away that kind of management.

Simon Brunning's analysis is very accurate too.

  1. "Simon Brunning’s analysis is very accurate too." Don't hear *that* too often! ;-)

    I agree with you that c.l.py is to newsgroups what the Rolls Royce is to cars. But I'm not sure that Russ disagrees, exactly - I don't think he has much of an opinion one way or the other. He just doesn't like newsgroups at all. So, if he's missing the best that Python has to offer, it's not surprising that he's as keen as we are.

    Java books: yes 99.9% crap, but Bruce Eckel’s "Thinking In Java" isn't the *only* worthwile book. Bloch's "Effective Java" springs to mind, as does Tate's "Bitter Java". I feel a post comeing on...

    J2EE *is* a worthwhile standard, I think. Java have J2EE as a server API, and JDBC as a database API. Python has something like the latter, in DB-API, but nothing like the former. J2EE allows me to deploy my app to whatever server my clients choose without changes. It works well. Python needs one.

    Posted by: Simon Brunning on July 28, 2003 05:33 AM
  2. Uhmmmmm..... python&java, difficult thing, impossible exclude one. Perhaps, the best and for something areas the only option.
    I like much more python, and i have somo envy of java programmers because his/her job are more easyly recognized, only for be programmed in java. Why?, because java accomplish standards? yes; because can scale well? yes, python it's not multithread. In return, because we use python? because it's more readeble? yes, and this it's great in programation; because we love the way of python?, yes i belive that are the best languaje that i found to express my ideas, and for this reason i love it. But i believe that it have a lack in standard support, not only for the python community, either for industry-company community, they don't like too much python, i don't know why, even i can't imagine!!! :-(
    From my point of view python it's a beautifull car, but need to be trade to the community.....and need either make some make up to be more beautifull to the company community.

    Posted by: Rosendo on July 29, 2003 05:37 AM
  3. Just my 2 cents:

    The reason I like Java is not because it's a hype thing (that hype thing passed away a long whiles back), but because
    you can do so many things with it, and there are so many resources (Books, Newsgroups, Online documentation, etc) that you can use easily.

    Two example factors:

    Java gives you choices. As an example, there is not just one way to access databases in J2EE, but several choices! There is of course the use of the JDBC API, but in addition you can use EJBs, and now JDO (Java Data Objects) to do the same thing. The difference is in the features and advantages given by each. In another sense, Java allows you to scale your application to different levels of complexity...simple web apps may use just servlets/jsp, but scalability can be introduced by adding in clustered EJBs, for example.

    Java gives you reach. The new initiative of "Java Everywhere" is something more than marketing. "Java Everywhere" has been defined as a single-architecture, end to end solution. The Java platforms on the server side (J2EE), client side (J2SE), and small devices (J2ME) share the same basic language features, API designs, libraries, and even development tools. The value proposition of Java Everywhere is to maximize productivity and allow existing Java developers to enter emerging markets without extensive retraining. J2ME is the de facto standard for writing apps in small devices, and thus Java developers have immediate access to this very fast growing market.

    Posted by: kalimantan on August 25, 2003 01:06 PM
  4. #3: I agree with you partially, when looked from the context of a technology company. However, from the context of an IT department in a company whose core business is not technology, both Java and .Net are overly expensive and complex. IMHO, such complexity should be outsourced to vendors who are good at that; and who can keep up with advancements in that. My experience has been that there are custom-off-the-shelf-software for most enterprise application needs. If IT department is good enough to foresee the implementation, maintenance and upgrade costs, it becomes quickly impractical to take up such complicated ventures in-house. Soon, people get too immersed in technical details rather than what is functionally required. I see this again and again - the whole team of customer and vendor spend hours discussing merits and costs of *the platform*, somewhere loosing sight of original end-user who doesn't care about it!

    Good point about J2ME. I'm swinging between it and .Net; but I don't know enough to make a decision now. Your blog is very nice and I'm hoping to use it as I go along.

    Posted by: Babu on August 26, 2003 05:59 AM
  5. "babu":

    running servlets/jsp on tomcat/apache is not only easy, it's 100% free ;-)

    with regards to j2me, there's really no choice....the compact framework (the equivalent of j2me) is not only MIA in microsoft smartphones, it will also restrict you to programming only for pocket pc handhelds.

    j2me will allow you to program in nearly every new smartphone out there (including microsoft smartphones - LOL), not to mention handhelds.


    Posted by: kalimantan on August 26, 2003 11:03 PM
  6. I agree with Paul Graham:

    http://www.paulgraham.com/javacover.html

    Java smells funny - too many acronyms J2EE, EJB, JXL, JDBC, J4RE

    (made up that last one).

    1. It has been so energetically hyped. Real standards don't have to be promoted. No one had to promote C, or Unix, or HTML. A real standard tends to be already established by the time most people hear about it. On the hacker radar screen, Perl is as big as Java, or bigger, just on the strength of its own merits.

    Etc

    Posted by: Anthony on October 22, 2003 12:20 PM
  7. For me we must make dinstinction between Commercial contexts and non
    commercial contexts.

    On commercial contexts and, on a larger degree, in big corporates, people
    try to reduce risks and keep their jobs.

    On the other side, a lot of "service providers" and software makers come to
    decisions people to show their "shiny-brand-new-bug-free-technology".
    More, most of the big companies build agreement systems, to give the
    end-purchaser the idea that their solution is "independant", "re-usable" or
    a "Must to Have".
    By the way, they never loose any occasion for FUD (Fear Uncertainy and Doubt).
    And against EVERY identified ennemies (don't laugh: they use this vocabulary.)
    [Remember, before Y2K, reactions against Linux by companies that now promote Linux]

    In this context, one or more persons, responsible of big budgets of
    million dollars, are really afraid to make mistake. (I can understand).
    In this kind of situation, this always the dog that barks better than the others that win the "market".


    Ok. let's imagine those decision makers can understand what is better in term
    of objectives parameters. You still don't win!

    The big 3 (or more) letters companies also sell a lot of "technical articles"
    for computers magazine. Don't believe? Just count the number of advertises
    found on those magazine. It's big money!
    In that context, if a company XYZ, buy an advertise slot to a magazine. And
    this magazine says XYZ's product are not that interessant, beleive me:
    the magazine lost its contract,... and money. (And usually its not
    even the XYZ company that take the phone: this can be a bank (this happened
    yet) that risk to loose money on stocks)


    In that situtation, all the decision makers that don't have a deep technical
    knowledge will beleive the most barking dog!

    I must admit, that if today I have a multi-million buget, I would be afraid
    to go on Python instead of J2EE...


    On the other side, the OOS community do not (always: look Apache) benefit
    big-money-sponsorship. Thus, the OOS dog makes a lot of noise, but not enough.
    And sometimes, it's true, not very coherent.


    Ok, I have good technical background. Was always frustaded by this situation.
    For exemple, I am considered as a Java/J2EE expert (well in reallity it is
    not that-true). But when I propose solutions that are more efficient, even in
    J2EE frame, those solutions are often rejected, simply because my director
    of manager never heard about that before.


    Now, I changed my mind: in commercial context I will never be able to bark
    that loud. So, I accept the game,.. sometimes smilling. When I come back
    home, when I help volonteers: I can choose the solution I find the best.
    And then I really enjoy!

    We must make distinction from private context, and business context. Life
    is better after that.


    Ok, as clausing words: Just to examples:

    1- C++/Python experience:
    In 99, for my own pleasure I wanted to develope a client/server for a
    game system. I wanted to develop my own TCP presentation Layer:
    - C++ (I was fluent): 3 weeks
    - Python (Just learn in fews days before): 4 hours.
    And after 20 min, my C/S was multithreaded.


    2- HTTP/HTML and JSP
    On its roots, HTML/HTTP edition is very basic:
    You edit your page -> you Save -> You read.
    For fun i Put 1$ cost for each steps:
    $ -> $ -> $
    Total: 3$

    On JSP:
    You Edit -> Save -> Deploy -> JSP transformed to Servlet ->
    Servlet compiled -> Servlet loaded by VM -> Servlet Exectued ->
    You red
    Same computing:
    $ -> $ -> $ -> $ -> $ -> $ -> $ -> $
    Total: 8$

    OK, I know, the $ are not fair and HTML/CGI only applications are not
    that easy to maintain and develop.
    But face if: Tim Berners Lee whanted HTML to be as simple as possible.
    Some came after and transformed it into a huge nasty beast!
    For the curious: just try some development with Velocity (from Apache),
    make your own numbers, make your own conlusions.

    Ok finished for today. HTH.
    McG

    Posted by: Mcg on November 28, 2003 01:00 PM
//-->