Programming on your phone

June 5, 2024

So I'm currently daylighting as a tourist in Western Europe, but I am an incorrigible workaholic so after a while I decided to moonlight as a programmer.

I've been pretty good at not sleeping (or "bad at sleeping" depending on who you ask) since I became a father, and my mind wanders when the family goes to sleep, so its hard to stop myself from working on something that I find interesting. (What exactly I find interesting this time, I will share soon).

But I did not bring a laptop on this very long trip.

So this brings me back to what I used to do in college and really what I planned on doing on this trip. I have everything I need on my Android phone. A C/C++ compiler, zig, rust, gdb, node.js, python, bash, vim, tmux, etc.

All thanks to Termux. My eyes may not always agree (especially when I use a tmux split), but I find it a very convenient setup. I've even written several blog posts or chunks of them from there (this one included).

a picture of my phone kickstanded and my bluetooth keyboard in front of it

Setup:

  • my portable folding bluetooth keyboard (I am not affiliated with that link whatsoever, and get nothing for linking it).
  • any kickstand phone case or accessory. The above keyboard comes with a separate kickstand but I use a case with a kickstand instead.
  • pretty much any android phone, even old ones

I think it's sad that these days the split between "producer" and "consumer" of computers is getting more and more black and white. Sure you can still use the phone camera and some apps to "produce" e.g. TikTok content. But glaringly few people would consider it possible to create e.g. the TikTok app itself on a phone. I think it's a sad division.

It's worth mentioning that I can't really use an iPhone for this, they're (only slightly) more firmly than Android in the camp of "simplicity" and "security" (I think those terms are conflated here but I'll explain another time), and that's a tradeoff that I think is overrated. For an iPhone, feel free to buy a computer elsewhere and login remotely from some app, but I don't think that counts.

Also, iPhones can be much more expensive. I have not measured my setup's linux-compute per dollar, as compared to e.g. a hacked chrome book (never used one), but it's often good enough for my tinkering and requires much less space. My folded keyboard is lightweight and fits in my pocket or very small bag.

So anyway, I think the uncommon knowledge that you can develop your website or tinker with native code from a phone, is useful, or at least interesting.

Maybe someone ought to take things further and lower the boundary for computer science by designing a course that requires only a cheap Android phone, internet, and free open source software.


A maintenance note; I am going to try to write/blog more. Life has moved quickly in the last couple of years, but I think I'm used to it now.