views:

412

answers:

9

Background:

People often ask what is the best "developers toolkit" to use for a specific platform. The problem with this common question is it assumes the luxury of finding a set of tools for a single platform (viz. Windows, Linux or Mac). It doesn't address the people out there on the fringes who have to work routinely on "all of the above".

I am assuming there has got to be someone else out there who finds it necessary to find a developers toolkit that works on multiple platforms.

For example, one huge advantage of Vim and Emacs (despite how you may feel on other characteristics) is that they both seem to run pretty much everywhere. For another example, I notice some people resort to heavy use of cygwin on Windows systems, in order to have reasonably ubiquitous access to bash, regardless of what machine they are on.

Questions:

  1. Is there anyone else out there who does not get the luxury of focusing their development work on just a single platform ... and routinely has to move among Windows + Linux + Mac OS workstations and be productive on all of the above?

  2. If yes to above, are there any tools or strategies you use in order to be nimble on all the platforms with a minimum downtime of futzing around and tweaking when transitioning from one to another?

  3. Is it reasonable to approach this kind of scenario with a focus on a highly-portable set of common tools, or do you pretty much just have to learn the individual one-off apps that work on one platform only and then just "recalibrate" yourself when you have to switch to a different platform?

Assumptions:

The assumption here is a focus on web-development, which tends to have a heavy demand for cross-platform focus, but please don't let that limit your response if you have multi-platform insight in a different area.

This is akin to a "tools" question, but with emphasis on multi-(omni)-platform

Note: this question is looking for tools that you use in the process of developing on a workstation (e.g., editor, IDE, SCM, documentation system etc). This is not a question about programming frameworks or languages. See some of the other tools questions for comparison.

+3  A: 

When I was working in the video game industry, we routinely had to write code that would work on Windows and Mac, and later on Xbox and Playstation 2 as well. We accomplished this by moving everything system-specific that we could think of (or encountered as we went) behind a very string abstraction layer. We wrote our own interfaces for things like graphics, sound, network communication, file I/O, memory allocation, and so forth. We ensured that our higher-level code never made any direct system calls, but performed all these operations through the abstraction layer. Then we had a "back-end" that implemented the operations in the abstraction layer for each platform we worked on.

This was a while ago, and we didn't always have good OOP support on our platforms, but in modern systems this would work really well using interfaces and factories. The key is the strict separation between "high-level" code that uses the abstraction layer and "low-level" code that implements it.

MattK
Question was regarding tools (IDE, etc), not language/framework.
too much php
A: 

MattK is right on with the layering concept: you have to stick with it, though, as other developers may chide you for "designing ahead of time" or "wasting time with intermediate levels of abstraction". They have good intentions, but a simple cost-benefit analysis will bear out that, if cross platform operations are even ever slightly considered, putting in this layer is way cheaper.

Also, along this lines, one of my favorite toolkits for X-platform development is Qt. It is extremely well written, has tools for GUI work, databases, network programming, you name it, and works on Mac, Linux, OsX and to some extent embedded devices. It is free for open source development, the license is worth it for commercial development. The only danger is that it is so good that you might find yourself tightly coupled to it.

I know this is not exactly what you're asking (web development and tools and all) but looking at this library is a good place to start seeing how cross platform code is successfully created, in techniques, build toolchains, etc.

If you're looking for something a little less cut and dry, you may find that far more often libraries written originally for *nix are much more likely to be ported to windows/mac than vice versa. I would suggest becoming familiar with your favorite flavor of Linux and going from there.

Matt
+3  A: 

I use Eclipse for cross platform development since it runs mostly the same anywhere. The c++ for eclipse extentions work well with gcc under cygwin as well as with linux. Java works well anywhere do to it's nature. I make sure to use cross platform scm systems such as mercurial rather then visual sourcesafe. I also try to use cross platform databases such as mysql.

Jared
+1  A: 

I use OS X at work and only have a Windows XP machine at home.

  • For OS X I do everything in a shell. I don't use a fancy IDE, I use vim and write my own plugins and supporting shell scripts as I need them. If I ever needed to switch to Linux, I imagine just about all of my tools would port straight across.

  • At home on Windows XP, I'm limited to the very tiny subset of command-line tools which have a GUI front end - Vim, Mercurial and Git. I can survive on this only because my home projects are so small.

I hope someone else can give a better answer with more tools that work between Windows and OS X/Linux, because I find it quite painful to use XP.

too much php
+4  A: 

I routinely use both Linux and windows. I always have Vim installed, and Cygwin under windows to give me a sane shell environment and a good text manipulation toolset.

I've been doing a lot of Java development in recent years, and been using the Eclipse IDE for this (with the viPlugin of course!) which works really well in both. I'm slowly teaching myself Ruby, and using the Eclipse dtlk for that too.

I would get comfortable using the command line version of whichever source control tool you use, be it subversion, git, etc. That way you're not stranded no matter where you are.

For tools used more occasionally, you can often find reasonable equivalents for each platform. e.g., Meld for Linux, WinMerge for windows (although I've just installed WinMerge on Linux using WINE because it is more useful in some use cases.)

I guess it is a matter of working out what works best for you and makes you productive. I believe time spent in working on your development environment is not time wasted.

EDIT: Well, a reasonable amount of time, I guess. I installed andLinux (all 4GB of it) on my windows machine just so I could run Amarok v1.x for listening to music...

Evan
Try MSYS http://www.mingw.org/wiki/MSYS, instead of Cygwin.
Brad Gilbert
MSYS is geared purely towards an environment for the MingW compiler, whereas cygwin gives you a lot more. I've used it to run ssh servers, NFS servers, rsnapshot and all kinds of stuff as needed.
Evan
+2  A: 

Use VMware. With VMware Fusion on Mac OS X, it's possible to use Mac based tools, e.g., TextMate with Project Plus svc and bash shell, for all platforms, and test in the VM.

Doug Currie
Although sometimes you don't have a choice in what the "host" operating system you're running is. e.g., I have to use a Windows XP box at work.However, VMware or VirtualBox are handy tools for your toolbox.
Evan
dual-voted as the co-accepted answer (if SO had this as a feature that is)
dreftymac
A: 

My company develops a crossplatform installer that runs in nearly any operating system that you can think of, including OS X, Windows, Linux. Solaris and so on. As you can imagine, we perform quite a bit of crossplatform coding and testing. Among the few things that you can rely on across platforms are vim and emacs, either through native ports or cygwin. Over time we have developed a number of internal tools, mostly around scripting languages, so they are easily portable across platforms.

Some tools that have helped us manage crossplatform development (as opposed to development in different platforms) are VirtualBox, Vmware, Wine (for quickly testing Windows code on Linux, which has proven surprisingly robust) and sshfs

Daniel Lopez
I have one gripe about BitRock. It doesn't support Alt+N, Alt+B for moving through wizard pages, which is a standard in practically every installer. Hope you guys address this issue soon.
Imran
Which platform and which frontend did you try? I just tried with our latest version on Linux and it works out of the box in GTK, and X-Window modes (we still need to get Qt mode right)
Daniel Lopez
I never created any installers with BitRock. Speaking from my experience of using some Win32 platform installers created with BitRock (QtCreator 0.9.1 Beta, some Bitnami stack installers: Django 1.0.2, WAMP 1.0 beta 3, Joomla 1.5.9)
Imran
A: 

While I also used to be a strong proponent for using Cygwin while on Windows, I now happen to use coLinux instead of it-which is tremendously neat to have around: it's basically a full-fledged linux OS running as a background process/service on Windows, so that you can easily use it, via SSH/VNC or whatever - it transparently sits as a virtual machine in your windows network and is just a few key presses away.

In fact, under Windows coLinux used to be (now there's mysysgit) the only reliable way of getting to run git properly - just by running it on the virtual linux machine, so that it would sit on your network, where you could connect to it from your non-virtual windows box.

Also its performance is so much superior to Cygwin, it's really fantastic: I can in fact even run complex software such as 3D simulators/games and there's no performance perceivable even though coLinux is run all along.

none
A: 

gedit, scite, bazaar/mercurial, task coach, doxygen, tex/texinfo/lyx

gcc/mingw, python, lua, wxwidgets/qt/gtk

qwer