Coding on an iPad

// development

About a month ago I planned for a holiday to Tokyo with my wife, and I finally decided to do something about the worst part of travelling for me—plane flights. My experience has always been the same: my ass hurts; I can’t fall asleep easily, and I get bored out of my mind. Excruciating!

For better or worse, I’m stuck with the Apple ecosystem when it comes to tech gadgets. I started researching on ways to code on iPadOS and fortunately, it’s slightly easier these days. Your experience would mostly depend on whether you have internet access or not.

My gear (pretty lightweight):

  • iPad Air 5th Generation
  • Logitech Combo Touch

Coding on a plane

Let’s start with the worst-case scenario. You’re about 10,000 km in the air, and you don’t have a reliable internet connection1. Since only interpreted languages are allowed to run on iPadOS, the best you could do is to install a Python IDE on your iPad. These were the two most promising options I shortlisted:

It just so happened that the Pythonista author recently came back from a long hiatus and published an update. That felt a little serendipitous for me, so I decided to go with Pythonista and took it on the plane with me.

Python code running on iPad app; Pythonista

5 hours of bliss on an airplane, I’ll take it.

The experience was surprisingly pleasant. The lights were dim and nobody was talking around me. The app was silky smooth, and it helped that the typing on the Logitech Combo Touch keyboard felt pretty good. I could totally get engrossed with coding. A 60-minute coding session on Pythonista uses about 10% battery charge, so this could definitely go the distance even on long haul flights if you bring along a hefty power bank or two.

While I can’t write any serious software with this setup, the ability to do this on a freaking plane was good enough for me. The only downside with Python IDEs on iPadOS is that you can’t pip install—you’re stuck with whatever 3rd-party modules the app author packaged.

Coding in a cafe

Of course, I also had to try this setup in a quiet cafe somewhere in Harajuku. With an internet connection, I could do so much more on an iPad with the help of Cloud IDEs. I also researched on this a little, and narrowed down to these options:

SaaS (paid):

DIY (free):

I briefly considered running code-server, which would open up the possiblity of moshing into my box with Blink shell. But for just USD4, I no longer have to worry about securing my server, setting up SSL certs and all that jazz. On top of that, Copilot is free with a GitHub Pro subscription. It’s a no brainer.

For the record, VS Code runs pretty damn well on iPadOS Safari. I could write an entire React frontend, start a Live Share session if I wanted to, and even run a web server with port forwarding automatically working out of the box. No additional configuration required! I’m a Codespaces fanboy now.

Writing and running React code on GitHub Codespaces

Boilerplate React+Vite. Pretty magical huh?

Addendum: iPad + Raspberry Pi

I am aware that connecting an iPad to a Raspberry Pi 4 is possible if I wanted to write compiled languages, but the setup looks unwieldy and seems like there are too many things to bring around. I’d prefer just bringing an iPad around.

  1. At the time of writing this article, there was no widespread adoption of satellite broadband internet in commercial airlines. ↩︎