EXTRA - Experience using GitHub Codespaces
I've been using the GitHub CodeSpace intensively to write some demo applications for articles on my blog and I would like to share with you my takes on this tool
For those that do not know GitHub Codespaces you can see it as “Editor as a Service” based on the repositories you have in GitHub. From any branch of your repository, you can spin up a Codespace for your code, and such Codespace will be available. With the free account, you can use it for 60 hours a month.
GitHub Codespaces uses Visual Studio Code editor which means you have plenty of plugins to install dynamically in the environment that is opened for you.
In today’s issue, I will cover
Good things
Not-so-good things
Is it useful for using it at work?
The good things
It works directly in your browser. For me, this is a huge advantage since I can code on a laptop avoiding the installation of all the tooling I used to need. The exact version of Java, the Git tool, and a nice editor… are things that I can omit thanks to the Codespaces. Also, working in the browser, you avoid possible memory consumption on your laptop by running the app you are coding, because all the run happens in GitHub Codespaces cloud. It runs pretty smoothly and fast from my point of view.
It opens public ports to access your app. Let’s imagine that you are coding a Spring Boot REST API. Just running the application the Codespaces will span a new URL for your service, so you can use your browser or your tools to access your API through that URL. It looks like you even can run docker containers in Codespaces.
The power of Visual Studio Code. Thanks to the power of the Visual Studio Code editor you have a full world of plugins available for you to use at 1 click of distance. This is really convenient for the start-up of a project since you can avoid having to install plenty of tools on your laptop and, potentially, avoid problems installing them. Also, UI is friendly to me and, very fast, you get used to it and have the feeling of typing in a “known” editor.
The not-so-good things
Before start listening about the not-so-good things, I want to tell you that I’m amazed by this GitHub Codespaces and the milestone that means for the Software as a Service model.
Said that, I will enumerate some important points to me:
Because of the lack of auto-import classes (in the case of Java code), I have the feeling I’m back in time and I’m coding in VIM or NotePad. The editor is very intuitive, but you have to know that, to use the URL object, you have to import the `java.net.URL`.
Every time I spawn a new environment, I have to install all my favorite plugins. I believe it would be great if there would be someplace on which I could define my plugins to be used in all possible environments I span.
The editor is a bit limited. Things like auto-scape quote chars, auto-imports, or identify not used variables, error detection cannot indicate what the error is about, are features I’m missing
I could not use Java 17 for some reason. At least, I did not find how to use it.
I’m used to using Gradle. In my local environment, I usually run ./gradlew whatevertask. In this codespaces, I have to run the `gradle` binary that is installed, instead of my wrapper gradlew. Not a big deal though.
Sometimes I’m coding and the Codespaces just stops and I had to refresh the page.
Update: I found how to auto-complete Java native objects, via a plugin, but not with objects coming from third-party libraries.
Is it useful for using it at work?
I’ve used GitHub Codespaces with a free account.
From my point of view, it’s far to be used for professional tasks, like the ones that you do when you are working for money. Things like the lack of auto-complete of code and imports are a must-have to me for a tool like GitHub Codespaces. It’s true that this is a good starting point in the way to have a complete development environment as a service and this niche has a bring future in my opinion. But not yet for real work.
I see this GitHub Codespaces useful for small POCs and when you are using a computer that is your “programming computer”. This is the usage that I’m giving to it and it’s quite convenient to me.
Do you use GitHub Codespaces frequently? How is your experience? Share it in the comments!