Dev on the Road

The Problem

I am going on a non-work trip such as a weekend getaway to the coast or a week of skiing. I won’t be doing much or any work unless there is a critical infrastructure error. If there is a the website is down! sort of situation I have to jump in.

You may identify with this problem.

Luckily for me, this is a very rare occurrence. But the consequences are also high if it does arise.

What if something goes bonkers with the Talk Python Training site and its backing MongoDB server? Possibly something happens at DigitalOcean and I need to SSH into the server to fix it.

I really don’t want to drag my $3,500 MacBook Pro Max on the trip just in case.

But I’m always taking my iPad on trips. It’s my TV, my library, my magazine, photo album, and game station. All perfect for vacations and relaxing in the evenings.

Is there a way to make your iPad a dev machine?

Wow, I don’t know. That’s a stretch. But we can solve the problem above pretty well by approximating this. That is: How do I make my iPad enough of a dev machine to fix minor emergencies.

I’ve been thinking about this problem for a long time (and dragging the laptop along too). I think I have a pretty solid set up.

1. We’ll need SSH access to the server infrastructure

SSH and especially SSH keys make me nervous. But keeping them locked on my iPad behind biometrics seems safe enough. So I chose Prompt from Panic Software.

Prompt

It’s the best SSH client for iOS. Restart your server from a coffee shop. Fix a web page from the back of a car. It’s elegant, powerful, and always ready.

Prompt costs $15, once, but it’s very capable. It adds a special keyboard with modifier keys such as CTRL making it terminal friendly. And the SSH keys and logins are protected with FaceID.

2. Accessing source code

I don’t usually code with VS Code but it’s a very solid option. And, I have continuous deployment set up on a production branch over on GitHub. So if I can just make a change and somehow push code to that prod branch, then CI/CD will take it from there (or I’ll use Prompt above and get in the server to kick things over).

You’re surely familiar with GitHub.com but how about GitHub.dev? That’s VS Code hosted in the browser running on GitHub.

If you open your repo on GitHub, for example:

https://github.com/mikeckennedy/jinja_partials

Then change the .com to .dev, boom! It’ll drop you into that project in hosted VS Code. You’ll need write access to the repo so open one of your repos and give it a try.

3. Dev environment

We have access to the servers with SSH, to the code with GitHub + VS Code in the browser. Yet sometimes you really need to run the code to figure things out.

The final piece (which you hopefully don’t have to use) is GitPod.

GitPod

Spin up pre-configured, standardized dev environments from any git context when you need them and close them when you’re done. You won’t go back to the friction of long-living stateful environments.

The idea is you connect GitPod to your GitHub repo. Configure it once to set up things like your version of Python and project dependencies and it builds the environment (in a Docker container I think).

They also have a hosted in the browser VS Code that then connects you to that environment. From there, you should be able to write what you need and test + debug it on their infrastructure.

The GitPod folks are on the same page as us here:

Code anywhere, on any device

You no longer need an over-powered laptop to code, Gitpod works just as smoothly on a Chromebook or iPad. All you need is a browser.

Finally, pricing is free with 500 credits/mo or up to 50 hours per month.

Apple, this is your fault

And you can fix it.

Of course, this whole iPad vs. laptop discussion is only because Apple is being dogmatic about iPadOS (ironic given the Steve Jobs quote).

If we had access to full macOS on the iPad, then we’d just do everything locally. After all, my iPad has an M1 processor and is just as fast as my desktop (Mac Mini) which I have been using daily for over 2 years. Apple has crippled the iPad with iPadOS.

Please Apple: Let us dual boot iPads into macOS for Apple Silicon.

I’m not suggesting adding touch to macOS or anything invasive like that. If you could just dual boot the iPad into macOS it would all be self-contained and the same tools as we usually use would be available to us.

This could easily require a keyboard and mouse, no touch. Thus, it would not require any changes to macOS. We’d be golden. I’m holding out for that. Until then, the tools above are a pretty good “just in case” travel set up.

Discuss

What do you think? Do you do something like this for traveling or are you dragging your laptop along these days?

fosstodon.org/@mkennedy/109660721346086147