Difference Between IDE and Compiler

I recently had the opportunity to interact with a few Computer Science Major students (funny, I used to be one not long ago), and was shocked to see that they had difficulty differentiating between a compiler and an IDE! A lot of them thought that they were synonymous or there was very little distinction between them.Many also thought that Java could only be coded in Eclipse and nothing else. If these bright young minds have such misconception then surely a lot of people must have them. Therefore, here I am, humbly presenting my view and differentiating between the two totally different and not so related terms.

Compiler as well all know and love translates the source code from a higher language into a lower level language which is the Machine Language or the itsy bitsy junk which a computer understands. What it simply does is that it checks your code for syntactic and semantic errors and then line by line, translates it into Machine Language. But, did you know that you could compile a .cpp or .java file straight from straight from the command line as well in addition to those fancy editors like Eclipse and DEV C++? Probably not right?
But that’s right! You can do that! The ugly command prompt in Windows and the terminal in Linux are more powerful than you think and can do a lot more than you can probably imagine. All command line interfaces allow program compilation. And you don’t need an IDE every time you need to code and compile a language( though having an IDE is great help and we’ll get to that part later on).

Every language has its own compiler for example javac is a compiler for Java while the GCC compiler provides its compilation services for c++. Write a bit of java’s code in a file and save it in a file with the extension .java then in the Command Line Interface (CLI) navigate to where that file is residing and write “javac file.java” without quotes and file referring to the name of your java file. A file.class file will be generated after you type in this command after which you can write java file.class in the command prompt to get the output of the file on the screen. A similar set of steps exists for compiling the c++ code straight from the CLI but that is not a part of this post. (Google is my best friend and should be yours as well).

Moving on to the second part of the article we have the Integrated Development Environment (IDE), which is user friendly software that helps us developers in writing and maintaining our code which in turn makes our lives easier and keeps us from going crazy(nothing drives me crazy than awfully written code). Some IDE’s are useful as they can check for syntax errors while you code which saves a lot of hassle for us and we do have to compile the program every time to find the problems in our codes. Not only will the IDE do all the above steps itself while compiling programs, but it also provides some neat advantages over using regular word pad such as code completion, code insights, resource and project management, debugging which in turn lets us spend a better part of our time in actually coding than managing code.

Some examples of popular IDE’s are Visual Studio, Eclipse, Android Studio, Webstorm etc. The list is literally endless when it comes to listing down IDEs.

I hope this will be helpful for a lot of people who still have confusion! Please comment, if you know something else which I missed or stated incorrectly.

Thanks!

Advertisements

One thought on “Difference Between IDE and Compiler

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s