Tuesday, December 14, 2010

Project 5 - Interpreters and compilers

It's important to find the right interpreter and/or the right compiler for the job. In order to accomplish this there are five important questions you must ask yourself. First, in what language will you be working? Second, in what platform will you be working? Third, how much time do you have? Fourth, what level of quality do you want? Fifth, how much you are willing to pay?

First things first, what are interpreters and compliers? Interpreters are a form of software that translates source code, more commonly as a language, into a file or program that can immediately be executed and evaluated. Compliers are a form of software that translates languages into binary code. Binary code is required to allow computer hardware to process or execute the language.

A language has particular set of rules one must follow in order for the code to properly function. BASIC, PASCAL, C and C++ are each a language with detailed rules.

In what language will you be working?

There is a multitude of compilers available for each programming language. Depending on the language in which you are programming, there are some compilers of which you may have heard before.

For example, some commonly referenced Basic compilers include Visual Basic and Quick Basic (not to be confused with QBasic), which are both developed by Microsoft. Liberty Basic is used within SAMS Teach Yourself Basic book, within the rather popular series of books.

In what platform will you be working?

Just like some languages, compilers come compatible with only certain operating systems (OSs). When searching for a compiler, it is important to reference whether they are designed in support of your intended operating system. This is especially important of compilers that you may purchase. There is nothing is worse than buying a round peg, only to realize you are dealing with a square hole.

How much time do you have?

Interpreters are not a bad option for quickly translating a file; however, the code tends to run much slower, as an interpreter must look at each line of code and then run it. This is to say that interpreters have their place. They are a great way to test code and debug it, rather than waiting for a compiler to compile the code and run it before being able to debug it.

Compilers will take more time to translate the code, but once done, you have a faster moving program.

How much you are willing to pay?

The great thing about the internet is that you can get almost anything for free, if you are willing to look for it. Why would anyone choose to pay for something that they can get for free? Well, when something is free, it tends not to be of the same quality of something for which one must pay.

A user can choose to purchase a proprietary compiler, but this usually means adhering to restrictions place on the compiler via a EULA (End User License Agreement). Often, this means that there are limits how the product can be used. The user can opt for open source compilers. These tend to be your free compilers, and do not have any real restrictions on how they are used. This is different than freeware. While freeware is free (as its name states), it can still have restrictions on how it is being used.

Side Note: If you wish to learn the difference between freeware and open source software, you can go to http://en.wikipedia.org/wiki/Open-source_software.

When it comes down to it, the option that best addresses those 5 questions should be the choice with which you proceed.

No comments:

Post a Comment