Live data from Hacker News

Why We Should Teach Python instead of Racket

acbart.github.io

51–60 of 69 posts

Re: Why We Should Teach Python instead of Racket

#51
post #12

Python is a terrible choice as a first language. Idiomatic python is just glue code that obfuscates the underlying algorithms. Object oriented programming (implementation inheritance) is increasingly regarded as an antipattern, and it encourages that too. The massive performance penalty of writing logic in python vs calling out to external libraries mostly forces developers to program by lego-brick assembling externa…

Python is a great first language, because you can learn the basics in an afternoon, but it is still capable of handling (and actually used for) many real-world tasks from robotics to games to scientific computing.

Its low barrier to entry, high reward/effort ratio and quick feedback loop make a good way to recruit potential CS majors!

As others have mentioned, Python's slowness can also require you to pick good algorithms, and its minimal compile-time error checking means that you really need to test your code well and also handle unexpected runtime errors. ;-)

BASIC is a great first language for similar reasons.

Re: Why We Should Teach Python instead of Racket

#52

Full disclosure - I took 3 classes in Racket: Intro to CS, Programming Languages, and Compilers. > Racket is not a very popular language in teaching communities This list of schools with introductory Racket classes isn't accurate, because the author did not look beyond the naming of the courses on the Github page. My school was missed. > Students are unlikely to have had prior experience with Racket This is good beca…

> Students do not like Racket

That is kind of the killer, isn't it? 10+ years of Racket and students still hate it. If they can learn introductory CS without suffering through Racket, why force them to do so? (Disclaimer: I think Racket looks interesting but I have never tried to use it for a project.)

But why not allow students to vote with their feet? Offer Racket and Python and see which course's graduates do better in the rest of the major.

Re: Why We Should Teach Python instead of Racket

#53
I think most people here are commenting as graduates/professional so I thought I would chime in.

As a student, I love being taught in Python for introductory CS classes. I have been a course assistant as well.

The language is easy to pick and has great/easy applications that doesn't require learning another additional language.

(I am not opposed to learning another and carry the sentiment that you can relatively pick up another language.)

The second part is important to me as a student because I can quickly use it in my web programming projects, in my data-related projects and for scripting purposes as well(I admit I rarely do this).

Re: Why We Should Teach Python instead of Racket

#54

Full disclosure - I took 3 classes in Racket: Intro to CS, Programming Languages, and Compilers. > Racket is not a very popular language in teaching communities This list of schools with introductory Racket classes isn't accurate, because the author did not look beyond the naming of the courses on the Github page. My school was missed. > Students are unlikely to have had prior experience with Racket This is good beca…

> At my school the Programming Languages core curriculum all used Racket. A good percentage of students funneled into at least the first PL-core class as part of their requirements. The class was very popular.

Although the article didn't cover it, I think it's important that in the industry, students will be able to find a job/internship that uses Python more than Racket. If both languages achieve the goal of introducing students to CS, why not use something that could benefit students more?

Re: Why We Should Teach Python instead of Racket

#55
post #35
post #12

Python is a terrible choice as a first language. Idiomatic python is just glue code that obfuscates the underlying algorithms. Object oriented programming (implementation inheritance) is increasingly regarded as an antipattern, and it encourages that too. The massive performance penalty of writing logic in python vs calling out to external libraries mostly forces developers to program by lego-brick assembling externa…

Performance is largely irrelevant for the first teaching language. You can completely ignore OOP (unlike Java) if you want, although you probably should teach students about it at some point. Python doesn't have "no concept of types". I have TA'd different intro classes that started with those languages, and Python IMHO makes a way better first language than C or Java. Start with it, introduce other languages and the…

> Performance is largely irrelevant for the first teaching language. You can completely ignore OOP (unlike Java) if you want, although you probably should teach students about it at some point. Python doesn't have "no concept of types".

That's how my college (Macalester) teaches it. We have two levels of CS class. One in Python, that only covers OOP at the end of the class in regards to GUI/Games.

We have another OOP class where we use Java and we go a little more deeply into CS concepts + Software Engineer Practices.

The first course is intended for anyone wanting to have some view of what CS is. I think it's a good balance.

It also helps that there are good job opportunities with both Python and Java(more so).

Re: Why We Should Teach Python instead of Racket

#56

We did CS courses in C and C++ 22 years ago. I recently did an MsC program at the same University and most courses are being done using Java. But for assignments teachers allow any programming language - if the task permits - so I did mine in C#. Some colleagues used Java, one guy used Python.

How did they handle grading?

Re: Why We Should Teach Python instead of Racket

#57
post #46

Earlier quoted context omitted.

Just to make sure I understand you correctly - you're arguing that it is not the place of universities to address real-world needs? History and economics faculty should have nothing to offer to politicians? Biologists in universities should study model organisms, leaving the study of humans to the medical industry, and biology degree programs should not pump out health monkeys? Law professors should discuss specially…

I didn't say anything about areas whose research focus coincides with 'real-world needs', I specifically talked about programming languages and concepts. And no, universities should not teach micro services, enterprise Java code, or the latest frontend frameworks. But yeah, keep twisting my words around.

Sorry, I'm still not sure I understand. You're saying that computer science is one of the specific areas whose research focus does not and should not coincide with "real-world needs," in contrast to history, economics, biology, law, and music? Or am I misunderstanding you badly?

What other fields of study are like computer science in that they shouldn't be about real-world needs? For a given discipline, how do you tell which of the two categories it falls into?

Re: Why We Should Teach Python instead of Racket

#58

Full disclosure - I took 3 classes in Racket: Intro to CS, Programming Languages, and Compilers. > Racket is not a very popular language in teaching communities This list of schools with introductory Racket classes isn't accurate, because the author did not look beyond the naming of the courses on the Github page. My school was missed. > Students are unlikely to have had prior experience with Racket This is good beca…

> Students do not like Racket That is kind of the killer, isn't it? 10+ years of Racket and students still hate it. If they can learn introductory CS without suffering through Racket, why force them to do so? (Disclaimer: I think Racket looks interesting but I have never tried to use it for a project.) But why not allow students to vote with their feet? Offer Racket and Python and see which course's graduates do bett…

My university has taken this approach. The main intro class is still Racket based, but they offer a Python alternative which satisfies the same requirements. I hope they're tracking the difference in outcomes!

Re: Why We Should Teach Python instead of Racket

#59

Full disclosure - I took 3 classes in Racket: Intro to CS, Programming Languages, and Compilers. > Racket is not a very popular language in teaching communities This list of schools with introductory Racket classes isn't accurate, because the author did not look beyond the naming of the courses on the Github page. My school was missed. > Students are unlikely to have had prior experience with Racket This is good beca…

> At my school the Programming Languages core curriculum all used Racket. A good percentage of students funneled into at least the first PL-core class as part of their requirements. The class was very popular. Although the article didn't cover it, I think it's important that in the industry, students will be able to find a job/internship that uses Python more than Racket. If both languages achieve the goal of introdu…

Python is definitely more real-world practical. Most students will go on to learn it in future classes anyways though. An Intro class is better off preparing a conceptual foundation that will serve students across many languages and paradigms.

Re: Why We Should Teach Python instead of Racket

#60

Full disclosure - I took 3 classes in Racket: Intro to CS, Programming Languages, and Compilers. > Racket is not a very popular language in teaching communities This list of schools with introductory Racket classes isn't accurate, because the author did not look beyond the naming of the courses on the Github page. My school was missed. > Students are unlikely to have had prior experience with Racket This is good beca…

> At my school the Programming Languages core curriculum all used Racket. A good percentage of students funneled into at least the first PL-core class as part of their requirements. The class was very popular. Although the article didn't cover it, I think it's important that in the industry, students will be able to find a job/internship that uses Python more than Racket. If both languages achieve the goal of introdu…

The question is "will teaching python actually benefit students more"?

Having learned Python well before any of the Lisps, today I find it a cumbersome language that doesn't really offer anything above others, and while useful, in an academic setting I'd relegate it to a secondary status of language specific to certain courses that use tooling related to it. I'd probably forgo teaching it at that, as the experience of learning a language on your own (and Python got pretty good materials included for that) is pretty important, and can be supported by one or two workshops to help students struggling with it.

Remember, learning Computing Science at an University is not a vocational course like a bootcamp, that churns out people more or less prepared for churning basic, simple code (not to disparage the students of those, but Bootcamps are by nature simplified). That's not what going to university for a CS degree is for, and every institution that assumed such mindset had their course quality plummet.

Post reply on HN