Android, Airplanes, and Assembler: IDEOne
I spend a lot of time on airplanes. It used to be you'd often strike up a conversation with the person next to you on a plane. Over the years I met the editor of a newspaper in Roswell, New Mexico (and, yes, he was human as far as I could tell), an LA Laker Girl (no kidding), and many other interesting characters. But these days, you don't get much chance to visit with your flying neighbors because everyone has an iPod, or a laptop, or some other gadget to keep them busy.
I'm no exception. But when I look around at the others on the plane, I see most of them watching movies, listening to music, or playing games. Once in a while you'll see someone in a suit working on a spreadsheet or some PowerPoint charts. I wonder what people think when they see me writing C++ or Java code on the plane?
I like to code. Some music in the headphones for background noise and I'm coding away on the plane. No phone ringing off the hook. Often no e-mail, although more planes are getting WiFi now. I used to carry a netbook running Linux, so my old friends GCC and javac were right there on the plane with me. However, lately I've been carrying an Android tablet. I'd bet someone has GCC and Java tools that run native, but it would be a stretch.
So I find myself on an airplane, my seat mates all plugged into their devices and I'm surfing the Web using the plane's WiFi. I really wanted to play with a little algorithm that was dancing in my head, but I didn't have the netbook with me and my laptop is too big for a coach seat. Then I noticed something in the Android market: IDEOne.
A few minutes later I had IDEOne installed on the tablet. It turns out the application is a front end to the IDEOne website (http://www.ideone.com), which requires free registration. This website lets you enter source code and compile it in roughly 40 different languages ranging from Ada and awk to Visual Basic and Whitespace. Of course, C, C++, C#, Java, and many others are right there too.
Don't expect Eclipse. This is not made to be a production environment, but it is handy for testing a little snippet of code or demonstrations or training. I was having a conversation with someone about multiple inheritance in C++, for example, and fired up the IDEOne website to compile the following code (see the screenshot for how it looked online):
#include <iostream>
using namespace std;
class base1
{
public:
void p1(void) { cout<<"Object base1\n"; }
};
class base2
{
public:
void p2(void) { cout<<"Object base2\n"; }
};
class multi: public base1, public base2
{
public:
void print(void) { p1(); p2(); }
};
int main(int argc, char *argv[])
{
multi obj;
obj.p2();
obj.p1();
obj.print();
return 0;
}
The Android app is also great fun (hint: your password is your API key, not your login password, so create an API key when you create your account). With either the Android app or the website you can try out that FORTRAN code for sieving prime numbers that just can't wait until you get home!

