Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm not a programmer, but financial analyst by profession who is learning how to code (Python, Django, C w/ ctypes when I need something to go really fast) in a virtual Ubuntu setup on my work laptop.

Question: I just assumed that coding on a Virtual machine was no different from if Linux was my main OS. Is this a bad assumption? Is there anything I need to watch out for?

Thanks,

Mike

share|improve this question
    
ctypes is not exactly the best (or easiest) choice for interacting with C. Consider wrapping the C code with plain old C or Cython. –  delnan Feb 8 '11 at 21:40
    
By wrapping the C Code with plain old C, do you mean docs.python.org/extending/extending.html#a-simple-example? –  MikeRand Feb 8 '11 at 21:44

6 Answers 6

up vote 13 down vote accepted

No, there is absolutely no problem with working in a VM. There are even some advantages, like the possibility to copy the VM to another computer (so you don't have to reinstall all the libs and tools and whatnot).

share|improve this answer
1  
+1 for easy migration - that used to be such a pain until VMWare took it all away –  Gary Rowe Feb 8 '11 at 22:18
2  
Also the odd snapshot before you do something liable to cause absolute havoc is very handy... –  glenatron Feb 8 '11 at 22:27
    
Also, you can't break your system in a VM. –  Silviu Burcea Feb 27 at 10:07

It's perfectly fine, unless you're writing programs that require graphical acceleration, shaders, etc. because in this case you won't be able to test it.

EDIT:
vmware supports 3d features, so I guess, now this makes VM == physical machine.

share|improve this answer
1  
Graphical acceleration can be done today in a VM environment –  Aaron McIver Feb 8 '11 at 21:41
    
AFAIK (for VMware Fusion 3.1.1 - Mac), only DirectX 9 with shader model 3.0 is supported, so higher versions of DirectX are not supported via hardware acceleration (see: en.wikipedia.org/wiki/VMware_Fusion). –  Scott Davies Feb 8 '11 at 23:52
    
Well, DirectX is irrelevant in this case, as OP is running Linux in the VM. However, at least VMWare and VirtualBox also have some support for hardware acceleration of OpenGL, so this might work. –  sleske Feb 27 at 15:56

Depending on what you are using to host your VM there are limitations to how much horsepower and what hardware you can interface. Storage controllers and high memory / multi-cpu performance are usually the pain points in what I do.

share|improve this answer

Any time you need to touch specific hardware you will have some considerations. If you were developing software that required a WiFi card (such as a WiFi sniffer), you'd be out of luck as a standard desktop NIC is emulated by VMware.

In terms of business logic code, you'll be fine. I run VS 2010 in VMware 3.1.1 Fusion on my Mac and have no issues.

share|improve this answer

In short, no - not really. The only real difference between running and testing a program on your desktop and the virtual machine will be the hardware your program sees itself running on. As long as you have a good understanding of the machine the program is really running on (the virtual machine), you shouldn't be surprised by any side-effects. Just recognize the limits (minimal graphics, limited RAM, etc.)

As for a potential gotcha, I have found that remotely viewing your computer with something like RDP and attempting to use a Virtual Machine within it can cause significant lag. The inability to easily move around a graphical editor / browser has been problematic for me in the past with this type of setup.

share|improve this answer

You'll be fine. Developing in windows in a VM is fine too. I've spent many hours on a linux box doing C# coding in Visual Studio from within a VMWare instance.

If you ever encounter a situation where execution in a VM is a problem, you'll likely know what to do about it by then. Apart from speed or memory, but that's easy enough to solve: buy new hardware.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.