It has always been difficult for programmers to organize and work on projects across a variety of locations, computers, and devices – especially when you work in teams. When you store your code on one computer at one location, you become tied down to that one computer, finding yourself running back to that machine each time a you’re hit with coding inspiration. Worse, if you’re working in a team, each member of the team has to send their code to every other member, each step of the way, creating organizational distractions and unnecessary delays. This is the problem that online compilers have solved, and the programming world will never be the same.
With an online compiler, you can store your code online, allowing you the freedom to program from any computer (or device) with a connection to the internet. With an online compiler, you and your team can work on the exact same set of files, regardless of where your team members are, allowing you to work better as a team and keep your projects organized.
This article will cover:
- The benefits of using an online compiler
- Current limitations of online compilers, and also
- Help walk you through your first steps in using some of today's top online compilers such as Closure Compiler, ShiftEdit and Compilr.com.
Benefits of Using an Online Compiler
Code on the Road
Online IDEs have cut the number of tools you need tenfold – now, to access and edit your code, all you need is an internet connection. This allows you to access and edit your code from just about any computer worldwide, freeing you from the need to have constant access to a single computer where your files are stored.
Working on the online java compiler at the Compilr.com office.
Code in a Team
When working in a team, it’s essential to keep all team members on the same page, keep team members updated to the latest changes in code, and keep projects organized without a confusing jumble of different project versions stored on different computers. An online compiler allows a team to work on the exact same set of code, browsing files just as they would if they were stored on their local machine, marking the end of organizational hassles.
Ready to Go
Shipped with just about language/library/etc. you’ll ever need, online IDEs come ready to program out of the box. With an online IDE, you can get your projects up and running faster than ever by skipping over tedious installations, and getting right down to the programming of your project itself.
Use Any System
An online compiler stores your files in the cloud, and you access/edit these files with your browser. This means that you are now able to program for a wide selection of devices, without actually needing to go out and purchase them. You can write for Mac, Windows, and Linux or even an iPhone or iPad without spending the money on buying one of each.
Program with Any Device
Can you log into your online compiler with your Smartphone or tablet, and edit your code? Absolutely. It might seem a bit awkward to consider writing code on your iPhone or BlackBerry, but when you have a client demanding coding changes fast, you will be glad you can. With an online IDE, you can log in with your Smartphone, edit a project’s code, and have it sent off to your client in a matter of minutes.
In this screenshot, the Compilr interface has been set up as an online C compiler.
Some Current Limitations
As an emerging technology, today's online compilers are certainly not without their limitations. Most online compilers have yet to integrate the reliable version control capabilities which many of us will find necessary on production projects, however for the time being, most online compilers have integrated auto-save functionality to temporarily make up for lost ground. Auto-save functionality will save a back-up of your code as you work in case you loose your internet connection, but this will not overwrite your project's files, which will only be done when clicking "save".
Team collaboration can also still be a bit limited, though this is there area where online compilers likely stand to make the most impact on the way we code. Again to temporarily make up for lost ground, some online compilers have implemented a "public projects" feature, which will allow your fellow team members to view your code online and copy it into their own profile. In the future, as the development of online compilers becomes more advanced, we will undoubtably see better team collaboration functionality, allowing multiple team members to work on a single set of files without overwriting the changes of their team-members.
As the primary goal of any online compiler has been to replicate the feeling of programming on your own computer, care is taken to ensure that there are no significant changes when approaching programming on an online compiler vs. programming on your own computer.
Keep in mind that online compilers are an emerging technology and under active development. Rather than taking the current limitations of online compilers as a stumbling block to getting your feet wet with the technology, you should take it as a cue to dive right in. Find the online compiler that fits you best and get involved in that compiler's forums, make suggestions on what features you feel need to be implemented first, and help develop the online compiler platform. The beauty of online compilers is that their CEOs, marketing teams, and of course developers, all programmers just like you - they're more than eager to listen to your suggestions on developing their online compiler, and most importantly, they'll understand what you're talking about when you ask for a feature. Just to drive this point home, find your favorite online compiler and get involved - not for what it is, but for what it will be.
Choosing the Right Online Compiler
When choosing the right online compiler for your project, you need to ask yourself one simple question: what language / platform do I want to use? At the time of writing, there are a handful of online compilers / online IDEs that currently exist; luckily for you your decision on which online compiler to use has been made much easier by the fact that each of these online compilers, at least at the time of writing, seems to be specialized for a certain set of languages with relatively little overlap between products. In the future, there will likely be more direct competition between online compilers, however at present, the following compilers are your best bet for their respective languages.
Compilr.com is the best tool to use if you want an online compiler for Java, C#, VB.NET, or to work on the XNA platform.
ShiftEdit supports a range of web development languages, including PHP, Ruby, Python, and Perl among others.
Coderun is another good solution when working with PHP, AJAX applications, or working with ASP.NET.
Step One: Add a URL
Step Two: Choose Your Optimization
Closure allows you to choose from several optimization options before running your code through the compiler. Choosing "Whitespace only" will remove all whitespace and comments, but does not alter anything in your actual script. "Simple" will perform the same stripping, but also shorten the names of local variables to improve performance. Because it only works on local variables, the functionality of the script remains intact. "Advanced" will optimize your code better than just about anything else out there, but it can be touchy so before using it, it would be best to consider reviewing this article.
Step Three: Compile!
Hit "Compile" and watch your code shrink! If you have errors in your code, you'll be warned of them before getting an output, allowing you to ensure that your compiled code is not only small but of the highest quality possible.
Getting Started with ShiftEdit
ShiftEdit works best with web languages such as PHP, Ruby, Python, and Perl among others. To get started with ShiftEdit, head over to ShiftEdit.net.
Step One: Click Access ShiftEdit
After landing on the page, simply click "Access ShiftEdit" and log into the website; you can create a new account, or log in with your social network.
Step Two: Choose your language
Choose the language you want to code in. For this example, we've chosen PHP.
Step Three: Code!
After choosing your programming languages, you'll be greeted with a familiar code editing page, though unfortunately, the syntax highlighting of the application is still only in its early stages.
Creating Your First Project on Compilr.com
Compilr.com is an online compiler for Java, C#, and VB, with the recent addition of a online XNA capabilities as well. To get started using Compilr.com, point your browser to the following URL where you can sign up for a free account with Compilr: sign up for Compilr.com. Once you've signed up, with your free account you'll be able to create and store public projects on Compilr online IDE, accessing and editing your code from anywhere.
Step One: Select Create New Project
To begin creating your first project in Compilr, navigate to the sidebar and click "Create New Project". This will launch the new project screen where you can specify the details of your project.
Step Two: Select "Create New Project"
Once you have landed on the new project page, you'll be asked to specify the details of your project. The options on this page will depend on the programming language you have decided to use in your project, whether it be C#, C++, VB.NET, or Java. You will also be able to choose XNA, or another language platform. Once you have selected the specifics of your project, click "Create Project".
Step Three: View your Project, and Open it in the Online IDE
Once your project has been created, you will be able to view it, and if it is a public project, the Compilr community will be able to view the project and vote on its quality as well. To view your project and begin editing and compiling your code online, click the "Open in IDE" button.
Step Four: Get Programming!
You're up an running! You now have a project stored online, where you can compile your Java, C#, and VB.NET code from any web browser. To get started with the IDE and have a look at some example code, click the example file that is displayed in the file directory on the right hand side of the page.
Online Compilers / Online IDEs have changed the way we programmers do business – at least those who’ve had the foresight to make the switch. By storing and editing your code in the cloud, you’re able to code better, faster, and more efficiently. An online compiler is one of the most essential tools in the modern programmer’s tool belt, and if you want to stay ahead of the game; it is about time you bring your code into the 21st century. Online compilers may yet need a bit of work before they become the tools they're capable of, but the best way to get them there is to find the best compiler for you, and get involved in that online compiler's community.
- 26th May, 2011: Initial post