What advantages does Ubuntu have over Windows as an environment for programming?

Solution 1:

This sort of hypothetical might do better on Programmers.SE because it's likely to be pretty one-sided here. That said, I was a .NET developer for a few years and came to depend on Visual Studio. It does a lot for you and yes, I particularly like the integrated debugger... However, I think there are a few reasons people choose Linux:

  • Ubuntu is free. Windows and VS can be extremely expensive.

  • Ubuntu is free. Windows and VS give you very little control over how you use them.

  • Ubuntu is a programming environment straight out of the box. Tools like Bash, grep, sed, awk. Windows is historically a big pain in the bottom to script from. Batch files are awful and even with PowerShell, the command-line experience in Windows pales into insignificance when compared to Bash and the GNU tools. You can port some of that over to Windows but it's not the same experience.

  • Complicated setups are easy to automate and replicate through apt-get, tools like Puppet, Chef, Juju, Fabric and simple scripting.

  • Some things don't need complicated IDEs. I'm a Python developer these days and I'm perfectly happy with its own built-in tools and debugger. I use a text editor, the command line and fabric... And I'm way more in control than I was under .NET. I can build, test, commit and deploy my webapps with a single Fabric command.

    That's not to say there aren't monolithic IDEs. Eclipse and Netbeans. MonoDevelop. KDevelop4 and QT Creator. They all have their users who swear by them.

Is Ubuntu better for you? Who knows. It's a very capable and very customisable system. If you give it a chance and alter your workflow to allow it to help you, you should be able to make it stick.

Solution 2:

I would like to add one more important reason though; Ubuntu is great for experimenting with new libraries, languages, IDEs and compilers. Everything is one apt-get away.

So you've heard about a fancy language called Haskell:

sudo apt-get install ghc
nano hello.hs
<copy-paste hello world example>
ghc -o hello hello.hs
./hello
Hello World!

Oh, you've heard a fancy editor for Haskell:

sudo apt-get install <fancy-editor-for-haskell>

The same with C/C++ libraries, you just apt-get install them and the binaries and the headers go to the right folders, and you can just #include them in your source files without even needing to check where they get placed!

In essence, it's not about how fast you can setup your day-to-day working environment. It's also about how extremely fast you can setup an experimental environment. I believe that's what accelerates the learning experience under Linux.

Solution 3:

Here's an opinion from a primarily Microsoft platform developer. If you're not targeting the .NET ecosystem I would argue that your best option is Ubuntu. You will have a much easier time obtaining, configuring, and using tools for almost every other platform/language if you are on Ubuntu instead of Windows.

The value of Microsoft's toolchain is that it is HIGHLY integrated. From the IDE to Source Control, Project Management, Build, Deployment, Database, Cloud Infrastructure, ad nauseum. Microsoft makes it VERY easy if you're going full-bore with their platform.

As some have mentioned, deviating from the Microsoft Way can be a pain. Using .NET for your code and Oracle for your database...d'oh that's gonna be a pain.

Want to create an .NET web application and deploy it to Amazon Web Services...not very straight forward.

But if you stay within the Microsoft Ecosystem...that baby will sing like a mocking bird for you. In the hands of a competent software developer, the Microsoft Platform is like PEDs for a talented athlete. It's not going to enable an amateur programmer to create the next Facebook. But it will give an edge to a talented developer who understands how the pieces fit together.

The argument for the free (as in beer) cost of getting started with Ubuntu is out the door, there are a number of programs Microsoft offers that let you get started with their tools for free. Including Bizspark which gives your startup company 3 years of licenses (including production use licenses of their tools). And Dream spark which gives it to students for free.

That being said, if you want to explore and learn new languages and platforms, you'll find better tools to get started on Ubuntu and if you're looking for work outside of the Microsoft ecosystem, you're going to need to be familiar with Ubuntu.

Solution 4:

I use both tools, IDEs and text-editors with Command-Line Interface (bellow referred to as CLI), to write programs.

What Linux offers is a useful CLI starting from the default installation. If you don't need that and you are just using an IDE anyway, then there isn't much of a difference anymore (IMHO).

IDEs

  • IDEs are very good when it comes to integrating many features and present them in a graphical GUI.
  • The downside is, it can overwhelm someone new to this. Now you will have two things to learn: the IDE and the programming language.

Text editors and CLI tools

  • Text editors and CLI tools don't take long to learn.
  • If something doesn't work, it is easy to see which tool doesn't work as expected.
  • It easier too look up problems with Google as everything is text-based.
  • Programming with text editors and CLI tools is faster and more responsive, especially comparing them on older hardware.
  • You can work with them even on low resolution screens.
  • It allows you to program and debug with minimal resources on a remote server.

I often do my prototyping with text-based tools. Later, when there are more files to manage, I value the refactoring tools an IDE is offering me.

Solution 5:

I'll throw my answer into the ring (though I believe these all are good ones too).

The most basic answer you can get is that it's all about philosophy.


In the Microsoft world, it's a bit religious - You have the gods on Mt. Redmond who must be petitioned if you want anything implemented. Sometimes they will listen, other times your sacrifices and pleas will fall on deaf ears. Perhaps they were out hunting. Microsoft controls the entire ecosystem - they own the OS, they own the IDE, and they couple them together in ways that are probably inappropriate to talk about on a SE network. Even within the IDE pieces are tightly coupled - it may be called integrated but I think coupled is more accurate. If you would like to change things up a bit, Gates forbid that you would want to alter something in a way that either the designers of Windows or Visual Studio did not expressly allow. And then throw in technologies like IE, and IIS, Microsoft servers, and MS SQL Server, and Office... and everything is a nice big happy family. But if you should want to leave part of the family behind? shudder!


On the other hand, you have Linux, which inherits from the Unix philosophy that each piece should be responsible for its own small sphere of responsibility. It should do one thing, and do it well. And preferably, communication should happen by way of strings of text. As others have pointed out, sed, awk, grep, etc. are perfect examples of this. They do the one thing that they are designed to do, and they do it very well. If you need to do two things, then you combine the two tools. Which is very easy to do.

Because sed expects nothing besides the input coming in will be text, that means that anything that can produce text does not have to reinvent the wheel. They can simply use sed. And because sed produces text, anything that can read text can use the output from sed. Text is very universal (there are some exceptions to this), and it's very easy to combine these types of things together.

Not only is it easy to combine them, but it's also very easy to split them apart - if I decide that I no longer need to edit a stream, but I want to filter the results, rather than passing my text to sed, I can pass it to grep instead.

Now, this is the fundamental philosophy behind development in a Linux environment - so even if you go up from there, many tools provide similar sorts of interfaces. They allow you to decompose them into parts, or interface with them through the command line or ports or HTTP.

And even if that were not the case, you also have open source software. Most (if not all) software on the Linux platform is open source. So if you don't like how it's written you are completely, totally, absolutely able to change the software yourself. This is incredibly empowering. Can't break apart that IDE the way you want to? Either make the changes and submit them back upstream, or fork the project. Not sure why something behaves the way it does? Use the source, Luke! Need to be able to automate something through the command line? Hack on the project and stick your changes in. Come across a bug, or a security issue? Hey guess what - you can fix that yourself, you don't have to wait for SP3.432vb89234.startdate1eQ to come out.

You can combine the tools that you want and you need. And if there's something that is in your way, you are 100% able to get that changed. Even if you don't have the capability, you could certainly pay someone to develop that change - or even suggest it to someone else who has the know-how.

The reason this is better for programming is because when you come across friction, you can eliminate it from your workflow. Because development is hard there are a lot of things that you have to think about to be a successful programmer, and the more you have to think about the harder it is to think about other things.

Eliminating friction is key.

So if the Microsoft ecostystemreligion is where you feel at home, and you enjoy the tools so much that it doesn't provide you with much/any friction... well, it's probably just fine then.

But if you don't fit the Microsoft Mold(tm), patent pending, then you will run into friction. Development will be a pain. Each time you wish you could do something, but can't, that will drain precious cognitive resources. And if that's the case, then a Linux development environment is probably for you.