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

A Dozen Concurrency Pitfalls

Posted by cayhorstmann on May 4, 2011 at 8:52 PM PDT

I needed some filler material for my lectures on concurrency. I googled around for Java concurrency pitfalls and came up with a nice mixture of golden oldies and new ones (at least new to me). I cleaned them up and translated them into Scala because that's what we use in the course. Here they are, for your puzzling pleasure.

Parallel Arrays in Scala

Posted by cayhorstmann on May 4, 2011 at 1:49 AM PDT

Having a Racket with Pictures and Continuations

Posted by cayhorstmann on March 22, 2011 at 8:50 PM PDT

In this blog, I describe how the Racket language provides fun graphics and a nifty web framework. The  former is great for beginning students, and the latter is helpful for grasping the mind-bending concept of continuations. ♦

A Blog Uploading Tool for

Posted by cayhorstmann on March 12, 2011 at 3:55 AM PST

In this blog, I address my grief with blog uploading, following Paul Graham's advice about choosing technology. ♦ 

Ruby, Scala, and Complexity

Posted by cayhorstmann on March 2, 2011 at 9:05 PM PST

In this blog, I ponder why Ruby and Scala are easy to learn and complex to master, and how their cultures differ. ♦

Scala for the Impatient

Posted by cayhorstmann on January 28, 2011 at 11:47 PM PST

In 1995, I got a call from Gary Cornell who told me that we were going to write a Java book. That surprised me—I didn't know any Java, and I was pretty sure that Gary didn't know it either. But Gary knew that Java would be big. So we set out to write, as fast as we could, the first Java book that showed how to write real code.

A Report from the Sewer Hole: Cygwin, JLine, rxvt, and the Scala REPL

Posted by cayhorstmann on November 24, 2010 at 2:39 AM PST

I have students running Windows, Linux, and Mac OS X, and I like to encourage students to choose whatever platform makes them most productive. But I also like to be able to give out one set of instructions, grading scripts, etc. to everyone. Fortunately, bash is available everywhere, even on Windows, in the form of Cygwin.

A Condensed Monospaced Font

Posted by cayhorstmann on November 21, 2010 at 11:49 PM PST

When the time comes for my graduate students to write their project reports, I give them a long checklist of do's and don'ts. One of the more vexing issues is the code font. I am astonished how many people who have been programming for years are unaware that computer code is usually presented in a monospaced font, like this.

The Mystery of the PolicyNodeImpl Class

Posted by cayhorstmann on November 15, 2010 at 2:50 AM PST

When Oracle, in its Android lawsuit, accused Google of copyright violation, I didn't think this was going to stick. I was pretty surprised when the PolicyNodeImpl comparison made its rounds a couple of weeks ago.

A Geometry Problem in Scala

Posted by cayhorstmann on November 12, 2010 at 6:04 AM PST

I ran into this blog about making a pretty drawing in C# and F#.

The task is to draw all lines between n evenly spaced points on a circle.