DEV Community

Medea
Medea

Posted on

Python IDEs - Replit vs VSCode

So for the last two years, I've been using Replit for all my Python projects. This is because you can code on it and host your website at the same time.

But I'd heard a lot about VSCode, so I tried to give it a go.

1: Storage

Replit uses Cloud Storage to save all its data, and it has a lot of storage: 500MB per project.
VSCode saves all data on your device.

2: Open Source

Anyone who knows what Replit is can view your code on Replit, unless you have Hacker plan (which you have to pay for).
On VSCode, all your code is private unless you use GitHub to make it open source.
GitHub on VSCode is great, as it is easy to use.
GitHub on Replit is also great, but it creates some unnecessary files, like the __pycache__ folder, the venv folder and the poetry.lock file.

3: Package Installing

On Replit, when you need to import a module, it automatically installs the package without needed to use pip.
On VSCode, you have to use pip and manually install the package.

4: Hosting

On Replit, when you run code which has a front-end side to it, it automatically hosts it for free.
On VSCode, only people on the device can see the front-end side to the code.

5: Which Devices

Replit can run on any device you can log into Replit from.
VSCode will only run on the device you have installed the code on.

Summary:

Replit VSCode
Saves on cloud storage Saves on your device
Public Code Private code
Creates unnecessary files on GitHub Works perfectly on GitHub
Automatic Package Installing Manual Package Installing
Free hosting No hosting
Run on any device Only run on one device

Discussion (33)

Collapse
dillonb07 profile image
Dillon Barnes

You can use both VSC and Replit. That's what I do. I put all of my code on GH. If I don't want people to see it, I use a private repo.

Also, you could use this extension to connect to your repls - marketplace.visualstudio.com/items...

And if you join the GH Codespaces you can create a VSC instance on the web to code in. If you've enabled Settings Sync, it will automatically install your extensions, settings and themes to be what you use in the app.

Join the Codespaces beta here - github.com/features/codespaces/signup

To be honest, I prefer VSC over Replit. Both are really good, but Replit isn't quite good enough for my needs as it's not very customisable and it's slow. And as you mentioned, the GH integration is awful.

Collapse
xyc profile image
Xiaoyi Chen • Edited on

👋 @vulcanwm @dillonb07 This is Xiaoyi, Engineer from Replit.

@vulcanwm Excellent review! I'm a user of both Replit and VS Code, so I can tell this is a great comparison. Thanks for mentioning the issue you have with GH. The team is aware of it and will improve on it. Keep having fun building!

@dillonb07 Thanks for the feedback! This is really valuable for us to understand how to make Replit better for you. We are actively working on extensibility and making Replit faster. I'm curious what customizations you wanted, and which part of Replit felt slow to you - was it loading the website, navigating between the files, editing or console/shell?

Collapse
dillonb07 profile image
Dillon Barnes

There are multiple reasons why I would prefer VSC over Replit.

  1. The shell. I use the console/shell a lot, and I really like having multiple shells. I like that I don't have to have one dedicated to running a webserver, but sometimes you need extra things running like a test script.
  2. Git integration. Git integration in Replit is awful. Yes, you can commit files, push and pull to/from GitHub but that's it. I'd like the ability to be able to stage files, amend commits etc. I think VSC does this really well.
  3. Files. I can't have multiple files open at the same time without using the shell in Replit. In VSC I can have four windows open at the same time. I don't think four is necessary for Replit, but two would definitely be helpful. Currently if I want two windows open next to each other, I have to open the shell and use vim.
  4. Speed. I'm not blaming Replit for this because I don't think there's much the team can do about this, but I like using Replit when I'm at school. It's also what my school used to use in my Computer Science lessons. However, since recent updates Replit doesn't actually work on the school computers. The IDE just doesn't load. I don't know the cause of this since the Inspect menu is blocked.
  5. Extensions. VSC has a vast library of extensions. I am aware that this feature is going to come to Replit, but currently I really like being able to customise themes, add snippets, add support for other services, etc via extensions in VSC. I think when/if this comes to Replit, it'd be much more likely for me to use it. Same for my next reason.
  6. Autocompletion. VSC intellisense is much better than what Replit currently uses. Again, I've heard that this is going to be improved on Replit. Emmet is also a vital part of my workflow. I'm also aware that a Codemirror extension for this is under development.

However, there are some things that Replit does better than VSC.

  1. Browser preview. Although VSC has a "Simple Browser" built into it, it really isn't very good. Replit's preview is much better.
  2. Collaboration. I think that Replit's collaboration features are much better than VSC Live Share. Of course, Replit doesn't have audio support but that's never been important for me.
  3. Packages? Replit manages packages quite well and does allow for manual control via the CLI. For that, it is better.
  4. Customisation. Although customisation was one of the benefits of VSC, I really like being able to customise the tools/languages and packages with Nix.

For environmental variables, I'd like to be able to edit it as a plaintext file. Why couldn't we have this as a hidden file so that other projects can't see it, and it could be inside of a default .gitignore file. Then the secrets added in the GUI would be put inside of the file?

Thanks for the response though! I hope that the feedback helps @xyc

Thread Thread
xyc profile image
Xiaoyi Chen

Thank you @dillonb07 ! Appreciate so much you taking the time to write this thoughtful review. It's pretty insightful, because quite a few of these are what we have been working on. For example, multiple file panes and making auto completion better. Replit team is actively working on improving the speed of website, and there are multiple aspects where we can tackle this problem. For Git integration, you can use git command in the shell for stage/amend, but I understand this is different from the UI which VSC provides and this is a pain point we'll need to address. Default .gitignore file is a good idea, and we might potentially add that soon! And preview, multiplayer, packages, customizing with Nix are what Replit is strong at.

Regarding using Replit at your school: Does your school block Replit? If that's the case, ask your admin if they can use firewalledreplit.com/. Also check if there are admin-override browser extensions that has conflict with the code editor. Don't hesitate to reach out if this does not resolve the issue.

Thread Thread
dillonb07 profile image
Dillon Barnes

Replit isn't blocked at my school. I am going to try the firewalled version tomorrow because it has less features so it might be more likely to load (lower bundle size etc). I think that the main issue is just that the computers are incredibly old and slow. As for extensions, I've looked at that before and there aren't any admin-overriden extensions.

Glad the feedback was useful! Also happy to hear that you're working on the features I mentioned. For git, I'm aware that you can use the shell, and I have on multiple occasions, but it's quite annoying having to go to GitHub and setup an access token just for using git on a repl. I am glad that it's an option though.

Collapse
vulcanwm profile image
Medea Author

Damn I never thought a developer from Replit would see this lmao!
Thanks!

Thread Thread
xyc profile image
Xiaoyi Chen

yes Replit is for the people :)

Collapse
vulcanwm profile image
Medea Author

Thanks!
Do you know how to host websites in VSC like we can do in Replit?

Collapse
dillonb07 profile image
Dillon Barnes

What do you mean? VSC is just an IDE. You can't use it as a website host.

Thread Thread
dillonb07 profile image
Dillon Barnes

Use a service like Replit, Vercel, Netlify or Heroku for hosting.

Thread Thread
vulcanwm profile image
Medea Author

So is there a way I can integrate VSC with a website host?

Thread Thread
dillonb07 profile image
Dillon Barnes • Edited on

Probably. Never tried. I just put my project on GH and then manually do it when I'm done. It only takes a few minutes. For Flask projects, I'd recommend using GH to sync it to Replit. You'd have to go in your repl and pull the changes though. Or connect to the terminal remotely.

Thread Thread
vulcanwm profile image
Medea Author

What if I want my code to remain secret?

Thread Thread
dillonb07 profile image
Dillon Barnes

If you don't have Hacker, you'd have to use a different host. I don't really use Flask anymore, so I'm not sure what the best option is.

I've heard that Heroku is decent for Flask. You can use the CLI for that meaning you don't need to share your code. From experience though, Heroku isn't the easiest to use.

Thread Thread
vulcanwm profile image
Medea Author

Thanks for the help!
I'm checking out Heroku right now.
It's actually pretty good as it can use private repos for the code, but it's hard to use as you said.
What are you working on now then?

Thread Thread
dillonb07 profile image
Dillon Barnes

Currently, I'm making a new portfolio using Next.js/React

What about you?

Thread Thread
vulcanwm profile image
Medea Author

I'm experimenting editing audio with Python (trying to make Google Translate sing lmao)

Thread Thread
dillonb07 profile image
Dillon Barnes

Sounds fun! Good luck.

Collapse
victorio profile image
Vic

This is a weird comparation, VSCode is just an IDE and Replit is a hosting service with an integrated IDE.

Collapse
vulcanwm profile image
Medea Author

But both have flaws

Collapse
victorio profile image
Vic

Ye, anyways if you want a hosting service you can use like mogenius, Railway, Heroku or Vercel, they're more focused in Hosting and do not provide an IDE but an easy CI.

Thread Thread
vulcanwm profile image
Medea Author

yea thanks, I'm trying Vercel out right now (I found Heroku a bit hard)

Thread Thread
dillonb07 profile image
Dillon Barnes

I don't think Vercel will work with Flask. It's for JavaScript frameworks.

Thread Thread
vulcanwm profile image
Medea Author

ah, thanks for letting me know

Thread Thread
victorio profile image
Vic

It does (I also thought the same before xD) dev.to/andrewbaisden/how-to-deploy...

Thread Thread
victorio profile image
Vic

I have used Heroku for Nodejs apps and it's easy, I find it easier than Vercel. Maybe it changed after the data leak.

Thread Thread
vulcanwm profile image
Medea Author

I spent about an hour trying to get my Flask app on Vercel and it kept on showing me this error: vulcanwm.vercel.app/
I might just go back to Heroku.

Thread Thread
victorio profile image
Vic

I cannot see the error, probably cuz I have no permission in the Vercel App, if you want you can send the logs so I can help you.

Thread Thread
vulcanwm profile image
Medea Author

It’s the 404 not found error here:
vercel.com/docs/concepts/edge-netw...

Thread Thread
victorio profile image
Vic

Maybe it's a routing error, check the logs in vulcanwm.vercel.app/_logs

Thread Thread
vulcanwm profile image
Medea Author

i might just go back to heroku lmao

Thread Thread
victorio profile image
Vic

I also recommend you render.com

Thread Thread
vulcanwm profile image
Medea Author

I'll try it out, thanks!