Seeking a Solid Java Textbook?
StudMuffin asks: "I am teaching a Master's level Introductory Java Programming class, at the University of Michigan in January, and am on the hunt for a solid Java textbook. This class is aimed at grad students (who obviously have a bachelors degree, so they are assumed to be able to think on their own) with no programming experience. Specifically, I would like to ground them in good Object Oriented principles, solid program design techniques, and finally in the actual syntax of Java. I would rather think of this as a 'How to program well' class that happens to use Java as the language over a 'Java class' that happens to cover programming. I would like to stay away from the applet heavy books that I tend to find, focusing instead on the topics above. Any ideas?"
I never thought I'd hear the phrase "Master's level Introductory."
"Come on, let's go drink till we can't feel feelings anymore."
and while I cannot single out a textbook for you, I urge you to spend 3 classes on UML. Understanding an object and it's methods really helped me, the language was secondary to that; hell, I just used the API ;).
Check out Bruce Eckel's Thinking in Java. Not really a textbook in the classic sense, but sounds like what you need. Also available in an HTML version.
People couldn't type. We realized: Death would eventually take care of this.
I always wished I would come across an instructor who took "Structure and Interpretation of Computer Programs (abelson, Sussman & Sussman [see here SICP]) and mappend the fundamental theories presented therein to whatever language was currently invogue during that class/age.
Mere learning of language, for the fit of mind, is a simplicity - you're talking maybe 4 months at the outside to learn the syntax of $x language, thru and thru. However, with the ideas presented in SICP, you can accomplish nearly any theoretical CS task. The implementation (though fun) is the easy part.
I might recommend your assigning sections apropos to your course from the book as homework; in class, project the particular Java syntax upon those principals presented in the text.
A most rewarding class would result, I think!
..Thinking In Java IS a great book, but I also think Ivor Horton's "Beginning Java" is another perfectly suited book. There is a 1.4 edition out now. I simply cannot praise "Beginning Java" highly enough, it is the book I used to teach myself. Sometimes he is very verbose, but he certaintly gets the points across.
It all depends on what exactly you are teaching. You could be teaching an introduction to programming, or data structures and algorithms, or Object-Oriented programming, or network computing, or... Java would probably be suitable for either of the items above, and there are textbooks covering each of them.
If you are safely assuming that your students already know how to program (for example in C) and know about data structures, then Java becomes an ideal choice to introduce object-oriented programming. If this is what you want to do, then "Object Oriented Software Development Using Java" by Xiaoping Jia is a very good bet. It introduces OO with UML, talks about patterns, and uses them to discuss the collections framework and Swing. Search for "Jia" on Amazon.com to learn more...
"In our tactical decisions, we are operating contrary to our strategic interest."
Specifically, I would like to ground them in good Object Oriented principles,
Good idea; too many people get out of college even at the Masters/PhD level without really understanding OO. (Even if it's not the be-all, end-all technique it was initially promoted to be, it's still a darned useful way of organizing large programs.)
solid program design techniques,
Sounds like a plan.
and finally in the actual syntax of Java.
Whoops, you're using Java? How does that fit with the first two goals? I can't think of a language that makes good OO harder while still having a "class" keyword.
Oh well, guess you're stuck with it.
Alright, ignoring the potentially flamebait nature of the above (though I mean it quite seriously), if you can avoid it at all, I'd recommend not worrying about teaching syntax. Seriously. Speaking from my experiences at a Certain Other Large Michigan School, you should just be able to say at the beginning of the course, "Hey, we're going to do an assignment in the second half of this course that will be in Java. Know Java by then." and let that be the end of it; we did that in Software Engineering at the grad level and it worked fine.
Just throw them to the sharks; they'll manage.
If you were going to toss Prolog or a heavily functional language at them unexpectedly, that might be worth some in-class time, but in-class time is a scarce resource; it really should only be spent on important stuff either unobtainable, or significantly more difficult to obtain, outside of the class. Java syntax hardly qualifies.
I've taught Java for a year (undergraduate level though) when I was getting Master's degree, and have assembled a collection of books that publishers sent for evaluation. I think the one you would be pleased with is Object-Oriented Problem Solving with Java.
It's not a book about programming and hence it received one star on Amazon from people who bought it trying to learn Java from scratch while they would have been better served by Deitel&Deitel or Lewis&Loftus.
Chapter 1, for example, goes through "Designing good programs" and "Software life cycle", in Chapter 13 there is a whole section dedicated to threads, not just pure code samples to copy and paste, but discussion targeted towards high-level concepts.
Disclaimer: I have not used the book for any of my classes, just merely browsed it in my spare time.
Used by MIT in the class 6.170 Laboratory in Software Engineering, which is part of the Open Courseware offerings, so you can see the lecture notes and see what they do with it.
I recommend Beginning Java Objects: From Concepts to Code, by Jacquie Barker. It looks at object-oriented thinking and design first, and code second. (if I remember correctly, the first part of the book only uses pseudo-code).
JP
Like other said before me, if the point is teaching Java, there's no better book than Bruce Eckle's "Thinking in Java", which is available electronically from Eckle's website. (The 3rd edition is new, I haven't read it specifically. My opinion is based on previous editions.)
I suggest, however, focusing on OOP, rather than on Java. A programmer who groks the fundametal concepts of OOP will have a relatively simple time adapting to the specific tidbits of Java. For this purpose, the best teaching language is Eiffel, and the best book is Object-Oriented Software Construction by Bertrand Meyer.
- Tal Cohen
Intelligence shared is intelligence squared.
I haven't read any other boooks, and I don't intend to. The Core JAVA books has imho excellent quality and explains stuff very well. They also give nice hints and ideas on how to structure your programs, which seems like a much better way than the c++ like approach I would have done.
They contains very simple language and information about the language, so anyone can understand it. They got lots of code examples and a small collection about intresting APIs after each part of text for the commands used in that part.
Have the greatest JAVA book I've come across. There's very little of this fumbling around in the dark with concepts as "what's abstraction?" and the like (even though all the high points of the language are hit - almost invisibly - in the text), and instead the book focuses on a more pragmatic approach that I found to be more of an "okay ... so you're a SMART chimp ... now let's take the language out and drive it around a bit", instead of a tome of terms.
Very good book, that. I still use it to check myself against their code for client/server configuarations (in both JAVA and C) and ensure that I'm writing code that's reasonable.
A short answer to your request would be to get Learn to Program with Java by John Smiley to teach the Java language and program construction in the easiest manner ever written. The method taught is very accessible for those who've never written a line of code. Have your students follow the instructions in Don't Fear The OOP! for fun and insight. Then, make the brilliant Teach Yourself Object Oriented Programming in 21 Days by Anthony Sintes the real goal of your course. The first 7 days covers OOP as you won't find in other books, then the following 7 days covers how to design/structure/test applications in OOP. The last 7 days is a fun project building an application using the OOP principles already taught. These two books should cover what your students need. If by chance you run out of time and they don't finish the OOP book, you should still be able to get them through the first 7 days of the material and still finish the Smiley book (which is necessary for the fundamentals). Your students can then continue to finish the Sintes book if they find Java/OOP is something they wish to pursue further.
For students who require more instruction in programming fundamentals, you'll have to be more considerate. More consideration requires a longer answer to your request. You know that OOP is the most important aspect of learning this discipline, but you're stuck with a chicken and egg situation. How can one learn how to build solutions (algorithms/applications) to problems without knowing how to express those ideas first in a language's syntax and semantics? As you've said, your students are assumed to have no programming experience. Well, as a child, before you learned how to speak your mind, you first had to learn HOW to say things.
I would first recommend giving your students a crash course in syntax and semantics. Don't worry if they don't know what to DO with the syntax yet. They first need to become familiar with the alphabet and sentence structures of the language before they can learn how to express their ideas in that language. I'm going to diverge from the rest of the slashdot crowd here by recommending that you use a CBT (Computer Based Training) for this step. It's the quickest way to your goal (about 8-20 hours of computer time) and the interactivity will keep their attention even though the material is very dry (in contrast to the Smiley book). They can run the CBT over and over again until the message of language's rules sink in. This will be most effective with your guidance in filling in the missing information (CBT text is purposely kept terse in order to maximize retention and in order not to lose the user's attention). Use CBTs as homework, or in conjunction with other homework. There are various worthwhile CBTs out there, Smartforce/Smartcertify's or Netg's first module on Java should suffice. Or, Joe Grip's whole set of Java instruction (about 10 hours of computer time, though they claim 5).
If your students really are beginners, I'd even encourage getting a CBT on not just syntax, but on basic programming concepts (iteration, selection, sequence, algorithms...etc). Smartforce/Smartcertify has something on that called Programming Fundamentals or you can get a copy of COMPTONS PROGRAMMING MADE EASY (though you'll need to ignore some minor bugs, not that textb
An Intorduction to Object Oriented Programming with Java by C. Thomas Wu. The book is almost decent, but leaves me wanting a lot more. Another minus is that the binding quickly deteriorates.