One of the duties as a Male in Singapore is to serve the national service, and we are called back between 1-3 weeks every year for our “reservist” until we reach MR or “operational ready”.
The past 2 weeks was my turn, and I decided to bring in a cheap $200 android tablet and a keyboard to see how far I could push it. In other words, I want to see what else I could do with it other than just consuming media.
It started with curiosity of finding out how close to Linux I can get Android to be. Termux is an awesome terminal emulator that provides an almost desktop-like experience. I will have a separate write up on how I customized it.
After I got my terminal experience all setup, I was excited about the possibilities and wanted to see if it’s possible to develop a simple script/app for my Automated torrent setup. (coming soon).
As you can see, NodeJS and Typescript worked beautifully and I threw my hands up in celebration the first time this succeeded. It wasn’t all roses when I initially tried developing on
nano, where it quickly became clear that a young engineer like me had grown accustomed to the niceties that a proper IDE has provided me all these years. I searched the Play Store high and low but couldn’t find one that really fit my needs. This was when I remembered about code-server. This is an open-sourced version of VS Code that runs as a service and you can connect to it through a browser.
Mind-blowingly, this ran locally without a hitch, along with plugins and theme support. My initial plan was to run this remotely, but I felt like that was cheating so I took the effort to make sure that the entire development environment happens locally on the tablet.
I will go more in-depth about experimenting local/remote development on Developing on a Tablet post (another coming soon).
- MiPad 8″
- Android 9
- Custom Rom: Havoc 2.8
- Unlocked / Rooted
- Snapdragon 660
- 3GB Ram / 32GB storage / 128GB SD Card
With only a paltry 3GB of RAM, Android is really unhappy with the processes that I am running, it will often garbage collect the code-server running in the background., causing the IDE to crash in the middle of my keystrokes. The way to get around it is to keep it running in the foreground with split view. This is basically what I’m seeing 99% of the time when I’m developing.
As you can see, the screen size is really small. I can only see up to 24 lines of code at once, and 49 characters across. Unsurprisingly, it took me way longer than expected to to finish up my code, but it has taught me to be more mindful with what I’m writing, and it had the unexpected side-benefit of smaller function blocks; cause it’s hard to reason what I can’t see.
What I’ve learnt
- It’s possible to make the best of my situation when I have time to plan in advance
- Android has came a long way since I tinkered in-depth with it since the 4.X days
- It’s actually possible to do proper web development on Android
- It’s possible to have a fully remote development environment that you self-host (this is exciting because it means that your laptop can just be a low-powered high-battery device)