Java and Practicality

I have found that those who advocate for the practicality of Java as a programming language for solving software problems invariably have an incredibly poor understanding of programming language theory and poor general problem solving skills. However, almost always, an even poorer understanding of the Java programming language itself is most prominent.

Consequently, one cannot have a reasonable discussion about the merits of problem solving, using the Java programming language, or programming languages in general. However, one hopes that this sample set is biased and so one continues the search for a counter-example.

This is lamentable.

35 Responses to “Java and Practicality”

  1. Erik Engbrecht Says:

    You’re assuming that they are concerned with solving problems, as opposed to avoiding the introduction of problems that can be traced back to them. Practicality means avoiding blame. Avoiding blame requires following the herd, having a vendor to blame, or preferably both. Many programming languages that are good for problem solving provide neither of these key traits.

  2. Tony Morris Says:

    Well by practicality, I explicit mean for solving software problems. I’m well aware of practical applications of Java for other, often more degenerate objectives.

  3. Nick Says:

    Does it mean that “those who advocate for the practicality of Java” are likely to have no formal CS training and come from EE/physics/other engineering backgrounds?

    On a related note, consider kaching.com. Despite their rich GOOG/Stanford pedigree and interest in Scala they have (or had until very recently) a mostly Java code base.

  4. Channing Walton Says:

    Totally agree. I despair when presented with a ’solution’ and the comment ‘how else would you do it?’ for any attempt to present anything out of the norms of idiomatic Java are ridiculed as academic and ‘not useful in the real world’.

  5. Morris Jones Says:

    Any Turing complete language can be used to solve problems. There are times when Java is the practical means because it’s understood by the people with the problem. There’s a quote that’s been floating around for a while now to this effect: “You might decide to use Lisp to solve your problem. Now you have two problems.” I’m not saying I agree, but that would be true for me. I’d need a year of study to get proficient in the language.

    So I’m not sure what your point is here.

    Given that any language is ultimately executed by a typical VonNeumann machine, we’re just talking about expression, symantics, and communicability to others. Ultimately the most practical language is going to be the one that your neighbor understands.

  6. Tony Morris Says:

    Morris,
    These kind of fallacies are precisely the reason we have the industry-wide disaster that we have today. Whether or not a language is practical is a property of a language, not of a person or any other type of projection bias.

    You surely agree that two turing-equivalent languages, identical but for one minor improvement in the other has implications for practicality for both. By your argument, we might consider using SK combinator calculus (another turing-complete language) because “my neighbour understands it.”

    This is completely bogus and does nothing more than provoke further lament.

  7. Yuvi Masory Says:

    I agree Java does not attract as advanced a crowd as Scala. However, I find the Java community to be refreshingly professional. At least in the last 5 years I find that most Java programmers *do* have formal cs training. Python has become the dabbler’s language of choice. So if you want to be immersed in a culture of programming aficionados, sure, use Scala or Haskell. But one can do much worse than Java.

  8. Pseudonym Says:

    Sorry, I’m a bit late to the party.I know plenty of clued-in people who use Java for a living. As a rule, they will freely admit that they use Java despite the language, not because of it.It’s not just arse-covering, either. Java sometimes really does win in a real-world cost-benefit analysis. What you need to realise is that the value in using Java is not in the language, but in everything else: the VM, the development tools, the frameworks, the deployment tools and a hundred other bits and pieces which work with Java but not with anything else.

  9. Tony Morris Says:

    Pseudonym, there does not exist a case where Java, the language, wins in a cost-benefit analysis. This should be easy to disprove if it were wrong; sadly I have never seen anything even come close.

  10. Pseudonym Says:

    Tony, I thought I made it pretty clear. The win is not the language, but the tools/libraries/everything else that are all geared to work with the language. In that respect, Java is very like English.

  11. Tony Morris Says:

    Pseudonym, I took that into account with what I said. It’s not a win; not even close.

  12. Razie Says:

    Java serves its purpose: availability of off the shelf cheap programmers, both to develop new products for vendors but also at their clients, to use product APIs, libraries etc

  13. Tony Morris Says:

    This onslaught of claims for which there exists absolutely no evidence whatsoever is quite expected. If it is supposed that these not-so-incredible insights had never been considered, then what on earth must it look like I am doing? I lament.

  14. Razie Says:

    I’ve been hiring people for a decade Tony, I know it to be true. We are a software shop and have over 30 clients. They hire people with the skills we tell them to hire. Cost of ownership includes all this stuff and we’re in this for business, not for fun.
    My claims are in fact the reason we switched from C++ to Java, a decade ago and did a big survey and lots of thinking then and continuously every now and then.
    There’s lots of evidence, even if you just go to the Tiobe index or see the stats on Monster. Or compare the number of open source libraries of say Apache. Or…well, why do I keep typing?

  15. Tony Morris Says:

    Razie, you’re using an appeal to popularity, which is in no way correlated to practicality.

    I used to work for “the biggest Java shop in the world” on the Java implementation itself — so what? This is not evidence for or against the topic under discussion, but a useless distraction. If Java is practical, for but one example, then show it to be so. I forewarn you that I have probably seen more attempted examples than you have, but I yearn to be shown something new that falsifies (or even comes close) my current position.

  16. Razie Says:

    Indeed. To summarize, I was in fact agreeing with you, that Java is not practical as a language. I was pointing out that it is however practical to use Java to develop one’s products, for the main reason of cheap developers…those that do have a deep understanding of programming languages in general tend to be not-so-cheap and not-so-off-the-shelf.

    Maybe it was indeed more a syntactic play of words than adding value to the discussion.

    Anyways, cheers!

  17. Tony Morris Says:

    Hi Razie, sorry about the miscommunication. I also agree that Java may be practical for some things. What I am most confident about is that it is not practical (not even close) for solving software problems. I certainly agree that it can (and has) be used for social engineering purposes. It’s not a programming language as much as it is an appeal to mass incompetence.

  18. Marco Says:

    Hi Tony,
    I thoroughly enjoy reading your blog and your Scala/Haskell exercises, but this blog post leaves me unsatisfied for one reason: What’s its purpose?

    I *suppose* that your ultimate goal is - or at least should be - to educate people or at least to spark their interest. “Discussing” the practicality of a language, in my opinion, seldom has any effect at all. It’s so much yada yada, back and forth and even more bla bla and though a lot of interesting points might have been made, in the end noone has learnt anything, similar to every other political debate on tv. What I’d be much more interested in is a “practical” approach:

    I think some people (including myself) would love to see a pratical example and side-by-side comparison of a poorly (or maybe even well implemented) solution in Java and the better implementation in the language of your choice. For that though you always have to consider the “problem scope” that a lot of Java programmers, again myself included, have: E.g. Putting together a somewhat boring,multi-language business administration tool and cms, where thousand building blocks already exists and real problem solving is reduced to a minimum.

    What exactly is mass Java incompetence? What is practicality? Can we get some examples of people that have poor understanding of programming language theory? Which problems have been solved poorly and how could they be solved better? I simply would love to see some “real life” code made better (not Monad exercises). Let’s start with Maven 2’s sourcecode :)

    See, I think you might be totally right with your statements about Java’s practicality, but your post hasn’t helped me at all with how I can go about solving problems better in my day-to-day work and spare-time, with Java or any other language. So what’s the point ? :) Let’s see some code and learn something!

  19. Tony Morris Says:

    Hi Marco,
    I’m sorry this post is not as constructive as usual. I am lamenting a little.

    However, I don’t agree that discussion on the merits of a programming language and its practicality are not worth having. The trouble is, these discussions are very rarely honest discussions where either party is either knowledgeable or willing to invest effort in order to acquire that knowledge. By this form of overwhelming nonsense, the true facts of the matter never come to the fore, and it is for this reason that I lament.

    I truly yearn for a solid discussion on the merits of, for example, Java and when it is either shown to be outrageously impractical for solving software problems (as is my current position) or I am shown to be wrong because I have misunderstood Java itself, then we can either move on from the outrageously impractical or I can learn something from my error.

    Sadly, neither happens :( The only honest discussions I have ever had have resulted in agreement with my position. This could of course attract the suspicion of a confirmation bias, but you’ll just have to trust me when I say I wish I was wrong more than my opponent does.

  20. doug Says:

    Hi Tony,

    Please accept my sincere apology if I mistook you as the creator of Functional Java. But if you are indeed the creator of FJ, can you please enumerate concrete examples of the *non-practicality* of Java in terms of problems that FJ is intended to solve? To me, the practicality of Java causally leads to the practicality of FJ. But since you have now dismissed Java as non-practical, I wonder what is the practicality of your Functional Java library. Can you please clarify?

    Thanks,
    doug

  21. Marco Says:

    Tony,
    a completely different topic:

    Could you re-post or possibly email me the source for your numeric currency amount -> literal currency amount converter, e.g. 100 = one-hundred, as I can’t find it on the web anymore.

    Thanks!

  22. Robert Bruce Says:

    THIS IS WHY I AM USING VISUAL BASIC 6 IT LIMITS THE PROBLEMS AND IT MAKES IT ALL OK

  23. Tony Morris Says:

    doug,
    Yes I am the creator of Functional Java. The thesis of Functional Java is to prove the practicality of Java for solving software problems. It fails. This is not to say that Functional Java is not practical for solving other problems and indeed it does.

  24. Mark Says:

    Tony,
    When you talk about “software problems”, what sorts of problems do you actually mean? It seems like a silly question, but I am asking it seriously. Java is good at solving lots of problems, as others have pointed out, but I do understand that there are certain kinds of problems that Java does not solve. I’d be interested to hear your thoughts on what constitutes a “software problem”; does that mean things like building composable programs, or something more general than that, or something completely different?

  25. Tony Morris Says:

    Hi Mark,
    By a software problem I mean any problem specific to software. Sounds tautological, but I don’t think this deserves so much attention and there is a little “mini protest” in that response.

    Contrast to, for example, social or marketing problems. If I were tasked to create a popular programming language, I’d come up with something like Java — although to be honest, I don’t think I could do as well as Java has in achieving this goal — it has done extremely well.

    However, this popularity and success has no bearing on its suitability for what it advertises to achieve, where is most emphatically fails. Rather, a more rigorous standard must be set in order to test this hypothesis. As a side note, some have suggested to me (on other channels) that this absence of practicality is an essential property of its aforementioned success — I’m not so sure about that.

    As you note, others have pointed out that Java solves lots of problems, including myself, but nobody has ever successfully (to a degree of which I am satisfied — not even close) pointed out that Java has been suitable for solving a software problem, not ever.

    This includes the many years I spent working on the JDK itself and the IBM J2EE application server (WAS) and of course, many more attempts. I mention this to solicit your trust in my proposition that I have expended an enormous amount of effort attempting to falsify this hypothesis. That I have found no such falsification is something I might forgive your scepticism of, but I really must assert that its absence persists nonetheless.

    By the way, you needn’t tread carefully when asking potentially contentious questions. I certainly don’t nor do I expect others too. Hope this helps and thanks for the question.

  26. jlh276 Says:

    Hi Tony,

    When you say “a problem specific to software”? Does that include or exclude things like problems I could encounter while trying to use system X to retrieve and process data taken from a system A to insert it in system B? There are ranges of “problems” that I can encounter. For instance:
    - what software is available on A, B and X and what choice I have to modify their runtime environments
    - what API (or services) are provided by A and B
    - how much computer power I have on X
    - what kind of data do I need to process (XML, table-like, …)
    - budget or are available to provide a working solution to this problem
    - budget or what people are available to support the solution

    Most of the things I listed are probably not “software problems”. Yet they contribute to a large extent on why Java is a “practical” tool in this kind of problem solving where software is part of the problem and where there are another bunch of factors.

    For some definition of software problem that is more narrow, then it’s quite likely that Java would not be a contender.

  27. Tony Morris Says:

    jih276,
    Yes definitely. If you ask those questions and you answer “Java”, then you are wrong — at least to the extent that I have seen. In most cases not only are you wrong, but you have just introduced yet more problems, not a viable or practical solution. This is especially true of your last two questions.

  28. jlh276 Says:

    So we are in general agreement to the definition of software problem? Meaning they can include the things that I’ve listed?

  29. Tony Morris Says:

    jih276,
    Yes. I’m not sure what more you’re looking for.

  30. jlh276 Says:

    Hi Tony,

    My own impression is that Java currently does pretty well in terms of cost effectiveness to build solutions to some problems and support these solutions. Java programmers are relatively easy to find. The eco-system (vendors, tools, open source libraries) means that for some software problems, a large part of the problem could already be solved. For instance if the problem is to insert the data located in some XML file into a database where the schema is already defined, for a company that already has Java programmers, then Java is likely to be a practical solution. I don’t think this type of problem I mentioned is atypical, so that’s why Java being considered practical is not controversial to me. But I’m open minded and if I’ve been wrong, I’d like to understand why and be able to use a better practical solution whenever possible…

    Java being wrong “to the extent that you’ve seen”… Where did it go wrong? What types of additional problems did it introduce? Why wasn’t the solution cost effective to build and support?

  31. Tony Morris Says:

    Hi jih276,
    I disagree (in the strongest possible way) with some of your statements. I’m happy to take this further if you like — perhaps email is appropriate?

  32. jlh276 Says:

    Hi Tony,

    Email would be great. Let me know if you don’t already have it.

  33. Tony Morris Says:

    jih276, my email address is ʇǝu˙sıɹɹoɯʇ@sıɹɹoɯʇ

  34. Berlin Brown Says:

    “Consequently, one cannot have a reasonable discussion about the merits of problem solving, using the Java programming language”

    Don’t you write Java libraries? Are those projects included in the problem solving?

    http://functionaljava.org/

  35. Tony Morris Says:

    Hi Berlin, Yes I do and yes they are (”problem solving” is very broad).

Leave a Reply