Skip to main content

Cay Horstmann

Cay Horstmann is author of Core Java (Sun Microsystems Press 1996-2009), Enterprise Java for Elvis (Sun Microsystems Press, to appear), and co-author of Core JSF (Sun Microsystems Press 2004-2009) Cay is professor of computer science at San Jose State University. He is a computer science series editor at Prentice-Hall and a frequent speaker at computer industry conferences. For four years, Cay was VP and CTO of an Internet startup that went from 3 people in a tiny office to a public company.

 

cayhorstmann's blog

Another Small Step for JSF...

Posted by cayhorstmann on October 19, 2009 at 11:56 AM PDT

In the relentless fight against configuration boilerplate, JSF and Glassfish have taken yet another small step forward. As of Glassfish v3 build 68, you no longer need to declare the faces-servlet in WEB.XML.

Recursive varargs methods in Scala

Posted by cayhorstmann on October 13, 2009 at 3:36 PM PDT

And now for something entirely different...one of my students asked how to write a recursive function in Scala with varargs.

Oracle OpenWorld Day 1

Posted by cayhorstmann on October 13, 2009 at 8:01 AM PDT

I got a blogger pass for Oracle OpenWorld. Here is my report from the show floor.

Oracle OpenWorld Day Zero

Posted by cayhorstmann on October 11, 2009 at 10:21 PM PDT

Aaron Houston, the fearless leader of the Java Champions, got me a blogger pass to Oracle OpenWorld. Here is what I learned on the opening night.

How to draw simple diagrams the easy way (with Java2D)

Posted by cayhorstmann on October 8, 2009 at 9:12 PM PDT

When you need to produce lots of fairly straightforward graphs, Java2D is your friend. In this blog, I show you how you can render simple images as crisp-looking PDF or EPS files, provided you can draw them on a Graphics2D object.

Recently, I had to draw a bunch of simple images, such as this one

Java/CS1 Cheat Sheet

Posted by cayhorstmann on October 6, 2009 at 8:31 PM PDT

The next edition of my CS1/Java book is going to print soon. At the last minute, we decided to put the real estate of the inside covers to good use and include a “cheat sheet” with the most important Java control structures and libraries. Since it would be particularly embarrassing to have a typo here, I am hoping to enlist the aid of the community.

Recording and serving screencasts

Posted by cayhorstmann on October 2, 2009 at 4:24 PM PDT

I just learned how to make Flash screencasts on my Linux system and deliver them (with GlassFish) on a server that the computer science department received as a donation (thanks Sun!!!).

Alice 3, CS1, and Quaternions

Posted by cayhorstmann on September 28, 2009 at 10:49 AM PDT

This semester, I am teaching the CS1 course again. If you just teach plain Java, it isn't easy to come up with interesting lab assignments. Some of the students have built exciting animations with Alice in the CS0 course. Somehow, they aren't as excited about printing prime numbers or digits of π in CS1.

A spoonful of Scala

Posted by cayhorstmann on August 11, 2009 at 9:22 PM PDT

I write my lecture slides in XHTML, using the marvelous HTML Slidy package. I just dump
the images into the same directory as the HTML files, which isn't so smart
because it makes it hard to copy a presentation from one directory to another.
I could change my habit, but hey, what is technology for?

Are you using static import?

Posted by cayhorstmann on August 6, 2009 at 10:00 PM PDT

I am rewriting a Java book for beginners, and it seems to make so much sense
to use

import static java.lang.System.out;

public class Greeting
{
   public static void main(String[] args)
   {
      out.println("Hello, World!");
   }
}

static.jpg