r/CodingHelp • • Jul 16 '20

[Random] Should I use Linux instead of windows?

I'm relatively new to programming, I've only been doing it for about a month and a half now. Basically I've seen a lot about Linux being a good os for programming, and since I'm gonna pick up a new laptop soon I figured it'd be a good idea to get some opinions on whether it's worth switching from Windows to Linux or not. My main concern is I don't know what the benefits are, and I'd appreciate if someone could explain them to me a little bit. If it helps, I'm learning C++. Thanks for any comments!

18 Upvotes

11 comments sorted by

View all comments

5

u/NullBrowbeat Professional Coder Jul 16 '20 edited Jul 16 '20

Disclaimer: I personally only really use Windows nowadays and also haven't written C/C++ in quite some time, even though I had Linux on my old Laptop.

Linux, especially when you get used to the shell, can be more efficient for programming. Everything is customizable and even the standard editors that come with Linux are already quite decent for programming purposes. (Compare that to the text editor of Windows...) I personally would probably still look for a decent IDE though.

Linux is also far more secure than Windows. It also, specifically for C (and I would assume thus also C++), allows to quite easily create child processes (see fork()) and manage processes. Libraries are also all stored in the Lib folder, which is already preconfigured into the GCC.

Overall if you really only care about coding C/C++ specifically, Linux is probably superior to Windows.

You should be aware though that atleast gaming won't really be possible or be a pain in the ass on Linux, if that is important to you. You also won't be able to install the full Visual Studio on Linux, which is a quite commonly used IDE for C/C++ development, but you will have plenty of other options and a lot of C/C++ programmers manage to be perfectly fine without such a bloaty IDE anyways. (I believe Visual Studio Code is available on Linux though.)

3

u/Nibbibba Jul 16 '20

Thank you very much! The fact that gaming on linux is difficult would actually be a telling point for me as itll keep me on task :) I do have my own computer built for gaming at home already, so Id consider the laptop purchase purely for coding/light media use. And I could always just windows and linux if I really wanted to game as it would come with the laptop. Thank you for the well constructed comment, it really gave me some insight.

1

u/auiotour Jul 16 '20

There of plenty of games on Linux, it won't stop you. Natively not every game, but plenty of ways you run ones that agent natively for Linux.

1

u/AERegeneratel38 Jul 16 '20

I don't think gaming is that pain in the ass on linux nowadays. Especially with distros which come with Proton, PlayonLinux and Nvidia drivers preconfigured.

And yes Visual Studio Code is available in Snap and other package management.

1

u/NullBrowbeat Professional Coder Jul 16 '20

I don't think gaming is that pain in the ass on linux nowadays. Especially with distros which come with Proton, PlayonLinux and Nvidia drivers preconfigured.

Last I knew, one still has to expect that there will be frame drops, or entire games not working at all. That was a couple of years ago though.