Saturday 21 September 2013

How do you run programs?

So you have just seen the code for the Hello World program. But you wanna run it on your machine. You have some options

Online Compilers:

Some online compilers are available. You just write code in them and then run it and see the output. You can use this to test out small snippets of code but writing big projects, Though possible, may not be the best practice. And moreover, Most of the code on these online compilers is available to everyone which will not make much difference to you, if you are a beginner. But if you are writing an application, you don't want the code to be public. At least not until the whole of the project is completed. So, I will say that this is not a good option. But if you are inclined to try one, Feel free to do so. IDEone is one of the most popular online compilers.

IDE's:

Integrated development editors(IDE's) are the complete package. They often come with some fancy features. Code completion, Automatic indentation are some of these features! As a beginner, this is the best option for you. I would recommend Code::blocks. It is a cross platform IDE that uses GCC as its compiler. The Compiler comes bundled with the binary release. And it is a good IDE. It has a C and C++ compiler bundled. And it will do for all the programs that we will be running.

This is the link to the download page of Code::blocks. You can download the relevant binary based on your platform.

Editors:

Code editors, they are very commonly used. They don't have the compiler built into them. But they have a lot of features like code highlighting, code completion, code indentation, soft rendering etc that make coding really "healthy"! Generally, I prefer to write code in such ediors and then use some compiler to compile them. You can use IDE's too. But when you move on to writing long programs I would say that you should use editors. As they will make your life a lot better. I love GNU Emacs and Sublime Text 2. Both these are completely free and are amazing editors with support for syntax highlighting of about a couple dozen languages or more!


No comments:

Post a Comment