
Ask HN: Your Dev Environment - evo_9
I've been thinking about how much VM's have changed the way I work now, esp. how I setup my dev environment and the kind of hardware I run.<p>A few years back I switched to running my VisualStudio Windows install on a VM;I originally started on Parallels then switched to VMWare, and then recently switched back to Parallels (it just runs Win7 way way faster on my rig at least). I love the ease of moving to a new machine (just copy the vm), or even backing up my windows dev environment (just copy the 45gig file to my Synology NAS). It's also nice if you need to temporarily move your Dev environment to another machine (again, just dump the vm onto an external drive and you can even run it off that if you need too).<p>I was wondering how prevalent using VM's in this manner is. I seem to run into a lot of developers that think running a VM is much slower than an actual machine, and I guess it depends on your rig.  I run a original Mac Pro tower with dual 2.6 core 2 duo procs + 12 gigs of ram; I can give Win7 4gigs of ram and allocate one of my cores to it and with that setup, Win7 + VS2008 smokes. It's honestly the fasest 'Windows machine' I've ever worked on. An added bonus to running like this is my email, music, IM and torrent clients are all running on the host so when Windows needs to reboot, I can keep working on some emails or updating my project plan, make a skype call, etc.<p>So how about it guys, do others run a VM type rig now or is it still predominantly just running a dedicated box for your main dev env?
======
johnbender
My friend Mitchell Hashimoto and I built a tool for using disposable vms for
development.

<http://vagrantup.com>

Feedback is always welcome!

------
steveklabnik
I develop on an Arch Linux box, two 22" monitors, XMonad, vim, and an IBM
Model M.

But then I got a MacBook Pro, and I've actually been doing all development on
it for the last few weeks. Textmate is the only non-vim editor I'd ever use.

~~~
evanrmurphy
Have you tried Emacs in viper mode? To me vim shortcuts plus Emacs
extensibility is the best of both worlds.

XMonad looks great, I look forward to trying this out.

~~~
steveklabnik
I haven't. I enjoy modal editing, so I've never been able to get into emacs.

XMonad is really awesome. I use xmobar to give me a little bar at the top, it
looks like this: <http://haskell.org/sitewiki/images/a/ae/Arossato-config.png>

~~~
evanrmurphy
To clarify, viper for Emacs includes most of vi's modes, so the editing
experience can be very vi-like. [1] What happens is you tune the environment
on a scale from vi to Emacs, with the one extreme being almost identical to vi
and the other keeping its core key bindings but freeing up the ones needed to
fully take advantage of Emacs Lisp, which is arguably more powerful than
vimscript.

Yes, thanks for the XMonad intro, I really can't wait to try it.

P.S. I think we have some friends in common and may cross paths at the l2l. :)

[1] As johnswamps points out in the neighboring comment, to get vim features
(not just vi) you may need vimpulse as well.

~~~
steveklabnik
> To clarify, viper for Emacs includes most of vi's modes,

Ah, nice.

> P.S. I think we have some friends in common and may cross paths at the l2l.
> :)

I'm there right now, actually. :)

------
rewind
I've been a .Net developer for years, but because I can't develop for the
iPhone on a Windows box, I switched my primary dev machine to a MacBook Pro
running my Windows stuff through a VM. The Windows part is 90% of the what I
do, but being able to run the iPhone stuff directly against the Windows back-
end made this a no-brainer. It's also really nice to have a VM that mirrors my
production environment right on my MacBook so I can do more of that sort of
testing on the same box.

I'd prefer running OSX in a VM on a Windows box (the Windows stuff is
definitely faster that way), but since I can't do that (easily), this is an
acceptable trade-off.

I wasn't happy about how much I had to spend for the MacBook Pro setup though.
You're definitely not getting the same performance bang for your buck. It's
the price you have to pay though. Oh well.

~~~
evo_9
Yeah, it's pricey to run it this way, but you do gain a lot of flexibility
like being able to run an XP VM once in a while to test stuff on IE6 (IETester
isn't 100% accurate), or just checking out the latest Ubuntu for fun.

I found running on a macbook pro to be not as fast as I liked (I was setup
very similar to this to start but an original 15" macbook pro) so I sold that
and managed to get lucky finding a used Mac Pro tower (1500 bucks). A lappy is
nice but having the extra room/ram of the tower really helped out, esp. when
you are running SQL, IIS, etc. Of course, with the new i5/i7 macbooks and the
bump in max RAM, a macbook pro would probably be pretty stellar but of course,
very pricy.

------
heresy
I run Windows 7 as my host OS, and use Sunacle's VirtualBox to run my VMs, as
it supports 64-bit guests.

I have a MacBook Pro if I need to do OS X stuff, but it doesn't have the grunt
to serve as my main dev environment any more, sadly.

And since upgrading my desktop to a Core i7 960 with 12GB of RAM and SSD + 10K
RPM drive combos...

VMs are sufficiently fast that if I fullscreen them on one of my monitors it
feels like a KVM connection and not a VM.

I have VMs for every flavour of Windows our software supports (Windows XP,
Windows XP SPx, Vista, Windows 7, Server 2003/2008).

And with snapshots I can quickly jump to a particular state if I need to
reproduce something specific (e.g. before installing our VC++ runtime friends,
after, etc).

We're actually considering shipping VMs as a deployment package to some of our
larger customers.

------
alexgartrell
It's been posted here before, but <http://usesthis.com/> for what other folks
use.

For my part, I have two monitors, I use the first for web browsing, chat,etc
and the other for whatever I'm working on (visual studio for chromium, virtual
box for Linux kernel stuff, PuTTY for working remotely). Not a bad workflow.

And working on kernel stuff would SUCK without virtual machines.

------
daakus
I just rent a cheap $20 month VM on the cloud. Every now and then I need
another one to test stuff, so I'll just rent another one for that duration,
which get's pro-rated. Screen does the rest. Having scripts to bootstrap VM's
is crucial to make this setup viable imho. I do wish cheaper dedicated servers
were available with the same easy management cloud VMs provide.

------
pssdbt
I do web dev, and my setup probably isn't nearly as crazy as most of you guys
but here we go.

Hardware: 15" MacBook Pro, w/ 19" external LCD and external Apple keyboard if
I'm at home.

Software: MacVim, MAMP setup w/ BIND for local dev (using this configuration:
<http://postpostmodern.com/instructional/a-smarter-mamp/>), git for vc,
Parallels for IE testing, Firefox w/ Firebug and WebDev extensions for
debugging js and editing css, and I prefer iTerm over Terminal.app (sadly just
for 256 color support, I'm sad I know).

Web apps: <http://www.getcloudapp.com/> for sharing, <http://www.freshbooks>
for time tracking/billing

Supervision: 8-month-old boxer-lab with an attitude.

~~~
theandym
I have an almost identical setup. Great stuff to work with. I just switched to
iTerm for the exact same reasons too.

------
cygwin98
I turned a NAS device -- Intel SS-4200E (has Intel Celeron CPU) into my
dedicated home dev server. Installed Ubuntu 9.10, latest Ruby on Rails, Mono
and F#. It rocks as it only consumes 40Watts when loaded with tasks. Cutting
eletricity bill was the main motive I had to replace a few obsolete PCs I used
as Linux servers.

My main desktop is my Macbook that hooked to a Dell 23inch LCD. Most of work
is done at the SS4200E where I use Vim. I generally open 5 to 6 terminals and
use cmd+# to switch among them. Contrary to other guys here, I really like the
Terminal.app. The default color scheme used by Vim is too dark though.

Edit: typo

------
gcv
I try to do my programming in either Common Lisp or Clojure, with a REPL
connected to a SLIME instance in Emacs. I can use these tools on any host OS,
but prefer the Mac. It's such an amazing combination of tools that everything
else feels like... well, I imagine that trying to type with two amputated arms
must feel similar.

Yes, this includes fancy IDEs; I have used Eclipse extensively and hate it.
No, I don't like vi, although I certainly respect it.

------
mmphosis
MacBook 2Ghz Intel Core Duo, 2GB 667 Mhz DDR2 SDRAM
<http://www.virtualbox.org/> I've found a use for Spaces. I put each
fullscreen virtual machine in it's own space. Space 1 - Mac OS X (native)
Space 2 - Windows (virtual machine) Space 3 - Ubuntu (virtual machine) I keep
networking turned off in Windows. Files are shared locally by VirtualBox
between Windows and Mac OS X.

------
swoodtke
I use VM's on a MacBook Pro circa 2006 and they worked fine - a little slow on
harddrive intensive operations (e.g. startup, building large applications) but
useable.

Then I got an SSD harddrive. It's like I'm using a new (much faster) machine.
The VM's seem like they're native.

SSD HD's are still pretty expensive but worth every penny IMO (and way cheaper
than a new MBP).

~~~
ashleyw
Really, does it make that much difference? I've been thinking about getting an
SSD for my 2006 MBP, but wasn't sure if it'd be fully utilised.

Though, I still need an upgrade, the 2GB RAM limit is getting pretty annoying
now. If only I had an extra £1650 laying around.

~~~
fierarul
Using an SSD is clearly noticeable compared to the normal laptop hard drive.
Login is faster, normal applications launch instantly (the icons in the dock
almost don't bounce).

After enough RAM is the best upgrade you could get. Well, technically it's
also the only other upgrade you could get to your laptop, but it should make
it snappy enough to delay a new laptop purchase for a while.

BTW, what would the £1650 be for ? 4GB of RAM is probably £100 max, an Intel
160GB SSD another £400 max.

~~~
petercooper
_BTW, what would the £1650 be for ? 4GB of RAM is probably £100 max_

The early 2006 MBPs that were Core Duo (rather than Core 2 Duo) could only
support 2GB memory max.

If he has one of the later 2006 ones, though, they were sold as supporting 2GB
max but can actually take 4GB with 3GB then being usable.

------
vyrotek
I dont think my setup is quite what you were asking about. But, I'm running
Windows 7 with a Windows 2008 VM. The VM hosts a handful of services that I
don't want always running or starting up with my computer. Things like SQL
Server 2008 and IIS7. But, I do run Visual Studio locally. It all runs very
fast on a QuadCore with 8GB of ram.

------
jheriko
I've developed on a VM in the past (VMWare), the experience was great -
convenient to test on multiple platforms without rebooting etc. but it was
difficult once I needed to do non-trivial graphics stuff with OpenGL - the
performance difference was quite extreme. Hopefully this is something that
will improve with future versions...

~~~
wwalker3
I've seen this too. OpenGL performance inside VMWare is much slower than
native, and there are graphical artifacts in some cases (like lines across the
diagonals of quads).

Some small details (like the apparent lack of line anti-aliasing inside VMWare
OGL, and differences in the rendering of translucent polys) make me think it's
partially or completely software emulated.

~~~
jheriko
Yeah, if it the command buffer was being passed through to the hardware in
exactly the same form then there shouldn't be these problems - I assume its
something that is being done out of necessity for driver emulation.

------
lallysingh
Emacs, Solaris. I'll have to jump back to Linux, and I won''t be happy without
dtrace/zfs. That's a desktop machine. I've got a Macbook Pro 17" that I can
use for multi-platform testing, with a VM in there if I need it. My work at
home isn't web-based, so I don't have to worry about windows compat.

~~~
phren0logy
I'm sure you are aware, but OS X has dtrace. But no real zfs support, alas.

------
thumper
I run on a Macbook (not Pro!) with 4GB RAM. For a while, I was doing some IE
plugin development and went with separate VMs for IE6, 7, and 8 (used the MSFT
distributed VirtualPC ones, actually). That got me used to the idea of
switching back and forth being VMs, and now I have separate Ubuntu VMs for
each project I work on -- switching back and forth as emails and phone calls
come in. Working this way really helps me compartmentalize my projects,
especially not worrying with how I muck up the OS installation as I need some
crazy tool or other for a particular task. It's also divorced me from
excessive customization of my rig, so that I don't mind upgrading when a new
Ubuntu is shiny enough to make me go "ooh".

------
iamelgringo
Before I was using Win 7 as my base OS, I was working with an XP box, and
coding on Ubuntu in a Vmware VM. It was the best way that I could get Ubuntu
to actually recognize my 3 monitor setup seamlessly. I could actually rotate
my main 24" monitor and code in portrait style, and Vmware would recognize the
change and adjust Ubuntu accordingly.

I might actually go back to that setup. I've been wading through some gnarly
unicode issues recently, and I suspect that the Python REPL + Windows 7
Powershell prompt were leading me in the wrong direction a couple of times. I
really need a OS that's working in unicode, dammit.

I would happily run OSX in a VM, but Apple doesn't let me. :(

~~~
nfnaaron
"I would happily run OSX in a VM, but Apple doesn't let me."

A Mac is Apple's DRM to protect OSX. All Macs are merely giant dongles that
plug in to the internet.

------
waivej
I've been using Parallels on a Macbook for a year or so. Though I have been
thinking of switching to a Windows machine. The guest OS is Win2003 server
which runs great. Though I get spinning beach ball problems and need to reboot
the host OS fairly often which disrupts my productivity. I may try a Mac
desktop next...Maybe it's a dodgy laptop.

I've just been on a Mac for a year and enjoying the change of pace but
frustrated by the number of problems I've had. It seems comparable to XP on my
Thinkpad...but bad compared to my 2003 Server desktop.

------
ahlatimer
I have one of the 27" iMacs with a 26.5" external display. I use parallels
whenever I need to test sites in IE, and it's very, very useable. I also do a
little bit of actual development (IronPython+Silverlight) in the VM as well,
and it's the same story. If I keep the VM fullscreen, I really can't tell I'm
not working natively. There are the occasional slowdowns (HDD performance,
mostly), but I'd imagine switching to a SSD would practically eliminate it for
me.

------
iuguy
I run Win7 on my main laptop and use that for a fair amount of development
with PyDev. I use dedicated separate VMs for PHP (LAMP), certain specific
Django projects and several scratch/playground VMs running Xubuntu or Arch. We
use a VPS for certain dev and testing functions.

Our penetration testing VMWare Images run XP and Xubuntu respectively but are
due for a refresh.

------
beamso
15" MBP with 2.53GHz CPU, 6GB of RAM and 7200RPM HD. Have external monitors at
home and at work. I'm using either IntelliJ IDEA 9 or Eclipse for an IDE,
depending if I'm doing Android stuff (Eclipse) or everything else (IDEA).

I don't use VMs on this machine but at work there is a server full of
VirtualBox VMs for testing deployed apps in a production-like environment.

------
kgutteridge
Macbook pro 13" 2.53GHz 4gig ram Aftermarket 500gb 7200 rpm disc and a 24"
Samsung 1920x1080 monitor

Use parallels to run VM Win XP and Ubuntu

Would maybe consider upgrading to the new 15" mac and the higher res screen
but think I will hold off and wait for the next iteration of Macs

Software wise xcode, textmate, eclipse

------
jharrison
i7 920, 6BG DDR3, Dell 24" monitor running Windows 7 64 bit host with Ubuntu
VM and Win 2003 server VM (both via VMWare). Ubuntu in the VM is faster than
Ubuntu on bare metal Core 2 Duo E6550@2.33Ghz w/2gb ddr2. Only downside
(totally non-critical to me) is VMWare won't support the advanced graphics
stuff for Linux.

------
aaronblohowiak
the more complex the deployment environment is, the more likely i am to be
running a VM (so dev can match deploy.) when i run ubuntu like this, it is
AwesomeWM + gvim. when things are simple, it is osx + macvim

------
calibraxis
I virtually always dev on a VM, for a number of years now:

* Parallels and VMWare on Mac (best to have at least 2 GB), running Debian, Ubuntu and WinXP

* Qemu+KVM on Ubuntu running Ubuntu

* VirtualBox on Debian running Debian

* SSH into Xen VM running Debian

The exceptions? Sysadmin tasks on my host machines.

