Author Topic: RobotBASIC is a more effective educational language than C++ or VB  (Read 3749 times)

0 Members and 1 Guest are viewing this topic.

Offline SamuelTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Please reserve making an opinion on the claim made in the heading of this posting until you have read the below.

Recently I had occasion to look at a course book being used in a technical college for teaching the fundamentals of programming.

The book utilizes pseudo code primarily with some flowcharting. Most of the programs in the book are developed as algorithmic pseudo code. Occasionally they translate the pseudo code into concrete C++ and Visual Basic code.

By looking through the book I noticed that the student is not able to ever run any (that is right…none) of the programs developed in the book.

Don’t misunderstand me. The book is quite good and as far as algorithmic development and material being taught, is excellent. However, I think the student is not really served by going through the entire course without running a single program and actually seeing the algorithms in real action.

This is not the fault of the authors. When teaching algorithmic development you need to concentrate on the algorithms themselves and not the particular language nuances and intricacies.

So the authors use the pseudo code approach (with some flow charting) and occasionally illustrate how the pseudo code can be implemented in two concrete languages (VB and C++).

Unfortunately, the concrete language examples are lacking and confusing in two ways:

1-   The programs in C++ or VB have too many elements of syntax that do not correspond to the pseudo code. This serves to confuse the student and add unnecessary complexity.
2-   The concrete programs given in C++ and VB would not actually run as given in the book. The student would have to do many more things than just enter the code given in the book to be able to run the programs. These additional actions and code are not given in the book and would only confuse the student if given in the first place.

Therefore, it is a sad reality of the course that the reader of the book would not be able to run any of the programs given in the book.

Had the course designers used RobotBASIC for their language of implementation of the algorithms developed as pseudo code they would have been delighted to see that the student would have been able to run each example given in the book.

The students would have been able to develop the exercises as real running programs. The given algorithms would be real running programs and the student would be able to verify the validity and efficacy of the learned theory.

To illustrate this I am going to give you an example program developed in chapter 5 of the book (it has 9 chapters). The program is given as pseudo code and as an implementation in C++ and Visual Basic. I have also included at the end the implementation of the pseudo code in RobotBASIC.

When you look at the 4 programs below, compare the C++, VB and RB programs to the pseudo code while considering these three points:

-   Length of pseudo code compared to the concreter code of each language.
-   Extra elements of syntax in concrete code that do not correspond to the pseudo code and how a student is expected to understand these elements and the complexity they introduce.
-   The fact that only the RobotBASIC code is a real running program. The C++ and VB codes are not programs. They are program fragments and will not run as given. Consider how this would impact on the learning process and the student’s perceptions.



Pseudo Code
1    Declare Rain[12] Of Reals
2    Declare rSum, Average As Real
3    Declare K As Integer
4    Set rSum = 0
5    For K = 0 Step 1 To 11
6        Write “Enter rainfall for month ”, K + 1
7        Input Rain[K]
8        Set rSum = rSum + Rain[K]
9    End For
10  Set rAverage = rSum / 12
11  For K = 0 Step 1 To 11
12      Write “Rainfall for Month ”, K + 1, “ is ”, Rain[K]
13  End For
14  Write “The average monthly rainfall is ”, rAverage

C++ code
1   int main()
2   {
3      double rSum;
4      double rAverage;
5      double Rain[12];
6      int K;
7      rSum = 0;
8      rAverage= 0;
9      for (K = 1; K <= 12; K++)
10    {
11       cout << “Enter rainfall for month “ << K << end1;
12       cin >> Rain[K–1];
13       rSum = rSum + Rain[K–1];
14    }
15    rAverage = rSum / 12;
16    for (K=1; K <=12; K++)
17    {
18        cout<<”Rainfall for month “ << K << “ is “ << Rain[K–1] << end1;
19    }
20    cout << “The average monthly rainfall is “ << rAverage << end1;
21    return 0;
22 }

Visual Basic Code
1   Private Sub cmdRunProgram_Click()
2       Dim Rain(12) As Single
3       Dim rSum As Single
4       Dim rAverage As Single
5       Dim K As Integer
6       Dim UserInput As Integer
7       Dim strMessage As String
8       For K = 1 To 12 Step 1
9           strMessage = “Enter rainfall for month “ & K
10         Rain(K – 1) = InputBox(strMessage, “Monthly Rainfall Entry”)
11         rSum = rSum + Rain(K – 1)
12     Next K
13     rAverage = rSum / 12
14     K = 0
15     For K = 1 To 12 Step 1
16         strMessage = “The monthly rainfall for month “ & K & “ was: “ & Rain(K – 1)
17         MsgBox strMessage, vbOKOnly, “Monthly Rainfall Entry”
18     Next K
19     strMessage = “The average monthly rainfall is: “ & rAverage
20     MsgBox strMessage, vbOKOnly, “Average Monthly Rainfall”
21 End Sub

RobotBASIC Code
1    Dim Rain[12]
2    rSum = 0
3    For K = 0 To 11 Step 1
4       Input  "Enter rainfall for month "+(K + 1), Rain[K]
5       rSum = rSum + Rain[K]
6    Next   
7    rAverage = rSum / 12.0
8    For K = 0 To 11 Step 1
9      Print "Rainfall for Month ", K + 1, " is ", Rain[K]
10  Next
11  Print "The average monthly rainfall is ", rAverage


« Last Edit: August 06, 2009, 11:58:31 AM by Samuel »

Offline mdmedlin

  • Full Member
  • ***
  • Posts: 73
  • Helpful? 1
Re: RobotBASIC is a more effective educational language than C++ or VB
« Reply #1 on: August 06, 2009, 02:21:26 AM »
First of all, is this book being used to teach an intro to computer programming?  If so, then you are right, to start off having the student write code in VB or C++ is going to be confusing.  If this is a higher level computer programming course, then the student should know what they need to do to change the code so that it would work.  When I was taking my data structures class, all the code was written in psudocode.  After the code was discussed, snippets were given in C++ and it was up to the student, i.e. me to develop a program that would use the snippet correctly.  Most of the time this was given as an assignment by my instructor to develop it into a larger program.  Such as when we were discussing inheritance.  There were snippets of the infamous ball colored ball code and that was used to write a program in which the user would choose what color the ball was and other options.  If someone was to just use the code in the book, well it would not work.  The code in the book is used to get you started, not do the assignment for you.  The other thing that I will say is that whereas RobotBASIC may be a program that you are familiar with, C++ and VB are two of the major programming languages being used now, even though I would have dropped VB and when with Java, but that is just me.  I understand that when programmers graduate from school, most likely the company they will be working for may have their own language based on Java or VB or C++.  Schools can't teach all languages, so they have to pick a couple and go with it.  Those are usually Java, C++, or VB.
Do or do not, there is no try yes I changed my picture, it is of my daughter.

Offline SamuelTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Re: RobotBASIC is a more effective educational language than C++ or VB
« Reply #2 on: August 06, 2009, 06:04:52 AM »
Hi M,

I am not going to mention the university's name but it is a famous online
university that is becoming more and more famous by offering numerous online
courses of all sorts.

Yes indeed, the course is a beginner's course that teaches programming fundamentals.
I am glad that you concur that C++ is unsuitable for that course. Nonetheless, try
convincing the university administrators of the fact!!! They will probably argue (as you do)
that they need to expose the students to C++ due to industry requirements.

Unfortunately, I think this is a very benighted attitude, and moreover
delusional if not downright fraudulent. If a potential employer thinks that a
person hired on the basis of this particular course has any programming
experience, let alone C++ or VB experience, then the employer is going to be
sorely disappointed and frustrated along with the employee him/herself.

As a matter of fact, I don't blame the university or the authors. I blame the IT
managers' lack of foresight and real knowledge of programming. They are the ones
that are putting pressure on the educational institutions to produce people who
on paper appear able to program in C++ when in reality they cannot even program.

This inability of the students to truly program is due to the fact that they
were taught programming from the start with C++ and therefore overwhelmed and
confused. The poor ones that actually manage to wade their way through the
course only succeed due to a combination of low standards for passing and due to
parrot style repeating and copying of code.

There are many people who have overcome their initial trauma of being thrown in
the deep end of the pool (my father did it to me in the ocean with 1 meter
waves) and managed to learn how to swim and some even grew to like swimming (I
love sailing and SCUBA diving…the love for diving came from my initial
experience with swimming which was more akin to diving than swimming…).

However, the majority who were subjected to this stupid method of teaching
swimming were terrified into hating pools, swimming and oceans for the rest of
their lives.

Many IT managers forget the journey they went through to get to the level where
they can now program in C++. Requiring a student to learn programming with C++
is the most unrealistic and self deluding action. Even VB has become complicated
way beyond a beginner's level.

Regards

Samuel

Offline mdmedlin

  • Full Member
  • ***
  • Posts: 73
  • Helpful? 1
Re: RobotBASIC is a more effective educational language than C++ or VB
« Reply #3 on: August 06, 2009, 09:49:31 AM »
I have to agree with you on this one Samuel.  In my intro to programming class, we touched on programming with making very basic web sites with HTML and even did a little bit of Alice and Java.  A slight introduction to VB and that was it.  I do agree that intro students do not need to know how to program with C++ in the beginning, but as their prowess in programming increases, they do indeed need to learn the basics of the other programming languages.  This was why a programming languages class is required to me to get my degree in CS.  I did not learn how to program in different languages, but mainly the history of the languages.  In fact, my instructor said that by the time I am applying for a job as a programmer, more likely than not, the company I will be working for will have their own proprietary language that I will have to learn.
Do or do not, there is no try yes I changed my picture, it is of my daughter.

Offline SamuelTopic starter

  • Jr. Member
  • **
  • Posts: 18
  • Helpful? 0
Re: RobotBASIC is a more effective educational language than C++ or VB
« Reply #4 on: August 06, 2009, 09:25:18 PM »
Thanks M,

Samuel

 

SMF spam blocked by CleanTalk