CS120 resources : [an honors thesis (HONRS 499)]

Thumbnail Image
Wilson, Ryan A.
McVey, Bonita M.
Issue Date
Thesis (B.?.)
Honors College
Other Identifiers

Computer Science 120 is the first course that every Computer Science major at Ball State University must complete. From the undergraduate catalog, the description is "Introduction to programming using a structured, strongly typed language. Topics include: basic control structures, input/output, procedures and functions, arrays, textfiles, sets, records, introduction to software engineering, and ethics of computing." After reading this description, it is apparent that CS 120 is a rigorous course. Many of the students enrolled in CS 120 are first term freshmen that are not accustomed to working and studying at the level required for this course. As a result, a great deal of assistance is needed to help all students succeed. This assistance is provided in several different ways. Dr. McVey and her graduate/undergraduate assistants hold office hours, during which students can get help with homework and programming assignments. Students are also encouraged to contact Dr. McVey and her assistants via email with questions. Appointments with Dr. McVey can be made by students unable to attend any of the available office hours. Finally, Dr. McVey keeps an up-to-date CS120 web site. Despite all that is available, there is still a need for more assistance. CS 120 Resources attempts to alleviate this need.CS120 Resources is a web site designed and developed with the intent of providing a resource for students who need assistance in Computer Science 120. The interface to the site is intended to allow students to navigate easily to the information they are seeking. CS 120 Resources attempts to provide information about the basic and core concepts taught in CS120. Students must use bsu-cs, the computer science department's Unix system, in order to write and test their programs. Two pages of Unix commands and information are available for students who may have questions about the system. VI is the editor that students must learn and master in order to create their programs. A listing of the most commonly used VI commands is provided on the CS 120 Resources site for students. All information available on the site can be printed allowing students to have a hard copy to use when working throughout the semester. A complete listing of keywords used in the C++ programming language can be found with descriptions of the keyword and an example of its use. Also available is a glossary of terms commonly used in the Computer Science field. The glossary is interactive. Students click on the term for which they wish to see a definition, there is a list of terms available, and the definition will appear in a text box on the lower part of the screen. All operators used in the C++ language are listed in order of precedence with other information about the operator and an example of its use. One of the larger parts of the CS 120 Resources site is the code examples section. In this area, students will find detailed descriptions of code segments with output results clearly demonstrated. A walkthrough of the common Hello World program is available. Documented segments of code may be downloaded directly to a student's account where the student can compile and execute the code. Executable versions of programs are also available for download. Students wishing to gain a clearer understanding of how loops work in C++ may experiment with the interactive loop examples found in the code examples section. Because CS 120 Resources was developed with the intent of being a supplement to Dr. McVey's CS 120 web site, there is a direct link to the CS 120 web site from the CS 120 Resources site. Students not finding the information they desire on either the CS 120 web site or the CS 120 Resources web site, or students desiring to learn more, may wish to visit any of the other 28 C++ informational web sites linked directly from the CS 120 Resources web site. Finally, students may have a suggestion about improving the CS120 Resources web site. To accommodate these students, there is a suggestion form on the web site where students can enter their ideas and submit them directly to the Webmaster.The purpose of this Honors Thesis was not only to complete a project but also to learn while doing so. As the idea of creating CS120 help site formed, I decided that using JavaScript when programming the web site would not only allow the site to become more interactive and powerful, but it would also require me to learn JavaScript. At the start of this project, I did not know anything about JavaScript. However, I now feel confident in using JavaScript as another programming tool when working with web sites.JavaScript is programming language developed by Netscape to be used in web pages to allow web sites to be dynamic. HTML alone will always provide the same web site when viewed by different users. JavaScript allows the web site to function differently depending upon the values of variables at the time of execution. JavaScript is not Java, but it can interact with Java on a web site. JavaScript is a client-side programming language. Therefore, the code is executed on the user's computer when a user is viewing a web site containing JavaScript. Ideally, this would not cause any problems, as all JavaScript interpreters should interpret the same section of JavaScript code in the same manner. However, this is not the case. Each browser handles JavaScript differently. The two most frequently used browsers today are Internet Explorer and Netscape. When this project began, Netscape was the leading browser statistically in use. Now at the completion of CS 120 Resources, Internet Explorer is the leading browser statistically in use. JavaScript code can be written to detect which browser is being used to view the web site and execute code that was written specifically for that browser. This method typically requires twice as much code to be written for one problem, one version of the code for each of the two major browsers, and some overhead to designate which code to run based on the browser detected. Early in the development of CS120 Resources, it was decided that the JavaScript contained on this web site should be developed to work with Netscape. Netscape was picked as the browser to support for two reasons. First, Netscape is the developer of JavaScript and, therefore, is well acquainted with JavaScript. Second, Netscape was the most commonly used browser statistically at the time this decision was made. This decision allowed for more code to be developed for the CS 120 Resources web site because time was not spent writing two versions of the same code to accommodate compatibility with Internet Explorer. The opening page of the CS120 Resources web site includes an introduction that explains that this web site has been developed for use with the Netscape browser version 4.0 or later. A link to a free download of the Netscape browser software is provided in this introduction to make it easier for students to browse this site. Internet Explorer has been tested with the CS120 Resources site. Versions 4.0 and 4.1 do work with the site with only a few problems. Version 5.0 seems to work very well with the CS 120 Resources site but the Netscape browser still provides the best overall experience. The JavaScript code found in the CS120 Resources web site is not apparent to the user even though it is running in the background of every page. Clear examples of the JavaScript running can be seen on the interactive loop pages. It is the JavaScript programming in the background that executes the interactive loops based upon the information provided by the user. The change color page also uses JavaScript to change the background color of the web site according to the user's preference. Once the color is changed, JavaScript sets a cookie on the user's machine that will remember the color chosen so that it can be used again on the user's next visit. A cookie is a small file stored on the user's computer that contains a piece of information from a web site. JavaScript is also used to display the definitions of the various computer science terms in the empty text box when a user clicks on a term. There is a portion of JavaScript code running on the CS 120 Resources web site that is intended not to ever be executed. This code is executed only if an error occurs in the JavaScript found on the web site. Should an error occur, an error report will be automatically generated containing information about the error and the user will be presented with the option of submitted the error report to the webmaster. Another JavaScript program running in the background calculates the time of day and displays it in the status bar on the lower part of the user's browser. Finally, a small amount of JavaScript code is used to automatically display the most recent update time for each page on each page. This allows the user to know when the page was last modified and is useful for knowing if a bug fix has been implemented or possibly more information has been added to the page. Section II contains all of the JavaScript and HTML code used in created the CS 120 Resources web site. A printout of the web page is found before the code that underlies that particular web page.The CS 120 Resources web site has been developed to aid CS 120 students as they learn. A large amount of information is available at this site but it is in no way an exhaustive resource. The CS120 Resources web site was designed to make it easy to add more information and pages to it in the future. The web site is based on a frame system that displays a menu of available topics on the left and the current topic on the right side of the screen. New pages developed for the CS 120 Resources web site can be linked from added topics to the menu. This web site is intended to grow and change over time to reflect the current needs of CS 120. Student input and suggestions will greatly influence the future of this web site. HTML and JavaScript technology continues to develop and improve. As a result, the code used to create and run the CS 120 Resources web site will continue to be supported by future web browsers.