Chad Perrin: SOB

24 April 2009

choosing a dev environment

Filed under: Geek — apotheon @ 02:28

In February, someone asked a question on a mailing list about what kind of development environment to use while learning Ruby on Rails. He mentioned that he talked to a professional Rails developer who suggested he start using a Linux distribution instead of MS Windows.

His specific question was whether he should keep using MS Windows or switch to a Linux distribution, even though he hadn’t used any Linux-based OS before.

I offered my thoughts on the matter at the time. Now, a couple months later, I thought of that mailing list discussion again, and decided to adapt it for an SOB entry. This is, with only minor modification, what I said:


My personal preference is actually for FreeBSD — which is substantially similar, from a typical end-user’s point of view, to Linux. There are some significant differences once you get past the surface, though, and it is these differences that make up most of my reason for preferring it. I still prefer something like Debian GNU/Linux over MS Windows by far, though.

My recommendations are as follows:

  1. If you want to just get into Rails and not have to worry about anything else, stick with MS Windows for now. If you make an OS switch at the same time, and you don’t have any other reasons for the switch than to support your Rails development, you should put off investigating a different OS until you feel like you are willing to just devote some time to that. Even if the long-term benefits of making the switch make it worthwhile, it will require some adjustment that could interfere with your early explorations of Rails development. Rails is a Web development technology, and while a Unix-like OS can provide characteristics of a development environment that aren’t easily accessible on MS Windows, the actual target environment for your code is not directly affected by your choice of development platform.

  2. If you want to learn Ruby itself, and you aren’t specifically trying to learn it for MS Windows development, I think that a Unix-like OS such as a BSD Unix or Linux-based OS can be one of your best friends. It is much easier to get started writing simple, but useful, little automation tools (e.g., shell scripts and similar) in a Unix-like environment than in the relentlessly CLI-hostile environment of MS Windows. Because not only the development environment, but also the execution environment, of your code while learning the Ruby language itself is far more affected by the choice of development environment than when your only interest in Ruby is as it pertains to Rails development. The greater opportunity for simple, quick, useful tool development in a Unix-like environment provides incredibly valuable advantages for someone learning to program, especially with a language well suited to such tool development like Ruby.

  3. Give something Unix-like a try eventually. Even MacOS X can help in this regard, even if not as well as a more traditional Unix style user environment. It also costs a hell of a lot more to experiment with MacOS X than with something like Debian GNU/Linux or FreeBSD, since with MacOS X you not only don’t get a free OS, but also have to buy hardware specific to the OS — but it would still provide a much better command line tool development environment for beginning programmers than MS Windows. Anyway, the point is that (especially for developers) it’s good to choose your user environment based on knowledge of the options rather than based on apathy and ignorance.

There are “easy” introductions to Unix-like OSes, such as Ubuntu Linux, PC-BSD, and DesktopBSD, if you want to try making a complete switch to a Unix-like OS in one shot. If you want to take a more gradual approach, though, I’d recommend doing something like what I originally did. I got a KVM switch, and connected two computers to it side-by-side on my desk. One was my main MS Windows system, and one was a far older system running Debian. The KVM swich allowed me to quickly and easily — and almost seamlessly, without any reboots or changes of peripheral hardware — switch between the two systems. I could learn the Linux-based system at my leisure, getting into really understanding the system rather than just sticking some gooey (GUI) fat-interface OS on it like Mandrake (Ubuntu didn’t even exist then, let alone Mandriva).

After a few years, I got fed up with some issues with Debian, and made the move to FreeBSD. Along the way, I’ve tried out a number of other Linux distributions and BSD Unix systems, in some cases professionally, but in terms of OS-of-choice, I’ve gone MS Windows -> Debian -> FreeBSD. The move from MS Windows to Debian was the most shocking, in several ways, though probably the most shocking part of it was the sudden realization one day that I had gone from thinking of the slower, older Debian box as a toy to play with to using it constantly without even turning on the MS Windows system for a couple of months — without even noticing the change.

2 Comments

  1. Just out of curiosity, what is it about BSD that you like over linux? I agree completely that having some sort of CLI-friendly OS is a huge help for a programmer.

    Comment by codeyeti — 26 September 2009 @ 12:56

  2. Just out of curiosity, what is it about BSD that you like over linux?

    In brief, and in no particular order:

    • stability (in my experience, at least)

    • more of a focus on OS development “the right way” rather than “the convenient way”

    • more consistent interface

    • licensing

    • better developer documentation

    • better user documentation

    • more knowledgeable user community

    • more certainty that stuff that’s supposed to work can be gotten working (more important than whether it theoretically supports something, in my opinion, is whether I’ll be able to get something it theoretically supports to actually work for me)

    • easier to get stuff that’s supposed to work to actually work (none of that asinine jumping through ALSA hoops, for instance)

    • less obnoxious community (since those aggravating GNU/FSF weenies aren’t running around in BSD Unix communities as much, looking for reasons to sue people who don’t understand every nook and cranny of the dense, tangled legalese of the GPL perfectly)

    I’m sure there’s more, but that’s all that immediately popped up in my mind when you asked. I’ve commented on my preferences here at SOB before, if you want to start trying to mine the archives.

    Thanks for commenting, by the way.

    Comment by apotheon — 26 September 2009 @ 01:18

RSS feed for comments on this post.

Sorry, the comment form is closed at this time.

All original content Copyright Chad Perrin: Distributed under the terms of the Open Works License