🛠Makers + 🎏Glitch = 😻Amour

REDL driven development.

While enjoying some glorious Corsican summer days with my partner in crime, we built a chatbot for Slack. It recently got approved on the Slack App Directory.

The experience of creating and deploying this 🤖conversational interface was delightful and, it’s worth mentioning, completely free (as in free 🍺beer).

The tool we used is called Glitch and I thought the least I can do to thank Glitch was to write something about its 💯awesomeness.


🤔 I was skeptical

As in all good love stories, it started off on the wrong foot. The first time I heard about Glitch I thought this was yet another online code editor. I had seen and tried other ones before and always ended up being disappointed.

Like most of the developers out there I had already invested a lot of time setting up my dev environment. I had my editor (Atom) with all the customizations I wanted, I had my terminal (iTerm2) so I felt in control, I swore by Git using it from the command line, and I had my shortcuts, I had my aliases, I had my language (Clojure)… The list could go on and on.

Online editor? I’m not going to waste time playing with that toy!

I closed Glitch’s tab and went back to my local setup.

🎨 The art of making

I relish doing side projects: they are opportunities to try new stuff without having the stress of doing something perfect.

Indeed.

Before Glitch, I would open a blank editor and hack away. Building something from scratch can be delightful because you take the time to understand every bit of the software you’re writing — and that usually makes you feel good!

However, it’s pretty easy to get lost on the way if you’re following that approach. For instance, I had one disastrous experience when trying to build my first Messenger bot. Frustration was real.

Sometimes you just really want to build something faster and reach that “Rough MVP” stage as soon as possible. Let’s admit that at the end of the day it’s easier to clean or iterate on something that’s already working.

🐟 Plop the bot

Amir Shevat’s book Designing Bots had just been released and this was perfect timing to read it during the holidays. Following the methodology inside we started writing down ideas for potential Slack bots that we would build as a side project.

Plop

We ended up choosing to build Plop. Plop is a casual corporate game to get to know your coworkers better. It takes place entirely within Slack and basically boils down to being able to recognize as many profile pictures (of your coworkers) as possible in 30 seconds.

It’s worth mentioning that Plop is also a friendly fish who hopefully gets along well with Glitch’s 🎏double fish!

🏗 Building Plop

We then had to decide how to really build it. The book mentioned different options that all come with a compromise between flexibility and ease of development. We settled on Botkit, because it would bring enough flexibility while being a battle-tested framework. Going through Botkit’s readme I noticed this Remix on Glitch button.

It felt like this was the right moment to give it a try!

I clicked on the button and there I was, right in the middle of the code. I was a bit lost for a moment because I didn’t see right away the Glitch-specific readme. However, after having read it and followed the steps to configure my Slack app to “hit” my Glitch app, I had a bot up and running in production at a url they provided [your-app-name].glitch.com

– Say again? 
After a few minutes I had a live bot with its code in an editor before my eyes.
– Putain, c’est ouf !

🤓 Software engineering

When you’re first editing code in Glitch, you’re shocked. You think that it’s fast, really way too fast!

Glitch, Stahp!

Keystrokes

After recovering from the initial dizziness, you then come to understand and appreciate the power of what we could call a REDL (Read Eval Deploy Loop) : on every keystroke your code is saved and the container of the live app is restarted — no jokes!

Collaboration

Also, it’s collaborative. You get the ah-I-see-your-cursor-too kind of collaboration, and it’s great. Glitch could actually be the ultimate tool for remote pair programming!

Logging

As for debugging, you have access to the logs of your app. You have also access to the console if you want to do more advanced stuff. In my case, I didn’t really feel the need to hack around in the console — logs were enough.

Assets

“I love managing my assets and include them in my code. I never mess with their paths, and I’m having fun!” — said no one ever

Maybe that was “la 🍒cerise sur le 🍰gateau” but the way Glitch handles assets is brillant: your drag and drop them in a “folder”, you’re then provided with an absolute url pointing to a CDN, and you can paste it where you need it. Done.

Env & data

Every Glitch project has a special .env file and .data folder which are not visible for outside people. They also don’t get copied when a project is remixed. Sweet af.

All in all, there has always been a struggle to take a local side project to “production”. Glitch removes that friction in a brutal way. 👊Brutal!

🙏 Potential improvements

I obviously enjoyed the experience, but I can’t help to think about what could be on their roadmap:

- Search: it’s frustrating not being able to search within files…
- Languages: I understand that it’s important to focus on one language (JavaScript) for now in order to keep a quality product, but that’d be so amazing to be able to write Clojure code in this kind of setup. It might be easier to integrate than other languages since Clojure compiles to JavaScript! 
- Formatting: Glitch is already an opinionated platform. Why not adding tools like Prettier by default?!
- Sleeping: A glitch app sleeps after 5 minutes. It’s possible to overcome that limitation with an uptime service, but I’d rather have the possibility to tick a box or not within Glitch (and pay for that if needed).
- Git: I read that this is coming, but yeah Git branching would be nice. The current workflow for a live app is to remix your project and to import it back to the original one. A bit cumbersome.
- Git again: The Git history that Glitch makes has not a lot of meaning. This could be nice at least to attribute commits to people. For blame and glory!


A maker life is a good life.

To conclude, I highly recommend that you check Glitch out and make something today! It doesn’t matter whether it’s a small bot like Plop or a future billion-dollar company. It’s only important to remember that a maker life is a good life.

Sneak peek inside Glitch