r/linuxquestions • • Jan 14 '20

What makes Linux so good for programming?

I heard it was, but I would like to know why.

Edit: Thanks for all the replies and support. I've never experienced such a knowledgeable community!

204 Upvotes

127 comments sorted by

149

u/0x2a Jan 14 '20 edited Jan 15 '20

IMHO on Linux it's just so easy and natural to see what goes wrong, either in stuff you wrote yourself or third party software:

  • wondering if it reads the config file or listening on the socket you're expecting: lsof

  • WTF is my program just sitting there: strace

  • I wonder how the C++ mangling went: strings

  • Did I link that correctly: ldd

  • so was that file saved in UTF-8 or latin: od

  • wait, is it trying to use the proxy or not: tcpdump

  • size of memory segments and swap usage: pmap

  • and others like top/ntop/iotop, digging around in /proc/$mypid, ps for showing the env and everything, dtrace and gdb for super detailled tracing

Yes you can get all of these on other OS', but you need to find the actual replacement, deal with shitty shareware sites and app stores to download them, and then figure out how they work. Here, most the above tools are a core part of the Unix experience since decades and they are always just a couple of keystrokes away.

14

u/sntnmjones Jan 15 '20

Damn, there's some good stuff in here. I'm always looking for good terminal commands.

11

u/Arinomi Jan 15 '20

I saw someone use "ngrep" the other day, apparently a grep for network packets. I don't know if you've heard of it, but here you go.

Also, I only recently found out about "cut", for when you need to trim some text without using sed.

3

u/fart_vandalay Jan 15 '20

If you like 'cut', you'll love it even more when combined with 'tr'. My fave is to use tr -s ' ' first to collapse multiple inconsistent whitespace in pretty-printed program output to make it easier to do cut -d ' '

2

u/Arinomi Jan 15 '20

Ooh, thanks! I'm not exactly new to Linux, but somehow I've missed some really cool and helpful commands like this. My use case for 'cut' was to extract local IPs from my OpenStack stack, using 'openstack server list'. I had previously been unable to dig out the local IPs, but 'cut' used along with 'grep' and 'awk' did the trick.

7

u/newworkaccount Jan 15 '20

I think this is probably the main reason/winner (other than how much of a PITA setting up environments can be on Windows, but you can automate that).

Windows is closed source and sometimes user-hostile - particularly in terms of letting you look at its innards, or poke around in what the kernel or some other portion of the OS is doing. It's also not super friendly to debugging.

With Linux, or its other Unix-inspired cousins, the system doesn't fight you looking at what is going on. It's transparent. It's designed for you to be able to look at it and see what it's doing, from the ground up. This makes a tremendous difference.

1

u/mvanvoorden Jan 15 '20

I was actually kind of surprised that when I needed Python on my Windows laptop for an application I found on github, and that installing it was a blast, and I could easily install the dependencies through npm. Hadn't done any such thing for years, back then I would've had to use cygwin which can be a huge PITA in its own way.

But yeah, Linux wins by a stretch when it comes to coding and debugging.

62

u/egosummiki Jan 14 '20
  1. Ease of setup. You can run a command and have everything you need where as in windows you need to spend hours running different installation wizards. (At least that's how I remember it)

  2. Docker!

  3. Ease of customization of your work environment

  4. If you work with backend, you're closer to your production environment and things are more likely to work

11

u/Lellow_Yedbetter Jan 14 '20

wInDOwS hAs DoCkER!

32

u/[deleted] Jan 14 '20

But windows docker runs Linux kernel inside it so it's performance is almost like a normal VM

12

u/Lellow_Yedbetter Jan 14 '20

I know I was being facetious

13

u/[deleted] Jan 14 '20

It's a very subjective thing. I don't work on any large amounts of code but I dabble as a mental exercise even though it isn't my wheelhouse. So take what I say with a definite grain of salt. It feels like there's less of a hard barrier in the workflow between like writing some C or something in Kate, and just sliding down yakuake to compile and run it via GCC.

I don't think it's anything substantive, more that Linux desktops feel like they integrate that kind of terminal usage in the desktop experience better than Windows. It's just some easy keystrokes between writing a text file and having the built in C compiler build it.

Big IDEs confuse me admittedly, and they offer that experience too. I haven't graduated from basic text editors.

6

u/frnxt Jan 14 '20

To be fair my Windows setup at work is exactly that, VS Code/VS + a sliding Powershell for building the things.

...it took ages to setup the way I liked though.

5

u/[deleted] Jan 14 '20

Yeah, that's kinda what I mean. A good programming setup like that is pretty OS-agnostic for the most part. But to have a pretty seamless setup for that, I can start from any fresh Plasma distro, map Yakuake (slide down terminal) to ctrl+alt+T and just start chunking away on a text editor like Kate.

I can't speak for any setup involving bigger IDEs, but it just feels easier out of the box with *nix systems. Ultimately, it's kinda a pick your poison thing. Windows works just as well, just may take more work to set up. Somebody (not me) who knows what they're talking about I'm sure can fill in any other differences from there lol.

29

u/EclipseMain Jan 14 '20

It's FOSS so you can tinker with just about anything. This also deals with the vast majority of licensing issues when you use it as a web server.

11

u/wk4327 Jan 14 '20

That's the right answer. It's not a deal breaker when you have to screw around with tedious installers, after all that's what programmers get paid their big bucks for. But what does break the deal is having to deal with libraries to which no source code is available. Good if there's comprehensive documentation, but no documentation is as reliable as being able to examine the code itself.

96

u/DesiOtaku Jan 14 '20

I know a lot of people will be comparing Linux to Windows, but let me tell you about a time a friend of mine who wanted to learn C++ on his Mac. These were the steps he had to go through:

  • First, log in to the App Store

  • Whoops, he hasn't logged in since a while and had to reset his 2 factor authentication

  • OK, try to install XCode

  • Whoops, XCode refuses to install on an older version of MacOS.

  • Download and install the latest MacOS (this took 2+ hours!)

  • Finally download and install XCode

  • Whoops, Carbon API no longer works, if you want native GUI, you need Objective-C + Cocoa

  • Fine, use Qt for something similar, download and install Qt

  • Whoops, you need to install extra tools from XCode to make Qt work

  • Yay, you can finally run your Hello World C++ GUI project!

Meanwhile in Linux:

sudo apt install build-essential qtcreator qt5-default

Done!

30

u/topfs2 Jan 14 '20

And for the hello world you only need g++, but build essentials is a nice package

11

u/sue_me_please Jan 14 '20

Fuck Xcode. Seriously, fuck Xcode and fuck the linking issues that simple upgrades to it or Homebrew updates incur.

6

u/[deleted] Jan 14 '20

Homebrew sucks butts, and MacPorts has been much more stable and much more capable for me since switching.

I hesitate to say that homebrew breakages are the fault of xcode because homebrew is constantly failing and disappointing me with or without the help of xcode changes. At this point expecting to rely on homebrew for any amount of non-trivial workload is like expecting that friend that never pays you back to eventually hit you up with that money without you asking for it.

5

u/sue_me_please Jan 14 '20

I miss when Fink was the go-to package manager. An apt port to macOS was an okayish solution back in the day. It blows my mind how popular Homebrew got, I've even met users who use it on Linux.

47

u/breakbeats573 Jan 14 '20

You literally just posted the worst case scenario of a neglected machine and tried to pass it off as standard fare. Plus he forgot his password? I guess on Linux he’d be figuring out how to reset the root password as well. Pretty much your point is moot.

Who in the hell doesn’t keep their machine up to date anyhow?

17

u/yaaaaayPancakes Jan 14 '20

The company I work for is generally one entire MacOS revision behind current, because they are so ungodly slow at pushing out updates (since they seem to break the enterprise tools for encryption and domain joining with updates).

This makes my iOS development colleague very sad, and his life painful.

4

u/breakbeats573 Jan 14 '20

Is he not using the Apple Developer website for some reason?

4

u/yaaaaayPancakes Jan 14 '20 edited Jan 14 '20

I'm not an Apple user/developer, so all I know is what he's told me. But from what I've gathered, what happens is that Apple eventually does what they do and makes it so XCode won't work on older versions of MacOS. But our IT department isn't ready to handle it. So his Mac becomes the special snowflake of the bunch, they release the OS upgrade to him, and it causes all sorts of breakage b/c our company's enterprise tools aren't ready.

It's usually around the Dell Data Protection encryption tool our IT staff uses. It's fucked up and forced IT to wipe/reimage his machine at least two times now.

I'm not blaming Apple entirely here - our IT department is slow as fuck to push out OS updates (hell on Windows I'm still stuck on the April 2018 update). But somehow even though my version of my OS is two years old, I never seem to have a problem when Google pushes out a new version of Android Studio.

Yet, Apple seems to push their planned obsolescence even to their developers. I don't understand why XCode and development tools in general on Mac is so tightly coupled to the OS revision. It probably doesn't need to be that way, but it's a way for them to make incremental revenue on developers to force them to upgrade. And in an enterprise environment, that's a recipe for pain, being forced to be on the somewhat bleeding edge. It doesn't help that Apple doesn't release good tools to play nice in an enterprise (Windows) environment.

2

u/breakbeats573 Jan 14 '20

I don't understand why XCode and development tools in general on Mac is so tightly coupled to the OS revision.

Literally every piece of software on mac is tightly coupled to the OS revision. That's how mac works.

2

u/bobby_java_kun_do Jan 15 '20

Or rather how it ceases to work lol

4

u/breakbeats573 Jan 15 '20

It's incredibly stable this way. When you're using your computer to run a concert for example, stability and performance is everything. There are great advantages to having a fixed hardware set.

5

u/thurstylark Jan 14 '20

This is an illustration of the differences in each environment's barrier-to-entry. Half of the people I know who have a computer and want to try programming would give up half way through that list.

Just because that's how people should maintain their computers, that absolutely does not mean that they actually will.

7

u/Sol33t303 Jan 15 '20

If they gave up halfway through that list, they probably wouldn't have the patience of learning how to program anyway, since that takes weeks at the absolute minimum. Normally it will take months.

2

u/pt4117 Jan 15 '20

Those same people are the ones getting stuck in Vim.

4

u/DesiOtaku Jan 14 '20

Not everybody keeps their MacOS to the latest major version. For this case, he was just one major version behind; so Apple still "supported" that version as an end user, but not as a developer.

He actually didn't forget his password, he just never logged in to his Apple account for over a year. And in that year, Apple started to require 2FA, so he had to set that up before he could actually log in.

6

u/Headpuncher ur mom <3s my kernel Jan 14 '20

Totally, I work somewhere where there a few designers on macs and there is always discussion about waiting at least a month past a macos release to upgrade. Apple upgrades have not been reliable in the last couple of years, breaking a lot of stuff and buggy. Windows updates are handled by corporate IT, who ironically refuse to manage the macs, but they still allow them on the network.

And the dropping of 32bit libs really fucked a lot of corporate software too. Apple have lost their way lately.

1

u/[deleted] Jan 14 '20

I mean... From my experience, I'd say anyone that uses a Mac or windows. Hell, I have a windows vm that I haven't let update in 4 years now! But thats mainly because it has software well past the license date and I don't really give it access to the internet... It still thinks it's 2016 lol

-1

u/damofthemoon Jan 14 '20 edited Jan 14 '20

+1, such bad comments ☝️☝️ EDIT: not ready for Linux

12

u/ivster666 Jan 14 '20

Don't forget that you need an apple account first

14

u/budriley Jan 14 '20

It's almost like there was a reason I installed Arch on my MBP.

4

u/mountainjew Jan 14 '20

This guy arches.

6

u/skylarmt Jan 14 '20

Masochism?

14

u/FiIthy_Anarchist Jan 14 '20

Mac OS schism

4

u/ThellraAK Jan 14 '20

btw I use arch

6

u/[deleted] Jan 14 '20

That's not really accurate. You don't have to use Xcode to program on a mac. Macs have a native C compiler like Linux too iirc

5

u/[deleted] Jan 15 '20

Xcode comes with clang which is the native compiler. You cannot avoid getting xcode if you plan on building for a Mac/iOS device afaik.

4

u/turturtles Jan 14 '20

While you might not need Xcode for certain languages, there are some that require it to be installed, or for some certain tooling to make development easier.

-1

u/IsWorking Jan 14 '20

Except there are a dozen of other editors to pick from...

4

u/yaaaaayPancakes Jan 14 '20

From my brief usage of a MBP for Android development, I remember that Apple bundles so much shit w/ XCode that you must install it even if you never touch it.

0

u/[deleted] Jan 14 '20

[deleted]

9

u/i542 Jan 14 '20

xcode-select --install is a one-line terminal command that installs all the necessary tools from gcc and clang to git and make without having to fiddle with the App Store or installing Xcode manually.

3

u/[deleted] Jan 14 '20

Really? Admittedly the last Macbook I owned was in 2011, but I didn't think it arbitrarily blocked you using different IDEs before?

3

u/sue_me_please Jan 14 '20

Xcode packages the necessary development files you need to compile against on macOS. You don't have to use Xcode for development, but the second you want to do anything beyond using an interpreter, you'll need to have Xcode dependencies installed. If anything you download is linked against those dependencies, like a lot of developer tools are, you'll need to install them even if you don't plan on using Xcode.

1

u/[deleted] Jan 14 '20

Wow. Somehow, that just makes me irrationally angry to think about.

1

u/sue_me_please Jan 14 '20

My could feel my blood pressure rising as I typed out that comment.

2

u/ctesibius Jan 15 '20

You don’t.

1

u/shawmonster Jan 15 '20

Been coding on my Mac for a while and I’ve never installed Xcode.

0

u/[deleted] Jan 15 '20

[deleted]

1

u/shawmonster Jan 15 '20

just searched for it in spotlight and nothing came up but ok.

6

u/AlexP11223 Jan 14 '20

It depends. For web programming Linux or MacOS are usually easier to use than Windows because many tools are designed for POSIX-based OS. And there are less differences between development and production environments (most web servers run Linux).

Also better Docker performance.

And a good terminal out-of-the-box (but you can install ConEmu + Clint on Windows, and Chocolatey).

1

u/fedeb95 Jan 14 '20

I'll try those, been using mingw64 since it's what git for windows installs but it's pretty slow. Starting a jboss server from bash is 2x slower than powershell

5

u/[deleted] Jan 14 '20

For me, it's because of very little things that just pile up:

  • The ability to automate any process in bash, which is a very well documented language with a huge community of fans.

  • The ability to replace that automation with any other language if it gets messy, without having to change any dependencies

  • The ability to delete a file that's opened, that's executing even (self-update becomes easy)

  • The ease with which you can define services

  • Don't have to deal with shitty "security" measures that prevent you from using a driver or install a software because its signature isn't trusted by Microsoft.

  • You can shut down most things that you don't want running and slowing down your file access times (like an active antivirus)

  • SSH mounts, with network triggers for unmounting

  • How easy it is to manage VPN connections natively without several different shitty programs for each client you might be working for.

5

u/pseeec Jan 14 '20

grep and tail

9

u/dydzio Jan 14 '20

I can tell you that it is not "so good for programming", but... managing C/C++ library dependencies in projects is easier on linux, also somebody told me programming in ruby on windows is nightmare, also because dependencies

It is good for automating - clicking GUI / using total commander cannot compete with bash scripts etc. Windows powershell seems to be not popular for some reason

6

u/[deleted] Jan 14 '20

Power shell is very much popular in IT environments that predominantly use Windows. It’s very handy.

2

u/yaaaaayPancakes Jan 14 '20

It's ability to actually use typed objects is very nice, and you can also use pretty much anything in the .NET framework in your scripts.

2

u/brimston3- Jan 14 '20

"Pretty much" being absolutely everything. Powershell scripts can marshal COM objects and import symbols from dlls. You could write a windows forms application in pure powershell if you wanted to ignore all of the IDL/RAD tools.

4

u/fedeb95 Jan 14 '20

Others have their good points, but what really makes me prefer linux (and I work with windows, sadly) are two things: command line and development tools "just work". When you're used to writing code, writing it also for changing directories, running programs, renaming things, and the like, means more productivity. So it's better with a proper shell. And yes, I've tried windows subsystem but it's just slow. I have yet to try the new windows terminal though. Yes, you cam technically do scripting with windows, but it's really a pain and using the same commands you use in other settings (docker, ansible, production machines) means you can learn one thing well and try things out locally more easily

4

u/xenocampanoli Jan 14 '20

In commercial, you do as little as you can to get money out of your customer. In open-source engineering, you do things to help yourself and gain the respect of your colleagues and clients. It's really that simple.

3

u/[deleted] Jan 14 '20

easy access to dev tools, libraries and such. and if you need something from e.g. github it almost all compiles on linux while needing extra steps on windows/mac in many cases. One downside is lack of good graphical debugging tools (compared to windows) except IDA.

edit: and of course for backend stuff you can setup local copy to test the setup easily.

3

u/[deleted] Jan 14 '20

all executables in the path

3

u/[deleted] Jan 14 '20

package management and dependency resolution is super clean on most Linux distributions. Which means that when you run into a case where you need a certain lib for programming, you just install it using the distributions package management system, which usually takes all of 5 seconds.

everything's pretty straightforward and you can find tons of doc online for anything. I still don't understand a lot of how to compile code on Windows: i feel like i'm forced to use an IDE i don't want to use (Visual Studio) and even when compilation has worked for me on Windows, I always feel some version of "this system wasn't built for this" or like i'm mis-using the OS. I'm sure that's also my inexperience with Windows, but Linux is just so straightforward and also open (in the sense of not locking you into a single software / pipeline).

1

u/[deleted] Jan 14 '20

Also, a huge amount of the internet and embedded devices run on Linux. A lot of cases for programming, scripting, developing, etc. just feel "closer to home" on Linux. This is what Linux was made for.

3

u/StevesRoomate Jan 14 '20

I think it's because of the package managers. Any one of them (pacman, yum, apt, etc) is way better than anything on other platforms, although brew on Mac is pretty great. You can easily install just about any library or dev tool in seconds, and then uninstall it if you don't need it anymore or don't use it.

3

u/ZaitsXL Jan 15 '20

What you mean on "programming"? Writing code, compile and run it in Linux is no different from any other OS

7

u/KevinChopra2019 Jan 14 '20

Nearly all proprietary software does not permit end users to modify it. Linux is open source and therfore you modify it to suit your needs. This can lead to impressive performance on your local machine (if you know what you are doing)...

1

u/Dinger1000 Jan 14 '20

I wouldn't say it's anything special for programming, at least from what I see, it just allows more control of a computer and the terminal and full control considering you have root privledges.

4

u/rechargedretard Jan 14 '20

Would you say it's better than Windows for programming?

9

u/Dinger1000 Jan 14 '20

I mean, I would cause I feel like Linux gives people an incentive to be better with computers in general, but that's assuming you're interested in computers, but if someone isn't into computers than Linux is a waste of time.

6

u/quoda27 Jan 14 '20

That's true. The best tool for any job is the one you know how to use, and will enjoy using.

3

u/polypagan Jan 14 '20

I would, but I'm totally biased.

2

u/yaaaaayPancakes Jan 14 '20

As with anything, I'd say it depends on your use case.

At work, I still use a Windows machine for Android and Java development. At home, I've installed Kubuntu to do the same development tasks for my personal use. Both are platform agnostic, so it's nbd. If there's terminal work to be done, the Linux machine is a little nicer, since the terminal is native. But WSL works fine for the tasks that expect/are easier w/ a bash terminal. And if you're doing development that ultimately uses Docker Desktop on Windows, you'll need to use dos2unix fairly often to convert line endings of text files you copy into your Linux based images in your dockerfiles.

If I was doing webdev these days, I'd probably stick to Linux, since so many of the tools for webdev are built for CLI usage and expect a bash style environment.

1

u/fedeb95 Jan 14 '20

That's simply not true, in oc's favour. You can have administrative privileges with windows too. And while "the best tool is the one you know better" is true, if you know very well how to use a knife and can probably take down a tree with it, a chainsaw is still a better tool for the job. Also for a programmer is not that hard to learn basic shell scripting and be more productive. My 2 cents from someone that works with windows, has colleagues that work with linux and use linux at home

2

u/DarthEru Jan 14 '20

I think Linux is good for programming in large part because a lot of programming is done in and for Linux. Linux rules the server market, so most tools written for the enterprise have Linux support, and many are primarily for Linux. This means many devs have to use and target Linux, which means when they develop side tools to make their jobs easier, they develop them with Linux support. Plus, Linux is very strongly associated with the open source movement, and some of the biggest beneficiaries of open source are the programmers who use that code and are able to contribute fixes and enhancements themselves.

2

u/funbike Jan 14 '20

With a single command, I can install all the tools I need for a project.

4

u/Stormdancer Jan 14 '20

Lots of good answers, but for me and my relatively simple needs it's one word: Workspaces.

4

u/[deleted] Jan 14 '20

Windows has these though

3

u/yaaaaayPancakes Jan 14 '20

Aren't workspaces just virtual desktops? If so, Win 10 added that.

3

u/Headpuncher ur mom <3s my kernel Jan 14 '20

yes and they didn't fuck it up like apple did.

Workspaces in WIndows actually makes windows usable, but I never see people use them.

1

u/TheTrueXenose Jan 15 '20

was on windows for years, never used a work space.
switched to Linux couldn't get enough of them, I made mode + F1 to F12 workspace with the default for i3 1 to 0.

1

u/Stormdancer Jan 14 '20

It did, finally. It's not on by default, and I've had to re-enable it every time I want to use it.

1

u/yaaaaayPancakes Jan 14 '20

Interesting. I honestly don't use the feature, so I don't know how it works (on either platform).

3

u/Headpuncher ur mom <3s my kernel Jan 14 '20

For web development specifically, deployment of a site would be to a Linux server with Linux running about 80% of the www.

This makes web-dev on Linux easier, because deployment (especially in the pre-cloud, pre-container days) was done in the same environment as development. Also a lot of tutorials assume a bash shell or similar for the same reason.

Outside of web-dev my personal experience is that windows click-figuration, like setting environment vars, is a lot more complicated to explain in a tutorial than open vim -> edit file This is non-trivial when your job involves doing a lot of this type of configuration. Also the file system is easy to navigate once you learn the basics. No looking for stuff in C:Windows or was it in c:user/username/Program Files or was that Program Files64 (whatever it's called) or just some other random place.

Windows used to have other problems too, anyone remember Vista? And it has always been plagued by malware and viruses (whether MS's fault or not). Even recently with EternalBlue and similar NSA tools, it's a target that is closed source,meaning MS have to decide to patch.

But that aside, the tools for development and debugging have always been strong on Linux. I've debugged web apps with GDB when all else failed.

2

u/HyperBaroque Jan 14 '20

Windows click-figuration

file system

I would think that is exactly why most people prefer linux. No more not being in charge of the computer, no more fighting with the GUI to customize the experience or the security, no more chase down the directory.

And being able to set your file attributes, especially permissions, directly, en masse. And basically being able to plan, script, and execute your entire customization in one go and have it done in moments.

I kinda scratched my head at "which is better coding" because if you roll your own IDE (editor+compiler) the sky's the limit, everything good is ported to the big 3. there's something good on every major platform.

1

u/yaaaaayPancakes Jan 14 '20

Outside of web-dev my personal experience is that windows click-figuration, like setting environment vars, is a lot more complicated to explain in a tutorial than open vim -> edit file This is non-trivial when your job involves doing a lot of this type of configuration.

I sort of disagree with this. If you're a developer on Windows, you should probably know by now where to set env vars in Windows. And the UI for doing so is very straightforward (and dare I say it here, nicer than having to string together a giant semicolon separated string in a PATH statement in a dotfile).

Also the file system is easy to navigate once you learn the basics. No looking for stuff in C:Windows or was it in c:user/username/Program Files or was that Program Files64 (whatever it's called) or just some other random place.

Again, I also sort of disagree with this. If you're on Windows as a developer, you know where things go, just as a developer familiar with Linux would know where things go. In practice using both, you just need to learn. Just like I had to learn on Windows that 32 bit progs go to Program Files (32 bit) and 64 bit ones go to Program files on a 64 bit install, you have to learn on linux that progs can go in /usr/bin/local or /opt or some random dotfolder underneath /home/username depending on the program.

1

u/HyperBaroque Jan 14 '20 edited Jan 14 '20

If Windows is so good make it open source :)

edit: I'm not an OSS crusader these days, I find value in proprietary software as long as I can trust it, but when I parted ways with Windows in particular it was ideologically because the "problems" in windows seem perpetual in nature, and I felt like open source would have nipped all that in the bud. I still think MS should open source any version of Windows they stop supporting.

1

u/yaaaaayPancakes Jan 14 '20

I am definitely not an OSS crusader, even though I've open-sourced code myself.

For me, I just want the right tool for the job. Windows is the right tool for me at work, because they won't let me install Ubuntu on my work machine, and after a year of using Mac OS I never liked it. For home, I've got Windows on my gaming rig because it just works. My home server runs Linux, because containerization is just better supported on it, and hands down is the choice to go with for servers. My personal laptop I just switched to Linux, to further my learning of it.

1

u/HyperBaroque Jan 15 '20

If you're a developer on Windows, you should probably know by now where to set env vars in Window

Good luck pretending to be over Windows when you just got done telling Linux users that they should have to learn Windows' byzantine structure in full just because they demand the petty authority of wanting to code for themselves.

0

u/Headpuncher ur mom <3s my kernel Jan 14 '20

Meet me round the back of the 7-11 and fight me bro!

Srsly tho, I have never had to create a bigo string of vars in 10+ years on Linux. I suppose when you know a system then you know it. I personally find Windows GUI based system extraordinarily difficult to use. And I never know when a program goes in the prog-files32 or just prog_files folder.

Anyway, not trying to start a flamewar. I do think that pancakes are tasty though.

2

u/yaaaaayPancakes Jan 14 '20

All good, not trying to start shit either. Just share my experiences as a developer that's used both platforms. I was an ASP.NET/SharePoint developer for many years. I only really started using Linux regularly at home a few years ago, when I needed to teach myself Docker (I built myself a Plex server on Ubuntu Server). I very recently took the plunge and made Linux my daily driver on my laptop (I just purchased a new Dell XPS 13 developer edition).

When I was thinking long strings of env var values, I was really thinking about the PATH var, as it's the one I usually have to mess with. In Windows it's easy (once you know where to find the GUI for it). I still am never quite sure which dot file sets it for everywhere (ie. is it .bash_profile or .profile)? And the gui in win 10 at least presents all the values as a list, so you can't mess the string up.

All in all, as a user of both, I agree with you on when you know it, you know it. It just comes down to time and repetition of tasks, to make things like this stick in your brain. I have no doubt that in a couple of years, I'll probably be as productive in Linux as I am in Windows.

And honestly, if I could get my job to let me install Linux on my work machine, I probably would at this point. If only to spend more time with it to gain that knowledge faster.

3

u/[deleted] Jan 14 '20

One major benefit is the open source code. When you can literally read the code that operates the hardware of your machine you can build a tremendously deep understanding of how to code for that machine.

2

u/enokeenu Jan 14 '20

This is a very subjective question. Free IDE's on every platform makes it easier to program on windows than linux. This is especially so with python which runs everywhere.

I think programming on Linux will help make you a better programmer. Especially if you choose to do all of your programming in a text editor instead of an ide.

Additionally , documentation for Linux, open source compilers and editors is free and on the web. You don't need an MSN subscription to access information.

1

u/kvatikoss Jan 14 '20

It's because it's light for me which means I can I do faster development on my 10 year old laptop.

1

u/HyperBaroque Jan 14 '20

Coding performance is more about the environment.

No matter what platform I use, I am going to do one of two things:

(95% A) choose my text editor, preferable text/terminal mode, preferable internally scriptable, preferably with all kinds of code highlighting and other snazzy customizable features, that is able to run other programs with arguments

(5% B) get the fancy schmancy IDE because a project participant demands it or because it's Java for android

There is an oldschool text editor that suits my purposes for A just fine, it has its own internal scripting language, the key bindings and menu system come pre scripted and fully configurable, etc. etc. etc.

But there are plenty of less powerful, more capable text editors that are meant for coding moreso than automated text processing. And they are available for any PC operating system. And they are about as hard to install and set up on one as on the other.

If you are rolling your own IDE this whole question is moot. You can even get different versions for different OS and put them on a device formatted to work with several, and have the different versions in their own folders, and all share the same work folders. Now you can take your stick or drive wherever, whatever kind of station Mac/Unix, Linux, Windows, and keep coding.

1

u/codeDude123 Jan 14 '20

To me the reasons are.

  • Terminal. To me its very confortable use the terminal because you are everything within reach.

  • System Resourses. If you have distros like Arch linux, Debian, CentOS, distros that you make a personal instalation, You only have what you need.

  • Docker. Personally docker in Linux is the power.

  • C/C++ compiler. Well Linux and Unix working as a team

  • Programming tools. vs-code, vim, emacs, mysql workbench, docker again, git, git-flow, php, python, nodejs, etc.

  • Installing tools. I just to need write sudo pacman -S <tool> put my password and is done!!

  • The servers. LAMP server, DNS, DHCP.

1

u/[deleted] Jan 14 '20

For me, it’s a combination of how much is preinstalled, how easy it is to get libraries and packages you need on the fly, and how nice the terminal is. Mainly the package manager part.

1

u/g-flat-lydian Jan 14 '20

Also i think linux being very much made by a developer to be a dev environment, which was then liked and built upon by so many other devs, can probably explain it too.

1

u/Andernerd Jan 15 '20

Mainly that it isn't Windows or MacOS.

1

u/Ma5terVain Jan 15 '20

A heckin' good terminal for one. Windows terminal is still an afterthought compared to how powerful Linux terminal can get. And once you go full throttle on Linux terminal, it sometimes makes you wonder why guis even exist. I've tried to compensate by using WSL2 on my windows machine but it still has some way to go. And technically by using it you are using Linux.

1

u/[deleted] Jan 15 '20 edited Feb 08 '26

Do the right thing

1

u/shawmonster Jan 15 '20

My professor simply told us learning Linux will make us the God of the computer.

1

u/CommentReaders Jan 15 '20

Because you learn with the source. Ex. How to running operating systems? How to using libraries?. Also Linux has different tool when you coding. Most scripts developed for Linux in gitlab and github and other point, open source. You can modify so many editors, compilers, desktops...

I think, other people gave this sample. The basic sample xampp and lamp installation. Which one is understandable in the operating systems?

1

u/gordonmessmer Fedora Maintainer Jan 15 '20

Plenty of good responses. I'd add that GNU/Linux's reputation for being a great tool for developers dates back to the days when developer tools like gcc on Linux were free, where they were very expensive on other platforms. The situation has changed somewhat, but reputations endure, so people will tell you that GNU/Linux is a great development environment even as the playing field levels out a bit.

The biggest reason today, though, is that the code for everything you use is available to you to learn from and reuse. That will remain the biggest advantage over proprietary alternatives forever. And it's a huge advantage. As someone who built his career over more than 20 years developing software on GNU/Linux, I'm surprised that I see so little emphasis on that in other comments.

1

u/Vegetable-Relative Jan 15 '20 edited Jan 15 '20

The 2nd point makes some sense but I can't help but feel that:

  • you can look at Linux code on any platform, you can even clone and modify and build on any platform with relative ease.

  • even with source access, well written interface and design documents and 'formal' instructions still seem like better sources of learning. For example, give someone with no previous knowledge the full kernel source tarball or a few good books on the kernel and a few months to study, which do you suppose might result in a better understanding of the kernel at the end? Put more blatantly, watching the best movies again and again or even frame by frame doesn't necessarily make one a great film maker ;)

1

u/gordonmessmer Fedora Maintainer Jan 19 '20

True, you can look at the code on any platform, but when the code is for the platform you're running, you have the added benefit that it's very easy to modify the code, install it, and observe the changes in practice. There are additional barriers if you're not already using the software that you're modifying.

As to your second point: Have you ever worked with developers right out of school? There's no substitute for practical experience. That's not to say that school is useless. I would never tell anyone not to go to school. Just that you'll need to work with real systems whether you school or not.

1

u/[deleted] Jan 15 '20

No blue screen ... 🤷🏻‍♂️

1

u/Vegetable-Relative Jan 15 '20 edited Jan 15 '20

Is Linux especially good for 'programming'? That's hard to say:

  • If you program on the practical side, like work full time as a hired programmer: You probably won't care much about tool chain or HW platform. They are usually taken care of by other people/teams. Worst case, spend a few days to set up your environment is no a big thing when you are on a months or years or decades long commercial project. As for community, that's more like a work culture thing which can't be solved easily by using Linux.

  • If you are on the theoretical side, like work full time as a researcher focusing on algorithm complexities or security: You basically need a PDF reader or printer to read papers; and tools to communicate with some other people who run experiments for you. Again none of these are something that Linux does much better than other OSes.

But I get that it might seem interesting or useful for tinkering or "I come up with this great idea and 3 minutes to spare to code it up" situations as:

  • tool chains are readily available or easy to setup

  • the kernel and many aux components are open source, with communities to ask questions (freely)

  • the OS is customizable and flexible enough to run on alternate HW platforms like pi

1

u/[deleted] Jan 15 '20

GCC/G++ for sure!

Even on Windows I compile with GCC (MINGW)

1

u/[deleted] Jan 15 '20

Nothing these days. You can get your work done on any platform as a programmer, barring exceptional circumstance.

1

u/vandoff Jan 15 '20

Unix is the IDE.

1

u/brawll66 Jan 15 '20

For me personally since most of work is web based and IDE based things were fine but I was just annoyed by the forced Windows 10 updates and the Avast free antivirus constantly popping up every 10 mins. and consuming the laptop resources draining the laptop battery.

In linux you don't have to worry about any of this bullshit.

1

u/malcolm_123ssj Jan 16 '20

Linus Torvalds, the name itself, is the answer.

1

u/voncloft22 Jan 14 '20

It's not windows... Windows sucks

-4

u/stufforstuff Jan 14 '20

Do you believe everything you "hear" ? Do your own research and discover the FACTS.

-5

u/[deleted] Jan 14 '20

You can have a very good experience with an IDE on any OS and that might be enough for you. GNU/Linux can be and is like an IDE.

1

u/r0ck0 Jan 15 '20

Actually, it's pod racing.

0

u/[deleted] Jan 14 '20

[deleted]

42

u/jumpUpHigh Jan 14 '20

I would like to add that the entire ecosystem for programming ... programming itself, writing and reading documentation, versioning systems, automated building and testing, handling of files using permissions, and then deployment of the application, is all made to work with each other without much effort.

2

u/jackandjill22 Jan 15 '20

Interesting.

0

u/[deleted] Jan 14 '20

[deleted]

32

u/BanazirGalbasi Jan 14 '20

Given that C was created for Unix, I would hope a C compiler is standard. Still, I agree - *nix systems are ideal for writing C code.