11 ms·
Lots of programming wars is just tribalism. Java is disliked on HN because it represent "enterprise" - big long-lived organizations which maintain a codebase fo
by goto11 5y ago
Lots of programming wars is just tribalism. Java is disliked on HN because it represent "enterprise" - big long-lived organizations which maintain a codebase for decades and therefore conservative. A different tribe than the startup tribe HN represent. Java is not in particular more verbose than say C or Rust for solving the same task, it is just a random slight on the language of a different tribe.
HN is a great community, but it has a very narrow perspective on the world.
As a beginner it is fine to chose to master one language first, but in the long run you should not "choose a language", but rater learn to learn any language, and understand they all have their strength and weaknesses.
But there are so many choices of tools and technology in this industry and it is impossible to learn it all. Tribalism makes the world simpler because it narrows your perspective.
- deleted 5y ago[deleted]
- internetslave 5y agoJava is miserable to write. You don’t realize this until you work with other languages. It was literally built with guardrails to keep enterprise coders from getting too creative
- podunkPDX 5y agoI can’t speak to the actual act of Java development, but I can speak to Java applications from a sysadmin perspective (15 yr Sr. QA Engineer to a 3 yr Linux admin (don’t ask)) — I’ve got no real beef with Java from the development side, but maintaining some of those stacks in production is pure pain.
- lmm 5y agoHuh? Java is probably the least demanding stack from the sysadmin side - no big chains of library dependencies, no docker, strong backwards compatibility that means you can fearlessly upgrade the language. All you have to do is keep an up-to-date JVM installed on your servers and deploy single-file fat JARs to them.
- lovasoa 5y agoUntil you get an out of memory error. Then you need to start fiddling with the JVM. Or until you realize that you have a 99th percentile latency of multiple seconds...
- lmm 5y agoNo language is immune to slow or memory-hungry code. The JVM is probably the easiest runtime to monitor/instrument/profile (and it's not like having no runtime makes that any easier, quite the opposite), and has probably the most tuneable GC going. I guess enabling your users to do that might be work for a sysadmin, but that's more a reflection of those users having higher expectations for Java than for other runtimes - providing your users with the same capability in other stacks is never easier than Java, and often significantly harder.
- oblio 5y agoThere are only a bunch of out of memory errors, though. And they're easy to fix.
- smitty1e 5y agoThen you get into managing a collection of Java projects where each on ships its own JVM and keystore to obviate version issues. And then you have to deploy certificates against all that. I'm not bitter.
- twic 5y agoThe keystore situation is indeed poor. For several years now, it has been possible to do more key management in-app, so you don't need to manage keystores (i have written programs which pull standard PEM-encoded keys from environment variables). But the practice of using a JKS keystore is so ingrained that it's very rare to make use of that.
- crm 5y agoI think those guardrails often help with the humility the article discusses - they reduce cognitive load, and let you focus on the problem at hand, at the expense of expressing total creativity. It's a tacit admission that we aren't all knowing, and often need help from our tools to save us from ourselves.
- lmm 5y agoI find it's just the opposite - when working in a Java codebase you can't focus on the actual problem because you have to spend so much of your time reading past the needless verbosity - or, often, debugging the crazy reflection framework that your organization has introduced because that verbosity became intolerable.
- ratww 5y agoI think you're both correct. I find that the language itself is quite good, simple to use and has some nice features and performance... but the issues you mention are also there, however they're part of the frameworks and individual codebases.
- marcosdumay 5y ago> crazy reflection framework Did the Java community get over their love of code generation already? Last time I used it, I'd debug the crazy 1000's of computer generated lines that people changed here and there.
- lmm 5y agoThat's never been my experience in over 10 years of JVM work - people mainly use reflection or bytecode manipulation (aspectj) to do the kind of things you'd use code generation for. The only exception is thrift/protobuf and that's dumb serialization code that hopefully no-one's editing.
- marcosdumay 5y agoOh, the last time I've made any extensive use of Java was more than 10 years ago. I've met an off the shelf code generation based platform on the meantime, but luckily it was deemed too expensive so I didn't need to even finish a technical evaluation (much less use the monstrosity). Anyway, that is great news. That unexplainable love for code generation was one of the things holding the language back. It's always good to see things improve.
- livesinhel 5y ago> It was literally built with guardrails to keep enterprise coders from getting too creative Just as Go.
- saagarjha 5y agoGo somehow takes the worst bits of Java in this regard and makes them even worse :(
- goto11 5y agoYes lets rewrite everything Ruby on Rails and CoffeScript, it is just so much more productive and creative! At least this was the opinion on HN a few years ago. Now of course other tools and languages are fashionable. And nothing against Ruby or CoffeScript per se, but the demands of an enterprise where software lives for decades is just different than for a startup which rewrite the whole stack every six months. Creativity and cleverness is a double-edged sword, which is exactly what Dijkstra is talking about.
- nmfisher 5y agoCompare writing Java professionally with writing Kotlin professionally. It's like night and day. Same projects, same VM, all that's different is the language. Distaste for Java isn't elitism or arrogance, it's just that the language is so damn painful to write. If you start your career with Java (as I did), dipping your toe into another[0] language for the first time feels like Neo being ejected from the matrix and waking up to reality. You realize your eyes are finally open, you're awake, and you can see that all that pain was just what Java saddles you with, and wasn't "the way programming is done (TM)". [0] depends on which language, of course. Java to C# isn't a big jump.
- ajuc 5y agoCould you write your top 3 Java pain points? I started working in C++, moved to Java, used several other languages commercially (Python, JS, PHP, Groovy, Kotlin), and about dozen other languages for personal projects including the hip ones like Clojure, Prolog, Ruby. My first programming languages were C64 BASIC and Turbo Pascal. I've written some Ada and SML. And I just don't understand the Java hate.
- ArnoVW 5y agoHaven't upgraded Java since version 9, so take this with a cube of salt (my suspicion is that many hardcore Java haters were created by Java 5, 6 etc).. but my general issue is the readability. The idioms used to perform 'standard' things are verbose. The worst for me is that it's impossible to catch exceptions in lambdas. The absence of named or optional parameters. Mind you, I'm only saying that after having spent 2 years in Kotlin. The Stockholm syndrom is real: you don't realize how much better things can be from the inside. Programming has become enjoyable again, my work 'feels' cleaner, more readable. Null safety makes reasoning about code that much easier. I can switch to functional programming when it's convenient. I keep all the tooling from Java, including the amazing IntelliJ IDE. At the end of the day, choices are a matter of arbitration. Do I want the speed of C, the ecosystem and resource pool of Java, the locality / mathematical guarantees of functional languages, and the IntelliJ IDE? Sure. But they don't exist in one language. So when I'm programming embedded, it's C. When I'm creating a complex data treatment pipeline for machine learning, it's Scala. And when I'm making a CRUD application that will have to support a team of 15 developers hacking on it for a decade, I'll go with Kotlin.
- the_arun 5y agoProblem is not with programming languages. It is with lack of programming principles. For eg. Consistency, Readability, Maintainability. Software requirements keep changing with time & so if we do not do continuous refactoring, we see a decay. Also in enterprises team ownership keeps changing & we miss the accountability. This erodes software. People need to give a damn to maintain software.
- rendaw 5y agoI know this is just flamebait, but I write a lot of Rust, Python, Java, C++, Ruby, Typescript, etc. Java is fantastic to write in. What guardrails are you talking about?
- oblio 5y agoMy guess? Lack of first class functions and macros. Maybe higher kinded types. The first one is annoying, not really something a professional software developer would care about for more than 10 minutes while creating a new product. Macros can be major footguns, they're something that can only be realistically used efficiently and safely in large code bases by actual senior engineers. So the jury's still out how much they really increase productivity for the averaged developer. Higher kinded types seem great, but it seems that they're not easy to implement and they also slow compilation down a bunch (someone please correct me on this). These seems hard to bolt on to an existing language, so Java can't be faulted much.
- smitty1e 5y agoJava itself may lack macros, but by the time you get in reflection and libraries with XML and compile-time magic to work around the lack of macros and the whole thing is a giant plate of spaghetti, maybe macros were no' so bad after all.
- rendaw 5y agoThose would've been my guesses too, but Java's had first class functions in the form of anonymous classes since 1.1, and as the other commenter mentioned reflection takes care of a lot of macro use cases.
- ajuc 5y agoThat's like a mason or an engineer complaining that the bricks are too boring and predictable :) There's a place for "artistic licence languages" like Ruby or Clojure and I like them for experimenting, but when you want to build a house you want the bricks to be boring.
- 0xbadcafebee 5y ago> It was literally built with guardrails to keep enterprise coders from getting too creative You say that like it's a bad thing...
- valenterry 5y agoA programming language is one of the more important tools as a software developer. Having to use a suboptimal tool is neither productive nor fun. You can't always have the latest tool of course, but Java is quite outdated in many regards (even though starting to catch up a bit recently). I think it has nothing to do with being "enterprise".
- pulse7 5y agoGeneral statements like "...Java is quite outdated in many regards..." without providing any specifics are a sign of mentioned tribalism. Such general statements don't bring quality to the discussion, because nobody can really check whether Java is really so outdated or not.
- valenterry 5y agoI replied specifically to > Java is disliked on HN because it represent "enterprise" which I think is not true. Maybe for some people, but there is valid criticism too. I am happy to give examples, but I am disappointed that you call my response "tribalism". It really is not meant like that.
- pulse7 5y agoIf I personally dislike XYZ I could write "XYZ is quite [outdated/boring/miserable/painful/awful/uncreative] in many regards". But people here are more interested in (specific) advantages and disadvantages than my personal taste...
- seba_dos1 5y agoAs a person who has learned and used several programming languages (not exceptionally many, but enough to be able to start new projects with "hmm, so which language I already know will be the best for this"), I have never taken these language wars seriously. It's actually kinda surprising to me that some people apparently do. Do they take vim vs. Emacs holy wars the same way? I mean, plenty of arguments used in those wars are perfectly reasonable. PHP isn't elegant. Java is verbose. C++ is overcomplicated beyond salvation. JavaScript is shit. Those are all facts ;) However, they still can and often are the best choices for a given project. Is PHP pleasant to write in and think about? Heck no, but deploying it is exceptionally easy and sometimes that's much more important. I wouldn't ever think of using JavaScript as an example of good language design, but it accidentally turned out to be flexible enough to become the lingua franca of the Web and is here to stay. No amount of drooling over Rust will change the fact that you're going to have a hard time with it on some platforms where having a proper C++ toolchain available is ubiquitous. And sometimes the way Java code use to be structured is exactly the perfect fit for a project you're working on to ensure its long-term maintainability despite of the fact that people who work on it come and go in your startup all the time (so having access to a healthy pool of Java developers to hire from who's pretty much already familiar with your project despite of never seeing it before is a huge advantage). If those tools really were "suboptimal" they wouldn't exist anymore. They do, because they aren't - if anything, they may be poorly chosen to do a specific job.
- baby 5y agoI’m sorry but Java is an awful language that is mostly used because you are forced to, or because that’s the only language you know. There are much better modern alternatives.
- hugi 5y agoWhat an extremely typically HN comment.
- fn1 5y agoYou can read this to see how modern java differs from the java 15 years ago: https://wittchen.io/posts/an-opinionated-guide-to-modern-java-by-parallel-universe/ https://wittchen.io/posts/an-opinionated-guide-to-modern-jav... Also the JVM is highly optimized, more stable and faster than most other runtimes (and it can run must of the other languages).
- aethertron 5y agoParallel Universe blog is 404'd :(
- ratww 5y ago> mostly used because you are forced to, or because that’s the only language you know This probably describes 99% of all programming done today, no matter the language. Not everyone is a polyglot programmer able to choose their tech stack at their company.
- blackoil 5y ago
- fn1 5y ago> Java is disliked on HN because it represent "enterprise" - big long-lived organizations which maintain a codebase for decades and therefore conservative. Exactly. But what I found is that refactoring java-monoliths can be a very interesting and intellectually stimulating task.
- js8 5y ago> Java is disliked on HN because it represent "enterprise" - big long-lived organizations which maintain a codebases for decades and therefore conservative I work on mainframes and dislike Java. Conservatism is not a problem, my problem is I perceive lot of Java people being pretty smug, and they are just because Java is #1. (And I also worked in C#, so I know the difference. Java itself is not the thing that makes people smug about it, it's the position on the popularity ladder.) I mean, if your approach is, we use this old and tested language, it has many warts, but works for us.. good. If you go, well, we use this language, because it's #1, and therefore it's clearly the best in the world.. no, thanks. I know Forth and Lisp and Haskell, and I know the world out there, which you don't, so I know for a fact there are innovations that didn't make it to Java yet, or pretty badly. To me, humility in programming is (partly) don't think your tool is the best just because it's the most popular one at the moment. Finally, this perception of Java is changing (it is being slowly dethroned by Python and JS and other contenders), and with that will come more pragmatism (less of crazy OOP and patterns cargo cults), which will actually make it more likable in the future.
- saagarjha 5y agoI actually see Java looking at itself and realizing where it need to catch up to other languages these days. As someone who grew up with Java 5/6/7, the current pace seems breakneck with much-welcomed improvements.
- amarant 5y agoAgreed! Most of my professional experience is in Java, and the biggest issue I've experienced in the java community is precisely this lack of humility. Usually that comes in the form of people believing that Spring is the best framework for java backend development, regardless of your needs, because it's the biggest, most popular framework. Arguments do not work on these people, at all, they start countering technical arguments with "I work at BigTech Inc. and we use Spring, so clearly you don't know what you're talking about" Java as a language does have problems, but if you use it right, it can be pretty nice to work with. The verbosity issue is kind of a double edged sword, on the one hand there's lots of typing, on the other hand, I find it (the verbosity) can help make code very readable and easy to understand, at least if well written.
- locallost 5y agoIt's not just HN, and it's not just Java. Actually it's not just software development, it's almost everything - movies, music, sports. A is better than B because. C sucks. In certain contexts this is ok, the fun is in the pointless argument, but engineering should be more serious than that. Alan Kay referred to the whole field as a pop culture, and I can see his point.
- p0nce 5y ago> HN is a great community HN feels like white collar GPT-3. It predictably likes things that are more abstract, less practical, and promise novelty while replacing the incumbent. It also used to be a very self-serving chamber for startup investors. Honestly I come for the randomness but as community it's really the point of view of vocal people only.
- gonzo41 5y agoI see that attitude as a symptom of professional boredom. Some people like shipping products, some people like solving problems. Sometimes people who like problems build complex products to solve imaginary problems.
- p0nce 5y ago> Sometimes people who like problems build complex products to solve imaginary problems. While I'm critical, I'm guilty of this. Well said.
- lenocinor 5y agoI agree about the vocal people being the ones that influence the conversation. I hope there can be some way to fix this problem. I’ve been reading Hacker News avidly since close to when it started, and I comment occasionally when I feel like I have something unusual to offer. But mostly I don’t influence the site even though I’ve spent multiple thousands of hours here, and I wish that could be better somehow.
- ChrisMarshallNY 5y agoI try to offer the types of things that I'd like to see. Basic modeling. I'm very much into encouraging folks to connect at a "human" level, and not treat each other as abstractions. I also like practicality and experience. I've found that I feel as if I'm contributing, by telling stories. I'm of "a certain age," so I have a lot of them; including embarrassing ones. "Good judgment comes from experience. Experience comes from bad judgment." --Attributed to Nasrudin, but I read it from Will Rogers It's not "making it all about me," but it is about not projecting onto others, and trying to bring my own life experience into things. I have become a bit despairing of what has happened to the culture of the tech industry. I feel as if what used to be a fun, exploratory place has become a voracious, hyper-competitive gladiatorial arena; complete with lords on the sidelines, giving thumbs up and thumbs down. I know that it seems as if I may be looking back with rose-colored glasses, to those that have always known the industry as it is now, but I assure you. It was once quite different. We had fun, and we shared information, and we were pretty damn nerdy. When I was reading the various accolades about Dan Kaminsky, it actually choked me up. He was the type of person that seemed to be everywhere. The people who were really good at stuff didn't use it as a hammer to pound others; they shared their passion and exuberance. I try, in a rather awkward way, to do that, myself. I'm quite capable of being a super-negative "black hole," but I won't do that. I wouldn't want to live in a world like that, so I won't contribute it. Being negative is an easy way to get lots of clicks and shares, but it fouls everything it touches.
- enriquto 5y ago> HN is a great community, but it has a very narrow perspective on the world. Don't you say? Isn't everybody out there writing rust on neovim?
- deleted 5y ago[deleted]
- doggodaddo78 5y agoTribalism is social nonsense. I taught myself C in 92 and Java 1.0 in 96. That Java was extremely verbose compared to C for chaining calls or just normal method calls. Rust is also verbose for constructing types and performing type manipulations. C is verbose for getting things done because of its low-level nature. As productivity and safety goes, I'd choose Rust over Java or C as a systems language for most purposes. The JVM is a secure foundation for running applications in multiple languages. Clojure, Kotlin, JRuby make excellent replacements for the Java language while still on the JVM. JVM and CLR runtimes have an enormous amount of production experience baked into them. BEAM also would be fine. It's a toolbox with tools that are better suited for some jobs than others, and it also depends which ones a group of developers know.
- heresie-dabord 5y ago> tribalism Apart from the juvenility of social memia, there is the fact that programming languages are themselves buggy, opinionated expressions of how to solve a problem. Given enough followers, some languages become very like a temple that sees no ill within its own walls. A programmer must be able to reason clearly about the code, or something (or some opinion) has become dogma. There are many good programming languages. Leaving tribe and tribalism brings maturity.
- mywittyname 5y ago> Java is disliked on HN because it represent "enterprise" - big long-lived organizations which maintain a codebase for decades It's one of the few languages out there capable of producing a codebase that lasts for so long. That annoying verbosity and enforcement of naming conventions and directory structure mean that the Next Guy (or Gal) to come into the project and probably figure out what's going on. Most codebases written in other languages are constantly rewritten in the language de jure.
- anaerobicover 5y agode jure -> du jour "by law" -> "of the day", "current"
- axguscbklp 5y ago>Java is disliked on HN because it represent "enterprise" - big long-lived organizations which maintain a codebase for decades and therefore conservative. Yet HN commenters tend to like the React ecosystem, which at this point is pretty close to Web Development Enterprise Edition.
- EricE 5y ago>As a beginner it is fine to chose to master one language first, but in the long run you should not "choose a language", but rater learn to learn any language, and understand they all have their strength and weaknesses. Exactly. Languages come and go. But if you understand the fundamentals - why things work the way they do - it makes it much easier to move between languages, programming models and whatever the latest fad is. Being adaptable is a far more valuable skill over time. Nope, it's not easy - but rarely are things of value easy (it's why they are valuable - ha!). It is easier to start out early with this perspective and continually building on it throughout your carrier than trying to pick it up mid stream later on in life, so the sooner you start the better! I've never considered myself "done" when it comes to reading or learning. Like those sharks that die if they stop swimming - that's a good way to envision your long term intellectual health :)