4 ms·
I’m not across the Microsoft ecosystem but why is it (that people say) it’s so difficult for people to setup their dev environments? Is it something to do with
by smcleod 3y ago
I’m not across the Microsoft ecosystem but why is it (that people say) it’s so difficult for people to setup their dev environments? Is it something to do with running windows or is it a .net thing?
- markphip 3y agoThis is about containers .. so primarily about running a Linux dev environment in a container. https://containers.dev https://containers.dev I would guess the Microsoft angle here is to make the process smooth for a developer running VS Code in Windows to develop in a Linux container from Windows. I personally use it in Codespaces, so there is also the cloud developer environment aspect of it. Nothing about this is Microsoft or Windows-specific.
- smcleod 3y agoBut surely if your code base is that difficult to setup your dev environment for - it’s likely a sign of much bigger problems? The reason I asked about windows was because a few folks here said it is helping them with their windows dev environments, where as in my experience with software you’re developing for *Nix it’s not really a big deal. Usually you’re just checking out the repo(s) and running your languages command to install the libs.
- markphip 3y ago> But surely if your code base is that difficult to setup your dev environment for - it’s likely a sign of much bigger problems? I think it less about difficulty and more about when you have a desire to run your dev environment in a container. How are you getting your source code into the container? How is your editor accessing the source code to make changes etc. Dev Containers provides a pattern to follow for doing this that works across tools and OS that can simplify it for your team. If you work on a large team where devs work on the OS and Editor of their choice it can also simplify the development docs and environments you need to maintain. You can develop things like Node, Python, Ruby natively on Windows but if you are deploying on Linux, especially if in a container on Linux, having the dev environment running in Docker has advantages and there is less for the developer to setup and maintain.
- politelemon 3y ago> > But surely if your code base is that difficult to setup your dev environment for - it’s likely a sign of much bigger problems? You're misinterpreting ease of setup as a solution to "it's difficult", from what I assume is a bias; the two are not the same coin. Docker based development, which is what devcontainers is a template for, works in Linux too and is a useful way of having everything ready to go. You can of course put instructions in a README, this is one step further than that which is to prepare a docker image. > where as in my experience with software you’re developing for Nix it’s not really a big deal. Usually you’re just checking out the repo(s) and running your languages command to install the libs. That isn't entirely true about nix environments, or it depends which *nix environments you mean. On Linux, yes it can be pretty much clone and go (install dependencies where needed). A very "close 2nd" is WSL2 on Windows as it's also just... Linux. On Macos you need to perform a series of brew gymnastics to get the environment into shape because all the included defaults are practically insults. If you're considering that clone and go, then you might be doing it so frequently that you don't equate it to a difficult to set up environment. However even on Linux, it depends on the kind of development you're doing, because if you've ever worked with Cuda/Torch/Tensorflow, then you know that isn't necessarily a smooth experience but has to be carefully controlled.
- cratermoon 3y ago> Nothing about this is Microsoft or Windows-specific. Saying "nothing" is overstating the case. In a corporate shop of the common sort where everything is Windows and Azure, even the developers will have Windows on their daily development box. When the company starts to deploy on docker & Kubernetes in Azure (whether or not that's a wise decision), the Windows environments are going to have a tough time because most tools for the container world are Linux-centric. It can work passably on a MacOS system, on Windows it's a completely different picture. Giving developers VS Code with a pre-configured environment eases the migration.
- markphip 3y ago>> Nothing about this is Microsoft or Windows-specific. > Saying "nothing" is overstating the case. In a corporate shop of the common sort where everything is Windows and Azure, even the developers will have Windows on their daily development box. I meant that Dev Containers are not Windows-specific. They are probably used on MacOS just as much as Windows and you could also use them if you worked natively on Linux. I just did not want a reader to get the impression this is only for devs working on Windows
- cratermoon 3y agoOh yes, dev containers work wherever docker and vs code work. If the production environment is Kubernetes, though, I prefer to develop with Kubernetes or minikube, to better align with production behavior.
- mission_failed 3y agoCompared to say 10 years ago, now days devel environments are made up of stacks of modules that you have to hand configure. 10 years ago a LAMP server involved hopping on a Ubuntu server, paste in an apt command from a website and off you go. After not doing any devel in years I was trying last week to do the modern equivalent (nginx + php) and literally none of the guides online ended up with a webserver that processed php, which I eventually figured out was every single tutorial I tried was giving the wrong code at the step where you have to manually edit the nginx configuration file, because you have to declare the php version there and Ubuntu apt installs a more recent version, so nginx can't find it. Previously the linking between webserver and php 'just worked', now it's all manual and there are no breadcrumbs for non-experts when things break So a reasonably simple server has a qualified engineer confused for few hours, what hope does anyone have for something more complex?
- smcleod 3y agoIt’s probably been about 10 years since I’ve had to run any php, would you not just clone the repo and run whatever the modern equivalent of php-fpm+Nginx is in a container passing in the code as a volume? Or if you’re not using containers at all run the language’s app server? (E.g. an equivalent of <node serve index.js> / <go run app.go> / <python server.py> / <rails serve> etc…)