It turns out you can actually code on Android productively. For the longest time, it has been accepted that whilst computers are for productivity and creativity, Tablets exist purely to allow the passive consumption of content.
I believed that as well. I’m a software developer by trade, and I use a 13″ Macbook Pro to write all my code. I wouldn’t have it any other way. OS X comes with everything I need to be productive as a developer, and I’ve built my workflow around that.
Android on the other hand? I’ve never really thought about writing code on Android. Using a ghastly virtual keyboard to write a Facebook status update is bad enough. Writing code on Android? Perish the thought. It doesn’t even have a built-in file manager!
But then I bought a decent Bluetooth keyboard , and everything changed. I’ve now built a PHP development environment around my 2012 Nexus 7 tablet, and I love it. Here’s how it works.
The text editor is the cornerstone of any development environment. It should go without saying that discussing the merits of an individual text editor can be a hugely contentious topic in the development community. Indeed, the rivalry between fans of the Vi/Vim and Emacs text editors is referred to as the Editor War.
I’m firmly in the Vim camp . This powerful text editor is installed by default on OS X and most Linux distributions, and makes it easy to rapidly and accurately edit large documents and code files.
For something that is fundamentally keyboard oriented, I was surprised to see that someone had implemented Vim for the Android platform. This comes in the form of VimTouch. I don’t do hyperbole, but this might actually be the best Android text editor on the market.
What makes it so good? It comes with numerous plugins, including syntax highlighting which is especially handy for those of us who use a text editor to edit code. It’s also hugely customizable, and adapts Vim to be usable on a touchscreen whilst remaining faithful to the original Vim philosophy.
Vim addicts will know that Vim is customizable through something called a ‘.vimrc’ file. Whilst VimTouch makes it easy to add features and behavior through a nice touch-friendly interface, you should know that you can still customize things by editing a .vimrc configuration file, as you would on a normal computer.
VimTouch is free from the Google Play store [No Longer Available], and is licensed under an Apache 2.0 Open Source license.
I Love LAMP
LAMP stands for Linux, Apache, MySQL and PHP, and is one of the more popular server configurations for people who develop PHP based web applications.
It runs a slightly Welsh-sounding server configuration called LLMP. This isn’t too different to LAMP, except Apache – which is notoriously heavy – has been replaced with Lighttpd. I was pretty impressed to see that all constituent parts of Palapa Web Server are reasonably current, with the installation of the PHP programming language being the latest version.
The version of MySQL is pretty current, too. With that said, there’s no obvious way to interact with it by means of the command line. Fortunately, Palapa comes baked in with a copy of PHPMyAdmin. Granted, it’s not my preferred way of dealing with MySQL, but it works well enough.
There’s also a web interface where you can configure certain aspects of the web server, including the database and the installation of PHP. For some reason unbeknown to me, the default timezone in pretty much everything is Asia/Jakarta. If you’re not actually in Indonesia, you might want to change that.
You’re probably wondering if Palapa actually works. Well, the answer is yes. Yes, it does. Rather well, actually.
I should also mention that if you have Palapa installed on your device, you’ll have all you need to run a local install of WordPress on your tablet or smartphone. Crazy, right?
I’m catching a flight tomorrow. It’s not a long one, but it’s long enough for me to get some work done.
I normally would have taken my Macbook Pro with me. I would taken it out of my bag and let it be swabbed as I went through security. And when my flight took off, I would have perched it awkwardly on the little drop-down table, sat precariously next to my £4 cup of black airline coffee.
But now I don’t need to do that. Android has done the unthinkable, and replaced my trusty Laptop for something it previously didn’t excel at: Web development. That’s not to say that using Android as my main development platform doesn’t have its limitations. I’m yet to work out how to install PHP extensions in Palapa, and using a 7″ screen for too long can be quite painful.
Do you use Android as your development platform? What’s your setup like? Let me know in the comments below.