Which Is the Best OS To Use To Develop a Java Application?
One subject that often evokes a lot of debate is which is the best OS to use to develop a Java application. This article gives one view on the issue.
Join the DZone community and get the full member experience.
Join For FreeOne subject that often evokes a lot of debate is which is the best OS to use to develop a Java application. This article gives my view on the issue.
Java runs very well on Windows, macOS, and Linux Distributions.
I work for Chronicle Software, and much of our software is open-source Java libraries, so we don't - or rather, we can't - require our customers to run on a particular operating system. You may be surprised to hear that we don't mandate which operating system our staff should use either. We let them use the one that causes the least friction, the one that they are most productive with.
When it comes to your setup to develop your Java application, the most important choice is which Integrated Development Environment (IDE) you select, not the choice of the OS. Choosing a good IDE can boost your productivity, but we don't force everyone in the company to use the same IDE. That said, every Java developer we have hired in the last eight years has selected IntelliJ as their preferred IDE: JetBrains must be doing something right.
Before I used IntelliJ, I used to use Eclipse. I was forced to use IntelliJ when joining as a developer for UBS Investment Bank about 15 years ago. At first, I was not too fond of IntelliJ: nothing was where I expected it and it felt like I had my hand chopped off as everything seemed to take ten times longer. Over time, I grew to love it and appreciated its exceptional code refactoring.
When considering which OS to develop on, it is worth considering the OS of the target architecture. At my company, we develop low latency event stream messaging software. This software is used by many of the world's investment banks and crypto exchanges. Usually, the investment banks develop on Windows and deploy to Linux. On the other hand, crypto firms often embrace macOS for development. But almost every organization uses Linux for production.
While the OS which you develop on and your production OS don't have to be the same, it is good to consider your production OS when choosing your development OS.
FreeBSD underpins macOS. This is not Linux, but it is Unix, so they have a reasonable degree of similarity, especially in terms of commands, shell, etc. However, there is a fair degree of divergence under the covers: macOS does not offer the same fine-grain control. This can negatively impact you if you intend to do low-latency development. For example, you want to control which cores your threads are pinned to. For most Java developers, this lack of fine-grain control is usually not a concern, but if it does concern you, you should select Linux. The point here is that selecting either Linux or macOS as your development environment can make a lot of sense if you deploy a server-side application to Linux.
In the past, I have used Ubuntu, but the GUI does not come anywhere close to the level of integration and slickness offered by macOS. macOS has a reputation for being just cooler, prettier, and nicer, but it does come with real benefits which can improve your productivity.
At my company, around 50% of developers use macOS, and 50% use Linux and/or Windows. Recently many more applications are also available for Linux, and web-based apps such as Google docs work well in this environment, but it is worth checking if all the applications you intend to use will work on Linux. Alternatively, you could use virtualization, or, if you never have to run your Windows and Linux application at the same time, you could dual boot.
The Mac is not always perfect. A colleague of mine has a 2019 Intel 16" MacBook. He often has to run it on an ice pack. Otherwise, it will thermally throttle. Many non-Mac Ultrabooks also suffer from this problem. Putting a hot Intel chip in those thin unibody shells was a mistake, but Apple has now fixed this with their new silicon Macs. Recently, Intel has improved their thermal issues in their new hybrid core model introduced in their 12th generation architecture. AMD is more thermally efficient than Intel, but neither Intel nor AMD can currently compete with ARM or Apple when it comes to performance per watt.
Regardless of the development environment, at the end of the day, the software needs to run on a given target OS. Open-source Java libraries can help abstract the platform differences to enable a largely seamless development experience between different development and target operating systems for low-level features. (Some examples where macOS and Linux differ include file locking and thread affinity, and these libraries can help normalize these features between the two platforms.) Ultimately, in order to extract the best performance, the nuances of each target platform need to be carefully understood when deploying, configuring, and tuning a low-latency software stack, and some exposure and familiarity with the target OS during the development phase can be beneficial.
Conclusion
First and foremost, for development, I suggest using the OS you are most comfortable with. If you don't have much experience with any operating system, I recommend Windows or macOS.
If you are on a budget, Linux is a cheaper option, but be careful to check if you can run all the code you need just on Linux. Unless you want to put up with dual-booting or a Virtual Machine, you may have to blow the budget and get a second (or old) machine to run Windows. If you opt for dual-booting, then for a desktop I would recommend setting it up with two boot disks (one for each OS). This is so you can replace one if something goes wrong.
On the other hand, If you are writing low latency code where you have to have a good level of control of your OS subsystem, then select Linux.
Alternatively, I would select macOS.
The critical point is that choosing Mac, Windows, or Linux is a bit like politics or religion: people have strong views that their choice is correct and often shut their ears to a different viewpoint (which I feel is interesting).
Published at DZone with permission of Rob Austin. See the original article here.
Opinions expressed by DZone contributors are their own.
Comments