M-W 5:00-6:15
D. D. McCracken, October 24, 2005
Expanded course description. Java collections: maps, sets, lists and their various implementations. Use with generics. Their Iterators, and "natural order" where defined. Anonymous inner classes. Algorithms in the Java API (Application Programming Interface) as applied to collections: sort, search, shuffle, other. Why insertion into a Java Vector or ArrayList takes amortized constant time. Concurrency; thread safety; synchronization. Serialization; use with a linked hash map to implement a Least Recently Used (LRU) cache. Garbage collection; when is an object garbage-collectable? (A frequently-heard definition is wrong.) JAR files; manifests. Overriding vs. overloading vs. implementation. Wrapper classes; conversions between Wrappers and primitives; Wrapper methods. Object, the class at the root of the inheritance tree; its methods and when they are automatically overridden and when they must be overridden by the programmer. Java introspection. Design patterns, most importantly the Model/View/Controller pattern and its many applications. Layout managers; the container hierarchy as distinguished from the class inheritance hierarchy. (Fundamental in building Graphical User Interfaces—GUIs.) Why == is rarely useful with objects, and the equals() contract: it must be reflexive, symmetric, and transitive.
It is intended that students completing this course will be ready, or nearly ready, to take and pass the Sun Certified Java Programmer exam. It is reported that employers mostly ignore certification—except this one. The instructor can say from personal experience, having studied over the summer of 2005 to prepare for it, that the exam is hard and thorough.
3 credits; 3 hours. Prerequisites: CSc 220; CSc 221 with a grade of B
or better. The student must have taken CSc 221 since the language was changed to
Java in Fall 2003. (If all this can’t go in a description, then "Permission of
the Instructor.") Permission of the instructor.
(That's what we said, but the online registration system doesn't enforce it.)
Justification. Java is said to be the world’s most widely used programming language, having overtaken Cobol for that title. It is at the heart of IBM’s E-Commerce On-Demand strategy. Students reported two years ago that in job interviews the first question was "Do you know Java?" If the answer was "No," so the students said, there was no second question: the interview was over.
Partly in response to these factors, and others, the language of CSc 221 was changed to Java in Fall, 2003. Student response has been highly positive. Projects in recent semesters have included JUnit testing; an introduction to Extreme Programming; GUI building; a Rational class using BigInteger, the Taylor series for the arctangent, and formulas going back to Euler for efficiently computing π to thousands of decimal places; and a final project using a Java Database Connectivity (JDBC) driver with MySQL to implement a small but realistic relational database system with a graphical user interface.
What can be covered in 221 in 14 weeks, with students having no prior exposure to Java and—in some cases—extremely little programming experience of any kind, can be useful and stimulating, but it cannot possibly be complete. Java is used for big complex jobs; it is necessarily a big complex language. The API (Application Programming Interface) for Java 5, the latest, contains 3500 classes. No reasonable person would set out to "cover" all of them, but it should be clear that although in CSc 221 we can do a lot, we necessarily leave a great deal yet to explore. The students coming out of 221 today have definitely been introduced to life-long learning, but learning the rest of Java entirely on one’s own is an inefficient process. The instructor speaks from experience.
The instructor does not regard Microsoft as the Evil Empire. In his ideal world, our students would get a thorough grounding in Linux/Java/Eclipse/Websphere etc., and a thorough grounding in .NET, C#, ASPs, etc. The instructor is not capable of doing both, and, indeed, is working very just hard to master a useful fraction of the IBM/Java approach. Perhaps in future years we can offer both.
The text, or perhaps one of them, will be Sun Certified Programmer and Developer for Java 2, Sierra and Bates, Osborne, 2003. It is hoped that a Java 5 edition will be available in time for class use. Sierra and Bates were members of the team that wrote the Sun exam, and their book contains mock exams that permit the student to evaluate his/her mastery of the subject—as it will be tested. The questions are hard. The book also includes preparation for the Sun Certified Developer Exam, which has passing of the first exam as a prerequisite.
Added 12.29.2005: A Java 5 edition will allegedly be available Jan 31, 2006. I will believe it has been published when I am holding a bound copy. But if true, and if you want to take the plunge and go for 1.5/5.0 certification, you will definitely want this.
One explicit goal of the course will be to prepare the student as well as possible to take and pass the Sun Certified Programmer exam. No money-back guarantees can be furnished, obviously, but the instructor’s experience studying the book over the summer of 2005 indicates that passing the exam is a reasonable target, perhaps after some additional intensive study. (Whether the instructor will have passed the exam before the start of the spring semester remains to be seen.)
No claims will be made about preparing students for the Developer’s Exam, but since the Programmer’s Exam does not cover GUI building we will deal with most of the issues in the Developer’s Exam portion of the text: coding standards, clarity and maintainability of code, designing the graphical user interface, networking issues, and database issues.
The word on the street, as it were, is that employers ignore and belittle almost all certification—except the Sun Java certification. They apparently have enough experience with hiring people who have passed the exam to know that the exam is tough and that passing it assures a certain level of mastery.
It is possible that the course might attract some non-matriculated continuing education students who want to prepare for the Programmer’s Exam.