Hacker News new | ask | show | jobs
by LeonM 2243 days ago
FWIW: In the 2020.1 updates that have been rolled out in the last week the SSH support is now much better.

But serious question though: what workflow do you have that remote code editing is necessary?

7 comments

I find remote code editing to be useful when I don't have the necessary resources on my machine such as disk/memory/gpu and I am still prototyping a solution, which happens a lot in ML/DL.

I agree that remote code editing is not strictly necessary since you can perform such task with sshfs or git push/pull workflows.

On the other hand, having the remote environment in your local IDE quickens the development and you don't have to setup a full replica of your environment locally.

edit: ML/DL here stands for Machine Learning/Deep Learning

I also tried SSHFS, but there are hiccups. I did not really debug this. But sometimes PyCharm just freezes for 5-10 seconds. Which is extremely annoying, basically this makes it unusable. Maybe too much files are opened at the same time or so. Maybe I have to increase the cache size. I don't really know...

Also doing any Git action (git commit or so) over SSHFS is way too slow because it needs to go through the whole project directory. Maybe it's fine if the repo and project is smaller. But in this case, a Git commit can easily take a minute (while locally it takes a few milliseconds).

A Git push/pull workflow would also be quite annoying when you are prototyping and just want to try out things.

I get that through remote interpreter and automatic upload features.
I sometimes code on my Surface Go (with a Pentium Silver CPU) and remote in to my home desktop (with a ryzen 3900x). For one of my Rust projects, the Surface Go takes about 25 minutes for a clean build and 2-3 minutes for incremental build. The desktop does a clean build in 2 minutes and an incremental build in 10-20s.

Since it needs to do an incremental build to provide any of the intelligent tools for Rust, it means editing directly on the Surface Go degrades to a text editor experience, while doing the remote editing lets the IDE-like features work.

Not the parent, but I do all my development with VS Code's remote editing. I generally don't run anything on my main desktop. Instead, I have a local VM server that runs a dedicated VM for each of my projects. Dedicated VMs are great because I never run into a situation where project A relies on node.js version X and starts clashing with project B that relies on node.js version Y. And I just manage everything with Ansible so it's easy to blow away a VM and rebuild it if I ever need to.

I wrote a bit more about my setup here: https://mtlynch.io/building-a-vm-homelab/

I do research on speech recognition and machine learning, i.e. I run lots of TF code, on lots of big data, and it runs for a long time (days, weeks). All the data, user files, everything in our lab is accessible via NFS, and every node in the cluster has the same FS. From the outside, I only have SSH access.

I want to work on code which runs there in the cluster.

I could have a local Git checkout of the code (partly). But sometimes it's a lot of trial and error, and it would be quite annoying to keep extra care that my local Git checkout gets synchronized with the copy in the cluster. Sometimes it might also have other files as dependencies which are simply only there in the cluster - or it would be extremely complicated to replicated all the same locally, and keep it all in sync. Even if PyCharm could help on the syncing part, it would still not be perfect, and would be annoying.

VS Code Remote SSH is basically perfect and exactly like I want it. The only problem is that I still prefer PyCharm.

For me the big one was using linux VM's on a windows host. If I want to work with Linux command line tools by far the easiest way is to have VS Code ssh'd into my VM and a few terminals open. I get the comfort of my normal daily driver and access to whatever command line tools are best suited to my current project.
Would you mind elaborating on what the improvements are? I've just been through this a couple of days ago and found it quite messy.
Many companies build/execute code on cloud desktops.