The Trap Snaps Shut - GitHub Codespaces
Written by Mike James   
Thursday, 24 September 2020

This might be a trap that you want to get caught in, but it is worth appreciating just how clever it is. This is Microsoft at its Bill Gatesian best. GitHub Codespaces is an attractive lure to get you using Azure, VS Code and, of course, GitHub.

Ho hum, another day, another project. Of course, you have to find a way to get started. You need a development system. If you already have one, no problem. But when starting a new project you often have to decide to either share an existing development system - even if it's just you and a desktop machine - or you face the challenge of spinning up a virtual machine and installing all the tools you need.

I'm not saying this is difficult, but when you want to get on with the code, it tends to be annoying. Now imagine you use GitHub as many may, and you use VS Code which also has a big and growing following/fan-base. What if there was a button you could click that created a development environment for you in the cloud? As long as it wasn't a silly price, my guess is you would probably click it.

Welcome to GitHub Codespaces - which until the beginning of this month was Visual Studio Codespaces. 

If you are already a GitHub user, free or Pro, then Codespaces is going to look attractive. It is only in controlled  beta at the moment, so it isn't possible to try it out, but the description sounds right.

A Codespace is simply a cloud development environement suitable for running a repository. You can open a Codespace for any branch of a repository and the result is an Azure machine that, when the beta is over, you will be charged for according to:

Instance Type (Linux)

Per-hour rate

Basic (2 cores, 4GB RAM, 32 GB SSD) $0.085
Standard (4 cores, 8 GB RAM, 32 GB SSD) $0.169
Premium (8 cores, 16 GB RAM, 32 GB SSD) $0.339


Is this expensive? If you assume an 8-hour programming day then it work out, for the smallest instance, at 68 cents per day. The biggest machine works out at $2.71, but that is a big machine. You might save money on hardware, but you still do need a machine to connect to GitHub. What you are paying for is flexibility and ease of getting started. You also need to know that you are charged 10 cents per month for each GByte you use.

You can write code using VS Code or a browser. Given VS Code runs on just about any machine a browser would run on, I'm not sure what the attraction of using a web browser is, but you can if you want to. VS Code is just HTML/JavaScript running in a WebView-style native host. You can also use it from Visual Studio, if anyone still uses it.

How do you set what language environment you are using?

The answer is that it all depends on the container you choose. At the moment there are a set of sample containers and instructions on how to customize a container. The sample containers are:

  • Node Sample
  • Python Sample
  • Go Sample
  • Java Sample
  • .NET Core Sample
  • Rust Sample
  • C++ Sample
  • PHP Sample

Each of these is fairly minimalistic. For example, the PHP container lets you edit PHP, run it, debug it and run from a default PHP server. This makes it all seems very easy and I'm sure that the other sample containers are similar minimal and easy to use. Things get a bit trickier when you more on to something more realistic. A full PHP container does have Apache ready to roll but I think you still have to install a database of your choice. Suddenly we are out of plug-and-play and into the world of DockerFiles and configuring services. Even if you have the right container, you still have to configure the services.

Is this a fact of life?

It is possible to imagine GitHub CodeSpaces evovling into an even easier-to-configure system with "serverless" services, but for the moment it is an easier way to get a virtual machine directly from your code repository.

Would I use it?

Probably not, because I don't want to lose the connection between my program and the system it runs on. I don't want to give away the control that setting up my own development system gives me. However, having said this I have been very happy to give up control over toolchains by adopting an IDE. This is just an IDE in the cloud, so I might well give up and be taken over by CodeSpaces.

Given how popular GitHub is, Microsoft has pulled off a cunning plan. Well I like to think that it is cunning and not just an accident. Put VS Code together with GitHub, CodeSpaces and Azure and you have a coherence that suggests that there is intelligent life on Microsoft.


More Information

Configuring Codespaces for your project

Related Articles

GitHub Command Line Tool Reaches General Availability

GitHub Announces Container Registry

Run VSCode in the Browser

Microsoft GitHub - What's Different

Microsoft Buys GitHub - Get Ready For a Bigger Devil

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.



JetBrains RustRover Now Commercially Available

JetBrains has announced the commercial release of RustRover, an IDE for Rust developers. The company describes RustRover  as combining advanced coding support with an integrated toolchain.

Google Launches Developer Program

Google has created the Google Developer Program "to help developers build, learn and grow". The program will give developers access to a range of new tools and benefits such as technical assistance fr [ ... ]

More News

C book



or email your comment to:

Last Updated ( Friday, 11 December 2020 )