11 ms·
2009 I sucked it up too. "Hey Java is pretty much shit and here is this new better language called Scala, which you can use with your Java ecosystem!" And I w
by k__ 10y ago
2009 I sucked it up too.
"Hey Java is pretty much shit and here is this new better language called Scala, which you can use with your Java ecosystem!"
And I was hyped!
But, well then I saw the actual Java ecosystem...
Java itself is a pretty clunky language, especially for people like me, who did scripting language programming all the time and are probably not considered Real-Developers-TM to the Java folk. So the ideas of Scala resonated with me pretty much.
Anyway, after trying to configure stuff like Kafka, Zookeeper and Maven and setting up a SOAP API, I saw that the problem with Java isn't the language. Yes it's ugly, but JavaScript is ugly too, well even Python has its ugly parts. The problem also isn't performance, like so many C devs cry about daily. The problem seems to be that Java devs like to create things more complex than they need to be. Conglomerates of XML files, layers on layers on layers... I just don't know anymore.
I didn't use Scala for long and it wasn't because it failed me, it did, it brought its own complexity with implicit conversions and overloaded operators etc. but that wasn't the reason, it was the ecosystem which usage Scala enabled, the ecosystem that felt like it was still stuck in pre 2000. :\
- nolok 10y agoThinking of it, SOAP is the most Java-like thing taken to the extreme that I can think off. Needlessly complex, dozens of imbricated layers that no one knows why they even exist, cult of "the library and server will do it for you, you don't need to know how that works", and when the library invariably fail on some obvious stuff you're left hanging with inscrutable XML files and no decent way to debug the exact layer that fails, with every thread mentioning that issue on the web being met by a variation of "you shouldn't be doing that" or "add this additionnal middleware layer to solve it" All of that to send two ints and get one back.
- k__ 10y agoHehe, yes. I had to write a SOAP endpoint last week, because the dev in the other company didn't like REST. It was just one endpoint, that took a set of values. Took me a few days to get the WSDL right, because no good examples or tutorials were to be found... In the end it took me 80% of the time to figure out that I had a wrong XMLSchema version used to define my types. Only some heavy XML IDE found this bug, all validators just told me that I didn't define any types, haha... well at least I learned something in the process :)
- exclusiv 10y agoYeah my first project ever on Java was an API with Spring Data Rest connected to Oracle. 80/90 percent was config and issues w connecting to Oracle. Spring Data Rest was very nice.
- edabobojr 10y agoI take it you prefer CORBA?
- yawz 10y agoOh man! I'm old enough to having coded CORBA in Java and in C++. I'm glad we aren't stuck in that era.
- k__ 10y agoVery cool. The beside my SOAP project last week, I only heard about SOAP and CORBA in university distributed systems class and that was ten years ago. How is CORBA worse than SOAP? :D
- mcguire 10y agoSOAP is worse than CORBA in roughly the same way dying by falling from the Empire State building is worse than dying by being run over by a bus.
- i_are_smart 10y agoI had to deal with CORBA 6 months ago in the large scale architectures class at my university. I'm _very_ glad that class is over.
- nolok 10y agoI admit to never having to tame that particular beast. And given the sub comment about it being on the same greatness level as SOAP, I think I may pass :D
- nbevans 10y agoCome over to .NET and in particular F# - things are way nicer here :) FSX scripts are becoming a way of life for many.
- TheSmoke 10y agoi am looking forward to a stable and reliable .net for os x and linux. after that i really want to give f# a try.
- JBReefer 10y ago.Net core has been very stable for me so far! Edit: but it doesn't run F# yet
- ninofloris 10y agoWell it kinda actually really does...
- JustSomeNobody 10y agoNot really. .Net devs (C# in particular) still love their levels of abstraction.
- divanvisagie 10y agoMore application layers!
- bad_user 10y agoYou're missing the forest from the trees. Java libraries and frameworks are complicated because Java the language is not expressive enough. As I like saying, the status quo in Java land is Spring and Hibernate and people bemoaning Scala's implicit parameters never wonder why such monstrosities like Spring or Hibernate happened. Sure, blame the culture, but that's only half the story. The same thing happens with other inexpressive languages. One of them is Python. And here we disagree again, as I think Python is chock full of ugly parts. It started with refusing powerful and multi-purpose language features, like multi-line anonymous functions. As a result Python has been patched repeatedly with multiple non-orthogonal features to supplant the need for multi-line anonymous functions and/or to make up for its statement oriented nature. Oh, now Python 3 got await/async as well, but somehow I don't think this will stop people from monkey patching the socket module. I'm going to make the claim that in fact Python is not a TOOWTDI platform, in spite of its much touted "spirit" and anybody making that claim never tried working with Gevent or Eventlet, trying to make it work with MySQL's client and being forced to use the native client because Django wasn't compatible with the pure one. Or with an N-th iteration of Ruby inspired libraries that hack into its meta programming features to make it smell like the DSLs in Ruby, but with limitations and leaks. I don't even want to talk about the build and dependency management tools in Python's land, because it should be self-evident how broken the Python ecosystem has been. Another language in this category is Go. It's still young enough that people haven't used it much outside the niche it was created for and doesn't have much reuse going on in libraries. Give it time, you'll see the same pattern, same mistakes repeated again and again. Java was also a pioneer in dealing with concurrency, Java introduced generics really late and it was also built by famous engineers working for a sexy company, designed to appeal to beginners and managers.
- exceptione 10y agoThat is an insightful comment. What languages do you consider (most) expressive?
- JustSomeNobody 10y agoNo. It's not the Java language. It is the developers. They are the ones who have to have 35 levels of abstraction. Why? Because for some reason they think this will make modifying the software they write easier. In reality, no, it doesn't because everyone gets frustrated wading through the abstractions. If I can hold ten items in my brain's working memory and all ten are taken up by keeping track of how many levels deep I'm in, then it is really hard to make any real changes to the code.
- jcadam 10y agoYea, the hobby projects I do using the JVM (currently working on a side-project written mostly in Clojure) look completely different from the eleventy-layers-of-abstraction design-patternsplosion programming-in-xml garbage you're forced to work with at your typical Java shop. The culture in Javaland is a huge problem, and Scala doesn't really help with that. I'm constantly butting heads with Software "Architects" because, among other things, I tend to prefer building my programs using small libraries rather than uber-frameworks like Spring. I suppose my main problem is that I didn't start my career in Javaland, so I didn't get indoctrinated properly.
- btschaegg 10y agoI'm not sure if it's a question of indoctrination; I'd prefer to think that it is much more a lack thereof. Many things are "developed" without any appreciation of elegance - and the bit of old, overdesigned and overcomplicated C++ code I've seen tells me that Java's culture problem just stems from everyone moving away from there and continuing their style in Java-Land. No language will ever be able to combat this - the only strategy you can have is to make your language so different and confusing to regular people that they won't use it; but I doubt that would result in good languages being created. If you have a look at how modern C++ is presented and explained nowadays, there's much more focus on readable/useful code and actual design. Many language communities go this route (Clojure, Python, what have you), but that doesn't stop the average Joe to ignore those advices it if he so desires. Add in some crunch time where everything must be implemented ASAP and without consideration of the consequences and voilà: You end up shovelling snow around[1]. That being said, I especially like Clojure's approach to things. For example: Turns out good, maintainable C++ uses const almost everywhere - to avoid messes, you try to encapsulate mutable parts as much as possible (unless performance dictates otherwise). This is a thing that is still very clunky in C# and Java (and it seems very much overkill to use virtual inheritance for this. Say hello to IReadOnlyDictionary<T>). In contrast, Clojure makes almost everything read-only and uses mutation at very specific points. This is great - although of course you won't be writing any high fidelity videogames this way. Edit: Of course, when I say elegance, I realize that it's very hard to get actual things done from the Tower of the Elephant Tusk[2]. But yeah, stopping once and a while to understand/consider your problem and possible implications of your implementation gets you a long way. [1]: http://gizmodo.com/programming-sucks-why-a-job-in-coding-is-absolute-hell-1570227192 http://gizmodo.com/programming-sucks-why-a-job-in-coding-is-... [2]: http://thecodelesscode.com/case/143 http://thecodelesscode.com/case/143
- JustSomeNobody 10y agoPretty much hits the nail on the head.
- saiya-jin 10y ago> The problem seems to be that Java devs like to create things more complex than they need to be. Conglomerates of XML files, layers on layers on layers... this is not problem of the language, just juniority of some of its users. your typical smart coder with max few years of experience still considers the most important book he read Design Patterns, and well if the only tool you have is hammer... I get all kinds of beautifully over-abstracted code from our Pune team, which can be a nice topic for a chat over a coffee, but for real world maintenance, evolution and bugfixing it simply doesn't add any value, just LOC (ie, class has externalized interface, but it will never ever have any other implementation. and to spin things up, let's have an abstract class in between. or reading a property from external config file - goes via another 2 config files and 2-3 abstraction classes all the way to where needed). Small things but they add up. Things don't have to be this way - jav will be more verbose than python for example, but not as much as we tend to see these days. Just because you can build some cathedral, doesn't mean you have to to get job done properly. Especially when you just want a place to park the car.
- golergka 10y agoOut of curiosity, what is the scale of the projects you've used these technologies on? LOC, concurrent users, years of operation... As you can probably guess, I suspect that Java and it's ecosystem are created for a different scale, where this abstraction suddenly ceases to be excessive.
- k__ 10y agoI suspect most Java devs "think" this is the case and do this "abstractions for big scale" all the time, even if 99% of the project would do better without it.
- golergka 10y agoMay be. I have a different perspective - I'm now supporting a legacy NodeJS project which would desperately need more abstraction, but the original author was really into "getting things done" mentality and didn't think about future maintainer (me) at all. Magic strings, implicit hierarchies, code duplucation, different entity id scheme on client and server with hackish "translations"... I would give a lot for my project to have a little more of this Java "Enterprise" style right now.
- agentgt 10y ago> The problem seems to be that Java devs like to create things more complex than they need to be. This is the biggest myth! Like seriously how does using a particular language make you want/enjoy making things more complex? Why is Java (ecosystem and language) complex? Because Java has a massive very old ecosystem with organizations that have extremely complicated requirements. Someone else argued Java is complex because it isn't expressive. This is a myth as well as clearly Go language proved you don't need powerful types or annotations to be simply. Let me give you an example. The Java JSON parser Jackson. It is beloved and yet It is seriously freaking complicated! Why is it complicated? Well lots and lots of organizations have different requirements. Most of the libraries in Java that are mature are extremely complicated! They are this way because of requirements and evolution. Scala is complex but it hides it (and I guess some would say elegantly). I prefer being explicit and so do many Java programmers consequently the complexity is sadly exposed. There is another language rapidly evolving on the complexity front: Javascript. The ramp up time alone with modern Javascript is now close to being worse than Java (the transpiling, tools, etc).
- ThrustVectoring 10y ago>Like seriously how does using a particular language make you want/enjoy making things more complex? It's not the language, it's the community that uses the language. It's working with people who tolerate working in that language and with that sort of people. The Java community drives out developers with an aesthetic revulsion for things like a ShoelaceTyingStrategyFactory, and you're left with the dregs. In short, the causation is backwards - folks who want to or enjoy making things more complex end up using Java more often.
- agentgt 10y ago> In short, the causation is backwards - folks who want to or enjoy making things more complex end up using Java more often. That is complete utter nonsense. Developers most likely use Java because 1. they have to which is the case for Android or using existing libraries/code base or 2. because they already know it which is typically caused originally by number 1. 3. The language is still one of the popular language so for many it is a safe bet. As for ShoelaceTyingStrategyFactory... I have seen that crap in Typescript, I have seen it in C#, I have seen it in Objective C... Its caused by complex annoying needless requirements. See what happens with Java can happen with any language where you are don't have a proper development process of removing needless requirements. You end up with complexity. And yeah sure some people enjoy solving complex things and making it scale but the neither the language nor the community caused that. Now if you are talking about the spec writers like the JSR authors... yes those guys actually had it in there interest to make it complex because their company would be the only company that could make a reference implementation (for example Day software with JSR 283). But this is not the Java developer community as a whole.
- agumonkey 10y agoI remember saying python at an IT company once and they were about to expell me from the building. Their face showed à deep '3 seconds of my life wasted'.
- k__ 10y agoIt's really sad. So many cool things have been build with Ruby, JavaScript, PHP and Python... At university my OOP professor was all about how these languages aren't "real" programming languages, like Java or C#. And when I meet people working at older IT shops, that do Qt or Java, they all feel superior. This chauvinism is a real danger to the industry.
- oldsj 10y agoHow intellectually lazy of a developer do you have to be to use Java, stick with it and think you are better for using it than other choices? Wonder if your prof has ever even tried paradigms other than OOP
- k__ 10y agoHe also does FP classes. I think his distaste was more about dynamic typing than about non OOP languages.
- agumonkey 10y agoI remember saying python at an IT company once and they were about to expell me from the building. Their face showed à deep '3 seconds of my life wasted'.
- agentgt 10y agoPlease give better examples: > Anyway, after trying to configure stuff like Kafka, Zookeeper and Maven and setting up a SOAP API, I saw that the problem with Java isn't the language * Kafka: is written in Scala. It doesn't use XML. * Zookeeper: it was the first of its kind. It doesn't use XML. * Maven: same complexity as SBT, Gradle, etc... but it is declarative and again pretty much first of its kind (dependency management + build). * SOAP: this is not Java's fault (if anything Microsoft was the big pusher) * XML: jesus will people stop the XML is complex and hard thing. YAML is so much more complicated and harder to parse. I know it is easy to read on the eyes but its harder to parse and has more edge cases. XML is still one of the few languages you can parse and manipulate and preserve comments and whitespace. The XML thing is the dumbest thing. Developers write hundreds of lines of XML all the time... its called HTML (pedantically HTML5 is even more complicated since it allows SGML and XML style). But for some reason when people have to write a build or config file that they are rarely going to have to edit their fingers, eyes, and brains revolt at the complexity. Scala also has some massively complicated libraries like Akka. Ruby has Rails. When languages/libraries get mature they get complicated and the languages warts show more and more. I expect we will see the same thing even with modern languages like Go and Rust.
- rco8786 10y agoAgreed up until the XML bit. It's not "XML vs YAML", it's "Why do you need all this static markup at all?".
- agentgt 10y agoIf this is going along the lines of S-Expressions I say touche but it is what it is. You need markup instead of code sometimes because you want declarative configuration. You want to sandbox a developer/user. Yeah you can write declarative code in Scala (and many languages using Monads, macros or some sort of non imperative abstraction) using an embedded DSL... but it is embedded and hard to enforce someone from sticking a System.exit(1) somewhere. Again If you are in the Lisp camp I submit there are better options.
- gnaritas 10y ago
- rattray 10y ago> The problem seems to be that Java devs like to create things more complex than they need to be. This was my experience as well when I first tried to experiment with Kotlin for backend web development (coming from a py/rb/jS background). I would still happily use Kotlin if I had to be on the JVM, but I came away with the impression that most – certainly not all – of the libraries and tools in the ecosystem are... not to my taste.
- didibus 10y agoJava frameworks are made for very large enterprise systems operating at high scale. Not for startups or POCs or personal projects. Frameworks for that actually exist in Java too, but they are harder to find. Once you know Spring, it actually makes you faster at building robust systems. Hibernate too, though SQL is easy enough I'd recommend against it, but c3p0 is a must for robustness, and hibernate does make it easy to switch to it. Now, Java is akin to PHP in that a lot of devs use it at small to medium size companies that don't always value tech. This means a lot of Java is written badly, concepts are misunderstood, best practices like layered architecture, interface indirection, class inheritance are pushed to extreme nonsense and abused greatly. Kafka and Zookeeper and Maven are hard to setup, but it's because they solve very complex prolems. I don't know any other open source dependency manager who offer the robust features of maven like self hosting, build and dependency resolution all in one and signed artifacts. Zookeeper is like the only coordination frameowrk that passes Jepsen. Kafka is unmatched in its special use case too. You're playing with framework handling highly complex problems, you shouldn't expect the easiest learning curves. Why are you even playing with these? There's very little project that would need such beasts.
- 1_2__3 10y agoI've always said Java was the first language ecosystem that let developers write code they neither understood nor could manage. I've been doing this long enough to remember what life was like pre-Java, and I did not at that time have a lot of conversations with developers for which their contribution was "I just use the foo framework, I don't really know anything about it." So congrats to Java for helping shitty devs get shitty code to production faster.