4 ms·
CS programs for undergraduate majors have a real dilemma. What programming language should they teach their students. My own kids are studying CS in college so
by todd8 6y ago
CS programs for undergraduate majors have a real dilemma. What programming language should they teach their students. My own kids are studying CS in college so I've seen the curriculums for a number of universities, and I've spoken to the faculty responsible for the language choices at some top programs. To me, there isn't an obvious best programming language to study as an undergraduate.
Some schools have a bifurcated curriculum, like Indiana University which has a program in Informatics for those planning to go into a career the requires programming and software engineering skills and a program in CS for those perhaps planning on going into grad school. There, learning Haskell might make sense in the CS program, but does it make sense for other students that want to get out and get a job?
My own daughter studied at a school where her first CS class was taught in Scheme (Racket). It, to me, looked like an excellent introduction to programming for someone majoring in CS. They used a book I approved of, How to Design Programs/2ed by Felleisen, et. al. Would Haskell have been better? Maybe, but I predict that more kids would have serious problems with a language like Haskell that is burdened with more challenging concepts and ecosystem. Perhaps Lisp/Scheme is a gentler introduction to applicative programming than Haskell. However most schools start with Python or Java.
I understand the arguments for a strongly typed functional programming language like Haskell (my own university research was in program verification many years ago).
Early on in CS programs students usually take one or two classes on data structures and algorithms. Data structures in my opinion needs to be taught in C. Haskell, Lisp/Scheme, Python, Java, and even modern C++ are so high level that teaching data structures in these languages ends up with students not learning the proper use of these languages' standard libraries.
At some point undergraduates should have an introduction to systems programming, the best text in this area is Computer Systems: A Programmer's Perspective/2ed by Randal E. Bryant and David R. O'Hallaron. This is a great book for undergraduate CS majors. This book requires C programming. So to me, it makes sense to teach data structures in C since students will need to understand it for their first exposure to systems programming.
Where should Python fit in the curriculum? It's arguably the most versatile programming language. What about Javascript? When should CS majors be exposed to it. Modern Java is a big language so one semester of use isn't going to be enough and it's too important to ignore. What about C++? It takes years of working with it to become a good but not expert programmer in C++. Should it be a part of the curriculum?
So my own recommendations for an undergrad CS program's language choices would be:
* Python -- for intro to programming, a course on algorithms, and a machine learning course
* C -- for an early class on data structures and a later class on systems programming
* Java -- software engineering, and a compiler course
* Lisp -- programming languages smorgasbord course, and an AI course
* Assembly -- hardware architecture/digital design course
* Javascript -- taught as part of a web-applications class
* Haskell or OCaml (or maybe Rust) -- intro to functional programming and program verification
What do HN readers think about this list? I'm glad I don't have to make the real decisions there are just too many languages that students need to learn in just a few years.
As far are my own background I have spent a great deal of time pursuing three different degrees from three different universities in CS. I've been the instructor for university courses for CS majors twice and taught perhaps 40 week long classes to professional programmers within a Fortune 500 company. I've also interviewed and hired many senior developers for my own company.
- massysett 6y agoAs someone who programs only as an amateur I honestly find baffling the whole idea that a university would teach students any programming language. Shouldn’t they be learning concepts, algorithms, data structures? Isn’t the language just a tool? I’d think mere technicians would learn languages. University-educated scientists should learn the underlying theory with which they can learn ANY language. I am a lawyer. I didn’t learn Westlaw or Lexis in law school. I mean yes, I did use them and was trained in them. But they were just tools. But no one would say “what computer research system should we teach our students?” And good thing—the ones I used in law school are now obsolete! Even as a lawyer I can teach myself programming languages. Man I’d be disappointed if I went into a university CS course and they’re debating something as low level as what language to teach me, rather than teaching me how to learn any language and how to design new ones.
- 2OEH8eoCRo0 6y ago>Isn’t the language just a tool? Yes. But to learn the data structures and algorithms you have to practice coding them. What language do you code them in to teach them? After awhile most code looks the same.
- riwsky 6y ago“As some who legalizes only as an amateur I honestly find baffling the whole idea that a law school would teach students any particular nation or jurisdiction’s legal code. Shouldn’t they be learning concepts, rhetoric, and logic? Isn’t a case law just a tool? I think mere technicians would learn legal precedent. University-educated lawyers should learn the underlying theory with which they can learn ANY case law. I am a software engineer. I didn’t learn RequireJS or CommonJS in school. I mean yes, I did use them and was trained in them. But they were just tools. But no one would say ‘what JS module system should we teach our students?’ And good thing—the ones I used in school are now obsolete! Even as a software engineer I can read court opinions. Man I’d be disappointed if I went into a law school and they’re debating something as low level as what jurisdiction’s laws and court decisions to teach me, rather than teaching me how to interpret any law or legal argument and how to design new ones.” I hear what you’re saying, software engineer, but avoiding any particular set of case law would leave these lawyers extremely unprepared for professional practice—not just because they will likely work in one of those legal codes otherwise covered by the school, but because those codes and the arguments that shaped them constitute an immense base of empirical knowledge about legal rhetoric, logic, and concepts that simply cannot be replicated in a vacuum. Accordingly, those excellent judges and legislators who do the novel work of lawmaking and legal argument are _not_ reduced to technicians by their knowledge of case law. In fact, I’d say it’s the opposite: it is impossible to have a good grasp of the theoretical underpinnings without also having extreme facility in one legal code or another as a ‘native tongue’.