Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2
Yes this year we put a lot of effort into reducing any kind of change between the two halves of the course, even changes of approach independent of language This worked well for students. the first 5 days or so was a slightly enhanced version of Bootstrapworld Algebra. However, we wanted more on logical operators and on symbolic values, so we expanded the exercise a that has a butterfly trying to stay out of danger in a garden to include well in the middle of the garden. So the butterfly has to stay within the garden and outside the well. Then the size of the garden and the size and position of the well become variables... This was a good preparation for the second half in which students designed a game from the ground up using 2htdp/universe. Our "killer app" was to introduce vector arithmetic the moment we had structs. We did the math and the programming together and built a set of vector arithmetic functions /vector addition subtraction, vector/scalar multiplication, dot product, magnitude) Then.. we introduced an object struct that had an imgae and three vectors - location, velocity acceleration. Once the students have developed functions to move and draw thewse objects they have a very powerful and simple tool in their hands. Updating an object is like this location, velocity, acceleration -> location+velocity, velocity+acceleration, acceleration (all vector arithmetic, of course) We introduced structs for the first time on Sunday morning. By Monday evening they had objects moving in parabolic arcs on the screen under the effect of "gravity" This created a "wow" effect and students were then able to produce quite impressive games by the end of the course on Saturday sfternoon. The "wow" effect is really important...It gave students confidence. I am not sure how easy this would have been in another language environment. the 2htdp/universe framework and the design recipe certainly were very important. By the end of the 2 weeks even the most stalwart previous programmers had been converted to the benefits of the design recipe. Ad most of the newbies had produced quite sophisticated games far from the standard form provided for them in the first 5 days. Of the difficulties we faced with students, syntax errors were the most common, missing else clauses and errors associated with implicit begin end were the most intractable. Our students face the additional difficulty that all error message are in a foreign language (English) that many of them do not know well, some know hardly at all The only language trick we did was to use a macro for struct definition so that every struct automatically had an inspector and so structs printed out nicely and EXAMPLE (ie check-expect) worked for structs. Except we called it ÖRNEK (which is example in Turkish) CS On Wednesday, August 21, 2019 at 9:20:14 PM UTC+3, cwebber wrote: > > Chris Stephenson writes: > > > Parantheses and learners - experience with 14-18 year olds > > > > I have just finished giving a two week intensive course to 14-18 year > olds > > at the Mathematics Village near Ephesus in Turkey > > Very interesting email all around! > > > (a) A change of syntax between the two halves had proved confusing for > > students > > You actually touched on something that has been at the back of my mind > for a while. Else where in this discussion: > > Matthew Flatt writes: > > > At Sat, 20 Jul 2019 18:07:40 -0400, Christopher Lemmer Webber wrote: > > >> - Are people happy? Is this meeting their needs? Get community > input. > >>At this point, if the community is happy enough, and if it appears > >>that *newcomers* (including in the educational space) are happy > >>enough, now we can focus on switching the core Racket system over > >>to ~Honu-as-the-basis. > > > > I agree that the process would have to be something like that. > > > > I'm skeptical of starting with teaching languages in the sense of BSL, > > ISL, and ASL. That sets up some different problems --- ones that Pyret > > has directly addressed/explored. (Obviously, we should pay attention to > > Pyret.) > > I've been thinking about this, and I think that it's hard enough *for > me* to jump between different syntaxes. If there was a switch to ~Honu > as being the default, it really should be ~Honu everywhere... not ~Honu > in one place and Pyret like syntax in the other (or vice versa). That > kind of context switch is really hard. > > In my experience, the most empowering thing for students is "being able > to write programs that do cool things". If we use different syntaxes, I > think this will feel like the worlds between a &qu
Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2
Hi Shriram Nice to hear from you! In a course for 14-18 year olds where we are rigorously enforcing the design recipe, the overwhelming majority of errors are, indeed, syntax errors. (Except for missiing-else conds, of course) So that was what I meant. Pyret syntax errors are reported confusingly. Infix just messes things up. And in my view prefix does not present a problem for students Conversion: Indeed we did find an old version of Reactive in Racket, by which time we had already translated the newer Pyret version into Turkish and also introduced some experience based changes of our own. So what we had in our hands had diverged in several ways from the old Racket version. So we were merging the changes we had made and also translating the Turkish langauge documentation from Pyret to Racket. I understand the critcisms for using lang racket rather than advanced student in the second week , after using beginner in the first. Given that advanced student also accepts else-less conds (the worst source of hard-to-find errors) and we wanted to use the new Racket struct syntax (and struct-copy which can make HtDP universe code much shorter) we were pushed in that direction. I dont think we paid any other penalty for using lang racket. If we had had struct and struct-copy in advanced student, we would have used it. I am sure that is something we could have solved ourselves ... but time... Thanks for your views. Chris On Wednesday, August 21, 2019 at 2:38:55 PM UTC+3, sk wrote: > > >> Pyret was a pain. Error messages were not clear and the whole change >>> confused students. >>> >> >> Can you elaborate more on this? My personal experience with Pyret is that >> it has an exceptionally good error message, except when an internal >> error occurs (which should not happen). >> > > IMO, Pyret's *parse* errors are terrible. To some extent they are an > unavoidable consequence of infix, but it doesn't matter: parse errors just > suck, even for me, even today, even as one of the three longest-running > Pyret programmers. > > The run-time errors are (again IMO) much better than Racket's. > > Chris, FYI, Bootstrap:Reactive *was* in Racket to begin with, so there > may not have been a need to "convert" it… > > Shriram > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/bae23873-6837-415c-97ff-d7c0879873ad%40googlegroups.com.
Re: [racket-users] Re: The case, and a proposal, for elegant syntax in #lang racket2
Parantheses and learners - experience with 14-18 year olds I have just finished giving a two week intensive course to 14-18 year olds at the Mathematics Village near Ephesus in Turkey The course is based on Bootstrapworld Algebra and Reactive. Internet is very poor in the village, so we cannot use the web based WeScheme versiosn of the course(s). We have converted the Pyret language of the Reactive course to Racket for two reasons: (a) A change of syntax between the two halves had proved confusing for students (b) We don't have an offline Pyret, we had found online to be unusable in ptractice with our flaky internet connections and setting up a local server just looked to be too much work. So we have a variety of experience with our 14-18 year olds, Beginners Language Racket, Pyret, #lang racket with structs. Do we have parenthesis problems? Yes. Worse for students with previous programming experience. We solved them by educating our students in the clues given by drRacket - colouring matching parenthesis. But the most useful trick we taught is to select the whole function and use tab to autoformat it. This immediately makes parenthesis errors obvious. Make of that what you will. Does that mean that an indentation based format would be better? I am not sure. We certainly did *not* see any benefit from giving the second week in indentation based Pyret, as we did three years ago. Pyret was a pain. Error messages were not clear and the whole change confused students. Including students who had used Python, because the syntax looked familiar but the underlying language was different - being functional. Other problems? Two language features caused us trouble, being the cause of impenetrable bugs in student code: (a) Implicit begin .. end in function body. I have been writing Scheme for 20 years, and I **didn't know this existed**, always writing begin .. end in the very rare cases it was needed. Beginner Student (imho correctly) treats this as an error. I would be happy if advanced Racket also treated it as an error. You can end up with bizarre results if it is allowed and you don't notice what you have done. It allows, encourages even, paranthesis errors. (b) Conds allowed without else. Even beginner student allows this. It causes bugs. In htdp/universe you can end up with a void universe or a void somewhere in univers. the error emerges a long distance in space and time from the code that causes it. Make else clauses compulsory. That's my two cents worth. On Saturday, August 17, 2019 at 9:11:57 PM UTC+3, Dario Maiocchi wrote: > > HI all, > > I would personally be unhappy if in racketlang2 we would remove the (). I > don't think they represent a real issue. > > Just to share my personal experience a professional programmer. I learned > clojure like 7 months ago and now I'm learning racketlang and I never > felt the () as a barrier. > > best > > Am Freitag, 26. Juli 2019 03:42:14 UTC+2 schrieb Greg Hendershott: >> >> > I've taught the exact same material at the start of a 3rd year CS PL >> > course, and the students there didn't find the syntax as easy as one >> would >> > hope for students with that much CS “experience”. In fact, >> unsurprisingly, >> > many find the syntax as hard as expected for having trained on very >> > different syntaxes (especially when they are unclear about the >> semantics >> > that were attached to those syntaxes). Although the switch to teaching >> the >> > start of the course with literally the same materials, with the >> students >> > knowing that, seems to have reduced resistance substantially >> (presumably >> > they don't want to be seen as complaining about something 1st year >> > humantities students are fine with). >> >> This makes me wonder if some experienced programmers dislike simple >> syntax, not just because it is unfamiliar to them, but also because it >> is too simple to serve as an effective in-group filter. If humanities >> students are comfortable, we must raise the barrier to entry. ;) >> >> >> p.s. I just now stumbled across the Iron Ring obtained from the Ritual >> of the Calling of an Engineer. Probably everyone has heard of this >> except me, but if anyone hasn't: >> >> https://en.wikipedia.org/wiki/Ritual_of_the_Calling_of_an_Engineer >> > -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to racket-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/614d8a6a-78d4-468f-8941-c93d4b060efe%40googlegroups.com.