TEXT   18

Why Java is Bad for CS1

Guest on 2nd July 2022 04:25:42 PM

  1. Why Java is Bad for CS1
  2. Preliminary version; I'll flesh this out … some day.
  4. Teaching programming is not about teaching a specific language. It's about data representation and problem decomposition:
  6. how to take a problem, decide what information needs to be represented (and how to organize it);
  7. decompose it into smaller (named) sub-problems, and combine sub-results to build a solution to the overall problem,
  8. all in a formal, unambiguous (machine-understandable) way. Theoretically, these concepts can be taught in any language (a good assembly-language programmer does all these things instinctively), but in practice some languages are better than others for teaching these concepts.
  9. As a first-language, use of Java (or C, or C#) gets in the way. I am constantly having to spend time teaching and drilling and explaining concepts that are not part of problem-solving.
  11. In particular, I am frustrated how the typical intro programming course gives the strong, lasting impression that programming is about:
  13. boilerplate code,
  14. fighting through syntax errors,
  15. gotchas, like "don't use == to compare doubles" and "`/` is overloaded to mean two different functions, one of which is not the division that `/` means in all your schooling so far, and in the world at large".
  16. TODO: things that, although difficult, are fair concerns for programming at CS1;
  18. What is a better approach? I heartily endorse the Program by Design approach of Felleisen et al.
  20. TODO: address formal studies
  22. Disclaimer: As an industrial language, I don't have a problem with Java -- this is just about using Java for teaching a first languag

Raw Paste

Login or Register to edit or fork this paste. It's free.