Developers shouldn’t be tied to the computers

Be virtual, be free

Some basic assumptions:

  1. You are a developer
  2. You have your own dev machine with your own environment

If all these are correct for you, then keep reading.

Please, be honest with me and answer a very simple question: how much time do you need to recover your developer environment from… a cup of coffee? Or a hard disk failure? Will it be less than 10 minutes?

Friends of mine answer differently, but the median always is about 5-6 hours (plain dev setup/configuration time, without installing OS etc).

Is your dev environment fully mimic your production setup?

Or you think that your shiny mac is fully compatible with a linux that powers your main server.

Ok, time for another question: are you afraid of experimenting?

What about updating your ‘main-programming-language-here’ interpreter, your primary db, OS configuration for test purposes?

Will it be easy to apply and what is more important — to rollback these changes?

I think that the obvious answer is no.

So, is there any way to answer positively for all these? Yes. It is 2013 now, we could do better.

Virtualization technology is powering our servers for a long time now, we have clouds, we could spin up a bunch of a new machines just in a few clicks or keystrokes. And we should use all this power and opportunities to help us in developing.

The main idea of this post is — use virtual machines for your dev environment. This is easy, this will unbound you from specific computer, this will give your an experimenting freedom.

It was hard for me to adapt to this idea at first when I heard it from Andrey Deryabin on our local Ruby User Group meeting. As the more I think about it the more interesting it becomes to try. I've started experimenting.

The main approach is simple: take vagrant, spin up your base virtual machine, ssh to it, configure as you want (please mimic your server env) and save the results. You will have all your code on your host machine shared via network folder, so use any editor that you like.

Want to move to a different computer? Just take you virtual machine file and you are done.

Want to experiment with setup? Spin up a different machine based on your main one, experiment and destroy it as you finish.

All the rules that apply to the cloud infrastructure apply here too.

Want to automate things more? Use — smart vagrant configuration manager that allows you to pregenerate typical builds.

Is there any disadvantages to use VM for dev environment? Maybe yes for some specific setups, but for web developers I don't see any.

I work in virtualized environment for more than a month now and see some psychological benefits too: if want to work & hack — spin up your machine, if just to read and relax — turn it down. This helps your brain to adapt and focus on the current task the same way as differentiation of your work and home environment does.

This post is just a overall description of an idea, the next one will take a more close and deep look on how to setup your virtualized development environment right.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.