Operating system (OS) #
Your computer does not bind you to one OS. You can run multiple OSs on the same computer by:
- partitioning your disk, or
- booting from an external drive, or
- using virtualisation.
Depending on what you are developing, one operating system may be more convenient than another.
We review below some benefits and drawbacks of developing under Windows, macOS and Linux.
Windows #
Benefits and drawbacks #
Here are some benefits of using Windows as your OS for software development:
- it comes pre-installed on most PCs,
- it is compatible out-of-the-box with most hardware,
- it provides a fully integrated development suite for the .NET framework (C#, F#, Visual Basic), and to a lesser extent C/C++.
And some drawbacks:
- for general-purpose development, Windows is less friendly to new programmers (compared to Linux or macOS),
- the usage of an (OS-wise) package manager is (still) not the norm,
- it sometimes favors backwards compatibility over compliance with modern standards.
When to use Windows (and when not) #
Windows is the OS of choice for developing software meant to run on Windows only, or cross-platform software written in one of the .NET languages (mostly C#). C# is notably used for game development (e.g. for Unity) and graphical interfaces (although Javascript-based graphical frameworks may have become more popular lately).
Visual studio (not VSCode!) offers a fully integrated development suite for the .NET languages, and is also commonly used for C/C++.
For other programming languages, using Windows may require extra efforts or precautions (compared to Linux or macOS), especially for new developers.
In particular:
- software installation/upgrade/removal can be complex and error-prone,
- writing scripts (e.g. for two programs to interact) can also be more involved, due to multiple shells.
Besides, additional care must be taken to write platform-independent code. Here are two frequent sources of errors made by students:
-
Path separators (see the dedicated section),
-
Line breaks (see the dedicated section).
For this course #
You should be able to complete all assignments and write your project using Windows (even if your collaborators use other OSs).
However, you may need to pay extra attention, for instance to path names (as explained above). Installing and configuring the necessary software may also be more complex (again, we recommend using a package manager when possible).
If you do not manage to set up your working environment for this course (see the requirements) in a short amount of time, then consider using a Linux distribution instead (see the dedicated section below for using Linux alongside Windows).
macOS #
Here are some benefits of using macOS as your OS for software development:
- it comes pre-installed with an Apple computer,
- it is POSIX-compliant (since 2001), thus offering easier interoperability with Linux/BSD/Android/IOS
- the Homebrew package manager is relatively mature.
And some drawbacks:
- some software may not be available,
- your working environment is not easily customizable.
When to use macOS (and when not) #
MacOS is rarely used on hardware other than Apple computers.
It is often a good choice for new developers. In particular, Homebrew offers an easy way to install/update/remove programs needed for general-purpose development (compilers, interpreters, other package managers, etc.).
A number of more experienced developers also work with macOS, notably for web development (Node.js/Javascript) or data science (Python).
A Linux distribution may be more convenient in some situations, e.g. when developing a program meant to run on a server, or when working with Docker containers.
For this course #
If you have a Apple laptop, then you should not need an OS other than macOS for this course (even if your collaborators use Windows or Linux).
Linux #
Here are some benefits of using Linux as your OS for software development:
- it is primarily designed for developers,
- it is relatively lightweight,
- it has an important (and high-quality) online community support,
- it is used by most web servers,
- (OS) package managers are mature and easy to use,
- your working environment can be easily customized and/or configured.
And some drawbacks:
- Linux rarely comes pre-installed on a computer,
- there is sometimes too much choice (distributions, programs, configuration options, etc.),
- Linux distributions are (arguably) not as friendly to desktop users as Windows or macOS,
- Hardware support (e.g. for peripherals) is (still) more limited than for Windows.
When to use Linux (and when not) #
Linux is often the OS of choice for developing programs meant to run on web servers. It is also a good choice for writing cross-platform software.
Linux (together with macOS) is also a good environment to learn the basics of programming, due to native compatibility with a wide range of technologies for general-purpose development (e.g. Docker). Software installation, configuration, upgrade and removal is also made easier by mature package managers. Besides, the Linux shell is a versatile yet relatively simple tool that can ease process management or interaction between programs.
Linux is arguably not the best choice for developing Desktop applications that target a specific OS (such as Windows or macOS), or in some specific domains such as game development.
For this course #
You should be able to complete all assignments and write your project using a Linux distribution (even if your collaborators use other OSs).
In particular, if you face important issues when setting up your working environment (git, JDK, Maven, Gradle, etc. ) on Windows, we recommend using a Linux distribution instead (this may save you time). Keep in mind however that this will not solve issues related to the configuration of your IDE.
Not that you can use Linux (for development) and Windows (for other purposes) on the same computer.
Which distribution to choose #
You can use any (reasonably mainstream) all-purposes Linux distribution for this course (and other courses).
The choice may seem overwhelming at first sight, but most distributions are forks of a few popular ones (Debian, Fedora, Arch, …), and are relatively similar to each other. Besides, Linux environments are highly customizable: for instance, the choice of a distribution does not bind you to its default desktop environment. Available software is also very similar from one distribution to another: regardless of the distribution, you will have access to openJDK, git, Maven, etc. via a package manager.
Desktop oriented distributions #
Distributions that are more desktop-oriented can be more friendly to newcomers (especially non-developers), but also come with unnecessary software. Two popular distributions in this category (for new users) are Linux Mint and Zorin OS. Both are forks of Ubuntu, which is itself a fork of Debian.
Lightweight distributions #
For a (slightly) more lightweight distribution, MX Linux is currently a popular choice. It is also based on Debian.
How to install a Linux distribution #
Most distributions provide detailed instructions on their web page.
Regardless of the distribution, you have are (at least) three possible options:
-
Virtual machine (such as VirtualBox). This is the simplest option in terms of installation. But also the most expensive computationally, so only suited to a relatively powerful computer. Performance is also suboptimal.
A virtual machine is often good way to test a distribution before properly installing it.
-
Bootable drive. You can store your Linux distribution on an external hard drive, and boot on Linux when the hard drive is connected to your computer. Compared to the third option below, this may affect the performance of disk access.
-
Partition (with dual boot). You can dedicate a certain amount of space to a Linux distribution your hard drive. A minimum of 30 GB is often recommended (this can be adjusted later on). When starting your computer, it will let you choose which OS to boot on. This is the best option in terms of performance.
Note. For the third option (dual boot), the installation procedure has become slightly more involved on some recent computers, due to encrypted disks or so-called “secure boot”. So make sure that the instructions that you follow are up-to-date.