Live data from Hacker News

Ask HN: Why use Linux for coding?

news.ycombinator.com

11–20 of 46 posts

Re: Ask HN: Why use Linux for coding?

#11
To the degree there is a better operating system for starting to program, the operating system a beginner uses is orders of magnitude less important than just sitting down and writing code. The best operating system for learning to code is the operating system you are using.

The only certain thing Linux is the best operating system for is learning Linux. Learning Linux is not learning to code. It is not a step on the path to learning to code. Mostly, it is a distraction from getting started. There is time to learn Linux later...http://norvig.com/21-days.html

Good luck.

Re: Ask HN: Why use Linux for coding?

#12
Because of the generally superior command lines and command line tools you get with UNIX and UNIX-like operating systems like Linux or macOS.

Recently, Windows has somewhat caught up in that respect but so far nothing beats a native Bash (or similar shells) environment.

Re: Ask HN: Why use Linux for coding?

#13
> I'm learning coding. I use Windows. But I have heard that Linux is the best choice OS to start learning programming. What do you think?

There are a number of interesting technologies that have better supported dev environments and less frustration for the inexperienced on Linux, but there is plenty you can learn and do fine on Windows, and that avoids the cost of learning a new OS just to learn the basics of programming.

Linux can wait.

(Note, if you have a particular thing you are learning for, and the best tool for that is heavily Linux -- or, at least, UNIX-like-OS -- biased, you might want to learn Linux early on so you can use it, but otherwise, there's time for that later.)

Re: Ask HN: Why use Linux for coding?

#14
I program on Linux here's why.

1. Every library known to man exist for Linux and is very easy to install, build from source, hack on, and customize, especially if you know what you are doing. This is comparably easy enough on Mac since its Unix based but Windows is its own beast when it comes to building from source and getting custom libraries working, etc.

2. You have complete control of your operating system and programming environment.

3. I don't program for iOS or .NET, so I don't need anything offered by other operating systems for Development purposes.

4. The languages I do program in have great ecosystems and development environments on Linux. These are : Android, Ruby, Java, JavaScript, Python, R and the occasional C/C++.

5. I don't write desktop software and virtually all software I create is deployed on Linux systems, so I write my code in a similar environment to the one its going to get run in (exact environment using docker, vms, etc if necessary).

6. Finally, I'm philosophically much more aligned with the democratic and decentralized spirit of Linux and Open Source than I am with closed source and centralization espoused by Msft and Apple. Admittedly, if their products were significantly better for my purposes as a programmer - I'd use them, since I'm not a Richard Stallman, but this is still one of the reasons I continue to use Linux. I think its a positive thing for the world.

Re: Ask HN: Why use Linux for coding?

#15

To the degree there is a better operating system for starting to program, the operating system a beginner uses is orders of magnitude less important than just sitting down and writing code. The best operating system for learning to code is the operating system you are using. The only certain thing Linux is the best operating system for is learning Linux. Learning Linux is not learning to code. It is not a step on the…

I disagree. The best operating system to use for learning to program is the operating system that stays out of your way, allows you to easily install your dev environment, and allows you to keep things reasonably up to date. For me, that's using Linux.

The last thing I want to do when learning a new programming language is waste a lot of time trying to install all of the dependencies/libs/compilers, being nagged by the OS to reboot because updates were installed, having cortana randomly pop up (it's like the modern day clippy), and deal with a host of other things that windows does to get in your way.

Re: Ask HN: Why use Linux for coding?

#16
I was already a coder long before I learned to use Linux. It was a steep learning curve to jump into Linux. I'd say it was worth learning absolutely, and now with 13 years experience with Linux it is my favorite OS to code in.

But if you're just now learning to code, focus on that and use whatever OS you are already comfortable with.

With that said, when I made the switch to Linux, I also decided to learn C. So I had two new things to learn and both had a steep learning curve, but C and Linux go hand in hand and are complementary skills. It was a lot of fun.

Re: Ask HN: Why use Linux for coding?

#17

To the degree there is a better operating system for starting to program, the operating system a beginner uses is orders of magnitude less important than just sitting down and writing code. The best operating system for learning to code is the operating system you are using. The only certain thing Linux is the best operating system for is learning Linux. Learning Linux is not learning to code. It is not a step on the…

I have god 15 years of experience and generally only a small part of my time is spent "programming". A lot is about setting up servers, databases, setting up my dev environment set up to reproduce bugs. Assuming you are writing software that runs on a Linux based server it's pretty useful to know how it works.

Re: Ask HN: Why use Linux for coding?

#18

To the degree there is a better operating system for starting to program, the operating system a beginner uses is orders of magnitude less important than just sitting down and writing code. The best operating system for learning to code is the operating system you are using. The only certain thing Linux is the best operating system for is learning Linux. Learning Linux is not learning to code. It is not a step on the…

I disagree with this comment because, while everything said is technically true, it ignores the fact that it's a big trade-off.

Going with "the operating system you are using" does optimise quite a few things; these are the "pros" of this approach, things like:

- not burdening yourself with the learning curve of a new OS at the same time as you undergo the learning curve of programming

- being able to ease the programming effort by taking advantage of microefficiencies you've already gained from friend use of the OS.

- etc.

This has to be weighed against potential cons though:

- how long do you intend to program for (presumably some large multiple of the time it would take to learn a new OS)

- what is the actual difference in overhead of using development tools on the two OSes–if you're repeatedly undergoing a little extra overhead for every dev task on your current OS, this builds up over time

- if you intend to simply defer learning Linux to a later date, what's involved in switching your dev setup over? Will there be habits and disinformation to unlearn in the process?

Re: Ask HN: Why use Linux for coding?

#19
Depends on what you want to build. iOS software and you will need a mac. Microsoft stack and you will need windows.

If you are doing more general web development then there is a good chance you will be using a Linux server so it makes sense to learn it - your dev environment will be more similar to your production environment. There is plenty of open source software and material available so you can try things out.

Re: Ask HN: Why use Linux for coding?

#20
post #8
post #6

Linux gives you control. Compare compiling C++ code with Visual Studio vs. gcc. Yes, it is easier to get started with VS but you don't have as much control. With gcc (and my build tool of choice) I can control every step of the compilation and linking process. It's "learning what's under the hood" - which I guess is an expression that comes from auto mechanics. To really learn how cars work you need to open the hood…

>Compare compiling C++ code with Visual Studio vs. gcc. That is not a valid comparison as Visual Studio is an IDE and gcc is the compiler. It would be no different if you were using CLion from Jetbrains on Linux to do C/C++ work. The compiling would be handled all through the IDE. You are more than able to get down and handle building C++ from command line by using cl

I know you can use cl.exe directly, but it is not the same. For example, you can't even suppress its output completely. https://social.msdn.microsoft.com/Forums/vstudio/en-US/9eabe...
Post reply on HN