Thursday, December 16, 2010

Program 12 (ABC) - Program Test Data, Debugging and Termination: Program Termination and Return Codes



I selected Java, Visual C++, and Ruby for this assignment. I am somewhat familiar with Java, having just completed a introductory course. However I for this assignment I have referenced the expert official developer sources for each of these languages to find the best information on testing, debugging, and program error codes.

JAVA
For Java, I went to the following website: http://www.parasoft.com/jsp/products/article.jsp?articleId=3108, as well as Java Sun's website. The following passage is from Parasoft:

Static Code Analysis, Data Flow Analysis, Unit Testing, Runtime Error Detection, and Code Review

Software verification techniques such as pattern-based static code analysis, runtime error detection, unit testing, and flow analysis are all valuable techniques for finding bugs in Java programs. On its own, each technique can help you find specific types of errors. However, if you restrict yourself to applying just one or some of these techniques in isolation, you risk having bugs that slip through the cracks. A safer, more effective strategy is to use all of these complementary techniques in concert. This establishes a bulletproof framework that helps you find bugs which are likely to evade specific techniques. It also creates an environment that helps you find functional problems, which can be the most critical and difficult to detect.

Development can try to debug it, but debugging on the production server is time-consuming and tedious. They would need to step through each statement of business logic as it executes in hopes of spotting the point where the runtime behavior deviates from their plan. Even if they find the point where plan and reality diverge, the underlying cause may not be apparent. Alternatively, they might apply certain tools or techniques proven to pinpoint errors automatically.

At this point, the developers can start crossing their fingers as they try to debug the application with the debugger. Or, they can apply an automated testing strategy in order to peel errors out of the code. If the application is still not working after they try the automated techniques, they can then go to the debugger as a last resort. The Java manual at Sun.com, provide the following instructions for testing.”

This passage makes the argument that all programmers need a separate debugging application (which ParaSoft sells) to find all the errors. However, according to Java.Sun.com, everything needed for debugging is already in the Java language library itself. Detailed instructions on running a test from the Java.Sun.com Java Developer’s Manual follow:

JAVA MAIN() TESTING
“A common way that many Java developers exercise objects is to create a main method
that instantiates an instance of the class, and performs a series of checks to ensure that
the object is behaving as desired. For example, in our HtmlDocument class we define
a main method as:

public static void main(String args[]) throws Exception {
HtmlDocument doc = new HtmlDocument(new File(args[0]));
System.out.println("Title = " + doc.getTitle());
System.out.println("Body = " + doc.getBodyText());
}

We are then able to run the program from the command-line, with the proper classpath
set:

java org.example.antbook.ant.lucene.HtmlDocument
test/org/example/antbook/ant/lucene/test.html
Using Ant as a Java program launcher, we can run it with the <java> task:

<java classname="org.example.antbook.ant.lucene.HtmlDocument">
<arg value="test/org/example/antbook/ant/lucene/test.html"/>
<classpath refid="test.classpath"/>
</java>

Writing main method checks is convenient because all Java IDEs provide the ability
to compile and run the class in the current buffer, and certainly have their place for
exercising an object’s capability. There are, however, some issues with this approach
that make it ineffective as a comprehensive test framework:

• There is no explicit concept of a test passing or failing. Typically, the program
outputs messages simply with System.out.println; the user has to look at
this and decide if it is correct.
• main has access to protected and private members and methods. While
you may want to test the inner workings of a class may be desired, many tests
are really about testing an object’s interface to the outside world.
• There is no mechanism to collect results in a structured fashion.
• There is no replicability. After each test run, a person has to examine and interpret
the results.”


VISUAL C++
For Information on Visual C++, I went to the Microsoft Developer’s website. There are several ways to perform tests and debugging in Visual C++ the following passages outline just two methods from the official Developer website:

“Using Assert Statements in Unit Tests
By default, each generated unit test calls the Inconclusive method, which causes the test to fail because the test is still essentially unimplemented. Your next step is to add meaningful code to check the correct operation of the method being tested. A typical way to do this is to generate a value and then compare it with an expected value by using an Assert.AreEqual statement. For an example, see "Unit Test Example" in Structure of Unit Tests. Newly generated unit tests contain "To-do" comments that suggest changes to make.
A unit test that contains no Assert statement automatically passes as long as it does not time out and does not throw an unexpected exception. For more information, see Basic Test Results and Using the Assert Classes.

Opening and Authoring Unit Tests
This topic contains two procedures:
·             The first procedure describes how to edit an existing unit test. You typically do this to prepare a unit test that has been generated automatically. See How to: Generate a Unit Test.
·             The second procedure describes how to create and author a unit test by hand.

To edit an existing unit test

1.       In your test project in Solution Explorer, locate and open the file that contains the unit test, and then locate the unit test method that you want to edit.
- or -
In Test View, double-click the unit test; this opens the file that contains the unit test and scrolls to the unit test method.
2.       Locate the variable assignments in the method.
In newly generated tests, variable assignments are marked by "To-Do" statements that remind you to customize the assignments. For example, the following is a typical assignment that needs to be edited:
string target.owner = null; // TODO: Initialize to an appropriate value
3.       Assign an appropriate value to each variable.
To know what values are appropriate, consider the values that these variables may be initialized to before the method is called, the changes they may undergo when the method is called, and the results you expect. For an example of this process, see the procedure Run and Edit a Unit Test in Walkthrough: Creating and Running Unit Tests.
4.       Locate and edit the Assert statements in the method. If necessary, add additional Assert statements.
The Unit Testing Framework provides numerous additional Assert classes and methods that give you flexibility in writing useful Assert statements. For more information, see Unit Testing Framework.

To create a unit test by typing it in

1.       In Solution Explorer, right-click a test project, point to Add, and click New Test.
- or -
Right-click the surface of the Test View window and then click New Test.
This displays the Add New Test dialog box.
2.       Under Templates, click Unit Test and then click OK.
A new source code file with a name such as UnitTest1.cs is added to your test project, in the language of the test project. This file contains several things that unit tests require:
·             It references the Microsoft.VisualStudio.TestTools.UnitTesting namespace and the System namespace.
·             It defines its own namespace, which contains a test class. Test classes have the [TestClass] attribute.
·             It contains an initialization method and a cleanup method. These methods have the [TestInitialize()] and [TestCleanup()] attributes, respectively.
·             It contains one empty test method, with a [TestMethod] attribute. It is here that you add your test logic. This method has a default name such as TestMethod1().
This file is also opened in the window for editing source code. The new (empty) test method is displayed in the Test View and Test Manager windows.
3.       Add test code to the test method.

The Unit Testing Framework provides numerous additional Assert classes and methods that give you flexibility in writing useful Assert statements. “


RUBY
Ruby provides a testing tool called TestUnit. It seems to be the most simple of all the different languages I have listed above. The Ruby website, has a one page process on how to run the test. The passage below outlines their instructions:

"Test::Unit wraps up a collection of test methods together and allows you to easily set up and tear down the same test fixture for each test. This is done by overriding setup and/or teardown, which will be called before and after each test method that is run. The TestCase also knows how to collect the results of your assertions into a Test::Unit::TestResult, which can then be reported back to you… but I‘m getting ahead of myself. To write a test, follow these steps:
References:

http://java.sun.com/developer/Books/javaprogramming/ant/ant_chap04.pdf

http://www.parasoft.com/jsp/products/article.jsp?articleId=3108
http://msdn.microsoft.com/en-us/library/ms243171(VS.80).aspx
http://www.ruby-doc.org/stdlib/libdoc/test/unit/rdoc/classes/Test/Unit.html



  • Make sure Test::Unit is in your library path.
  • require ‘test/unit’ in your test script.
  • Create a class that subclasses Test::Unit::TestCase.
  • Add a method that begins with "test" to your class.
  • Make assertions in your test method.
  • Optionally define setup and/or teardown to set up and/or tear down your common test fixture.
  • You can now run your test as you would any other Ruby script… try it and see!
A really simple test might look like this (setup and teardown are commented out to indicate that they are completely optional):
    require 'test/unit'

    class TC_MyTest < Test::Unit::TestCase
      # def setup
      # end

      # def teardown
      # end

      def test_fail
        assert(false, 'Assertion was false.')
      end
    end

Test Runners

So, now you have this great test class, but you still need a way to run it and view any failures that occur during the run. This is where Test::Unit::UI::Console::TestRunner (and others, such as Test::Unit::UI::GTK::TestRunner) comes into play. The console test runner is automatically invoked for you if you require ‘test/unit’ and simply run the file. To use another runner, or to manually invoke a runner, simply call its run class method and pass in an object that responds to the suite message with a Test::Unit::TestSuite. This can be as simple as passing in your TestCase class (which has a class suite method). It might look something like this:
   require 'test/unit/ui/console/testrunner'
   Test::Unit::UI::Console::TestRunner.run(TC_MyTest)

Test Suite

As more and more unit tests accumulate for a given project, it becomes a real drag running them one at a time, and it also introduces the potential to overlook a failing test because you forget to run it. Suddenly it becomes very handy that the TestRunners can take any object that returns a Test::Unit::TestSuite in response to a suite method. The TestSuite can, in turn, contain other TestSuites or individual tests (typically created by a TestCase). In other words, you can easily wrap up a group of TestCases and TestSuites like this:

 require 'test/unit/testsuite'
 require 'tc_myfirsttests'
 require 'tc_moretestsbyme'
 require 'ts_anothersetoftests'

 class TS_MyTests
   def self.suite
     suite = Test::Unit::TestSuite.new
     suite << TC_MyFirstTests.suite
     suite << TC_MoreTestsByMe.suite
     suite << TS_AnotherSetOfTests.suite
     return suite
   end
 end
 Test::Unit::UI::Console::TestRunner.run(TS_MyTests)

Now, this is a bit cumbersome, so Test::Unit does a little bit more for you, by wrapping these up automatically when you require ‘test/unit’. What does this mean? It means you could write the above test case like this instead:

 require 'test/unit'
 require 'tc_myfirsttests'
 require 'tc_moretestsbyme'
 require 'ts_anothersetoftests'

Test::Unit is smart enough to find all the test cases existing in the ObjectSpace and wrap them up into a suite for you. It then runs the dynamic suite using the console TestRunner.

To create a excellent large scale program, unit testing and debugging is a essential practice. As part of this process, the programmer needs to be familar with the termination and return codes and how to find the location and correct the syntax or other errors. Fortunately, these languages have extensive libraries and documentation sites that help with the development and testing process.

Project 11 - Cohesion and Coupling


The next problem solving technique is Cohesion and Coupling. These terms are often contrasted with one another. They have an inverse relationship. Low coupling equals high cohesion and vice versa. According to Wikipedia, “Low coupling is often a sign of a well-structured computer system and a good design, and when combined with high cohesion, supports the general goals of high readability and maintainability.” Cohesion is defined as a measure of the internal statement of a method serve to accomplish the method’s purpose. Coupling is the degree to which one program module depends on the methods of another. In programming this can be seen in a simple Java color bar tool. I recently had to complete this color bar as a final assignment for my Java class. The first part of the program built the individual bars and color ranges with a color selector sliding bar. The second part of the program was tightly coupled with the first in that it really depended much on the methods in my first program. It did this by creating a swatch that showed the colors of various blends of blue, red, and green. Unfortunately, because this was so tightly coupled, a simple typo in my first program caused me major headaches in the second.

It’s very difficult for me to think of how this relates in real life. There are many inverse relationships in real life of course but with cohesion and coupling? I suppose a group of students studying for a test would show this relationship. One wants to have a high cohesion value when it comes to knowing the material at hand, and you would want to have a low coupling with the other students tests results. In other words one would not want other students grades and abilities affecting their own grades because you never know how well or not well others are doing academically. In terms of cohesion, in this scenario, since cohesion is defined as a measure of the internal statement of a method serve to accomplish the method’s purpose, assuming the method is “get an A on the final”. You would want the cohesion to be high.

References:
http://en.wikipedia.org/wiki/Coupling_(computer_science)

Project 11: Top Down Design

This project relates to seven types of problem solving techniques. I will discuss each in a series of postings. The first type of problem solving technique is Top-Down Design, also called step-wise design. It essentially breaks down a problem into smaller modules. This requires a full understanding of the problem. Each sub module further deduces a problem into it’s simplest forms. So, that being said, the first step is to identify the problem (or need) it’s most general form. After that, it is further broken into sections and solved even further until all aspects of the problem or need are identified. Then and only then is the architecture and coding performed. For example, a doctor’s office may want to have patient information and demographics available for use before the patient’s first appointment. This would be the general problem (or need). Then after more analyses, all the factors and sub-problems would be identified and each broken down further and further. For example, all the way from what type of application to have the patients enter their information into to what should the GUI look like and what type of encryption should the data have. Then how will the doctor’s office import it to their database or will if flow over via an interface? So with this type of scenario the program designer  would really need to be familiar with the whole process as it is today and what the clients end goals are. Here is what Wikipedia says in regards to this type of design:

In a top-down approach an overview of the system is formulated, specifying but not detailing any first-level subsystems. Each subsystem is then refined in yet greater detail, sometimes in many additional subsystem levels, until the entire specification is reduced to base elements. A top-down model is often specified with the assistance of "black boxes", these make it easier to manipulate. However, black boxes may fail to elucidate elementary mechanisms or be detailed enough to realistically validate the model.”

Of course, using the Top-Down design works in real life situations as well. I use it all the time when grocery shopping.  The first step I take is to envision what I would like to make for dinner for each day of the week. I write it on a paper. Then based on each dish, I list the various ingredients I will need. Then I see if we have those available already or if they need to be purchased, I make a note of what store I should buy them at for the best quality and price. I then might make another list that broken down by store, so that I do not have to make special trips if I forget anything. Of course little “bugs” may arise in real life too. Many times, Trader Joes is out of something I consider a staple so I have to re-evaluate or” recompile” the list and make another acceptable decision.

References:
. 

Project 10: Control Structures

A structure is a basic unit of programming logic. In computer programming, there are four basic control structures. They are Sequence, Selection, Loop and Unconditional Branch. With these structures alone, you can program any task from very complex to easy conversion of temperature.

Sequence Structure
According to Webopedia, "in a sequence structure, an action, or event, leads to the next ordered action in a predetermined order. The sequence can contain any number of actions, but no actions can be skipped in the sequence. The program, when run, must perform each action in order with no possibility of skipping an action or branching off to another action. "

The following chart depicting the Sequence Structure was obtained from: http://web.gccaz.edu/~gmarrer/cis150abbb/lessons/lesson4/lesson45.html






Selection Structure
According to Webopedia, "in a selection structure, a question is asked, and depending on the answer, the program takes one of two courses of action, after which the program moves on to the next event.
This structure is sometimes referred to as an if-then-else because it directs the program to perform in this way: If Condition A is True then perform Action X else perform Action Y. "

The following chart depicting the Selection Structure was obtained from: http://www.logiccoder.com/Tutorial/FlowchartTutorial00.htm




Loop Structure
According to webopedia, "in a loop structure, the program asks a question, and if the answer requires an action, it is performed and the original question is asked again until the answer is such that the action is no longer required. For example, a program written to compute a company??s weekly payroll for each individual employee will begin by computing the wages of one employee and continue performing that action in a loop until there are no more employee wages to be computed, and only then will the program move on to its next action. Each pass through the loop is called an iteration. Loops constitute one of the most basic and powerful programming concepts."

The following chart depicting the Selection Structure was obtained from: http://www.google.com/images


Unconditional Branch Structure
I did not find much information on the Unconditional Branch, but this is what Wikipedia writes: “A branch (or jump on some computer architectures, ) is a point in a computer program where the flow of control is altered. The term branch is usually used when referring to a program written in machine code or assembly language; in a high-level programming language, branches usually take the form of conditional statements, subroutine calls or GOTO statements. An instruction that causes a branch, a branch instruction, can be taken or not taken: if a branch is not taken, the flow of control is unchanged and the next instruction to be executed is the instruction immediately following the current instruction in memory; if taken, the next instruction to be executed is an instruction at some other place in memory.”

The following chart depicting the Branch Structure was obtained from: http://www.google.com/images



References:
http://en.wikipedia.org/wiki/Branch_%28computer_science%29





Project 8 - Source Code vs. Executable Code

For this assignment, the following four articles relating to source code, executable code, interpreters, and compilers were read:


According to the article by David S. Touretzkey, the perceived and often taught differences between source code and executable do not really exist. They have just been taught as an easy way for non programmers to understand the process. According to David S. Touretzkey, people can read machine language, it’s just not very easy or efficient to do so. Also, machines can in turn, execute source code it would just take a very long time to do.

The webopedia article, about source code, listed above gives this concise description of the process:
“Initially, a programmer writes a program in a particular programming language. This form of the program is called the source program, or more generically, source code. To execute the program, however, the programmer must translate it into machine language, the language that the computer understands. The first step of this translation process is usually performed by a utility called a compiler. The compiler translates the source code into a form called object code. Sometimes the object code is the same as machine code; sometimes it needs to be translated into machine language by a utility called an assembler.”
The process can be confusing for a lay person so I have “compiled” an analogy to everyday life that may help beginners to understand. First off, let’s say a very intellectual Latin speaking professor decided to write a book for toddlers on a subject like learning shapes. This very high level professor might write a book in Latin that is very eloquent and has lots of multi-syllable words and many layers descriptions, procedures, and instructions. Well, when his children’s book editor receives the first copy, they realize that very few toddlers if any would be able to understand the original (Source Code) draft of the book. Some might eventually be able to understand the book , but it would take them a long time. So, the editor decides to commission a person who speaks Latin and English. This person’s role will not only be to translate the language, but break it down into lower level terms that a toddler can understand. In the scenario I just described, the book the Latin professor writes would be akin to the C++ language. The children’s book editor recruited another person to interpret and compile a simple toddler’s book. The end result would be like an executable program in machine language.

Wednesday, December 15, 2010

Project 9 - Data structures and Data Representation


Global Variable:  A variable that can be modified by any part of a program or all functions/blocks/sections of a program. They are considered hazardous because they can cause confusion and take up memory space.

Local Variable: A variable in a program that is accessible only in the section/block/function of a program that it was declared in. Can’t be accessed or modified by other parts of the program.

Elementary Data Types

Character – represents single characters. Can be letters, numbers, or special characters.

String: A sequence of characters, variable length, usually has to be enclosed in double quotation marks.

Integer: represents whole numbers without a decimal part, holds 32-bit integers

Floating: represents numbers values with decimal parts.

Boolean: true or false values derived from logical expressions.


Data Identifier (name): The name of an entity or variable.
Its Data Type: The data type could be integer, character, or string.
Its Memory Address: This is where the data is stored. It is not the data itself.
The Actual Data: The actual data itself is whatever the use inputs.
A Variable: a piece of information that can change and is determined by the data., has a named memory location and data type.
Literal: values that do not change in value.
Constant: a variable with a value that cannot be altered during execution.

Number Base Systems:

BASE 2 – Also called Binary, Each number occupies a place value. When 1 is reached, the value goes to 0 and 1 is added to the next place value. 0,1,10,11,100,101,110,111,1000,etc.

BASE 10 – This is the system we use in everyday life; a decimal numbering system where the numbers represented are 0 thru 9 then as the value increases with each set of ten, the 1-9 sequence begins again. 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23etc

BASE 16 – Also called hexadecimal, It uses sixteen distinct symbols, most often the symbols 09 to represent values zero to nine, and A, B, C, D, E, F (or alternatively a to f) to represent values ten to fifteen

Floating Point – A number system for values that are too small and too large for regular integers. Similar to scientific notation.

Decimal data point – can store a max of 38 digits to the right of the decimal. Stores exact number.


Relative Address: a memory address range, specified from its distance from another address.

Data Types and Data Abstraction
•File – a group of records grouped together for a logical reason.
•Record – a group of fields grouped together for a logical reason.
•Array – a series of variables in a computers memory, all with the     same name.

Book – Programming Logic and Design – Joyce Farrel

Language Statements

Natural Language: language that is used and spoken by humans in everyday life. Computers cannot understand this language.

Artificial Language Statements: language that has been deliberately arranged and planned or created by a person or group over a short period of time.

Input/Output Statements: These give direction to what types of data will be input (and how) and what the outcome will be and how it will be presented.

Assignment Statements: A statement that stores the result of any calculation to a particular memory location.

Program Design Language: PDL expresses the steps of an algorithm.
1.      Syntax Diagrams – a flow chart tool that represents the steps of the algorithim.
2.      BNF – Backus Naur Form, a way of showing algorithm and programming structure and syntax without using the particular language. A type of format.

Espressions Components
Operators Operands and Results:
1.      Unary – this operator accepts only one operand
2.      Binary – accepts two operands




Simple Types:
1.      Arithmatic: used to perform familiar aarithmatic operations that invole calculation of numerical values.
2.      Logical: compare Boolean expressions and give a true or false result.
3.      Relational: express relationships such as greater than, less than, equal to, etc.

Results:
Unconditional: results that are not based on distinct Boolean statements.
Boolean: true or false – either the conditions or method statements were true or they were not true.
http://msdn.microsoft.com/en-us/library/b6ex274z(VS.71).aspx













Friday, December 10, 2010

Project 7: GUI Object Oriented Languages

For this assignment we were instructed to read three web articles, Getting Started With the NetBeans IDE BlueJ Plugin, GUI Alternatives, and Visual Basic from Wikipedia, then explain which GUI language is best for developing a simple game.  In order for a developer to select the appropriate language or (GUI tool) from the many that are out there, he or she first has to have a good idea of what they are aiming to create. This is done is the design phase of a project. So for this assignment I assumed “simple game” to be something like tick-tack-toe or solitaire for a desktop vs. a phone.  Then, after reading the articles and learning more about BlueJ and Netbeans, I would choose to use Java with the BlueJ Netbeans plug-in IDE. For me, it is the best guided user interface (GUI) for developing a simple game.
           
BlueJ is an integrated development environment (IDE) that was specifically developed to teach students Java programming focusing on teaching the relationships between objects, classes, and methods, without bogging the new user down with learning a complicated IDE or having to learn syntax right off the bat. Netbeans is a professional IDE that is well received in the developer community. It works with other programming languages in addition to Java. These two programs teamed up together in 2006 in the Netbeans BlueJ Plug-in and seem like a great match.

According to the Getting Started With the NetBeans IDE BlueJ Plugin with the key benefits of this IDE are:
“The NetBeans IDE provides a wealth of features that make writing applications of all types and sizes faster and easier. These features include the following:
  • Marking of syntax errors in the Source Editor before you compile
  • A variety of navigation commands that enable you to navigate easily between code elements and files
  • A GUI builder in which you visually design the user interfaces for Swing technology-based desktop applications
  • Code templates that allow you to enter long code snippets with just a few keystrokes”
I like that one can drag and drop the design elements in a design view and then view the actual source code in the code view. I use Dreamweaver a lot for web design so that WYSIWYG aspect is familiar as well as it's use of palettes. Usually any limitations that are encountered in the design view can be over come by modifying the actual code.

A developer could probably use either of these to develop a simple game. There are extensions available for BlueJ such as 3D Environment Extension. With this extension, students are able to create an object and "drop" it into a graphical 3d environment. As for Netbeans, it is an IDE for professionals so it has plenty of GUI capabilities and complex tools for a simple game without the BlueJ plugin. The BlueJ plug-in just makes it easy for students to transition to Netbeans.
In the article GUI Alternatives, I was introduced to the aspect, separate GUI from logic. "As programs grow larger, it's essential to separate the GUI interface processing from the logic. This is easy to do by putting the interface and logic in separate classes. Some GUI generators below help accomplish this.” As I have mentioned many times before in my blog, many of these great tips that I learn are very simple and basic so I am glad when they (tips) are pointed out. Being new to the programming and developing world, simple well-known truths in the industry are unknown to me.  So I will tuck that bit of advice away for future reference when I start to write simple games. For now, I plan on downloading BlueJ to help me with my Java class.

References:
http://java.sun.com/developer/technicalArticles/tools/bluej/
http://en.wikipedia.org/wiki/Visual_Basic




Sunday, December 5, 2010

Project 5 - Interpreters and Compilers

This assignment asked that I describe an interpreter and compiler for BASIC, Pascal, C and C++. In general, a compiler is “Software that translates a high level language into machine language and tells you if you have used a programming language incorrectly” (Farrel page 668). After compiling, a program is saved that can be run. An interpreter is software that interprets a programming language into machine code while executing. It never creates a program that can be run at a later time, so programs written in interpreted languages need to be interpreted each time.

I researched many different BASIC compliers. There were so many out there! According to thefreecountry.com the term BASIC describes many computer languages. There are many dialects and generations of the BASIC language. The original BASIC was very simple implemented by using an interpreter in many home computers. For the purposes of this assignment I have selected a second generation BASIC dialect, QBASIC. The free QBASIC IDE, the QB64 COMPILER V0.923. The QB64 Compiler had both a compiler and interpreter. It can be downloaded at http://www.qb64.net/forum/index.php?board=2.0. This version was just released on December 1, 2010. Other than finding positive reviews about this compiler, there was no other documentation about QB64 that I could find.

For Pascal, I selected Free Pascal (aka FPK Pascal) a 32 and 64 bit professional Pascal compiler. This program gets great reviews and it is free! Many different user guides in .pdf format can be downloaded along with the software at http://download.cnet.com/Free-Pascal/3010-2069_4-11652728.html?tag=mncol. Since there is a user guide available online, the instructions on how to use the compiler were readily available. According to Free Pascal’s official user guide, the steps to compile are as follows:
“Compiling a program is very simple. Assuming that you have a program source in the file prog.pp,you can compile this with the following command: fpc [options] prog.pp”

Now for C and C++ I sought out a compiler that could compile both of these related languages, was from a reputable source, and preferably free. After researching options and reviews on the CNET website (http://download.cnet.com/), I decided upon the Digital Mars Compiler. The Digital Mars website had the following to say about their program’s compilation process:

“Digital Mars C++ is an extremely fast one-pass compilation system with highly effective register utilization. An optional global optimization facility provides tight and efficient object code. Run the compiler from within the IDDE or more traditionally using dmc from the console command line. The compiler executables can compile either C or C++ files. The preprocessor is integrated in; but for specialized applications a separate standalone preprocessor is also included. As it runs, the compiler reads the source files, executes all preprocessor functions, checks for any syntax errors, optimizes the program, generates machine code, and outputs an object (.obj) file suitable for input to the linker.”

While doing my research, I came across some very helpful resources, one was the CNET downloads page, I enjoyed the concise reviews and thorough information about all the software available for download, and also qbasicnews.com. This website has lots of tutorials and tips on the QBASIC language.

References:
Programming Logic and Design Comprehensive, Joyce Farrell