views:

1506

answers:

23

Are there any clear reasons for why using linux may benefit you as a programmer? Such as tools that are only available on linux or anything else that could make you a better programmer or more efficient programmer?

+33  A: 

If you use linux, or any other unix flavour, for dev you've got immediate access to the best suite of low level tools - sed, grep, awk, piping output, stderr etc. Unix is a developers play ground, brilliant for those of us who can build command line tools.

Windows on the other hand suits end users, which is the main reason it's that much more popular, there are more users than developers.

MrTelly
Last year I worked on a project started by a MS shop. As they don't have the typical Unix tools, they wrote a lot of Unix shell one-liners as methods in their program (mainly organizing input data). It was a really big bunch of code. You see what is missing best by looking at the workarounds...
ypnos
@ypnos: standard unix tools have been ported to Windows, see http://unxutils.sourceforge.net/ http://www.cygwin.com/
Mauricio Scheffer
+6  A: 

Not really.

There's the superior package management which puts all sorts of libraries at arm's length, but it would be hypocrisy to say that hunting down libs is making Windows developers inefficient.

Disclosure: I run Linux for many years now.

I'm still waiting for a package manager for Windows apps, I just don't know who'd run the servers... I doubt very much Microsoft would, and why should anyone else?
Matthew Scharley
Package managers for Windows are there in some spaces: cygwin exists, Steam exists, Gametap -I think- exists. But they're not so prevalent because the culture of 'I'm selling this app for $' is much more prevalent than on Linux. It requires a coordination that open source software doesn't.
Adriano Varoli Piazza
You do have package management on windows, it's of the "download something off a site, click through a series of steps, see if it comes with an updater app and make sure to keep that running in the systray" variety. In all fairness though: it works.
+3  A: 

You will be a better programmer as you will know how to program under Linux. You will be a more efficient programmer in programming Linux programs.

One real benefit is that you can learn how to work with Emacs or Vim, and this can help you in the future when you will use remote terminals.

Mykola Golubyev
I've been using GVim for some time under windows. This is one **really** not OS-specific.
temoto
Under linux you have no choice like Visual Studio. That's why you have to learn either Vim or Emacs. And this is benefit.
Mykola Golubyev
Isn't having no choice worse since you are limiting your opinions?
Anton
vi saved my life a lot of time :-)
chburd
@Anton: please rephrase - I didn't get it.
Mykola Golubyev
You don't have Visual Studio. Eclipse runs great under Linux, though.
Adam Jaskiewicz
@Adam: I work through remote desktop. Gtk based GUI is not good for that.
Mykola Golubyev
wtf, why would you work through remote desktop
@lraimbilanja: security policy
Mykola Golubyev
A: 

Yes. It is not RTOS, but it performs in more predictable time than Windows. Like, this action will happen in 0.1s, and almost no later, or it won't happen because I've done a mistake. On Windows, say you run a program, you can wait for 0.1s or 1s or more.

Linux also has better choices for tiling window managers, I reckon it's a must-have for a developer. I'd recommend dwm. I would be using Compiz if they had tiling support.

Everything else is well ported, or we're talking about OS-specific development. And you can tweak and customize your windows box really well, though it would be simplier to do it under linux.

temoto
Edouard A.
They are not strictly RTOS. That is why i described what i mean with it. That's why i said "more real-time". How do you don't understand "actions take more predictable time"?
temoto
Desktop Linux is not a RTOS. There are flavors that are, but they're generally not mainstream.
Bob Somers
Bob did you even read my comment?Yes, desktop Linux is not RTOS. But for my personal experience, linux performs more predictable than windows.
temoto
More predictable? In what sense? Process scheduling, threading??? :S
Hernán
Probably, process scheduling. I'm not much into kernel, i can't really say what is the reason.
temoto
That sounds to me like you are more likely describing what happens when there is a lot of stuff loaded onto a windows OS compared to a linux machine. You are not talking about the actual OS or kernel or scheduling.
Tim
tim, i was using same set of tools. Either kernel explain difference, or i don't know what to think.
temoto
+4  A: 

I think by its very nature there are no tools that are only available on Linux. I'd definitely agree that using Linux tools can teach you a lot, e.g. grep, sed, awk.

Andy
Things like cygwin are making this even more true. Cygwin was a must-have for me developing on Windows though, even developing Windows only applications.
Matthew Scharley
Agreed! - having a proper shell to do things with is unbelievably useful
Andy
+4  A: 

Just by using linux you won't instantly become a better programmer, but with time, definitely a more efficient one. You can do things much faster on the shell (using the mouse in windows will sooner or later cause pain in your wrists). Just by using linux you will learn a lot, it could be a steep curve however.

siddhadev
+21  A: 

No:

Using linux will not benefit you any more than using some other OS.

You might learn things using linux, but you could equally learn thing using Windows, or Mac OS, or FreeBSD, or RiscOS, or AIX, or FreeDOS..

There's not anything in Linux you couldn't do on another OS.

Yes:

It's a different OS, with different design-philosophies, a different structure, different goals - even if you never look at its source-code, you could still find inspiration in how all the famous(?) sed/awk/grep/cat/pipes/redirection and countless other tools magically work together (the UNIX philosophy of "do one thing, well").

Package managers are great - aptitude install gcc and you have gcc and all it requires. aptitude install libohnowhereisthatlib-dev and you have the headers you need for that project.

dbr
So your answer is "Yo"? ;-)
Adrian Grigore
Or it could be "Nes".
Jonathan
"There's not anything in Linux you couldn't do on another OS." You mean I can browse the windows source code and submit a patch? Cool! ;-)
Si
Err.. Well, you can browse the Linux Kernel source code and submit patches from Windows!
dbr
hahaha, touché dbr :)
Si
+2  A: 

Apart from the tools, it'll make one a much better programmer if one follows the UNIX/Linux ideology as seeing in the command line - make small, universal, isolated components that do a limited and logical amount of work and are well defined and highly reusable.

Consider all the ways you can use and combine cat, grep, awk, and co., and each does a simple function, and when one fails, it doesn't take the rest of them with it.

n-alexander
+20  A: 

It's not the tools, it's the UNIX mindset, or culture, to phrase it the way Joel does. Knowing both linux and Windows will give you a different perspective on things.

Yuval F
Especially if you can raise yourself above fanboy status and recognize all OSes for what they really are, and offer.
Chris
+2  A: 

Whether Linux actually has better tools or anything else that makes it unique is debatable. I'd say yes, but then I'm a Linux user :-).

However, I believe any serious developer should know different tools and environments, even if they are not used every day. So I would definitely recommend getting at least some familiarity with Linux, simply to expand your horizon.

Then you can answer the rest of the question yourself.

sleske
+1  A: 

I use Linux. I've been using it for many years now. And each year I see less and less benefits. For example I use Komodo IDE, it's based on Mozilla. It's cross-platform. It works better on Windows. No wonder, when you see stuff like Firefox working through WINE better then native Linux version. I also use IDEs based on Eclipse. Again, cross-platform, and again work much better on Windows. I would like to use Google Chrome, but it's Windows only.

On the other hand network transparency one can achieve using Linux is impressive.

vartec
+8  A: 

I find I'm far more productive programming under Linux (or Mac OS X) than under Windows.

This is partially because the Windows machine I'm stuck with at work is hopelessly hamstrung by it's laughable file system and a McAffee virus scanner that's locked down and configured to scan every file on access. This includes unpacking zip and jar files in the background to make sure they contain no evil. (edit Note: it is Window's vulnerabilities that makes software like McAffee necessary in the first place.)

The availability of a powerful shell (I use bash and fish) under Linux is the other time-saver for me. I can't count the number repetitive tasks I'm able to automate every day by building on this foundation.

Example: Subversion Checkout

Suppose I want to check (out of svn) the trunks of all projects in the repository. There are about 50 of them. As the local config and build manager, I find it useful to have them readily available.

Under Windows I'd spend half the day click-click-clicking myself to death. Between each checkout, I'd twiddle my thumbs while I waited for McAffee to get the heck out of the way and let me get on with my job. (Checkouts under Windows take 10x as long as under Linux in my particular case.)

On Linux, it's a couple lines of shell. It then runs by itself without further interaction from me, and it's done in 1/10th the time.

Example: Building Software

I program primarily in Java. I build most of my stuff with maven. The end result of a maven build is a jar file containing all the compiled class files and other stuff (resources). Maven is itself, composed of a large number of jar files and runs under Java. How well do you suppose this performs under Windows with a virus scanner that insists on scanning the contents of every jar, class, java and xml file every time it's accessed?

Like a slug. Swimming. In a pool of jello.


I expect that if my employer were to take my Linux box away, my productivity would fall to half of what it is now. I'd also be very frustrated and generally in a piss-poor mood. (I hate doing by hand what should obviously be automated.)

bendin
Both of your examples boil down to antivirus being the problem, not necessarily Windows. Misplaced blame exudes ignorance. Try "snoozing" the antivirus during heavy IO operations on trusted files. Also, example #1 is easily doable on Windows with cygwin + subversion client installed. I can't speak to Java and Maven because I don't use them.
Chris
True, the proximate cause is Anit-Virus software in these cases. Note, however: (1) It's the presence of Windows that makes it necessary, and the incompetence of typical windows-centric big-corporate IT that makes the configuration of the AV so terrible. (2) When I disable the antivirus, Linux with ext3 is still about twice as fast on the same machine for typical Subversion (checkout, update, status) and Maven (install, site) tasks.
bendin
You can automate tasks in Windows if you have the proper access. If you don't you can write batch scripts to reduce how much you have to type each time you need to do the same task. I've found this website useful: http://commandwindows.com/
indyK1ng
Yes, nothing quite like the power and expressiveness of batch files... ugh. Powershell, OTOH is probably worth a look.
bendin
-1, because it sounds like your problem is not very general (I could be wrong, but my WinXP works plenty fast for me right now. Of course, I don't have an IT Team from hell :)
Edan Maor
The lack of a command line shell I can use to automate tasks is a pretty general problem for me. Also, the file system performance problem doesn't entirely go away if you kill the brain-dead antivirus scanner, as pointed out previously.
bendin
+2  A: 

Switching to Linux from another OS, or indeed switching between any OS in general will do many things for you but it will not instantly make you a better programmer. You'll gain experience of using a different OS, learn new methodologies and methods to package, implement and install software and make user interfaces.

Hopefully your software will be easier for end users to use once you implement the lessons you've learned using different software.

Obviously, if you develop software for certain platforms you may need to use that platform's IDEs or whatever but generally in my experience a productive programmer should use whatever tools and platform he/she feels comfortable with.

Even if you love every other aspect of your new operating system (whichever OS, I'm not picking on Linux here - I use it on my main laptop) if the IDE is rubbish, if you can't easily test and debug your code it won't matter.

Salgo
+1  A: 

I'd say yes, mainly budget wise -

1) Linux tools are mostly free, including some very fine tools.

2) Linux has very good free documentation.

3) Tweaking your Linux is common. Tweaking Linux helps to learn about O.S.

Regardless, any programmer should know at least a bit about the Unix world. (as well as on any other important O.S)

Liran Orevi
+3  A: 

No. Most tools are also ported to Windows eg. the GNU toolchain (Cygwin). Some things needs other tools (yes, often not for free) to get some similar working flow as under Linux but its not a big problem.

With Linux you can learn a lot of Unix and networking principles. A developer should have enough know how today, to setup a development environment with a webserver, ftp, ssh, svn/cvs on a Unix based system... Yes, I see the benefits of Linux more with networking and not as programmers operating system.

I work with Linux since middle of the 90th and love the free concept, stability and of course the networking features. Linux is the server system. Because of the technical advances in virtualization, we have it easy today to use different systems together on the same host system. But Linux doesn't benefits me as programmer more as other systems.

devarni
+7  A: 

How GNU/Linux may help a developer in my point of view / experience:

  • In the Unix and Open Source world there are many "good manners" in developing. How things are done is often exposed to you, the user, but also interested developer. So you can learn a lot "do"s and "don't"s in the free software world. Whereas under Windows, there is a much higher variety of application and code quality. Although many people talk about Linux application heterogeneity, on the lower level you will see large grounds of consensus.

  • In the free software world you don't have the "Not Invented Here" syndrome, quite the opposite. Everything can be done by a library. You learn to build on the work of others. And get your job done quicker. You learn what makes a good API, and foremost, to write code that plugs well into other code--which makes it easier to maintain and extend in the end.

  • Linux is developer's heaven. Many people blame it for bad usability -- for end users! The reason: Developers basically built a system for themselves (and server admins). That makes it much more usable if you have a developer's thinking and workpace. You get much more power on this system and you know how to exploit it. Two illustrations:

    1. Did you often think "If only a program could do that for me" but were too lazy to write that program on your own just to get a job done? On Linux most times this changes to "I think a small shell script will do it." I see many people on Windows untouchedly spending lots their time with stuff I would be annoyed to do by-hand after only 5 minutes. It starts by the famous but subtile "you have to click to change focus" or constantly bringing up windows one-by-one as you don't have multiple virtual desktops...

    2. Everybody knows that Windows is a very "visual" environment. You do things by point-and-click. This is important for the average user who needs visual feedback and clues, because otherwise he won't just find the files or programs he needs. But as a developer, you are like an experienced chess player: You can play blindfolded, because you have memorized the game in your head anyways. You get much faster not having to wait for a visual response which is only an extra layer upon the real data (like the file system). Or would you point and click your programs rather than just writing them down?

That said, it should be clear that there are also many obstacles and annoyances in the Linux world. So often when you want to do something new for the first time, you first have to learn everything about it, when you might just want to get it done quickly. (You can argue that in the most cases it pays off.. a high O(1) at the beginning beats a slim O(n) for large n ;))

ypnos
On you point about visual queues and the file system. I want to say it is much faster to crawl a directory when you just type everything out with auto-complete rather than click, search for location...
he_the_great
Exactly-true for you and me. But for the average user it is harder to remember "folder" names, or where they are located. It is easier for her to remember the spatial location of an icon. Because spacial location is not abstract. Like when you find a street while you are on the go, but not on a map.
ypnos
+3  A: 

I want to point out some prominent points complete missed by others that have posted. Linux provides some tools that I have tried on other OS's like Windows, but fail to have the proper flow. This is mostly going to be about the shortcomings of Windows, also you can interchange Linux with GNU for those that feel it is important to do so.

True X-Mouse Gizmo. In Linux Sloppy-Focus very nice once you get use to it. And the middle-mouse past is integrated so nicely.

VirtuaWin MacOS does well with this, but yet again, Windows fails when it comes to Virtual Desktops (And you will love them)

In Windows you can get a proper shell Cygwin and SSH Server, but it is so nicely integrated into the life of Linux. And if you are not already a shell user, that will help you as a programmer.

Proper window management is also important. Everyone has their own needs in this area and Linux provide the options to get it right for yourself.

All this is really going to depend on how you actually do development. Windows really is the perfect development environment for some people, but gives very little option if it doesn't suit your needs. If you are a .Net developer Linux probably isn't the best option for improving. If your big on IDE's you might not see much of a difference, but not being afraid of the shell is a big win. If you want Linux to teach you to be a better programmer, the switch will not be a walk in the park (I recommend breaking your system to the point of having to reinstall at least twice a week :) Linux might not be right for you but the only way to find out is to try it.

I didn't go into the importance of these things because not everyone finds them important, and it is just hard to really explain. And as others have said, it isn't just the environment, its the mindset.

he_the_great
+2  A: 

For a long time, yes, Linux / GNU were invaluable to me as a programmer. I did not need to purchase books (though I did buy a few anyway), access to enterprise quality code was quick and easy, the system came bundled with a fantastic C library and tool chain plus some great editors. Documentation may lack for some applications, but development tools and libraries are heavily documented (and were, from the start).

I've been writing servers and applications to run under Linux (and other Unix-like kernels) since the late 90's. What helped me the most was consistency in the tool chain, GNU gets most of the credit for that. The same wonderful consistency also began to spoil me.. I moved farther and farther away from really low level systems programming as I got used to glibc creature comforts and extensions.

So now, I would say, new emerging operating systems like HelenOS are helping me to become an even better programmer. I'm back at using a primitive and incomplete C library, back to using cross compilers daily and forced to implement things on my own since they just don't exist yet.

Linux taught me that monolithic kernel designs could be and are very viable, while giving me a very nice POSIX interface to write applications. GNU gave me all of the tools that I needed to be a better programmer.

Now, I feel like I'm not being challenged enough .. so I'm really honing my skills by repeating the whole cycle over again while working on something completely new and different .. this time, its a microkernel .. and all of my warm and fuzzy 'standards' are out the door. :)

This is why I suggest that any programmer explore a UNIX like OS, its one step in many to keep growing your knowledge and experience.

Tim Post
+1  A: 

I think it depends on what you're programming. For simple GUI applications, Linux is a hindrance. There is simply nothing like .NET + WinForms. Now that you have LINQ and first-class functions in .NET, it even rivals Python/Ruby/etc. in expressiveness. I work with both Java and VB.NET at work and after a long period in VB.NET, Java feels like the stone age. EVERYTHING feels like the stone age compared to .NET with WinForms in Visual Studio.

Linux is still very much hacker-ish rather than end-user-ish, and it influences the kind of programs that are easy to write. I can do some incredible stuff with simply Ruby and Shell scripts, but I haven't yet found a way to make GUI apps as satisfying as .NET.

Daniel Straight
+1  A: 

If you are Windows programmer, then yes, using Linux will help you be better. Any time you can get new perspective on the world it will help.

Tim
+2  A: 

In a general sense I tend to look at the operating system as a commodity. Just another platform to be targeted regardless of if its windows, linux, mac, solaris..etc. All standard unix applications have been ported to all other general purpose operating systems in use today so its hard to claim that you can benefit from an environment unique to linux.

To be honest in terms of development the MS IDE with its context sensitive help and edit-and-continue features allowing you to make realtime code changes on the fly without restarting the application is hard to beat on any platform. To the best of my knowledge Suns IDE was the only other c/c++ system with this capability.

The one major exception is valgrind. For debugging applications valgrind has actually become quite good at finding problems (and surpressing false alarms:) over the years. Its getting to be right up there with the likes of rational purify in my opinion. We routinly do quite a bit of testing on the linux platform specifically because valgrind exists there and nowhere else.

Einstein
+1  A: 

I wouldn't say Linux makes you a better programmer necessarily. It can come with better tools out of the box than Windows, depending on the distribution. If you know what you're doing, getting somewhere can be done a lot faster and automating tasks is easier with Cron than it is with Window's Scheduled Tasks. I find that all of this can be attributed to the use of the command line where Linux provides a lot more tools to do things on the command line side. For example, setting up a Cronjob would take me less time than setting up an automated task in Windows because I have to go through the steps Window's provides in the GUI whereas in Linux I can just type what I need it to do.

Linux also has the Virtual Desktop advantage since you can set up multiple workspaces and reduce desktop clutter. However, I find it mildly annoying and prefer the multiple monitors approach, which Windows handles better. A friend and I have spent hours messing around in the X Windowing system (the window manager in most Posix compliant systems) trying to get dual monitors to work with the NVidia drivers with very little to show for it. Neither monitor was at the correct resolution, but they were closer than when we started. That being said, my desktop almost exclusively runs Windows (I also play games on it) and my laptop runs Linux. I mostly use my desktop for development mainly because of the multi-monitor support. I think it really depends on personal preference and available resources. I would recommend Linux unless you want to get multi-monitor support fully working, then go with Windows XP (I've had problems with Vista). I know its a little nitpicky and if you can stand having your monitors at lower resolutions, then I go back to recommending Linux, if you have the time to deal with getting it set up.

indyK1ng
+1  A: 

There are no tools, to my knowledge, that are available only on Linux or Unix. There are other benefits.

I find Linux a more comfortable environment to program in. It was essentially designed for use by people like me, while Windows was designed for use by people who don't want to know about how computers work. (There's certainly nothing wrong with wanting to get something else done, and not wanting to learn about computers in detail, but I'm not in that target audience.) I'm not particularly fond of Visual Studio. It does some nice things, but it makes other things difficult. For example, last year I was modifying our software to run in 64 bits, and there were a lot of repetitive changes that would have been easy to make en masse using standard Linux tools, but which required a lot of clicking in raw Visual Studio. There are, I believe, tools that will handle that sort of thing on Windows, but they tend to be more obscure.

I like the Linux culture. There's a lot to learn from it for developers, much as there's a lot to learn from the Windows and Mac OS cultures about making things good for unsophisticated end users. I'd recommend Eric Raymond's Art of Unix Programming to any developer, particularly one whose primary experience is in Windows programming.

There's no particular shortage of Windows source code freely available, but there's much more source code to examine on Linux. You don't get as many large and industrial-strength applications on Windows that come with source code. Not that you need to run Linux to examine it, but it will greatly help when you want to play with it. I like to learn what's happening a few levels below what I'm working in, and that's easier on Linux than Windows.

In order to be a good developer, you really should learn a variety of languages. I find it easier to get good implementations of odd languages on Linux than Windows.

I'd recommend that developers have wide experience in software tools, so that they can learn different things from different environments. This applies as much to operating systems as languages.

David Thornley