Open AIM Developer Challenge Highlights - Part 3
During my daily “RSS perusal”, I recently came across an intriguing post which glorified a certain application’s ability to quickly and easily test code snippets. When I encountered CodeRemote on the OpenAIM Developer Challenge site, it brought that statement back to my mind. Although it doesn’t happen every day, there are definitely occasions when it is helpful to pull out a small chunk of code and run it to see how it works. Having a quick and easily accessible method of doing that has actually come in handy more times than I anticipated. It’s one of those situations where you don’t realize something is missing until you find it. CodeRemote is a bot, submitted by velorien, which integrates a variety of compilers, allowing you to test code from one of 6 different languages. (C#/C++/PHP/Java/Perl/Python) In this post I will talk a bit about CodeRemote and how to use it.
Aside from the fact that it provides useful functionality, CodeRemote jumped out at me for another reason: it is a great example of a bot which does more than simply send and receive messages. I mentioned this in an earlier post, but one of the key aspects of Open AIM that the Developer Challenge intends to highlight is that it is more than simply an instant messaging protocol. There is incredible potential within the Open AIM platform to power a wide variety of solutions.
As is the case with all bots, add CodeRemote to your buddy list to get started. Send it a message and it will reply with instructions. For help, type help, and for a short tutorial, type tutorial. Usage is pretty simple, actually, which makes it that much more appealing. Simply upload the file or files that you wish to test, and run using the following command: run <language> <file>, where language is either csh(C#), cpp(C++), php, java, perl, or python, and file is one or more files separated by spaces. To demonstrate I created a simple example which uses two separate files: Secret.cs and Program.cs.
Image 1 - The code: Program.cs and Secret.cs

After uploading the files, I sent the message run csh Program.cs Secret.cs, producing the output shown in Image 2.
Image 2 - The Output

Note that the compiler targets C# 2005. If you’re using any of the newer language extensions, they won’t be supported at this time, as I discovered on the first run-through.
Image 3 - Compiler Error

Note also that there are a few limitations imposed on usage, which I’ll quickly run through. First of all, the files you upload are removed after 15 minutes, so if you wait too long you may need to re-upload them. Second, the files are limited to 20kb. Finally, the program can’t run for more than 3 seconds. Other than that usage is fairly straightforward, and really does result in a quick and easy means of testing small pieces of code.
My example uses C#, but the procedure is the same regardless of the language you are using. A recent addition to the bot is the tutorials. By sending tutorial to the bot, it will start a series of tutorials which will walk you through an example using each of the 6 supported languages.
Image 4 - Tutorial

In closing I will once again mention that CodeRemote is both a helpful little bot and a great example of expanding your thinking and finding unique ways to use Open AIM. Head over to the Open AIM Developer challenge site to check out more entries or to submit your own.
- joeltulloch's blog
- Login or register to post comments
- Subscribe
