When comparing Codepen vs Google VM Instance, the Slant community recommends Google VM Instance for most people. In the question“What are the best cloud IDEs?” Google VM Instance is ranked 12th while Codepen is ranked 21st.
Ranked in these QuestionsQuestion Ranking
Pro Easily export your pen
CodePen makes it really easy to export code as a zip or Github Gist.
Pro Real time output
Pro Lots of support for frameworks and preprocessors
CodePen has an impressive amount of support for preprocessors (such as Jade, Haml, Slim, Sass, Less, Stylus, Coffeescript and PostCSS). There is also plenty of frameworks and libraries to pick from (Foundation, Bootstrap, Angular, D3, Backbone, Ember etc.).
Pro Great display/profile page
The codepen profile page allows you to display all of your public pens, and control which order you want them to be viewed in. This is great for showing off your work to possible employers, other devs etc..
Pro Easily fork pens
To fork a pen only requires clicking one button, and you'll be able to modify the pen on your own account.
Pro Great community pens
You can search through other pens, either by keyword or popular, picked or recent.
Pro Total environment control
Pro Can run any sort of web-based editor software
For example, one can run Jupyter Notebook on the VM.
Pro Real vi or Emacs editor
Pro Real Linux console
Con No private pens with free account
There is an option on Codepen for private pens, however it requires upgrading to a Pro account ($9/month).
Con This is not a "cloud IDE," this is a remotely accessible virtual machine.
This topic is about the best cloud IDEs and having a Google VM Instance on the list is a bit of a stretch. That's not to say that the service isn't valuable or great, but it is a completely separate purpose. Granted, you can certainly install the necessary tools on your virtual machine to make it an IDE that is remotely accessible, but that's not exactly the ideal situation and not what someone looking for a cloud IDE is likely looking to do.
Con Can be expensive
If one selects a powerful type of instance or if one does not take care and remember to shut off the instance when it is not being used.
Con Less ideal if you have a slow internet connection
Though this applies to any Cloud IDE, as well.
Con Less ideal if you are mouse dependent
Assuming you are using Vi or Emacs, and not Jupyter or some other web-based editor that is running on the remote VM instance.