by joshstrange · 4y ago · 0 comments
I had to help a developer setup deploys to a dev server from vscode the other day and I wanted to pull my hair out. I'll admit it's at least in part due to not using vscode myself but I was a heavy Sublime Text user which is very similar to vscode when it comes to how you find/configure plugins.
I understand that vscode is very powerful and infinitely extendable but I feel like I shouldn't have needed to try 4-5 different vscode plugins (all configured via json) before I found one that worked and did what I needed.
At least 2 of the top downloaded plugins when searching for "SFTP" were read-only/archived on GitHub, the top one had a "reloaded" version which was also discontinued from what I could tell.
I'm comparing this experience to IDEA which has this built in (including support for deploying to multiple servers at the same time) and all configurable in the GUI.
Maybe I'm just getting old and cranky but vscode seems to get unwieldy very quickly (plugin conflicts, not being able to tell what's doing what, writing almost all config in json). The plugin ecosystem seems to be much lower quality that I what I see in the Intellij product line. I guess I'm just not interested in "building my own IDE" and forever tweaking it, I'd much rather buy a product that does almost everything I need in a sane way.
I've been using VS Code for years to write JavaScript/TypeScript, Python, Go, Terraform, and CSS. My settings file is 60 lines, 42 of which are "for file extension X use autoformatter Y" configs.
When I first switched to VS Code I was frustrated trying to make it conform to random expectations I had. Eventually I learned that it's easier to embrace VS Code's defaults for 99% of things. I just want an IDE that works well (nearly) out-of-the-box and VS Code gives me that
I don't think it's a weird pattern, maybe a slightly legacy one but not out of the ordinary. I've seen this pattern used at multiple places (not implement by me). It makes sense if you have special use-cases where you need to use physical hardware and/or a local stack is too heavy or complicated to run.
Software should allow that. Especially software for writing other software.
VS Code is best when it’s just an IDE. I even have to drop into the terminal for some Git stuff
I don't know if you've just chosen to assume the worst or don't care enough to think about it for more than a second but I've been very clear in all my comments that these are developer-specific machines we are deploying to. It's literally no different from running VMs on your local machine. There is full visibility and feedback, we aren't deploying to Prod or even QA, this is development where each developer has 2 or more boxes owned by them and only them. We also are working with specific custom hardware that our code runs on which is one reason we can't easily do this locally.
To jump in and call that "worst practice" is just lazy and condescending. On top of that, it's completely wrong.
As a pure editor I prefer VSCode. It's fast and has a great plugin ecosystem. Another great feature is that it's config is just a JSON file that I can put into git and push it to my dotfiles repo making it easy to share config on all of my machines.
However, there's just some functionality in IntelliJ that I miss in VSCode like running tests. Of course there are plugins but they are all clunky and don't give you the great UX that IntelliJ does. I want the IDE to figure out where all the tests are and give me an easy way to run a single test/file/suite/feature. IMHO this is the killer IntelliJ feature for me.
I'm kind of surprised you did a deploy from VS Code. I would have assumed there was another tool for that. I do most of my git and ssh/scp stuff from the command line because I'm never quite sure what the tool will try to do to "help me out"
If you can develop 100% locally this isn't an issue but we can't (or haven't taken the time to do so). Think of the dev server as just a VM running locally and it might make more sense.
If you add any delays, any potential chance of forgetting a step, etc then it breaks my programming flow which can kill my productivity.
I strongly recommend everyone spend their first ~5 years coding in vim or some other basic text editor (preferably through the terminal), before leaning on an IDE to solve their problems for them.
That said, VSCode is now my go-to IDE, and I haven't opened WebStorm in probably ~6 months. It's lighter weight than the IDEA suite of IDEs, and gives me ~80% of the functionality, so it's been a pretty good tradeoff.
I actually dislike computer science classes which won't let me just use an IDE.
No one can memorize the .net 7 API
Everyone who uses VSCode has surely used an IDE before. It just turns out they aren’t better in every way, and possibly not in the ways that matter.
VSCode plug-ins just have more eyeballs and work done on them for various ecosystems, for example. Especially for less common languages and features.
I would expect the opposite to be true. I could be wrong but it seems like the free editor that's mentioned in lots of tutorials would be the one newer developers gravitate to over a paid tool like IDEA.
Almost every junior I hire has only used Atom, Sublime or VS Code, especially JavaScript developers.
>VSCode plug-ins just have more eyeballs and work done on them for various ecosystems, for example. Especially for less common languages and features.
The reason to switch to an IDE from something more flexible like VSCode or Emacs is the amount of time spent keeping the editor working.
An editor will generally not stop working like a car without oil. But, IDEs may stop working due to more complex configurations and disparate use cases.
I was about to give up WebStorm the other day, but eventually got around it.
Jetbrains products are very good, but they feel a little "French" just like Macs: beautiful, but be aware that on some models the handbrake is on the same side as the door so you might end up tearing up your pants or bruising your thigh until you learn to be careful :-/
VS Code by comparison is very straightforward, but not always as sophisticated.
Personally I'd use NetBeans for backend and VS Code for frontend but because of Kotlin (which is great) I'm stuck with IntelliJ anyways.
So I end up using IDEA if I'm working with Scala and Java at a job, Emacs if using Clojure, vim for those tasks that are kind of like using sed and awk but not quite, and for everything else, like Terraform, Python, shell, SQL, there's VS Code.
Also the default editor of the IDEA family is just unbearable (but there's the vim plugin for that, I guess), while Monaco is fine.
The only area where vscode is downright embarassing is interfacing with databases. In pycharm I can have a complete view of the database I'm connected to, run queries, get warnings and errors from inline SQL, and so on. Vscode has... strings?
If the remote capabilities get better, though, I'd admittedly have no reason to stay in the vscode camp.
I used it for a year or so around 2015. It was a huge improvement over Eclipse, which is what I'd been using since this was at a Java shop, but even then I knew it was sluggish. I just assumed back then that you couldn't have IDE features without sluggishness. Now I know better
(To be clear I have no idea how VSCode's Java experience, specifically, compares with IDEA these days; I haven't written Java since 2015)
far better and faster than sftp
We're also talking about a dev box here, are we not?
Of course I've heard of git and we use it, we just don't use local (on the computer we develop on) dev environments, we have a mix of developer-specific VMs and local physical hardware due to the nature of our business.
The only possible wrinkle is the developer box needs the build toolchain. If you're writing python, your remote box obviously already has it to run your app. But if you're writing Rust or golang, it's very possible the remote machine doesn't have the compilers.
But I just can't. My fingers are just too used to vscode, and I can do everything I need to. I feel like vscode is better at everything, and faster, except for the IntelliSense stuff. But lately I've tried GitHub Copilot and that just compensates it sooooo much, to the point I think it is even better than IDEA at suggesting stuff.
Also, working mostly with JavaScript and Typescript makes the difference go away (for me at least) as it is damn good at it.
Being free and open source also is a big plus for using it. And I love also how easy it is to configure... just a JSON with autocompletion for any setting you want to tweak. So much easier than having to mess with a ton of tabs and sections and search for settings, etc, etc.
But, if your language is not well supported in vscode, I agree Jetbrain's IDES are great and probably the best option out there. Specially IntelliJ if you're doing Java/Kotlin etc...
It's funny how we have such opposite feelings on config (you enjoying the json config and me preferring UI). I have nothing against vscode and I'm glad it exists, likewise I've very glad IDEA/Intellij exists for my own uses. Thanks for the feedback.
I know a few people like this. More or less, they all got burned by some technical issue that made IDEA unusable for them one day, so they quickly cobbled together a bunch of extensions in VS Code just to get their work done and stayed.
Java IDEs seem to be living in their own world, but for everything else VSCode works well thanks to LSP. For example rust-analyzer works best with VSCode, and this makes VSCode the best Rust IDE.
But one is free, the other is paid...
Also, as of lately, copilot is saving me an insane amount of time especially when it comes to boilerplate and testing.
I really wish the VS Code SQL/Postgres plugins would get there, but it’s a lot of work so I get that it probably will never happen unless Microsoft puts in the effort.
What does this mean? Setting it up so you can deploy through GUI?
With gopls, vscode is MUCH faster than goland, especially on big repos, and I don’t need to watch the dreaded “Indexing…” all the time.
It misses some features, but honestly it’s so much snappier, so that wins for me.
Yep, I've tried Intellij several times over the past 5-6 years, but I've never really had an experience I liked. It's interesting that you mention SFTP and remote server deploys as a pain point for you in VS Code, because I've actually had a huge amount of frustration trying to do development over SSH in Intellij.. As of Intellij 2021 edition, I was completely unable to get ssh working from my work laptop to an EC2 instance; it could not parse my `~/.ssh/config`, and manually putting in the username, hostname, path to the private key, and even port 22 (because it literally required putting the port manually rather than defaulting to 22 unless stated otherwise), it would just say it failed to connect. The 2022 version has a "remote ssh" beta feature which also required manually putting in info that I felt like it should just be able to parse from my ssh config file, but it did connect and work for a week or two. One day it randomly started disconnecting a few seconds into loading a file continuously, which made it impossible to even scroll down into the file before it just zoomed me back up to the top. I gave up on it and just decided to stick with VS code for everything rather than try to get Intellij to work for the small amount of Java code I occasionally have to write.
Setting up ssh development with VS Code, on the other hand, was a breeze. The first plugin that came up when I searched "ssh" was Microsoft's own for ssh development, and running the command to connect to a server after installing it popped up with a list of my servers parsed from my ~/.ssh/config, which I could just select and it would connect (or prompt for a password if the ssh key required one). From there, I could easily open any project on my remote server, and VS Code even was able to detect which plugins I had installed for use with the project needed to be installed server-side rather than locally (e.g. the `rust-analyzer` plugin was installed remotely since it needed to run the daemon on the machine where the code existed). When I close my VS code window, shut down my laptop, and then the next day boot it up and open VS code, it still has the same files opened to the exact same spot (compared to Intellij's "scroll to the top of a file on connection" I mentioned before). I'm sure there are ways to get Intellij to work like I'd want, and I'm by no means a fan of Microsoft in general (I avoid Windows whenever possible and overall have a pretty negative opinion of them), but VS Code just absolutely nails the UX I want in an editor without needing that much custom configuration compared to what I've tried in the past with emacs/vim.