Teaching Java in Introductory programming courses

The resolution asks what should be done by the Universities. To determine this, I will define the goals of introductory classes as the following: a) To prepare students for a career and advanced courses in computer science.b) To maximize retention rate for computer science majors. I will show how the unique features of Java help universities achieve their goals better than Javascript does. C1) Java Runtime Environment (JRE) The JRE consists of two things; the Java Virtual Machine (JVM), and the Java class library. The JVM is unique to Java and provides features such as automated exception handling [1] where the operating system generates exceptions as opposed to crashing [2]. This encourages novice programmers to understand the sources of their errors as opposed to being discouraged by them. Throwing exceptions on Java for simple programs is straightforward and requires only a single class which can extend the RuntimeException class and inherit its properties after which the newly declared class can be used in other classes and programs and made to throw exceptions of the programmer's choice. Another function of the JVM is to verify the bytecode before it executes which protects the host machine from being crashed by user programs while also controlling access to data that the programmer can declare private [1]. The Java class library is much more extensive than Javascript libraries which allows students to focus on writing original code while using the libraries for code that has already been written before. Javascript libraries on the other hand are more complicated to use, and less exhaustive. They all need to be linked in the original HTML file which reduces Javascript's capability as a standalone program. C2) Javascript is limited to webpages Introductory programming languages must offer a wide range of functionality on which students can build upon and learn more specific languages designed for narrowly defined tasks. This allows students to appreciate the full extent of the power of programming right from the beginning of their college years. Besides, if they end up learning only one language, one that is applicable to a greater range of situations is more useful. Java can stand alone while Javascript needs to be placed inside an html document to function. Javascript is wholly reliant on the browser to understand it. It wasn't developed as a general purpose programming language but rather to manipulate web pages. This makes it very limited in function. It cannot access desktop applications or the file system of the machine it runs on. It cannot open or save local files. These limitations makes Javascipt inappropriate for introducing students to programming. C3) No barrier to Entry Before a student can learn Javascript, they require knowledge of HTML (Hypertext Markup Language). Even the simplest Javascript program requires the programmer to insert script tags into an HTML document. In order for this to occur, students are required to create HTML pages which requires the capability to understand HTML and implement it before the first Javascript file is created. Introductory courses must teach HTML in the first few weeks of the course before moving onto Javascript. This lessens the time remaining to teach the students Javascript. Leaving Javascript for advanced courses lessens this difficulty as students in advanced courses are more apt to learn HTML on their own and use the features of programming languages they have already learned (like Java). The alternative to teaching HTML in the first few weeks is to require HTML knowledge as a pre-requisite. This blocks out students who are unwilling or unable to learn HTML on their own or waste a semester or quarter of financial aid taking a course in HTML. C4) IntimacyConsider the knowledge of the program gained from writing the simplest traditional “Hello World” program in Javascript and in Java. Javascript requires the programmer to create an HTML file, insert a script tag and type the following in a new file: alert (“Hello World!”); This teaches nothing about Javascript except that the programmer is invoking a built-in function. On the other hand, consider how much writing a basic Java program teaches the student about Java:public class main { public static void main (String [] args) { System.out.println(“Hello World”); } } The student learns that Java is an object oriented programming (OOP) language where all code is written inside a class and inside a method. Encapsulation is introduced with the access modifier “public” which is a core concept of OOP [3]. Public classes and methods are available to the client to use whereas in many applications, Java programmers want to practice information hiding. The term “void” teaches students about return types and students soon learn about methods that do have a return type and can correlate the return type of those methods to appreciate the difference between them and the method that they have been used to writing. As we can see, Java immerses students into the language right from the moment they touch the keyboard by teaching them about access modifiers and return types. Compare with Javascript where the underlying structure of the language is not exposed to students until later on in the course. This intimate connection with the language structure increases interest in the language which keeps students engaged. The benefits of teaching a general purpose programming language like Java outweigh. I could keep comparing features but I will stop here to see what Con comes up with so we can get to the areas of real clash. Sources[1] http://en.wikipedia.org...[2] http://en.wikipedia.org...[3] http://docs.oracle.com...