Scheme
Scheme
Posted May 5, 2023 18:08 UTC (Fri) by geert (subscriber, #98403)In reply to: Scheme by Wol
Parent article: The end of the accounting search
Posted May 5, 2023 22:48 UTC (Fri)
by gutschke (subscriber, #27910)
[Link] (13 responses)
Lisp and its various dialects are amazing as an embedded language and for the longest time didn't have much competition. But this language family also works really well as an introductory language for teaching basic CS concepts. It's easy to explain the entirety of the language in a few hours, and the utter lack of boilerplate code makes it a perfect fit to quickly outline algorithms and to introduce the concepts that a first year CS students needs to pick up. It also has the benefit of being a functional language.
I found that it is difficult to teach people to think in terms of functional programming, if they were first introduced to procedural concepts. The other way rounds is mostly effortless though. These days, knowing both paradigms is important and thus starting with Lisp still gives an advantage.
Of course, if you are teaching an applied degree (i.e. software engineering vs. computer science) the focus shifts. Lisp might not really have much of an advantage if you don't want to make a speedrun through introducing as many fundamental algorithms as possible. And in the long run, few people will stick with Lisp exclusively. You still need to learn everything else that is out there. But I wouldn't outright discard it as an introductory language. If you have a good professor, it can be a valuable tool and provide great abstractions for discussing problems.
I personally wouldn't want to throw Java into that mix. Way too many rigid rules and boilerplate code that can confuse a beginner. Python is fine although maybe a bit too relaxed to unleash on an inexperienced programmer without some handholding. A sane subset of Javascript can also work in a similar way to Lisp, but again it requires discipline to avoid its pitfalls.
Posted May 8, 2023 3:32 UTC (Mon)
by marcH (subscriber, #57642)
[Link] (5 responses)
For this OCaml checks all the boxes you listed and more, it's the perfect teaching language. It's as functional as Lisp but with a readable syntax[*] and much more. But of course people want to be taught a language they have a chance of using in some future job and OCaml is even further than Lisp there.
Maybe it's Haskell cousin would raise fewer eyebrows? I don't know Haskell at all.
Posted May 8, 2023 3:57 UTC (Mon)
by gutschke (subscriber, #27910)
[Link]
I also fully agree with you that there are more modern alternatives that have similar or nicer properties than plain old Lisp. I could see them be used as a preferred teaching language.
Posted May 9, 2023 18:32 UTC (Tue)
by patrakov (subscriber, #97174)
[Link] (2 responses)
Posted May 9, 2023 20:55 UTC (Tue)
by mbunkus (subscriber, #87248)
[Link] (1 responses)
Posted May 9, 2023 21:15 UTC (Tue)
by marcH (subscriber, #57642)
[Link]
I know this comments section looks a bit like social media but the comments here are not as binary. More specifically here, a programming language and community can be in a very large number of nuanced states besides "dead" and "alive".
Posted May 23, 2023 19:50 UTC (Tue)
by ArneBab (guest, #42896)
[Link]
Did you know that a derivative of readable (wisp¹) is now used for the Guix Workflow language for reproducible science in HPC? Ricardo Wurmus who realized that showed it to people who were uneasy with the regular Scheme look of the code and the experience was very positive:
> »Wisp allows people to see code how Lispers perceive it. Its structure becomes apparent.« — Ricardo Wurmus
I built wisp 10 years ago with the thought at the back of my mind to use it in teaching one day, and now I use it to show error correction codes in a networking lecture and to represent concurrent algorithms for distributed systems.
¹: for more information on wisp and the source of the quote see https://www.draketo.de/software/wisp
Posted May 8, 2023 7:47 UTC (Mon)
by geert (subscriber, #98403)
[Link] (2 responses)
Now, let's compare with what my daughter had to endure in high school:
[*] Seriously?!? I thought we wanted to attract more people in STEM education, not scare them away?
Posted May 11, 2023 8:02 UTC (Thu)
by ringerc (subscriber, #3071)
[Link] (1 responses)
I was able to easily and quickly implement a program for reading values from an ultrasonic sensor in graphical Scratch. Quite astonishing. I've been programming for decades and expected graphical block programming to be a nightmare - I was pleasantly surprised.
It would not be my choice for real programs but it's quite serviceable for learning basic embedded stuff.
Posted May 23, 2023 19:53 UTC (Tue)
by ArneBab (guest, #42896)
[Link]
Posted May 8, 2023 14:28 UTC (Mon)
by tialaramex (subscriber, #21167)
[Link] (3 responses)
By the time I left for industry the first time it was teaching Java as a first language and I believe that continues today. Programming is obviously far more necessary across numerate disciplines than it once was, and so almost all the sort of courses where decent maths is a pre-requisite for year one now teach programming, at least optionally, except for one. Medicine is already absolutely up to their necks in requirements, as well as teaching a longer schedule and presumably there just isn't room to teach them programming. Outside of CS, the first language is usually Python, although in some disciplines it's R instead (and in Electronics specifically it's C).
Because Java is, if nothing else, broadly useful, today's CS students needn't learn any other language well, which is especially ironic when the university hires them, especially as interns or on short fixed terms, and obviously we aren't a Java shop, so they need to learn a new language. They are shown C during their mandatory first year classes, because Java doesn't have allocation and that's important, but it's not as though first year courses are fail-one drop out, so who cares if you do OK everywhere else?
Modern CS students can explicitly choose to learn Haskell, and I think there are still opportunities that might lead to Lisp and Prolog in the optional courses somewhere, but it's not unusual to get a fresh graduate whose only practical programming language is Java, which is a bit disappointing.
One really obviously missed opportunity is that while Rust looks superficially like a semi-colon language, like C or Java, in many ways it's an ML wearing a trench coat. So people who learned when I did are like "Wait a minute..." because oh yeah, these aren't statements which end in a semi-colon, these are expressions with a semi-colon at the end to turn them into statements. And these types seem awfully recalcitrant for a language which inherits from C, but once you realise this is an over-grown Hindley–Milner type system it becomes much clearer why 5 isn't true and "x" isn't an array and so on. So if you were still teaching ML then you've actually got a clear route to the future. Oh Well.
Posted May 8, 2023 19:06 UTC (Mon)
by NYKevin (subscriber, #129325)
[Link] (2 responses)
* CS 1 (the introductory course for freshmen) uses Python. I have no experience with this as I placed out of it. I think it previously used C++ at some point?
Posted May 9, 2023 11:37 UTC (Tue)
by mathstuf (subscriber, #69389)
[Link]
Posted May 12, 2023 1:39 UTC (Fri)
by jschrod (subscriber, #1646)
[Link]
I'm from Germany and had the opportunity to get a full-paid position in my university for my PhD time. In US terms, this position is a mixture of teaching and research assistant position, available for those with a Master degree and working towards a PhD. (This was in 1990, btw.)
My professor (PhD advisor) had an annual lecture called "principles of programming languages". I was supposed to develop and supervise the practical exercises accompanying that lecture. Well, the main point the lecture wanted to drive home: Specific programming languages are irrelevant. If you, as a CS master student, have learned to program any imperative, functional, object-oriented, or logical language (like Prolog), then you should be able to learn a new language of the same paradigm quickly, if you understood the principles behind it.
So, when I started to design the practical exercises for this lecture, I decided that my students would have to learn a new programming language every 2 weeks as far as to produce a program for a sensible requirement. The learning exercise was: It doesn't matter if you indent your program structure (Python) or if you have lots of parenthesis (the Lisp family) -- what matters are, what data and control structures are available to you in your program design.
Anectodical note: Don't do this after a thorough analysis of the technical means you have to provide to the students. I remember especially two issues:
1) Exceptions, which were not well supported in many languages in 1991. So I had to make available a CLU compiler for the exercises, within 2 weeks, since this was -- at this time -- the best practical example what it means to have exceptions as a fully-fledged 1st-order part of the language. (Still, I think that Liskov is way underrated for her contributions to the development of programming languages. Besides her work on exceptions, her SIGPLAN paper "Programming with Abstract Data Types" in 1974 actually coined the term `abstract data types'!)
2) My professor insisted to cover class-instance vs. prototype-instance models in the part of the OO language introduction. So I had to devise an excercise for a problem that's suitable to prototype-instance concepts. Nowadays, we could just use Javascript -- but this was 1991. The work to set up a working Self system for my students (for a 2 weeks assignment!!) was outrageous. But I have bought into it, and I got through it.
The interesting part of this story is: There were quite some students who shied away from the demands of the lecture and (mandatory) practical excercises. But for those, who did it together with us, it was a great experience. Many of my master students that supported my PhD came off from that course. In fact, some of them were helping me to set up the excercise environments during the course, while actually taking the course -- and those were the ones who later took off and have now excellent positions, both in companies and universities.
I'm still proud to have been a part of their journey towards the understanding that expression doesn't matter prinicipally. (We can discuss, where it matters.) Models and understanding the principles are the gains you get from a thorough university education. There is a "everything changes so fast" attitude I'm experiencing today from others in my field (mainly software and business process architect, with a lasting footage in the open-source development community in my spare time). Well, from a CS point of view, no. The principles remain the same.
Scheme
Scheme
Scheme
OCaml
OCaml
OCaml
Scheme
Scheme
1. Scratch,
2. Visual Basic in PowerPoint[*],
3. Python.
Scratch
Scratch
Scheme
Scheme
* Data Structures (effectively CS 2) uses C++. The class structure consists of two lectures introducing a new data structure that you have probably never seen before (I specifically remember "leftist heaps," which are just extremely unbalanced heaps that you can merge quickly), an assignment where you're supposed to implement that data structure (as in, you submit code, they compile it, and it has to produce exact byte-for-byte correct output over a range of test inputs), and a lab (where you do a more basic version of the assignment and can ask TAs for help). Every week. For the entire semester. As you might imagine, this is where a lot of students drop out. OTOH, this was probably the most useful course of my entire four years at that place, because it taught me how to Actually Get Shit Done, which is a rather important skill in this business.
* "Computer Organization" (basically, low level stuff for people not on the hardware track) uses x86 assembly, by way of DEBUG.EXE on 16-bit DOS on 32-bit Windows on 64-bit Windows. No, I don't know why they did that either.
* Programming Languages had a mandate to teach us logic programming (SWI Prolog), functional programming (Oz, but only the functional parts) and the Actor model (a weird Java dialect which the professor invented himself). I'm told that the other prof. used more sane languages in their iteration of the course (though at least Prolog makes some sense). For the Prolog part, I distinctly remember an exam where we were asked to implement a linked list in Prolog, and I had no idea what I was doing and just wrote out the list invariants as logical formulae... and was very surprised to later get full points for that answer.
Scheme
Scheme