This blog is for everyone who commutes on a regular, those go on holidays frequently, those that want to be able to unleash their mind, and be creative with your programming anywhere.
Laptops are getting lighter and lighter, but if you are like me, just a tad bit too big to bring with you everywhere. If you are going to a social event, do you really want to lug around a hefty bag with your laptop?
So the question is, how do I start programming on my smartphone!
Power of the smartphone
Smartphones are amazing, and offer an unlimited amount of creative and educational power. I enjoy learning and being creative. Learning and creating offers so much more reward than the instant gratification you receive by playing mobile games; developed with addictivity in mind; destroys your phone’s battery life; riddles you with adverts every few minutes.
Honestly, the majority of mobile games infuriate me. The same goes for social media, I try to limit my social media usage, I mainly use them to keep in touch with hobbies, follow tech blogs, as well as maintain social life. It’s quite a dependency for young people unfortunately.
We have the power of all the worlds knowledge in our hands, and the ability to build on top.
How I can use my smartphone?
Android:
If you are on an android device, you already have an entire linux operating system at your fingertips, android phones are highly customisable, and highly versatile. Without even rooting your android device, you can install a Linux terminal with Termux , (~95% parity with a desktop linux machine) it is entirely possible to even set up a window manager, however making it a pleasant experience is difficult.
iOS:
Apple devices are a lot trickier, apple really hides a lot of their system architecture on their phones neccessary to run any type of commands. Some scripting is possible as an in house feature with Shortcuts, I personally use this to automate a few of my common web tasks, as I am able to do light javascript scripting. Also, surprisingly apple devices support Python development very well, so if you are a python developer, happy days.
Both:
Internet is gaining far more accessibily, there are hotspots everywhere, and 3G/4G is mostly everywhere. Online, there are a number of available web based IDEs, and full programming environments, even code sandboxes for front end web devs. Also, you can even SSH/Remote desktop into your personal computer, accesss
Android
Android, it runs on a modified version of Linux, so the kernel strongly supports Linux emulation, woohoo. Android phones can be tinkered with and modified to your heart’s content. (if you know what you are doing)
So running a Linux emulator, is well. Pretty much the same as the desktop experience. Download an application called Termux. You can download pretty much all the same packages, as you would on a Linux machine. If you are a nut like me, you can even set up Vim to have all your favourite plugins.
Performance is obviously slower, so some plugins and packages are not as useable, but still is possible if you absolutely need it. For example, once I had written a program, and I had tests for it. But in a rush, I had committed to GitHub without checking if the tests passed. Panicking, and without a PC (as I was on the train somewhere) I was able to clone my get repository, run the tests and found they had not passed, but I was able to make a quick fix and tests had now passed, I then was able to amend my commit and push it back to the repository. All via Termux on my android phone.
Whilst I do not recommend doing large projects using your phone as your programming machine, it is still very fun creating small projects. I had made a snake clone web application whilst I was on an airplane, without any internet connection. It was thrilling. I preemptively downloaded the documentation I needed, and the tools I would need, such as the P5.js visual programming JavaScript library. It really sped up a 3 hour flight to Italy.
Also, I am not a mobile developer, but I can create Command Line Programs with ease. For one procrastination-esque project I wanted to learn as many digits of PI via random access memory. Like, what is the 50th digit of pi: [input answer]. Simple in nature, but also I could not find any existing solution, so I made my own CLI, and was able to run it via Termux and practice PI.
I very much recommend creating projects that you are genuinely interested in, not just another Todo list.
IOS
With an internet connection you are able to SSH into any machine, so you can still have the power of an entire Linux machine at your palm. You can also, remote desktop into your home computer via your device. You will be amazed at how powerful this now makes your device (performance may vary on device + internet speeds).
With remote desktop you can view your entire desktop windows. So all your desktop exclusive apps, are now available with just a bit of WiFi, and leaving your computer on, which may not be what you want to do every day, but useful when you know you may need to access files, or programs remotely.
The browser: there are a number of sites that exist now that allows you to SSH into a Linux machine. Or even run code in the browser. I.e codepen.io . If you have a physical Bluetooth keyboard, it’s pretty easy to work on your front end web design on the go.
With how available with WiFi is now, as well as 4G/5G, accessing these alternatives are pretty possible. Maybe not Airplane accessible, but hey. Maybe one day, or maybe something does exist and I have not yet found it.
On IOS, if are a python developer, you will be glad that Python works via apps such an Pythonista, Apple has not entirely closed the doors on developers.
Conclusion
I hope you enjoyed the blog. Maybe I am the only one crazy enough to program on my phone, or play CLI games on my phone. Or perhaps I have inspired you?