Lately, when I start tinkering with a side project, I reach for Glitch.
That sounds like the start of a toothpaste commercial, but bear with me. The thing about Glitch is it’s not very weird. The general vibe and decor of the place reminds me of my favorite BASIC programming books from the early 80s. But, behind that is some dead boring technology.
Out front, there’s a no-frills web-based IDE – not as complex as something like Cloud9, but plenty powerful for most tinkerings. In back, there’s a tiny Linux machine with a sliver of RAM and a dollop of storage – not entirely unlike a Raspberry Pi. Along with basic editing, the IDE offers access to console log output and a web-based terminal where you can engage in command line shenanigans.
Every project gets its own *.glitch.me
subdomain with an SSL-enabled web server all ready to go. And, though you can store assets like images and such alongside source code, there’s also a separate CDN that accepts uploads via drag and drop.
For version control, you get an easy-to-grok rewindable timeline. The neat thing, though, is that this is backed by a git repository. Every ten minutes or so, the system commits your changes and you can roll back with a file-by-file preview of changes right in the editor.
I recently discovered that the Glitch API opened up direct access to the underlying git repository. So, with plain old git tools, you can back up or transfer your projects away from Glitch. You can even work through GitHub if that strikes your fancy. Ironically, these sorts of clearly marked exits make me more comfortable with sticking around.
I’ve read that other languages work on Glitch, but my main thing around there there is working with JavaScript in Node.js and the browser. The happy path is well-trodden: On edits, web pages auto-refresh and servers auto-restart. Tweaks to dependencies in package.json
are automatically applied from a fast pnpm cache. And, if you don’t quite like the auto-restarts, you can customize with a watch.json
file.
To circle back, it might sound like I accused Glitch of being boring like that’s a bad thing. But, I know that the infrastructure keeping things boring must be anything but. And the effort to support what’s common clears the way for more exciting things folks can do when they don’t have to focus on the setup and knob tweaking that so much of modern web development seems to require.
When I start a new bit of tinkering on Glitch, I don’t have to go through a boilerplate dance of git init
and npm init
and npm install
and trying to remember what I did last time to configure Webpack and yadda yadda yadda. I just start a remix of one of the many starter projects on Glitch and commence tinkering.
Then I can tweet or toot or do whatever to share with the *.glitch.me
URL and show off what I’ve got so far. I can even embed my projects on my own pages. In starting to explore the API, I added a list of recent projects to my home page. And if you want to play, it’s just a click or two to remix my work as your own.
And then, if or when I do want to get into some knob tweaking – Glitch gets out of the way. I can replace and configure the built-in auto-restarts and file watchers. I can run npm scripts from the command line for linting and formatting and whatever else I feel like doing. I can set up a fancy Webpack dev server complete with hot module replacement or whatever ends up being the latest hotness.
So, I guess to sum up: Glitch is pretty cool. I’m probably going to be using it a whole bunch in the near future.