Aug 042014
 

If you love coding but hate having to boot up your computer everytime you wish to write, compile or interpret code, maybe you are forgetting that little computer in your pocket. Yes, your android phone! 1 GHz processors and 512+ RAM is far superior to the configuration people used to work with only a few years back.

In this article we will look at how you can write, compile and run your C code on your Android device. There are two basic things that you need a) The Editor and b) The Compiler.  But before we discuss editors and compilers, you would ask “How on earth am I going to write code using the stock android keyboard?”.

Code Keyboards On Android

Well here is the good news for you, there are many specialized keyboards available on the Play Store meant for coding and  development usage.

Programmer Keyboard


If you have a really big screen, preferably a tablet, the programmer keyboard will work well for you. There are two modes available: big keyboard and full keyboard. Full Keyboard is preferable if you’ve got a tablet. On the other hand, Big Keyboard allows for toggling between two views, containing normal letters and special characters that are usually used for programming. Overall, this keyboard is perfect for tablets with it’s full keyboard mode on. It gives a geeky look to your tablet, and makes programming more fun.

Programmer’s Keyboard


The programmer’s keyboard is better for small / medium sized screens. This keyboard too, provides a toggle between regular keys and special characters(used for programming). If you are really good at texting, coding will be fun with this one.

Hacker’s Keyboard


The hacker’s keyboard is by far the best one that I have used for coding. Also it’s the one I am currently using. The keys are placed exactly where you expect them to be. While working on the Linux terminal on my device, I found the tab key and up-down keys right where they are supposed to be on a physical qwerty keyboards. Braces(curly as well as round) are placed at intuitive positions. Fast double-tap on Shift enables caps-lock. This helps me while defining macros. There is a toggle functionality available for other important things like numbers which are anyway available in both the views, but in different formations. Not just this, but there are language plugins available too. All in all, the Hacker’s Keyboard is the best keyboard around.

Now that we have our keyboard ready, let’s get back to evaluating the compilers and editors.

Compilers/Editors :

While choosing an editor, you need to look for the following features: a) Color coding b) Auto completion c) Auto spacing. (brackets matching). While I tried out many compilers, I found that many of them were buggy and didn;t quite work for me. The two that did work well were CodePad and C4Droid.

CodePad2

CodePad2 is impressive, but comes with a catch. The “free” or the “lite” version doesn’t allow you to write your own programs. You can only see,compile and edit sample codes given by app. Pro version of CodePad2 allows you to create new files(programs). The GCC plugin however is free. The thing that I loved about CodePad2 was the urban color coding it provided.

C4droid – C/C++ compiler & IDE

C4Droid – GCC plugin for C4droid

The C Editor and Compiler that I recommend is C4Droid . The developers provide active support for the app and it is not too expensive. C4Droid comes with GCC plug-in which is free along with the original purchase. There are other important plugins available with this particular C editor such as SDL plug-in etc. You can even compile your code online in your browser.

For other scripting languages like Python and Ruby, the interpreters are available. For example Ruboto is the best irb (interactive Ruby environment) out there, focused on JRuby, that I use.

Summary

There are many free keyboards, editors and compilers available online, however my trials suggested that the free ones are not comparable to the paid products.  Hacker’s Keyboard is my keyboard of choice, and for C programming on Android, C4Droid is the best way to go, with wide technology support & developers’ support.

Call For Speakers IndicThreads Software Development Conference, Pune, India
The following two tabs change content below.
Chaitany Nimkar

Chaitany Nimkar

Chaitany Nimkar is studying for his Masters in Computer Applications at Symbiosis Institute of Computer Studies and Research. He is part of the Spoken Tutorials project and Technical Head at Google Student Club at SICSR.
Chaitany Nimkar

Latest posts by Chaitany Nimkar (see all)