Coding in the cloud

November 7, 2021

Some time ago, I got access to GitHub codespaces and it blew my mind! I used to be skeptical about coding in the cloud but now I think it's the future of coding, lets talk about why.

The experience

Context: I code mostly in Typescript projects using NodeJs and React as main technologies, my editor of choice is VScode.

To start coding in the cloud you will need an organization, afaik this is not yet available to your account, not sure why though, but you can get past this by just creating a one-person organization and adding your projects there. The cost is 4 bucks per month plus the amount your codespaces is going to cost around 1 euro in storage and 5 cents per hour of active development for a small project running with 4 cores. Once you open a project in codespaces you need to configure the environment (basically a Dockerfile) and then you're ready to go. 

Starting in an already configured project is instant, you get access to the vscode and you can run the project in the terminal which will connect give you an URL instead of your localhost. So here we have two of the most powerful features, you can start working on any project right away and you can easily share your local environment. 

Working on multiple projects

When I was a freelancer I used to work on multiple projects in the same year and sometimes I will work on 3 or 4 projects at the same time. Freelance websites like Toptal or Upwork list different gigs that you can do by the hour, one of the main things that take time when working on new things is setting up the local environment and one of the sources of bugs is the mismatch between the developer's local machine and the production environment. Tools like Docker help to do this, however not many people work with Dockerize environments, Github codespaces is closing that gap and making it faster for developers to jump in a codebase and fix something quickly without polluting your local environment.

The other use case it's working in big teams or corporations, especially in those working with microservices. In those environments, the sad reality is that as the teams start to grow they become more focused on just one small service and the collaboration across teams starts to be harder and harder and the time of the developer starts to be full of alignment meetings. The customer also is affected because all those developers working in silos cause the experience to be inconsistent across the different journeys. In an ideal world, a developer will have a task and will work across the customer journey modifying the projects she needs to change, I think that cloud development helps to reach that goal because you can enter a project and run it right away, no installation process required, and this reduces the initial friction that frustrates a lot of developers.

Ship your local

For years a developer's motto is "works on my machine". This refers to the problems that come with the mismatch of the local environment and the production one, with the advent of the DevOps revolution we started shipping our local machines by replicating the local environment in production, Docker is the main tool in this crusade. 

But in my experience, we still have a lot of things that locally we need to install to run projects, especially when teams grow big, where you need to deal with those tools to run on Windows, macOS, and Linux. The more projects you need to run the bigger this problem is. Having all this configuration in the cloud helps to remove any barriers to this while running your project with the fans off. And the fans off means that we don't need fancy computers to code anymore, which is important for companies to save money but more than anything for professionals and students starting in tech who don't have to invest so much anymore, and especially for people who don't have the luck to have access to a MacBook Pro, governments will have the possibility to also invest in tech education at lower costs.

A local environment easy to share

Another use case that you will encounter especially in corporations is the ability to share your local environment with stakeholders or colleagues, this is achieved now with the costly process of preview environments where we create special deployments on PR creation that you can share, this process is slow and frustrating, having instead the possibility to share your local it's going to be a golden standard that in my opinion will be the killer feature of cloud development for corporations. The pipelines will be way faster and reduce time to go to production immensely.

Also when you create a product for web or mobile, testing in multiple devices while developing can be challenging, having an URL to access in any device is quite handy, especially if you have multiple stakeholders checking things on multiple devices.

Another use case is prototyping, the cost of running this will be way smaller and we will be able to get feedback on features faster and iterate faster with designers and product managers, saving the organization valuable time in development but also in the shipping new features our customers are expecting.

Code anywhere

Because we have the code in the cloud we will be able to code from anywhere, this is especially important on times of shifting our ways to work, I don't think we will come back entirely to the 9 to 5 office hours, instead, the future will be more like work when you want from where you want and for me, it's about my projects or prototypes I like to build sometimes when I'm waiting in the doctor's office or the subway or maybe going in the train to my vacations; I don't need to bring a 16' 2 kg / 4 pounds laptop with me everywhere, at the moment of writing this I'm using my IPad Air to code my personal website where this post is available and in the future I hope that bringing a small VR set or maybe even glasses will be enough. If you ever received a call saying the website is down and you need to take your laptop in a middle of a bar to start debugging, you will appreciate this so much.    

Missing things

There is a lot of potential in this and a lot of things that are already working nicely, however, there are certain things that are still not there and I hope to see in the next years to move definitely to the cloud.

The main thing is that internet connections are still not there, I'm writing this from Germany where the internet connections are terrible, but this is also true for my hometown in Argentina or when you're taking a train, we will need to have better connectivity to make this possible, this will be a nice convergence with 5G in the future.

It's worth noting this is currently not yet available for mobile development, I think that could be a game-changer, I use React Native and Expo to run the local environment which is offering already a lot of the features I described here and I hope GitHub can integrate this better in the future for native development. 

Finally, the code everywhere is not easy, you will still need a tool specialized in that, there is just so much I can do on my iPad for web development for example, as neither there's native support for the editor (I run vscode in the browser) nor the browser has developer tools. 

Microsoft is thinking 10 steps ahead

I used to be critical of Microsoft because I didn't enjoy windows and the closeness of the system was terrible. However, in recent years, the company has gone through a transformation and, at the moment of writing, has placed them as the most valuable company in the world. I think that the way of thinking 10 steps ahead and focusing on the customer as much as possible was the way to get there, in JavaScript development the combination of Typescript, vscode, GitHub, and the contributions to React Native have changed the way developers think about Microsoft, I hope we keep seeing this push for improving developer productivity so we can benefit from the competition in this space. 


I think that in big organizations it's a no-brainer to already start trying this out, the advantages are too many and the dependency on an internet connection doesn't sound like a real problem (trust me, your coders depend on the internet for doing their job). Also, you can still have both ways, you can run it locally but also some teams can already start working in the cloud if they want to, this is not one way or the other thing, you can start codespaces when you want, just make your project codespaces-ready and let your employees decide.

For individuals, I would say it's almost there, you will be able to save money by having a smaller machine and be able to fix bugs on the go, but if you are traveling a lot or in regions where the internet is not so stable then you will have problems running this smoothly.

In any case, I think the future is bright and I think we will migrate to the cloud for local development within 5 years because it can save so much time, help with the onboarding of new team members, make sharing and iterating with stakeholders easier, and improve collaboration across teams.