Is it a good idea to teach algorithm courses using pseudocode instead of a real programming language? I am a young professor teaching a data structures course for the first time. I'm teaching at an engineering college that provides an academic degree, but the focus is preparing future computer programmers, not academics. 

Before the start of the semester I decided to present the algorithms as java code, instead of pseudocode. I felt that this would make the presentation more precise, and show the students how to put these algorithms to practical use.

My experience has been mixed. It seems like the problem is that now the students think that the various algorithms are the java code. They are complaining that, for example, I can't possibly expect them to know the counting sort algorithm, because how can they be expected to learn code by heart? So I am starting to understand the wisdom of using pseudocode.

My question, intended for other teachers, is: What has been your experience when using pseudocode vs using code?
Similar to @Vince, I think it's a good practice to do both. I don't really agree with the cooking recipe analogy, though. Pseudocode describes that the algorithm does, without going into detail how you do it.

I think perhaps a better analogy:


Pseudocode: you need to put an egg into the flour mixture
Actual code: pick up an egg, crack it open on the side of the bowl, and drop the egg into the container. Don't forget you need to dispose the egg shell as well.


There are so many ways to accomplish the task, and the actual code just gives the student an example of how to do it.

Presenting only the pseudocode might make some of your students loss. Presenting only the actual code would keep them in the box and get them focused too much on the details. A mixture of both would be my choice.