264 points · by letientai299 · 6y ago · 403 comments
IME a lot of developers don't like their IDE heavily coupled to backend servers and environments, but actually prefer the "code editor + useful features" approach. It makes combining with CI/CD a lot simpler for one, since the activities run on a project can simply be the same as those run on the pipeline. A quick "mvn install" is often enough for many/most modules. Many devs only really want advanced editing + syntax highlighting + language server.
I can see that by using an abridged and edited version of my analysis of the data for this blog post that I’ve unintentionally spread confusion. I’d like to clarify the intention behind my comments on developers and IDEs. For me, if developers don’t understand what IntelliJ IDEA gives them as a fully-featured IDE, that’s a failure on my part, since it has been my job for six years to educate developers on what an IDE (specifically IntelliJ IDEA) can do for you. I feel very strongly that one should never blame users, or prospective users, for failing to understand a product.
My personal viewpoint on IDEs for Java developers comes from having been a Java developer for 20+ years, working on production Java projects large and small. I can’t imagine trying to create a complex enterprise application without the considerable help you get from an IDE like IntelliJ IDEA. I have also seen lots of developers using VSCode and I completely see the use cases that code editors cover well. There’s always room for more than one tool in your toolkit, and understanding what a tool does well helps us pick the right one for the right job.
For longer sessions that's not a problem, but when you're on battery or quickly hopping into the project to look something up it makes a lot of difference. Also, opening up a foreign project is two clicks and one second, compared to project creation and then loading+indexing when using IntelliJ.
I love the IntelliJ line of IDEs. But VSCode outcompetes it in simplicity by far. Especially when we're talking about something like a simple Node project, where compilation+execution is far simpler than something with a full build pipeline with artefacts.
VScode is a very nice middle ground where the defaults make sense and you can get powerful extensions for everything else you want, there's a reason it's so popular.
That would be so far beyond impractical you wouldn't last an afternoon.
The way of the future is definitely lightweight code editors loaded with as much or little customisation as the user desires. Monolothic IDEs are long dead outside of the Enterprise™© world.
Funnily enough, I also found myself using Java and .net less and less. I never had much love for Java, but C# was an amazing language that somehow got gobbled up by the Enterprise black hole and it's a huge shame.
What in the world do you mean by this? C# is more amazing than ever...
The time of bloated IDEs is over. And you're right, I need to be able to run all CI tools the same I do on my development machine and the CI server.
Obviously, WYSIWYG and other graphical builders will always need a specific IDE in order to do RAD, but these are special cases, not the norm anymore.
Nothing prevent jetbrains from selling CLI tools that perform all the tasks in their IDE, especially when many of their IDE do rely on open source CLI tools at first place.
But If I'm developing say an Android app and I'm not the design integrator, I shouldn't have to fire an slow and heavy IDE just to write a bunch of Java classes. I have my maven manifest and it should be all I need to compile a project.
I find this pretty dumbfounding considering the amount of efforts that goes into IDEA, Eclipse, Visual Studio, and X Code on a daily basis.
Also, watch how VS Code (and other text editors) are slowly turning into full blown IDE's as well.
The code we write today has never been more complex, it requires matching complex tools.
And Intellij's products come from decades-old thinking about how to manage that complexity.
They're not good enough; for many people they don't help manage complexity. They just increase the confusion.
I don't know why it died, WYSIWYG and GUI-friendly IDE's allowed higher productivity in that "one-man-bands" (small staff) could do the entire project. Now development is often layered into specialists. Things like UI design and ORM's have longer learning curves, which emphasizes specialists. But staff is larger per feature: less productive. (There are many times I wanted to shoot Bootstrap in the head when I couldn't get it to act how I wanted. Something in WYSIWYG that would take 20 seconds becomes a 2 day trial-and-error session in Bootstrap.)
WYSIWYG/GUI-IDE saved money. Most businesses don't run their internal productivity software on mobile anyhow. "Progressive" UI's are a money sink in practice.
The trend predictors got it WRONG: desktops live on in biz. Our anti-state-GUI web standards don't help. Businesses really want cheap rich desktop-like GUI's for productivity software.
I'm not against flow-based layouts, but they should be an option, along with WYSIWYG.
Can I ask where you you see this demand, is it industry specific?
I was under the impression that the benefits (easy deployment to a known runtime aka the browser, open ports (80/443) in the firewall, large developer pool, potentially cross-platform use) outweigh the UI shortcomings and budgets were shifted to web-based productivity software.
But when I want to write my code, get correct linting, inline documentation, Java-to-Kotlin conversion of old code, the whole range of interacting with the device I am running my code on, management of my Gradle tasks, VCS integration, Task contexts, remote connections to test databases (and the whole other metric ton of features I wont get into) I will always take Android Studio over what ever flavour of the year text editor.
I really enjoy using VS code, but it is no IDE.
I have Webstorm with 15 projects open using 500mb of ram, and IntelliJ using about 800 on a larger Java project.
The key selling point of Intellij IDEA is they come with semantic refactoring tools, for something like "move this method into its parent class" or "extract the selected methods to a new interface", which is still rarely seen in the wild, and didn't get mentioned at all in your list, but it saves real time.
If you structure things differently - say, by steering clear of subclass inheritance, or keeping interfaces small, or not using the Bean pattern, then you can pretty quickly discover that there aren't all that many IDE refactorings that you actually use.
At this point, most the refactorings and code actions that I'm actually using exist in vscode as well; IntelliJ's main advantage is that I'm (somewhat) more able to use them efficiently without taking my hands off the keyboard.
VSCode with its flexible plugin system got this right. Even though it isn't a speed wonder itself, it's still better on average than most "heavy weight IDEs" I've seen).
I don't know how long ago you tried Rider, but after more than a decade of using Visual Studio I had had enough of the lag, broken features and instability - I moved to Rider, and couldn't be happier. In fact, I'd say it's one of my favourite ever pieces of software. It obviously loads much slower than VS Code, but then in operation if feels snappier and never lags. I've also never once had a release version crash, which for such a complex tool is pretty impressive.
True, QtCreator performance is fine. But I found the whole toolchain integration (Kits?) and cmake integration a bit weird if I remember right.
The fact that it played so nicely with CMake was an added bonus.
But having a language that enables the functions of an IDE is a big advantage. A good text editor that manipulates characters efficiently is absolutely valid. But an IDE that treats code as an AST gives you a lot. After all when you think of code you think of it in trees/graphs: You go to fix a bug, one of the first things you will probably ask is "what calls this code?". Being able to do that, right up to the top of the call hierarchy, instantly, without having to run the system is a huge advantage.
An IDE gives you the tools to reverse engineer the design (or lack of it) from the code.
This is indeed useful, and languages with semantic IDE tools are indeed better at it. But this works for me in JavaScript 90% of the time with just text-based (and I think it probably tracks imports) tooling.
Which is not to say that my understanding of Java extends to working professionally in it; I'm a functional programmer and broadly unfamiliar with modern Java's specific patterns.
The question is: why? Why would you not use an IDE? Looking at refactoring capabilities alone you'd want those for any language [1] And on the fly actionable code analysis [2]? Why would you not want that for a programming language?
[1] https://www.jetbrains.com/help/idea/refactoring-source-code....
[2] https://www.jetbrains.com/help/idea/list-of-java-inspections...
How does Java need strong IDE more than other languages?
The only thing I can think of is the (long) import handling, but that's hardly a "strong" IDE feature, more like bare bones IDE feature.
And because Java is statically typed, this enables you to do things like changing the name of the "save" method in 83 of the different 132 instance, namely the method from class "Widget" and all its subclasses. And, of course, update the right callers.
If you are doing Python or JavaScript, you often don't have much of a clue what the type of "foo" is in that "foo.save(a, b);" call, and so you don't know which of the "save" methods are being called. And you know that when creating your app, so you stay clear of class hierarchies that require this IDE functionality to untangle :-)
Throw something like eclipse/Jetbrains at it and the whole thing has an aneurysm .
If your language requires an IDE, you've already failed
That said, when I need to work on a Java or C# project I put Emacs aside and reach for my preferred IDE. There is overlap between a text editor and an IDE; certainly I can _make_ a text editor do _most_ of what I get from an IDE but is it really worth the effort?
In my opinion, IntelliJ is on point here in some cases; I suspect developers coming from a background in front-end or a language like Python or Ruby are very comfortable with their text editor and tend to use these same tools for work with Java or C#. In this case it is likely that they are to some degree unaware of the benefits of a more integrated IDE.
In terms of CI integration, in my experience this has never been a problem (I have never really used Eclipse). My Java IDE uses the Maven configuration to manage the project and the CI process calls Maven from the command line. In the C# environment, the command line tools works in a similar way.
At work, I deal with JS, Python, and Java. I don't really care to spend the effort to configure Emacs to handle all the oddities of a super old codebase reliably. I just grab vscode or intellij. They're fine.
The disconnected VSC model - main company in charge of the editor, and third parties in charge of certain language plugin[s] - puts some languages' support at risk of being insufficiently developed.
I "only really want advanced editing + syntax highlighting + language server", and use VSC, but, while its support for "statically typed languge #1" is ok, the support for "dynamic language #2" is atrocious, to the point of being unusable (poor "go to definition", editor aggressively misaligning lines of code, etc.). I'm not sure it will ever reach sufficient support.
On an IDE, this doesn't happen, because the developing company must, within a certain qualititative extent, take care of all the functionalities.
OTOH:
1. it encourages the main company to simplify and/or extend the plugin API to make writing plugins v simple, or even possible in the first place.
2. it gives a smoother path for the inclusion of new trending technologies into the IDE.
3. it encourages devs to offer improvements to features that aren't high priority for the large IDE company.
For the latter, I'm thinking of Lombok support which, via a plugin, is much better in VSCode than it is in either Intellij or Eclipse.
Studying how the IDE made use of Turbo Vision was a good introduction to OOP ideas.
Personally, I use VSCode for generic text editing, scripting, taking markdown notes, general purpose review/browsing repos (e.g., opening up a project to review a couple of python classes), etc. It's nice for switching between a variety of languages and use cases. I like the integrated terminal, the directory search feature (so much less clunky than the equivalent Mac Jetbrains IDEs' features), the multiselect text editing experience, the ease of configuration, and the general responsiveness.
But if I need to do a deep dive on a language, I generally switch to a fully featured IDE. For example, if I need to refactor 10000 lines of C#, I'm definitely going to switch to Rider or VS with Resharper where the built-in refactoring, debugging, and static analysis tools are so much more powerful.
So really I see them as different tools for different use cases. VS Code is nice for my fluffier, tech lead work, where I tend to bounce around between fifty disparate tasks in fifty different contexts. Rider, Pycharm, CLion, etc. are more useful for me when I have to fall back into doing deep dive technical work personally.
Seriously? They should have a look into what VS Code (and friends) can actually do! Once you outsource your refactoring machinery into something like TypeScript or Roslyn (C# Compiler) you suddenly have these features available everywhere. And in that regards, the should also just look what their Resharper Product is doing in Visual Studio and JetBrains Rider.
I think the only lack in editors is visualizations. I think that will be soon a theme in VS Code ;)
VSCode, when it works, gives one a glimpse of what you be a good IDE (Visual Studio proper, JB Rider), yet is light-years away of being one.
I was addressing the c# refactoring s. They were delivered with roslyn to VS and exposed to VS Code via OmniSharp. The gap of C# refactoring in the VS 2008/2010 era is due to the Roslyn project blocking all other efforts. So C# refactoring are only realized via Roslyn Analyzers and with that available to VS Code.
And VS Code is executing them nicely. There is no gap.
[1]: https://charlespetzold.com/etc/DoesVisualStudioRotTheMind.ht...
You really don't want to add ephemeral designer tools to your list of hard project dependencies.
The Delphi, C++ Builder, Forms/WPF/UWP, Swing/JavaFX soul in me begs to differ.
In fact that is the biggest pain in Web projects to this day and I can hardly wait for stuff like Uno and Blazor to bring "Flash" back, if Web Components don't do it first.
Still no idea. Seems to be a synonym of IDE, but not really?
For example in Lazarus, Delphi and C++ Builder when you edit components in the visual editors (be it the form editor for making a GUI or a data module editor for non-visual components - e.g. editing the routing for HTTP requests in an fcl-web application) you are actually editing live objects which are serialized as part of your application when you save the project (contrast this to something like Qt Designer, Gtk's GLADE or wxFormBuilder for wxWidgets, which only create stand-in controls that pretend to be what you are designing). The IDE exposes the properties and events of those components by using their RTTI information of the object instances directly (instead of hardcoded knowledge of using some configuration file) and it has full knowledge of the source code you are editing so that it can automatically create event handlers, functions, variable declarations, etc for you (no need for special comments or whatever) as you edit the components and the code (this isn't just for component editing btw, in Lazarus you can do something like start writing a `for I:=0 to 100 do` loop, then move the cursor to the `I:=` part, press a key and have the IDE deduce the type and declare the `I` variable if it is missing).
One way to think of it is like if you are making a game in Unreal or Unity where you also work with live objects, but instead of those objects being levels, pick up items and monsters, they are forms, modules and buttons for your application.
I personally find IDEs are way too complex and cluttered for my personal tastes. To boot, a code editor allows for unified workflows across a broad swathe of languages in ways that IDEs simply can't replicate. It's a pity Jetbrains has long held a dismissive attitude[2] toward developers that don't want a full blown IDE, but that's what you get when there are financial incentives attached.
[0]: https://microsoft.github.io/language-server-protocol/
[1]: https://github.com/fwcd/kotlin-language-server
[2]: https://discuss.kotlinlang.org/t/any-plan-for-supporting-lan...
I like the really powerful code completion and refactoring tools a good IDE brings to the table but this one strikes me as extremely odd. In 2020, I would want all IDEs to remove this kind of functionality because I don't want to deploy from my IDE ever and I don't want teams that work with/for me to ever use it either. I want to push my git commit and have everything building in my CI/CD pipeline.
It's absolute pain to write Rust/Java/C++ in any of those. No safe refactorings (moving classes? good luck), completely random code completion, 0 awares of available libs/SDKs, and so on.
It would seem that most of the developers have no clue what's the difference between a lightweight editor and a full-featured IDE. I think it's just Dunning–Kruger effect on a scale.
I understand that I'll be voted down into oblivion but it really rubs me the wrong way when people confuse some kind of server/application server (???) integrations with an IDE that can offer sophisticated refactorings, a proper type inference, and can infer which functions from which lib/SDK I am using.
No, I don't need or use all the IDE features. I don't use the integrated shell, I don't use the git integration, I don't have it handle my packages. I don't see a need for these things when I always have multiple terminals open anyways, but proper code intelligence is not something an editor+plugins can provide like a real IDE can.
I don't care at all if someone prefers IntelliJ over Emacs (that's a pure matter of taste) but the idea that it's impossible for an editing environment that isn't delivered as a single, integrated monolith to expose powerful language-specific tools such as interactive lints, large scale refactorings, debuggers (check out DAP for the debugging equivalent of LSP), etc was never true as a technical matter and is increasingly untrue in the real world.
One of the best developments in dev tooling in recent years is that it is starting to be seen as the norm for new languages to provide canonical language server implementations. Long may that trend continue.
Seems like you haven't used VSCode in a long time. It is my primary everyday editor for Typescript, and it has all of those things you listed: I can move a class to a separate file in one click, code completion always follows type system, it is aware of all packages that I have in package.json and offers to import them, and so on.
The IDE/editor distinction really doesn't have as much meaning as it once did.
My biggest problem with vscode is lack of UI configuration. You can have only one panel which is huge waste on big screen. Some useful features compete for screen space (outline vs. project explorer, project explorer vs. debug window etc.). This makes me way less productive than using heavyweight configurable IDE.
I've tried it for more serious development for Rust, Python, and TypeScript. While for Typescript the inference is barely acceptable it complete sucks for Rust/Python.
My guess is that was intended as hyperbole, like saying you think they are "crazy" for doing so. Still, I'm thinking you'd be more likely to get interesting feedback by stepping it down a bit.
I find it incredibly pompous that you believe that people who have been writing C++/C even Java for decades in editors like Emacs, Vim or even Sublime don't know what they are doing. The IDE vs Editor argument is nearly as old as Emacs vs Vim.
As a personal anecdote, I've seen people switch from vi to IDEA after a pair programming session. In that session they learned that IDEA has full understanding of the frameworks, configurations, code annotations and bindings etc. that we used in a project, and that you don't need to spend 15 minutes furiously searching in files for stuff when you have to change something in two or more places.
> In the web space it is understandable to use an editor as web developers are typically working with dynamic languages
> But in Java, especially professional Java, you really get a lot out of a good tool
What are the reasons that make you intentionally "lose" the advantages of the IDEs?
What do you have in return?
I think the issue is more how snappy/bloated they are. I don't mind all the integrated features, but IntelliJ has gotten slower and slower over the years, and its starting to get annoying, especially on anemic laptops.
I personally saw no value in intellij compared to what vscode offers.
VScode has won both the intellij Vs eclipse AND vi Vs Emacs holy wars for me. Nothing else matters anymore (unless you need to SSH directly into a box and make edits there of course, for which we have vi) - it really is an amazing editor in my view.
I can't see the need for an IDE like intellij at all when you have an "editor" as capable as vscode.
I still use Netbeans for Java. It's simply the best.
I'd particularly like to see a use-case laid out where something like VSCode + Extensions wasn't actually enough. I've been using IntelliJ nearly every day for the past 4 years and I still don't understand how it is any different from a text editor + extensions. IntelliJ is even architected similarly with so many different "plugins" adding full fledged language support for other langages. Goland, Pycharm, etc, are basically extensions for the intellij text editor.
Personally I really like the freedom to switch editors.
I've been recently using VSCode with TypeScript (and Prettier/ESLint). TS is pretty neatly integrated with VSCode, and I've been wondering how similar the VSCode + TS combo is to writing Java on an IDE like IntelliJ?
I've found that VSCode can trivially be expanded to be more fully-featured than any IDE I've used -- includiding Eclipse, Idea and XCode.
It's not even the difficult kind of trying to make Vim or ST or even Emacs an "IDE-like" editor with a mismatch of third party plugins of varying quality and integration.
VSC has a few first-class, officially-supported (e.g. MS) plugins that immediately give you nearly all IDE superpowers (inline debugging, intellisense, build environments, git, remote development, testing, etc) with very tight integration.
In fact VSC is so well designed for extensibility / plugin integration, that even third party plugins feel native and integrated to the UI/experience. Despite it's origins as the Monaco editor or Visual Studio's "little cousin", it's more of a "a la cart IDE" today than a text editor + some plugins.
I'm not an Electron fan, but VSC is a great app.
* Better refactoring
* Better linting and code cleanup; Most of the time I learn new language features from the IDE linting
* Awesome diff/merge tool; Not just for git but for local history (undo/redo)
* Debugging/running multiple projects at once is also nice
* Better dynamic language support; Easier to use on a large wild Javascript codebase
I had weird issues with Eclim that kind of came and went and that was a big part of my dropping it. If this is more reliable I can see situations where I might prefer to try and edit my Java code in Emacs.
I mean that is my theory ... and I think a lot of people share that theory.
For most devs, and especially HN-mingling devs, it's either system work, embedded work, ML/AI/Data Science, backend work, html/js frontend, or Electron -- and as for native apps, most focus on iOS or Android (rather than desktop native).
Somehow RAD native apps became the forgotten stepchild.
Try to do iOS storyboards by hand in a text editor loved by the HN UNIX crowd.
I think the author doesn't know what VSCode can deliver.
> In the web space it is understandable to use an editor as web developers are typically working with dynamic languages
So? Most popular dynamic languages have optional static typecheckers, and the VSCode ecosystem has extensions that leverage these to provide many features common in IDEs for statically typed languages. Of course, the VSCode ecosystem also does this for already-statically typed languages.
> But in Java, especially professional Java, you really get a lot out of a good tool that has integration with the application server and you can really use the analysis and refactoring and everything.
“Analysis and refactoring and everything” isn't something VSCode overlooked developers interest in, and application server integrations are also part of the VSCode ecosystem.
Here's refactoring and code inspection in IDEA [1], [2]. VSCode is just that: a code editor with some features tacked on.
> “Analysis and refactoring and everything” isn't something VSCode overlooked developers interest in
This is somenthing most VSCode developers (and emacs and vi developers, too) aren't even aware exists.
[1] https://www.jetbrains.com/help/idea/refactoring-source-code....
[2] https://www.jetbrains.com/help/idea/list-of-java-inspections...
For projects built in a microservices architecture, these massive refactors are becoming less and less common from what I'm seeing. Usually if you want to change a method/class/library used by multiple different modules, it'll be a breaking change and most likely better handled by depending on a semver-versioned import anyway.
I have yet to see vscode perform one third of the refactoring options provided by e.g. qtcreator for c++
Although, I'd be probably be pretty harsh reviewing any PRs where because of the lousy tooling the code is full of unaddressed warnings, misorganized imports, or where the author can't be bothered to refactor because they lack the tools.
The reality is that on most projects you can use whatever you want as long as it does the job, properly. VS Code is mostly not very practical on such projects for Java projects because standards tend to be pretty high because of the tooling.
VS Code is still valid of course for those who only occasionally need to do any changes. I tend to use it for things like javascript/typescript and rust or other things I use less frequently. I switched to pycharm for python though because it seems marginally better at supporting that.
The Java experience in VSCode is quite acceptable, it is the Eclipse language server after all. The warnings and inspections are on par with intellij most of the time, but your devs should be using sonarlint/cube which provide far superior inspections on either platform.
As for organized imports in my experience Intellij just organizes them into one giant list alphabetically while the language server does the same except it's organized by JDK imports, javax.* imports, third party imports, and finally in project imports.
That's just a configuration, you can absolutely define import groups in IntelliJ
Can it Inline Variables yet?
And you'll find other refactoring options as well, e.g. rename, extract...
It's not Jetbrains' responsibility to resolve these geopolitical tensions
It's everyone's responsibility to stand up against tyranny, for ethics. Saying it's not your problem because you'd lose money if you did the ethical thing doesn't absolve you- it makes you just as bad.
I'm reminded of the small and rather racist town I grew up in. I heard someone say once "I have no problem with <race>, but I couldn't possibly hire one of them because too many of my customers would get upset". They weren't racist, but they'd cater to racists because it was financially better for them. Oh, I'll do the right thing, unless it costs me a penny.
Lots of them will stand up for LGBTQ+ rights, because it's a relatively easy thing to do. They will even put up posters in their offices or make press releases supporting this cause or that.
But stand up for Hong Kong where so many people are being brutalized or repressed every day and your biggest customer is out. Look at the contrast with Blizzard's acquiescence. It's stark.
The companies only really do this in situations where the incentives line up - low risk, high financial/PR return. I hate being cynical when it comes to "changing the world" style arguments, but the fact is that companies are only going to make them when it's convenient, and nobody is going to confront China because they simply have too much power.
It would be better if the media or another powerful enough entity would really against companies being ethically shot for these transgressions, but it seems like they have more or less forgotten about Blizzard and the like by now.
There are so very few people that fit that criteria of doing the right thing even if it costs them.
As an example: its the reason we kid ourselves into thinking we care about global warming while driving cars into supermarkets for shopping. Sure, we'll protest but that costs us just an afternoon and acts as guilt-offset as opposed to giving up habits that bring us great convenience but do significant environmental damage like supermarkets and cars.
So its the same here, there is barely _anyone_ who would give up something _real_ for Taiwan so IMO its a bit harsh to expect Jetbrains to give up something when we ourselves probably have very little to lose.
Now if we were speaking from a position of a company that did have something to lose, _that_ would be something.
Java feature releases have always been supported for 6 months. 7u4, the feature release that introduced G1, was supported for 6 months; 7u6, the feature release that introduced JavaFX and support for Linux on Arm was supported for 6 months; 7u40, the feature release that introduced Java Flight Recorder and Mission Control was supported for 6 months; 8u40, that introduced AppCDS and support for Mac OS was supported for 6 months. What seemed to be supported for more than six months were the major releases that these big feature releases were considered to "support" (which, back then, were called "limited updates" to the major release). What's changed is that major releases are gone. If you want to think about it using old terminology, all feature releases are now part of the "support" for the last major release -- 9 -- which is supported for all eternity or as long as Java lasts, whichever comes first.
The fact that after major releases were abolished, the feature releases were given new names has certainly had a big psychological effect, but I think the main issue is that many companies are severely overestimating the cost of the one last major upgrade past 8, and severely underestimating the monetary gains in hardware/hosting due to the lower footprint and higher performance of new versions.
It doesn't matter that minor releases within Java 7 or Java 8 introduced new features. What matters is compatibility. If your code ran on a given Java 7 release, it would work unchanged on all later Java 7 releases; the same for Java 8. The same pattern still applies for later Java versions; if your code ran on a given Java 9 release, it should work unchanged on all later Java 9 releases, but not necessarily on Java 10 or Java 11 (this is not a theoretical concern, I've seen it happen in practice).
> but I think the main issue is that many companies are severely overestimating the cost of the one last major upgrade past 8
I worked on upgrading one large codebase from Java 8 to also compile and run on Java 9 and Java 11 (making it run on Java 9 is a good first step to making things run on Java 11, but it's not enough; there are important breaking changes on Java 11), so I have a good idea of the costs. It's not just the compiler being slightly more strict with generics and a new class in java.lang conflicting with a wildcard import, which are very easy to fix, or the whole system failing to initialize when ran on the Java 9 or Java 11 JVM, which is annoying but hard to miss; it's also less used parts of the system failing to work when it's on a Java 9 or Java 11 JVM, many months later.
You not only have to upgrade your code (and hope your QA and unit tests caught all relevant cases) for the new Java version, but you also have to upgrade all your dependencies, recursively (and hope they didn't introduce any compatibility breaks themselves), and sometimes even introduce new dependencies (especially for Java 11). As late as this year, I was still seeing open source libraries releasing compatibility updates for Java 9 and/or Java 11.
† Admittedly only if you're getting feisty with run-time reflection fanciness. Which you probably shouldn't, in principle, be doing in the first place. But, in practice, it's pretty standard practice in Java.
> If your code ran on a given Java 7 release, it would work unchanged on all later Java 7 releases; the same for Java 8. The same pattern still applies for later Java versions; if your code ran on a given Java 9 release, it should work unchanged on all later Java 9 releases, but not necessarily on Java 10 or Java 11 (this is not a theoretical concern, I've seen it happen in practice).
But the situation now is even better. If your code works on 9, it will work with no or very few changes on 10 and if it works on 14 it will work with no or very few changes on 15, but while there might be slightly more work between 14 and 15 than between 8u20 and 8u40, in exchange you never have another major upgrade again. So the work is just spread differently, and in a way that makes it less costly overall, true, once you've got used to it.
But there's one more difference to those who do remember how things were: It is true that in the Java 6-7 era there weren't as many breaking changes, but that was mostly because Sun was dying and Java barely changing. With Oracle's growing investment, change is picking up, and the new release model makes it easier to cope with, not harder, as those who'll skip too many feature releases are sure to find out.
> You not only have to upgrade your code (and hope your QA and unit tests caught all relevant cases) for the new Java version, but you also have to upgrade all your dependencies,
I'd say that such a policy is based on folklore and/or luck rather than actual long-term experience. You have to do that for every patch release, too (although "upgrading your code" is not something that's very common in Java; most JDK 1.4 code still runs unchanged, and the required changes are mostly on the command line, not in the code). It is not the small spec changes that are most likely to break your code in complex ways, but internal changes that occur even in patches. The change that required the most code changes since 9 has been this one [1], in 11.0.2/8u202 -- i.e. a patch release, not a feature release.
The one area where there is more need to update dependencies on feature releases than patch releases is in bytecode parsing/manipulating libraries, some of which for some historical reason (a bad ASM accident about 8 years ago) still insist on shadowing ASM into their JARs. As a consumer of such libraries, you should advise them to stop.
[1]: https://pangin.pro/posts/computation-in-static-initializer
Come on, IntelliJ. You are still THE standard in Java development and it's on you to keep that first place. Those "opinins" on Visual Studio Code are ridiculous...
This really makes me want to try out Visual Studio Code for Java.
I remember trying both Netbeans and Eclipse. Both were nice but very slow. Nowadays I sometimes use programs based on eclipse (birt or xmind) and God they make me happy that I'm not doing java dec on Eclipse.
In fact, I think VSCode is one of the best things to ever happen to JetBrains. In particular, Live Share forced them to finally respond with their equivalent product Code With Me (several years too late, but at least it's here).
Without VSC, I don't think JetBrains would be responding nearly as well. It's baffling they consider themselves a full-feature IDE product while having an inferior alpha live share that was rushed through only in response to competition. It's been suggested for years.
I figured Eclipse was the most popular, followed by IntelliJ, followed by NetBeans. Is this mistaken? (I couldn't find a definitive answer with a quick google.)
IntelliJ: 72%
Eclipse: 13%
Netbeans: 3%
Who knows how realistic it is though... I personally enjoyed working with Eclipse. It simply suffers from a reputation problem because people developed monoliths with hundred thousands of lines in a single maven project in it...
I didn't stay long at either place - for some reason both companies were horrible places to work.
I have noticed a lot of new grads come out of College knowing Eclipse (and only Eclipse). Which is probably why it persists - and I still have to deal with it when I have to help junior devs figure out what's wrong with their eclipse config. Occasionally I can get one to convert to IntelliJ - the rest won't try a new IDE and that's a pretty good indicator of what kind of engineer they're going to be :)
I understand the annoyance with not being able to fix one's setup and that's on them.
But it seems very strange to fixate on what other people use as tools... Especially when both propositions are on the same productivity level. It's not like your colleagues are coding java in vim (and even then if productive AF, why does it bother anyone?).
Git's implementation is stronger and more useful for larger projects than Mercurial's, even if the user interface is less logical.
It's not that the software world is driven by hype but that the software world is driven by what the giants do. Often, what Google does isn't right for a small project.
I get it. Most software is boring, doesn't break new ground, and Go is well suited for those kinds of projects.
But I'm becoming an old, cranky developer who wants to work on problems where Go's mediocrity is more hindrance than advantage.
Guess how Go will look like at 25?
Keyword being "supposedly", because in practice, it's quite terrible compared to established solutions like Java and C#.
Removing complexity from the language just moves it onto the developer and end-user code, it doesn't eliminate it. Go's mediocrity is a ticking timebomb.
I went ahead and used Javalin, which I'm a little bummed to not see represented on the survey - it's meant as a successor to Spark (which I haven't used), and I really like it. It uses similar patterns to Koa/Express in Node, which made it easy to understand. The big downside of not using an integrated ecosystem like Spring Boot, of course, is more glue code, but I actually haven't found it _that_ bad.
The trick with Spring Boot is to keep things simple and avoid some of the stuff that is there for legacy code bases. Also, there is a lot of complexity lurking in using stuff like JPA (which I tend to avoid), spring data (like wise), spring-batcg and a few other things that IMHO are not so great. But the core of spring's dependency injection and e.g. MVC with kotlin's co-routines is pretty nice. If you want graphql, there's a great spring library for that from expedia that makes this super easy to setup.
The reason javalin and other frameworks are not mentioned is because it's part of an enormous long tail of stuff. A quarter of a century of Java means that there are a lot of things out there that are still being maintained and actively developed.
Technically, Spring MVC and Spring Boot are the actually the same thing pretty much. Spring Boot basically just packages up Spring 5.x with a lot of convenient things. I've actually migrated a few old spring projects to spring boot at some point.
Spring Boot is a "convention over configuration" framework for modern 12-factor apps. It integrates the other Spring libraries (like MVC) by providing "starters" that come with a basic configuration. For instance, adding the Spring Security starter package automatically configures Basic Authentication for all endpoints.
Spring MVC is the Servlet-based web library, it includes functionality for serving HTTP endpoints as well as an HTTP client.
This is in contrast to Spring Webflux which is the new reactive web library. It also includes server and client functionality.
Neither are required in a Spring Boot app though.
If you are accessing databases, JPA/Spring Data are pretty much the most common options. For typical use cases, the configuration is straightforward and features like Query Creation[0] can get rid of so much boilerplate.
[0]: https://docs.spring.io/spring-data/jpa/docs/current/referenc...
But, Spring Boot is much more modular and I'm impressed with compile and startup speeds. No more XML - unless you want to, but not on my project :) It also supports automagic docker image building using build packs, which keeps the size of images down (not as small as a service built using Go or node, but not as horribly big as you'd expect from Java).
I still have a preference for Clojure and integrating small libraries, but on larger projects where you're working with other devs and need to get moving quickly, Kotlin + Spring Boot is a powerful combo that's hard to argue against :)
care to explain?
I don't think TS is immature, but whether it's true or not, Java is still used by 90% of the enterprises. I am amazed why Node.js (TS in server) could not yet challenge Java, especially in large enterprise systems.
To justify switching the stack (at gigantic expense in training and engineering), a vastly superior technology would have to present itself. I don't think switching from Java to Node would make a big difference for the bottom line.
I don't know why, just feel like that, maybe stricter typing system and more verbose language is giving me more confidence.
Not every enterprise runs a single huge monolithic app or codebase.
I'm still planning to write a longer blog post about it with more details. I think in terms of enterprise usage, there is no equivalent to a batteries-included framework like Spring Boot - especially not one with paid support available for big companies.
There are a lot of Spring libraries to learn about, but only a couple are actually required in a Spring boot app.
switch(sort) {
case "asc":
sortedComments = topicComments
.stream().map(Comment::getThreadComments).filter(Objects::nonNull).flatMap(Collection::stream)
.sorted(Comparator.comparingLong(PostResponse::getCommentPostedTimeMilles)).collect(Collectors.toList());
break;
case "desc":
sortedComments = topicComments
.stream().map(Comment::getThreadComments).filter(Objects::nonNull).flatMap(Collection::stream)
.sorted(Comparator.comparingLong(PostResponse::getCommentPostedTimeMilles).reversed()).collect(Collectors.toList());
break;
}
I selected the first case and applied "Extract to method" and IntelliJ automatically suggested and applied the method to the second case also. Not sure if Eclipse will do that.Basically, Spring + Kotlin is a great combination currently. Spring has first class support for Kotlin and it arguably makes a lot of things easier. E.g. async io with Flows instead of Spring Flux is a lot nicer. I've done several projects with that in the last few years. The Spring people have done a lot of good work in recent years of making it work seamlessly with kotlin. E.g. their flux stuff is a bit clunky but interoperates nicely with Kotlin's co-routines and flows, so you mostly don't have to deal with it.
Also on Android, basically most projects are Kotlin at this point.
Android is going Kotlin because Google needs a way out of the mess they themselves created.
It is quite telling that they purposely always compare Kotlin to Java 7 code samples.
I find I prefer Jetbrains IDEs to VSC, massively so. VSC is nice, and I tend to use it as my daily driver, but I experience a host of issues with it that I've never been able to solve. In no particular order:
- Autocomplete/Intellisense/whatever-you-call-it just stops working, constantly. This has persisted across many languages: Rust, C, PHP, Elixir, Java, Javascript, Typescript, Scala, ... despite having the relevant extensions installed. It's incredibly frustrating. Reinstalling VSC, disabling all extensions, etc etc etc has made no change. I've found absolutely nothing that indicates what could possibly be the issue, and fixes I've found online haven't helped. I admit I have a habit of leaving VSC open for days on end, but that shouldn't impact anything -- Jetbrains IDEs work reliably for me under the same circumstances.
- Performance-wise, I find it slower. Sure, a window opens up fast, but that's about it. I have a few extensions for symbol/token colourisation (think rainbow parens, rainbow do/end in Elixir, ...), since it makes it easier for me to read the code, and I find that these have a giant impact on its performance. Things like smooth scrolling -- which I like -- tend to lag out a lot for me when there's a lot of text in the terminal, even when not coloured or anything. It's not like I'm running this on a low-end machine, either; specs are R7 1800X / GTX 1080 / 64GB, so to me it's absolutely inexcusable that it's this slow.
- Unreadable themes are an issue I've run into, tho I understand this isn't a VSC-specific issue. With VSC specifically, I can't find a theme that actually has comments that feel readable to me -- I strongly dislike green comments, and all the themes I've looked at make comments a really low-contrast colour that blends into the editor background. I have neither the time nor the patience to make my own theme (or customise someone else's), so using VSC just becomes frustrating at times because someone thought low-contrast comments were a good idea.
- Stuff like jump-to-definition, refactorings, ... are consistently either not-very-functional, or just don't work. Jump-to-definition specifically loves to just give "No definition found" even when the relevant symbol is in the same file.
Maybe I'm doing something wrong, I don't know. But I've used VSC for the last ~2 years and it's been consistently far less usable for me than a Jetbrains IDE. VSC feels like I'm using a plain text editor with syntax highlighting, an integrated file browser, and an integrated terminal.
I don't understand why people consider Spring to be overengineered. We find it very productive, time to market is huge and we can focus on other parts of development instead of reinventing the wheel. We are also considering Quarkus for some of our services that aren't supposed to run for a long time.
But I have to admit that Spring Boot combined with Kotlin is the most productive development environment I have ever worked in. I am not surprised it is so popular among Java devs.
That assumes you're starting a greenfield development. If you're joining existing companies with a mature tech stack, you won't be able to unseat their existing choices because there's a lot of risk involved.
It was used in one of the first big projects I did and it helped me become a better developer.
In this current post monolith, micro-service world, most java applications remain very maintainable though.
Fixed it for you.
Let's start with this: https://github.com/tinspin/rupy/blob/master/src/se/rupy/http...
How is the abstract class of yours less limited?
- No clear separation between the protocol concerns and the application concerns.
- Unable to take full advantage of the non-blocking NIO due to blocking IO assumptions.
- Full Servlet Web containers are overkill for many applications.
My design fixes all of them and adds many features:
- It has classloader hot-deploy, which means you can replace the implementation while people are requesting things from the server for zero turnaround development over HTTP distributed across continents securely.
- It uses non-blocking sockets, concurrent lock-free data and async. network implementations to allow for joint parallel scaling (many threads accessing the same memory).
- It implements "transfer-encoding: chunked" to allow real-time server -> client messages without over-engineering.
- It has a distributed JSON file database hosted on-top-of HTTP so it can scale.
To answer your question specifically:
The Service.java is similar, but Event.java and Reply.java are different as they allow hold() and wakeup() for NIO concurrent async. features!
Jetty has continuations per Servlet 3.0 spec.: https://www.eclipse.org/jetty/documentation/current/continua...
> - No clear separation between the protocol concerns and the application concerns.
Waiting for the link to see the details of this conclusion. In the interim, "application concerns" are addressable via https://docs.oracle.com/javaee/6/api/javax/servlet/ServletCo...
> - Full Servlet Web containers are overkill for many applications.
This is true. Servlets are clearly part of the Component Oriented Distributed Middleware architectural vision of Sun Microsystems' architects circa late 90s. A beautiful component oriented architecture, imho, but yes, too overblown for your basic web-apps.
> My design fixes all of them and adds many features:
I'll take a look. I don't think (per above) that your solution is really demonstrating a short-coming in the design of Servlets. You have entirely distinct design goals that merely share a network protocol in common.
I suggest you not to follow the mob and think critically about libraries you're going to pick up or the way you're going to use them. For example Spring can be magic, but you have an option to make it very explicit.
But there's not doubt about the fact that mainstream Java has taken a wrong turn at some point.
They claim to have 72% of the market based on their own survey (given to their own users), and eclipse only has 13%. Can't believe they would even bother to publish that.
1. It's too memory hungry for a project that uses microservices.
2. Lack of official support for OSGi & bndtools (although it looks like almost no one else is using it based on their data).