14 ms·
Development environments. The amount of time and hassle I've seen lost to getting a working development environment up and running is incredible. Every time I
by simonw 7y ago
Development environments. The amount of time and hassle I've seen lost to getting a working development environment up and running is incredible.
Every time I talk to someone who's learning to program I tell them: "Setting up your development environment will be a nightmare. I have been doing this for twenty years and it's STILL a nightmare for me every time I do it. You are not alone."
Docker is reasonably good here... except you have to install Docker, and learn to use Docker Compose, and learn enough of the abstractions that you can fix it when something breaks.
https://glitch.com/ https://glitch.com/ is by far the best step forward I've seen on this problem, but it's relatively limited in terms of what you can accomplish with it.
- t-writescode 7y agoAnd then after using Docker, sometimes you need to figure out how to get your debugger and IDE to talk inside the docker container, which has .. varying levels of success depending on the language.
- par 7y agoAlso, at least on Mac, docker can be a major resource hog.
- andbberger 7y agoPretty sure it just runs in a normal VM when not on linux
- PopeDotNinja 7y agoClose. Docker for Mac runs in a paravirtual environment using Hyperkit, which uses Apple's Hypervisor.framework. At least that was true a couple years ago. A couple years before that, Docker Machine and boot2docker ran on hypervisor of choice (e.g. Virtualbox). If you get a chance, Hyperkit can be fun to play with. I was able to write a bash script that downloads Hyperkit andba Debian ISO, and from that boot a running instance of Debian. It was an interesting exercise.
- chubot 7y agorepl.it is a nice take on this problem: https://repl.it/ https://repl.it/ I was impressed by the low latency (at least as of a few months ago). If you make a web app right, it can be faster than a resource-hogging local IDE! I don't use it myself every day because I've already been using vim/screen/bash for 15+ years. Those are my lightweight REPLs. But if I were advising someone to code, and they wanted to skip the dev env, I would probably try repl.it. They also have impressive concurrent editing facilities in any language. ---- I also think the question is malformed, because I would hesitate to say there's any "single problem" in software development. It's all death by a thousand paper cuts. The "dev env" problem is real, but it's really a problem with 100+ different tools. It's an architecture/ecosystem problem. repl.it has some creative solutions to these problems, though it's still a ton of work. I think they are doing great but it's not going to solve all problems. For example, another popular dev env is for data science or machine learning researchers. RStudio is doing some good stuff there, and there's Google colab, etc. Software development is very big diverse and it's hard to imagine one solution cutting across all of it.
- amasad 7y agoThanks so much for the mention. It's indeed a lot of work, but we've done so much with such a small team and it's only accelerating as we layer all of our solutions on top of each other. We're solving one problem at a time with focus on patterns and abstractions that makes it easily extensible and could support virtually any language. With the Universal Package Manager (https://github.com/replit/upm https://github.com/replit/upm) we're trying to encode the best practices in package management behind a single easy-to-use interface. One of the most fun features is that you can `import` or `require` a package and we'll just guess what you want to do, install the dependencies for you, generate a spec and lock file. With prybar (https://github.com/replit/prybar https://github.com/replit/prybar) we're trying to create a universal interactive programming experience that behaves roughly the same for every language. And, to be open-sourced soon, our window-tiling manager and workspace (https://repl.it/blog/ide https://repl.it/blog/ide), we're trying to build a framework that makes it so easy to build complex, plugin-based environments, such as IDEs, very easy to build. We also leverage a lot of awesome open-source projects and standards, like the Language Server Protocol by VSCode/Microsoft, that abstract over language features and makes it easy to provide an amazing experience across languages. Edit: if it's been a few months since you tried Repl.it, give it another try, we've made a lot of progress since then. Multiplayer is now out of beta, we have Git integration, and we've done a lot to make it faster and more reliable.
- claudiawerner 7y agoI'm interested in what features and integrations (possibly to be included in the default install) that Emacs and Vim need to compete with IDEs. A package for major OSs that contains Emacs+various packages, gcc, autotools and make all set up to run out of the box would be great.
- deleted 7y ago[deleted]
- darzu 7y agoMy dream is a "Open in VSCode" button on each GitHub repo that would create a container dev environment (either locally or hosted), and that environment would be ready to run all test, CI, localhost etc. You could trivially create a new environment to test out someones PR or work on a feature branch, etc. If you use hosted environments, then you could connect from any client. If you only have a web browser, then you could work from VSCode in the browser (it's all JS+HTML anyway). Others could join your hosted environment for peer-programming Google Docs style. On hosted environments, normally long builds could be done very quickly and smart caching on the backend could share incremental compilation state between your teammates and you. We're pretty close to this already with VSCode Remote Containers[0], Visual Studio Online[1] and VSCode Live Share[2]. (Disclosure: I work at MSFT but not on these technologies.) [0] https://code.visualstudio.com/docs/remote/containers https://code.visualstudio.com/docs/remote/containers [1] https://code.visualstudio.com/docs/remote/vsonline https://code.visualstudio.com/docs/remote/vsonline [2] https://visualstudio.microsoft.com/services/live-share/ https://visualstudio.microsoft.com/services/live-share/
- gavinray 7y agoWhat you are talking about exists, and its fantastic: https://www.gitpod.io/ https://www.gitpod.io/
- amasad 7y agoWe've made something similar at Repl.it -- we call it "Repl from Repo". It's far from running everything but it can run a lot: https://repl.it/blog/github https://repl.it/blog/github We tried to make it as seamless and as low configuration as possible. Our "run on repl.it" badge is currently growing exponentially on GitHub.
- ijpsud 7y agoGreat work on this. Is it open source? Or is there a way to use my own hardware? If not, then it seems like gitpod.io[0] is a much better fit for the open source ecosystem. That said, there's definitely a place for proprietary software in this space (I'm a Glitch user and I love it). [0] https://www.gitpod.io/ https://www.gitpod.io/
- amasad 7y agoThis is my calling. I'm the cofounder of Repl.it and I've dedicated my career to solving this problem. Simon -- since you're the cocreator of Django, you might get a kick out of this: From loading up a Django environment to adding and rendering the first view takes less than a minute: https://gifs.amasad.repl.co/django.gif https://gifs.amasad.repl.co/django.gif Before starting this company I was a founding engineer on the React Native team where I focused speed of setting up and taking the drudgery out of cross-platform mobile dev. And before that I was a founding engineer at Codecademy where we were attacking the same problem from an education angle. With Repl.it, however, we're determined to simultaneously solve the "getting started" problem while scaling the environment to allow real work. It's incredibly challenging but we've made great progress. If anyone is interested in working with us, collaborating, or if you're simply passionate about this problem and want to chat then I'd love to hear from you: amjad@repl.it
- travisjungroth 7y agoI read that comment and thought “repl.it founder’s gonna be in here real quick.” Then I saw your comment with ‘0 minutes ago’ at the top.
- AndrewKemendo 7y agoI love Repl.it and taught my daughter python there. Can you please make a self hosted version? I think the only thing I've seen is that maybe sometime in the future you'll have it.
- amasad 7y agoGreat to hear :-) Certainly the plan. Just a matter of priorities and time. I'm curious, what's so attractive about self hosted version?
- CamperBob2 7y agoAs long as my critical infrastructure and tools depend on someone else's computer, I'm nothing more than a (potentially well-paid) sharecropper. In fact, I think that's a valid answer to the question posed by the headline. Returning the power to the end user, and keeping it there, should be the most important priority for software developers. This is a social problem, not an engineering problem, but unlike many other social problems the solution will have to be engineering-driven. In more concrete terms, that means being able to self-host your tools.
- fsloth 7y agoVisual studio works really well with C++ and .net languages. The defaults are fairly reasonable. Of course if defaults don’t suffice it’s back again to painland.
- aosmith 7y agoAnd let's not even get started on docker for mac volume mounts. My linux machine (that's not allowed anymore) is literally 10x faster for local dev.
- awinter-py 7y agodotfiles help a lot here, they should have them for more things npm & git's local directory awareness is a lifesver rvm / nvm are great when the shell integration is turned on, direnv is wonderful gap seems to be with native packages -- there isn't one of these for brew / apt-get, and language-level package managers fail on these deps a lot inability to map local hostnames to docker is also a problem -- that would make it easier to manage multiple environments at once
- globular-toast 7y agoWhy are you setting up new dev environments all the time? I have my dotfiles on github and they're always ready to go on any new Linux system I happen to be on. I have to initially set up new tools, of course, but once it's done it's done.
- z3t4 7y agoI've been working on this for the last 3 year and at least solved the problem for myself. The crux is that there are about 100 programming languages, with a few frameworks each, and a couple of database solutions, with at least a dozen different versions of frameworks and databases that are used in parallel for app maintenance, and a few different platforms to run on. And on top of that developers like to customize their developer environment.
- silviogutierrez 7y agoNix is the closest I've come to this dream. I like docker, but it's too resource heavy on a Mac. I need it running directly and not in a VM. So a simple nix file, and nix-shell shebangs[1] has been life changing. Throw in --pure and now you really know the environment works everywhere. My repos all have a shell.nix with every dependency. Just call nix-shell and it works in Linux and OSX. Anywhere. You can even bundle it into a docker image and use nix in there too. For production, etc. Documentation and tutorials are lacking, but if you put in some time, I've found nothing comparable. Version it in, pin the Nix channel[2], and you can come back a year later in a brand new machine and start where you left off. [1] https://gist.github.com/travisbhartwell/f972aab227306edfcfea https://gist.github.com/travisbhartwell/f972aab227306edfcfea [2] Highly counterintuitive: if you don't pin a Nix channel, it's a moving target and dependencies may go missing, be updated, etc.
- thundergolfer 7y agoAgree that Nix is a great candidate. The PhD about it is quite readable and demonstrates the rigour with which the author approaches this problem space. It’s pretty difficult to understand and use though.
- whateveracct 7y agoNix has pretty awful UX for sure. It's kind of a trial by fire to learn it. But once you do, you can build abstractions to improve that UX. But it would be nice if vanilla Nix was easier.
- zelly 7y agoNix was a huge innovation in operating systems. The wider community has not caught up yet, but it will.
- ohthehugemanate 7y agoHave you tried using VSCode's remote development extension? In a nutshell: your repo contains a file (or directory) with everything needed to set up a containerized run environment for the project. VSCode adds its own server daemon, and your IDE runs half inside the container, half on the host machine. Once it's set up, everyone on the project (who has vscode) instantly has a one click clean, working development environment, including all the niceness you expect from local development (debugger, test integration, etc). It is fucking magical. Detail: https://www.hanselman.com/blog/VisualStudioCodeRemoteDevelopmentMayChangeEverything.aspx https://www.hanselman.com/blog/VisualStudioCodeRemoteDevelop...
- k__ 7y agoI thought about creating an AMI for AWS that uses code-server instead of Cloud9.
- tfolbrecht 7y agoTheres a great tool by cdr that uses ssh to prepare and launch a VScode environment. Works great in conjunction with AWS ec2 tools like the awscli. https://github.com/cdr/sshcode https://github.com/cdr/sshcode
- ohthehugemanate 7y agoright, this is something like what VSCode has built in, except rather than hosting all of VSCode on the remote server, it splits itself into a thin client on your host and a server backend on the remote machine. You can use SSH, or my preference is a local container.
- k__ 7y agoI was looking in offerings like Glitch lately. Codesandbox had better UX than Glitch, at least for my taste.
- closeparen 7y agoIt’s absolutely tragic that LSP isn’t meant to work remotely, because the actual editing and code intelligence interface really needs to be local. So practically speaking the whole dev environment has to be local. I’ve used rsync type solutions for both AWS and local VMs (docker for Mac), and in the end it was always better to just get the thing running natively.
- michalf6 7y agoThat’s what I like about working in a .net shop, it goes like this: 1) install windows 10 2) install visual studio And I’m good to go. I’ve seen my friends from the uni setting up elaborate arch/vim contraptions and I’m kinda glad I don’t have to.
- jcelerier 7y agoMy development environment is pacman -S qtcreator clang qt5 cmake ninja git hotspot heaptrack I can start pissing apps 10 minutes after a clean install of my system... what do you guys do that make it so hard ?!