Profile

Scrapbook photo 1
Cay Horstmann
Works at San Jose State University
Attended University of Michigan
Lived in San Francisco
1,680 followers
AboutPosts

Stream

Cay Horstmann

Shared publicly  - 
 
Google gave my grad students some free credits to use Google Compute Engine. Here is how we set up a Play app with autoscaling and https support.
When teaching a class with a project that requires a server component, or when experimenting with software for teaching computer science concepts, I used to set up a server with Linux and GlassFish. Nowadays, our servers are ancient and the tech staff is decimated by budget cuts.
3
Add a comment...

Cay Horstmann

Shared publicly  - 
 
Working on updating "Scala for the Impatient" to Scala 2.12... The Scaladoc in 2.12 does away with the listing of classes on the left hand side and instead puts up a search bar on top. At first, I thought I'd hate it.
But now I am sold. Searching is better than being organized :-)
4
Add a comment...

Cay Horstmann

Shared publicly  - 
 
console: 1. to alleviate or lessen the grief, sorrow, or disappointment of; give solace or comfort. — That's what I need more of after trying to demystify the behavior of System.out in the Windows console. Read on if you want to be consoled and enlightened.

http://horstmann.com/unblog/2016-05-06/index.html
5
1
Gili T.'s profile photo
Gili T.
 
Hi Cay. See stackoverflow.com - What encoding/code page is cmd.exe using for a related discussion.
Add a comment...

Cay Horstmann

Shared publicly  - 
 
I am updating the section of Core Java that explains how to make a POST request. The service that I used in the previous edition was discontinued, so I tried using the USPS ZIP code lookup. The POST redirects to a GET, but that's ok—HttpURLConnection can handle redirects. But when the user agent contains the string Java, the post office redirects to a dead end!

http://horstmann.com/unblog/2016-04-20/index.html
8
Philip Durbin's profile photo
Add a comment...

Cay Horstmann

Shared publicly  - 
 
One reason to go to an education conference is to have one's belief in the blindingly obvious confirmed. This paper, presented at SIGCSE 2016, concludes with: "In this paper, we have found evidence that programming ability is hierarchical, and goes beyond what can be as-
sessed by a multiple choice test."

Hear, hear. I taught CS1 many times without a single multiple-choice question on an exam, much to the chagrin of the students. After all, it's loops and array and functions that matter, and a pretty good way to test those topics is to make students trace code, fix code, or write code. 

And when teaching CS2, many students joined the class who had learned to excel in multiple-choice questions in CS1, with a limited ability to write code. Many of them caught on and wrote in their evaluations something like "assignments much more reasonable towards the end of the semester", but unfortunately others didn't in time--"assumes super-human powers from students".

Another paper in the same conference proposed a multiple-choice test for assessing a "concept inventory" of programming knowledge. I went to the presentation, and it didn't pass the smoke test for me. I wish I had read the other paper first so that I could have raised my hand and said "Aren't you aware that there is evidence that programming ability is hierarchical, and goes beyond what can be assessed by a multiple choice test?"
5
1
Add a comment...

Cay Horstmann

Shared publicly  - 
 
I spent the better part of a day trying to figure out why a clearly documented API call didn't work as advertised. It turns out that the library uses the same class name, but in a different package, for an implementation class with different methods, and Eclipse auto-completed to that package. That's reprehensible. Don't entrap your fellow programmers like that!
I spent the better part of a day trying to figure out why a clearly documented API call didn't work as advertised. It turns out that the library uses the same class name, but in a different package, for an implementation class with different methods, and Eclipse auto-completed to that package.
6
Ivan Wooll's profile photoCay Horstmann's profile photoMargaret Leber's profile photo
4 comments
 
I think it's an impractical requirement to expect a library writer to name his classes in anticipation of what might be going on in some other package he's never even heard of. Class names are intended to convey meaning to users of a package, not to ward off the lost and wandering.

"Don't rely on package names" is not really helpful advice; separating namespaces is what package names are for, and if you're going to ignore them, you get what you deserve. 

Especially in this case, where Play has created the play.api subpackage specifically for the purpose of containing the Play API.

"Impl" sucks, and is ugly too. Really. 
Add a comment...

Cay Horstmann

Shared publicly  - 
 
My pet peeve from Java EE is the “stack trace from hell”, when the app server shares its pain with me, showing a stack trace, instead of telling me in which source file I messed up some setting. Oh goody—I just switched my Android build to Gradle, and it acts the same way. Hello, dev tooks makers. If you can't trace back your failure to the file name/line number of my artifact, you have failed.
My pet peeve from Java EE is the “stack trace from hell”, when the app server shares its pain with me, showing a stack trace, instead of telling me in which source file I messed up some setting. Oh goody—I just switched my Android build to Gradle, and it acts the same way.
6
Alexander Romanenko's profile photoTodd O'Bryan's profile photo
2 comments
 
That's one thing I love about SBT recently. The config files are actual Scala code, so you can figure out if it doesn't compile pretty easily. Now, if you have to modify SBT, that's a completely different story.
Add a comment...

Cay Horstmann

Shared publicly  - 
 
Woohoo! Gigabit fiber is coming to the Horstmann residence, thanks to Sonic. And it's the same price as crummy DSL! And the installers did an unbelievably awesome job routing the fiber into my wiring closet!!!

I had switched to Sonic years ago even though their DSL was a little pricier than AT&T because it meant no longer having to talk to the outsourced AT&T tech support who, after wasting my time for hours without resolving my problems, invariably asked "Have I provided you with excellent service today?" 

Now, with fiber speed at DSL prices, it's a no brainer. If you live in or around SF, check out their coverage area and see if you are in!
8
Stephan Goldenberg's profile photoCay Horstmann's profile photoGuillaume Binet's profile photoRodney Hoffman's profile photo
6 comments
 
I'm so envious!
Add a comment...

Cay Horstmann

Shared publicly  - 
 
I remember a Java One where Jonathan Schwartz was perfectly happy on stage that Android was being built with Java, even though it was pretty clear that he would have been even happier if Google had taken out a license. But then again, why would they have done that? Would they then have been associated with the stinker that was Java ME? Android broke new ground, building on top of open source, and that's how it should be ... provided, of course, that they share back.

It's pretty sad to see how all that ended up in a courtroom. http://arstechnica.com/tech-policy/2016/05/copyright-and-consequences-googles-andy-rubin-defends-android-to-jury/


4
Margaret Leber's profile photo
 
Java ME was a festering heap. I predicted at the time that hardware tech was moving so fast that within a few years you'd have Java SE in mobile form factors.

So today we have https://goo.gl/2t5hBX on http://getchip.com/pages/chip
Add a comment...

Cay Horstmann

Shared publicly  - 
 
Do you have a web site with one of those old-fashioned web hosts? Do you feel inferior when reading how everyone else uses S3 for a static site, like this fellow? https://blog.hartleybrody.com/static-site-s3/

So I gave this a try, and I am here to tell you that it may not be worth it, unless you want to learn a whole lot more about DNS than you probably do. For my domain, horstmann.com, I have two modest requirements. (1) I want to get my email. (2) I want people who visit http://horstmann.com or http://www.horstmann.com to see my website.

It is trivial to load your pages into an S3 bucket. You then get a  site with a cheery URL such as http://horstmann.com.s3-website-us-west-1.amazonaws.com/.

And then you can fuss with Amazon's DNS server (Route 53), but it's a fiddly thing and StackOverflow is full of people who are no smarter than I am and repeatedly erased and recreated configurations until stuff happened to work.

Or you can try to mess with the DNS settings at your registrar. Don't do it if you want both mail and web. I learned the hard way that there is no good solution. Since Amazon's IP address is a moving target, you can't use an A record for your web site. You can't use a CNAME record either because some mail servers out there will then try to send mail to the CNAME target instead of querying the MX records. And if you try to use the registrar's web forwarding, it's either a hack involving iframes, or they redirect to the weird-looking S3 URL that you don't want people to see.

Now I know what I pay my web host for: A static IP address.
I’ve got an old Rackspace instance that I’ve been running a bunch of small sites on over the past 4 years. Lately it’s been causing me problems and sites will sporadically go down…
3
Add a comment...

Cay Horstmann

Shared publicly  - 
 
Check this out: http://www.javamagazine.mozaicreader.com/JanFeb2016#&pageSet=11&page=0.

"What makes Core Java the definitive work on the language
is more than its vast scope—it is the quality of the presentation"

Sweet words indeed from one of the more curmudgeonly reviewers in our field--Andrew Binstock of Dr. Dobbs' fame, and now the editor of Oracle's Java Magazine (which--from one curmudgeon to another--has gotten quite good since he took over).
5
Add a comment...

Cay Horstmann

Shared publicly  - 
 
On the SIGCSE mailing list, a bunch of us crusty old professors reminisced on how we used to program with punched cards, on how Grace Hopper would hand out wires that electricity would traverse in a nanosecond, and so on, and how students would just shake their heads when we droned on about it. I was about to contribute how in my pre-college job, I had to enter the boot loader to some piece of equipment in octal, but then I realized that this, while being good clean fun for those who do the reminiscing, is not fair to the students.

So I tossed in that my grad students don't have a concept of a "server room" because their projects run somewhere in the cloud, and that more of the undergraduates are baffled by the concept of a "laptop" because for them, computing happens on a phone or maybe a tablet.

And I got some heartfelt responses how an Amazon data center isn't really any different from a server room, or how laptops will always be around. So, it's not just the students who extrapolate from their experience.

It's pretty amazing to be in an environment where the most basic assumptions on how one works get fundamentally shaken up every twenty years or so. I don't know if I will teach twenty years hence, but if I do, my students will probably be confused by the concept of a "data center" or a "mobile device".
9
1
Drew Bannister's profile photoRodney Hoffman's profile photo
2 comments
 
I've always said that the pace of change in computing was part of the appeal of teaching it for me: There was always something new to learn (being a student was what I was best at), and I could never get bored teaching CS.
Add a comment...
Story
Tagline
In my copious spare time, I write about programming languages and computer science education.
Education
  • University of Michigan
    Mathematics, 1981 - 1987
  • Christian Albrechts Universität Kiel
    Mathematik und Informatik, 1977 - 1981
  • Syracuse University
    Computer Science, 1979 - 1980
Basic Information
Gender
Male
Work
Occupation
Professor
Employment
  • San Jose State University
    Professor, present
Places
Map of the places this user has livedMap of the places this user has livedMap of the places this user has lived
Previously
San Francisco - San Jose - Ann Arbor - Syracuse - Ho Chi Minh City - Kiel - Aachen - Eutin
Links