
First Impressions of GitHub Codespaces - legostormtroopr
https://www.aristotlemetadata.com/blog/2020/08/first-impressions-github-codespaces.html
======
setzer22
While impressive technology, I still get that eerie feeling of my computer's
ownership being slowly taken away from me. The problem is not Github
codespaces offering us an alternative to traditional dev environments, the
problem may be 10 years from now, when someone says: "All the coding is done
on the web nowadays, why should we allow users to install compilers and dev
tools on their machine? They may use those for _hacking_ and compromising the
security of our systems. They may hurt themselves in the process and sue us!
Better not take risks". I'm afraid to go into a future where this is normal...

~~~
bryanrasmussen
>They may hurt themselves in the process and sue us!

has a hacker ever hurt themselves by hacking and sued the company whose
computer they were using?

Anyway I guess people can also buy their own computers if they want to play
outside the sandbox.

~~~
setzer22
Fair enough. But that was not my rationale, it was just a made-up corporate
rationale that is not too far from what I can observe in reality. Take, for
example, lobbyists in right-to-repair hearings. They use arguments like this:
"If we let users repair their smartphones, they might hurt themselves, so it
must not be allowed and instead always performed by a skilled technician". The
implication always being, that if users hurt themselves, they will sue.

> Anyway I guess people can also buy their own computers if they want to play
> outside the sandbox.

My point was, precisely, that we might get to some point where this is no
longer possible. Imagine they stopped selling what we today call "PC", and
instead everything is closer to smartphones or tablets. There would be no way
to setup a development environment on the machine. There's no sudo access, no
compiler toolchain...

------
fotcorn
There is also coder.com which provides more or less the same thing (running
Visual Studio Code in the browser).

The code is actually open source and you can run it on your own machine:
[https://github.com/cdr/code-server](https://github.com/cdr/code-server)

Hint: Set the following environment variables before starting code-server to
get access to the official Visual Studio Code extension marketplace. This is
against the TOS of VSCode, but some extensions are missing/broken on the
alternative marketplaces.

SERVICE_URL=[https://marketplace.visualstudio.com/_apis/public/gallery](https://marketplace.visualstudio.com/_apis/public/gallery)

ITEM_URL=[https://marketplace.visualstudio.com/items](https://marketplace.visualstudio.com/items)

------
albertzeyer
I also just got access to the beta. It works very seamlessly. You can install
all the VSCode extensions you want.

It came preinstalled with some Python 3.8 venv. The venv was put into the Git
repo root directory, which is a bit strange, as I first needed to modify my
gitignore to ignore that.

Git push directly from the VSCode menu directly worked and pushed the change
back to GitHub, without further setup.

I did not expect that I get a full virtual machine, but it seems so. I edited
some Latex project, and pdflatex was missing, so I did `sudo apt install
texlive-full`, it installed 4GB of packages, and then all worked fine.

I also edited some TensorFlow stuff, and `pip3 install tensorflow` also just
worked.

The side preview (eg. for markdown or Latex) somehow is broken. It stays
blank. However, e.g. you can open the Latex PDF preview in a new browser
window, which works.

The speed just felt native. There was no latency. It feels exactly like native
VSCode.

I very much like it. I guess the side preview will get fixed soon. I will
probably use it for a couple of smaller projects, of different kinds, like
Latex, Markdown notes, smaller Python stuff, or other smaller code projects
where VSCode is fine.

Otherwise, for e.g. Python, I still prefer PyCharm, which has far superior
code browsing and auto-completion. Codespaces with PyCharm would be really
nice! Or maybe VSCode can improve on that. Or maybe VSCode can even reuse the
language server from VSCode. Or at least the inspections. I think this part is
open source, right?

~~~
dlkmp
From the blog post I understand that my vscode configuration is somehow stored
within my browser, not connected to my github account. Is it also stored per
project or globally?

Because either choice brings its own problems. I want the vim plugin to behave
the same on all instances but language-specific plugins or similar only make
sense in the context of a specific project. How does this work currently?

~~~
albertzeyer
It stores settings just as usual in .vscode/settings.json in your project. (I
usually have .vscode in my .gitignore, but maybe it make sense to include it
in the repo.)

Additionally, there is some "Settings-Sync" feature, which I have not really
explored yet. Maybe this is global for all instances.

Btw, the startup time of the codespace VM is a bit annoying. It takes approx
30-60 seconds when it was inactive. And it get automatically suspended after
30 minutes of inactivity.

~~~
WorldMaker
In addition to project local .vscode/settings.json and the still Beta Settings
Sync, it should also pick up your user settings if you set up a dotfiles
repository.

------
sudhirj
The big draw for me is working on the iPad. If you attach the keyboard it
becomes a pretty awesome 'do anything' device, now that you can code on it as
well. Can't build native apps yet, but seems like a future opportunity. Web
apps / PWA development works great, I can just have the app running in a
hovering window / on a quarter of the screen.

~~~
greggman3
It's such a contrast to see this and the post by setzer22 right next to each
other

~~~
georgebarnett
I'm in the process of switching a lot of my work onto iPad.

I don't see a conflict here - I'm still using a "compiler" api, its just
somewhere else (i.e. not on my local device), its just in somebodies cloud. I
can't see why that would go away in the future and I don't really care where
the compiler actually is (if I did, I could self host).

------
desmap
> as a co-founder who is spending less time as a developer, and more time in
> meetings, writing emails, strategy papers, [...] this is just amazing [...]
> I’ve been spending a lot of time getting Windows Subsystem for Linux working

lol, just ssh into a $3 vps as dev machine, real Ubuntu, real tmux/(n)vim, no
setup, no hassle

 _Edit: to be fair, Cloud9 was my entry drug into remote development bringing
me to my setup above; the idea is awesome and Github Codespaces is too but
there are just too many limitations and having a real, ever-running Linux vps
everywhere, even on your phone is just magic and even when you write strategy
papers..._

~~~
josephg
I respect developers who make that work, but the development experience over
SSH (vim, etc) is never as good as local development. You can't use vs code.
You have to deal with lag delaying keystrokes. If you download a file and want
to copy it into your dev environment you need to SCP it over. If you want to
test a network service its nontrivial to point your local browser at the
remote machine. If you sleep your laptop and open it again, you need to
reconnect your SSH sessions. Etc etc.

A lot of these issues can be solved with enough extra work setting everything
up - but that completely defeats the point. "no setup, no hassle" is never my
experience.

~~~
desmap
> vs code

check coc.vim, uses vsc's native LSP, 99% of LSP's features

> delaying keystrokes

I have 16ms latency as my 60hz screen does and def less latency than a local
vscode

just use a vps close to where you are

~~~
robotmay
Or use Mosh, which eliminates the keystroke lag.

------
millstone
What are the specs? How much memory, CPU, disk space?

Of course it's in beta so nothing's final, but it would be good to get a sense
of order-of-magnitude.

MS Codespaces starts at 4 GB RAM, 2 cores, 64 GB storage.

------
soco
I'm surprised nobody mentioned GitPod[1] - it's in business since quite a
while in my GitHub projects, powered by VSCode, with terminal, pretty much
everything Codespaces does... Any thoughts on such a comparison? Is GitHub
reinventing the wheel locally?

[1][https://www.gitpod.io/](https://www.gitpod.io/)

~~~
AbuAssar
Gitpod is powered by eclipse theia

~~~
soco
The GitPod own page says "Gitpod is an open-source Kubernetes application
providing prebuilt, collaborative development environments in your browser -
powered by VS Code."

Might be they mean that Eclipse Theia can run VSCode extensions?

~~~
anaganisk
Eclipse thea is a wrapper On Vscode for users who want to build upon it.

------
Normal_gaussian
The pieces are starting to fall in place for a decent virtual first
development experience.

I don't expect my recent laptop purchase, which was a combination of form for
comfort, form for clients to see, and perf for working to last more than 3
years. At a $2500 purchase (most expensive damn laptop I've ever got) I'm
aware that half that price or less would get everything but the perf.

So if a cloud solution was good enough, I have about $400 a year to spend on
it.

It's about $.5 an hour to match perf on EC2, but we should consider:

\- I only need the top perf for minutes at a time. A lot of work could be
browser based, but browsers cant do the heavy lifting

\- I also have a desktop, which I use more than the laptop, is significantly
cheaper and higher perf. Its most useful to me if both envs are the same.

------
mintyc
I still don't understand why people want their code dependent on the web.

I want to share my one true dev environment, but I want to be able to do this
on my private premises setup without internet access.

I don't trust the internet and things like codespaces not to leak my company's
code whether nominally in a private repository or not.

I don't trust using internet dependencies either.

Even something like pair programming etc with a shared view of a project is
very appealing, but again, it needs to be appealing in a private context and
not dependent on public access.

What might be OK for an open source project is unlikely to be true for a
company's valuable IP, but people just seem to get carried away.

Secure first, managed dependencies first. Please.

~~~
evolve2k
“Most of my daily tools are Windows based, so I’ve been spending a lot of time
getting Windows Subsystem for Linux working alongside the rest of my daily
workflow, which comes with its own headaches. So being able to quickly
checkout a branch, make changes and take some load of my local machine seems
very promising.”

Making it easier for more devs to use and stick with Microsoft tech, is, I
think, a core driver behind this initiative.

------
sdn90
I'm pretty excited about what Codespaces is going to bring to the table. I can
already see a lot of good use cases.

I've been using an iPad Pro as a laptop replacement for the past year and
Codespaces makes it a pretty viable development machine. I'd been mulling over
switching back to a laptop, but I'll probably stick to the iPad for now.

Before I was using Blink shell to ssh into my desktop and run Emacs. Not
really ideal for me since I mainly use VS Code on my desktop (which is my main
computer) and hardly touch Emacs anymore.

~~~
patrick91
do you use codespaces in safari? doesn't work that well for me, scroll using a
touchpad doesn't work, and I guess not having a real fullscreen mode is kinda
annoying too

~~~
fallenhitokiri
AFAIK This is a bug that was introduced earlier this year when WebKit changed
how scroll events are handled [https://github.com/cdr/code-
server/issues/1455](https://github.com/cdr/code-server/issues/1455)

If you can add a shortcut to the dev environment to your homescreen it’ll load
the app without safaris control elements which comes relatively close to
fullscreen. (Not sure if this will work the way codespaces is built)

------
alienspaces
"Most of my daily tools are Windows based, so I’ve been spending a lot of time
getting Windows Subsystem for Linux working alongside the rest of my daily
workflow, which comes with its own headaches."

My work place is considering switching providing developers with a MacBook Pro
to a Dell Windows machine. At one point we were all allowed Linux which was
awesome.. Is WSL still painful to use? My prior experience came to a dead end
when I had irreconcilable Docker issues, the fine details I don't quite
remember now other than it had something to do with accessing the host
network. All good now or still meh?

~~~
d3sandoval
With the release of WSL2 and the new versions of Docker that take advantage of
it, I would say that most of the pain around the WSL toolchain has been
resolved.

Compared with trying to get anything working in powershell or dealing with the
slowness of git bash or Cygwin, WSL2 is a breeze.

The only pain point I still have is running Linux GUI applications. It
requires running an XWindow server on the Windows side and letting WSL talk to
it over TCP. Apparently MS is working on that now and hopes to have a solution
later this year on the slow ring of windows update. That'll make running
things like Cypress a hell of a lot easier and (fingers crossed) prevent me
from squinting on HiDPI displays.

------
wildpeaks
One of the things I hope to use Codespace for is a CMS editor directly hooked
into source control and its permissions (given static sites already get
generated by the CI), instead of hosting some admin UI on a thirdparty server
that needs to deal with all the authentication flows, without sacrificing ease
of use for non-devs.

If all goes well, it could even customize the Codespace with VSCode plugins to
fit customer-specific needs (but I have yet to see what limitations there are,
luckily by now I'm quite used to writing plugins for my local VSCode).

So I hope to be in the beta sooner or later.

~~~
greggman3
My problem (so far) with github for CMS is no preview. Maybe preview could be
added to Codespace as a VSC plugin. It needs to access all the media I'm
adding as well. Hmmm, maybe I will look into this :)

~~~
greggman3
AFAIK VSC is explicitly not iOS/Android friendly. Maybe Codespaces will end up
changing that but they make a point of Monaco (The editor portion of VSCode)
not being designed for tablets/mobile

[https://microsoft.github.io/monaco-
editor/](https://microsoft.github.io/monaco-editor/)

------
darumderum
Actually, you can self-host VS Code on a server and access it via browser:
[https://github.com/cdr/code-server](https://github.com/cdr/code-server)

------
swiley
I’d bet this stuff is mostly popular because of really really broken platforms
like iOS.

Also OT: Wow. That’s an entirely new level of broken web design. The links
don’t even work! How can you mess up HTML this badly?

~~~
legostormtroopr
Which ones - we're a pretty lean startup so if you've found some errors, I'd
like to know.

~~~
swiley
(sorry for the long delay, I struggle with compulsive hacker news usage and
have noprocrast on.)

On ios none of the links on that page appeard to work, coming back with
firefox they all do.

~~~
legostormtroopr
Thanks for coming back to clarify, glad to hear its not broken. I'll check the
iOS compatibility anyway.

------
bregma
The pendulum swings again.

Remember mainframes? Remember PCs? Remember thin clients? Rememeber PCs again?
Remember this i a couple of years as the pendulum starts to swing back.

~~~
quicklime
It’s not a pendulum, the industry is always moving towards two goals:
miniaturization (for portability) and centralization (for efficiency).

Sometimes it appears to go “backwards” towards decentralization when there’s a
shift in form factor. This is just to avoid getting stuck at a local optimum.

Eventually we’ll get to the global optimum where everything’s centralized but
available from everywhere.

------
jacquesm
That is a very badly chosen name. Codespaces was a company that went under
because they were (or claimed to have been) hacked.

[https://threatpost.com/hacker-puts-hosting-service-code-
spac...](https://threatpost.com/hacker-puts-hosting-service-code-spaces-out-
of-business/106761/)

If you want to instill confidence this name is not the best start you could
have picked.

~~~
IfOnlyYouKnew
Nobody (but you) remembers a minor company that went under six years ago. And
those that do are unlikely to believe there’s a connection.

