Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
OddObserver
Apr 3, 2009
<< is. >> not so much (error handling belongs in this thread).

Adbot
ADBOT LOVES YOU

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
I dunno, I would agree it’s harmful to have core things like I/O that tend to be central to intro programming use a really idiosyncratic syntax that doesn’t reinforce anything else you’re learning about the language. And the stateful way iostreams handles formatting is really confusing when you’re at a stage to try to piece together how it works.

namlosh
Feb 11, 2014

I name this haircut "The Sad Rhino".

rjmccall posted:

I dunno, I would agree it’s harmful to have core things like I/O that tend to be central to intro programming use a really idiosyncratic syntax that doesn’t reinforce anything else you’re learning about the language. And the stateful way iostreams handles formatting is really confusing when you’re at a stage to try to piece together how it works.

I guess different people view it differently, but I know for a fact it messed up my understanding… as I’ve already said.

I see it like math… you start learning a new concept by learning all of the things that prove that concept to be a logical next step.

Learning trigonometry without geometry would suck.
As would learning calculus without understanding limits and Cartesian plane and such.

C’s printf is much easier to wrap your head around, even if you don’t know how to define your own function yet.

Maybe having a better teacher would have helped idk

Bongo Bill
Jan 17, 2012

It's probably easier to start by learning a simpler language even if it has some warts, but I have come to believe that making the "wrong" choice of beginner programing language is only harmful to those who never go on to learn a second language.

QuarkJets
Sep 8, 2008

otoh learning Java as your first language is definitely harmful no matter how many other languages you go on to learn

There have been a bunch of times where I've seen some coworker's idiot bespoke inheritance nightmare and been like "May I ask if you used to be a Java developer?" and they're always "Why yes, how did you know???"

cheetah7071
Oct 20, 2010

honk honk
College Slice
yeah I was about to say that I think public static void main (string[] args) is going to be way more confusing to a day-one student than cout << "hello world!"

kind of a race for the bottom though

Canine Blues Arooo
Jan 7, 2008

when you think about it...i'm the first girl you ever spent the night with



Grimey Drawer
I have a hot take that I still not completely convinced of, but am growing more convinced of as time passes:

Your first language should not be Python, Javascript, something really high level.

I think you should have to deal with statically, strongly typed structures from step one. The reason here is that folks that start on python et al seem to struggle a lot with types, how to use them, and their benefits, where going the other way is much easier.

shame on an IGA
Apr 8, 2005

IEC 61131 Functional Block Diagram

OddObserver
Apr 3, 2009

Canine Blues Arooo posted:

I have a hot take that I still not completely convinced of, but am growing more convinced of as time passes:

Your first language should not be Python, Javascript, something really high level.

I think you should have to deal with statically, strongly typed structures from step one. The reason here is that folks that start on python et al seem to struggle a lot with types, how to use them, and their benefits, where going the other way is much easier.

TAing an intro course in Java convinced me we need to bring something like Pascal back. Just with a string type (and probably GC).

lifg
Dec 4, 2000
<this tag left blank>
Muldoon
Back when Perl was popular I heard someone say, “Perl is a great second language to learn,” and I think that’s true for a lot of high level languages today.

But maybe there should be different intro classes for people who just want a taste of programming, from those for comp sci majors.

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Canine Blues Arooo posted:

I have a hot take that I still not completely convinced of, but am growing more convinced of as time passes:

Your first language should not be Python, Javascript, something really high level.

I think you should have to deal with statically, strongly typed structures from step one. The reason here is that folks that start on python et al seem to struggle a lot with types, how to use them, and their benefits, where going the other way is much easier.

I've noticed this too and I agree.

nielsm
Jun 1, 2009



OddObserver posted:

TAing an intro course in Java convinced me we need to bring something like Pascal back. Just with a string type (and probably GC).

Advantage of Pascal family is also that keywords look better when hand written than weird braces do.

(Look into FreePascal.)

more falafel please
Feb 26, 2005

forums poster

lifg posted:

Back when Perl was popular I heard someone say, “Perl is a great second language to learn,” and I think that’s true for a lot of high level languages today.

But maybe there should be different intro classes for people who just want a taste of programming, from those for comp sci majors.

When I was in high school/college, just loving around and learning about UNIX and not needing to actually write maintainable code, Perl felt so freeing. My previous experience was with BASIC, then C++, then assembly, then C. Perl opened up a world of possibilities because it supports basically every possible programming paradigm, so you get to see and gently caress around with a lot of different approaches to programming.

Now though, I couldn't imagine wanting to write Perl for a living.

Athas
Aug 6, 2007

fuck that joker
How come it's "cout" and not just "out" or "stdout"?

Qwertycoatl
Dec 31, 2008

Athas posted:

How come it's "cout" and not just "out" or "stdout"?

The 'c' means 'character'.

champagne posting
Apr 5, 2006

YOU ARE A BRAIN
IN A BUNKER


Github actions is jumping on that ">>" operator like it's a live grenade: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

That's not the C++ >> operator. That's the shell >> operator.

The real coding horror is the previous scheme they had, where magic strings appearing in stdout would cause variables to be written and passed to later actions.

Xarn
Jun 26, 2015
who could've thought that malicious users might be able to also write to stdout?

Xarn
Jun 26, 2015

Canine Blues Arooo posted:

I have a hot take that I still not completely convinced of, but am growing more convinced of as time passes:

Your first language should not be Python, Javascript, something really high level.

I think you should have to deal with statically, strongly typed structures from step one. The reason here is that folks that start on python et al seem to struggle a lot with types, how to use them, and their benefits, where going the other way is much easier.

strongly disagree (well not about Javascript, because Javascript is a loving stupid language)

Learning in Python is fine, because it gets you started at expressing what you want to do, and you will learn about the benefits of types very quickly, as your program approaches couple hundred lines of code :v:

Beef
Jul 26, 2004
My hot take on your hot take is that rich structured static typing is another programming language in your programming language and that you shouldn't pile on to a fresh programming student's already overloaded brain another programming language in the programming language that they are learning how to program with. Get as much of the language out of the way while they are learning the basics, for christ's sake. You can always teach your "look ma, a R&B tree in dependent types" language after.

Phobeste
Apr 9, 2006

never, like, count out Touchdown Tom, man
Yeah your absolutely basic basic basic “learn what a program is” is pretty well served by a dynamically typed interpreted language because it minimizes the iteration time (see the strange loop talks posted in the ergonomics thread) because at that level you need to learn things like “the computer does exactly what you write down even if it’s not what you mean it to do” and “programs are sequences of instructions” and what function calls are and iteration is and a basic appreciation of the OS support environment - this is the “don’t make them learn another language inside the language” thing. After that though I agree it’s probably better to do something like C++, even if it’s filled with footguns, for the same reason you learn music theory or read old literature or philosophy: code is written by humans, PLs are made by humans, and learning the history and the basics makes it easier to learn and appreciate better things by understanding what they’re in conversation with. My ideal software engineering sequence probably has at least one course or courses where you write programs in like an asm, c, Common Lisp, smalltalk, forth, ocaml, C++, java, javascript, python, rust, apl or k, etc.

CPColin
Sep 9, 2003

Big ol' smile.
Everybody should learn BASIC then C++ without understanding OOP then Java 1.2 while still not understanding OOP, like I did.

b0lt
Apr 29, 2005

Beef posted:

My hot take on your hot take is that rich structured static typing is another programming language in your programming language and that you shouldn't pile on to a fresh programming student's already overloaded brain another programming language in the programming language that they are learning how to program with. Get as much of the language out of the way while they are learning the basics, for christ's sake. You can always teach your "look ma, a R&B tree in dependent types" language after.

You need to teach them what types are basically immediately anyway, to answer e.g. "Why does python not let me do '123' + 4?". You might as well start them off on the right foot and have them actually think about the shapes of their variables, instead of just assuming and being wrong.

raminasi
Jan 25, 2005

a last drink with no ice
My hot take is that there's no single archetypal beginner programmer so there's no universally correct choice for a beginner language. My anecdata: I used to teach absolute beginner computer science to super smart high-schoolers, and the course was so short that it could only really be a survey course, so part of it was three days of Scheme and three days of C. Some students loved Scheme and hated C ("I like it because I can just write the conceptual logic I'm trying to express without the language getting in my way") and others were the opposite ("I like it because I can write and understand exactly what I want the computer to do").

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


raminasi posted:

My hot take is that there's no single archetypal beginner programmer so there's no universally correct choice for a beginner language. My anecdata: I used to teach absolute beginner computer science to super smart high-schoolers, and the course was so short that it could only really be a survey course, so part of it was three days of Scheme and three days of C. Some students loved Scheme and hated C ("I like it because I can just write the conceptual logic I'm trying to express without the language getting in my way") and others were the opposite ("I like it because I can write and understand exactly what I want the computer to do").

You can't evaluate introductory courses just based on how well the students like them. That's a recipe for disaster.

The real question you have to answer is why you're teaching programming. Do you want your students to be up and running as soon as possible? In that case, Python or JavaScript are probably the best choice. But if you want to set your students up to do well learning new things later, then bringing in some of the big ideas that those language sweep under the rug is probably a better choice.

Volte
Oct 4, 2004

woosh woosh

ultrafilter posted:

You can't evaluate introductory courses just based on how well the students like them. That's a recipe for disaster.
Introductory courses that the students hate are a recipe for dropping out instantly

edit: No matter what the introduction is, the students are going to be learning bad habits and misconceptions that they need to break later, so you might as well start with the thing that gives them the least friction. I love strong static typing and very much dislike dynamic typing, but only because I went through a phase of loving dynamic typing, learning some hard lessons, and realizing how hard it is to architect a solid system that I'm confident in with dynamic types. At best if you teach students how great static types are to begin with, they're going to essentially be cargo culting it (or rebelling against it) for superficial reasons that they can't possibly understand intuitively. Experience is the only true teacher of these things - the best introduction is the one that makes students want to know more and keeps them interested.

Volte fucked around with this message at 15:52 on Oct 24, 2022

Loezi
Dec 18, 2012

Never buy the cheap stuff
ITT: goons ignoring every published piece of CSEd research because "well that's how I learned", or "it just makes sense to me". Truly the programming (education) horrors are coming from inside the thread.

lifg
Dec 4, 2000
<this tag left blank>
Muldoon
One thing I liked about learning programming with C was how you had to be explicit about passing parameters by-copy or by-reference. Higher level languages all assume you understand that model to some degree, label certain variable types “primitives”, and don’t spend a lot of time on it.

I’m not going to say it’s a foot gun in other languages, but I always wonder if it trips up people who write big projects.

QuarkJets
Sep 8, 2008

ultrafilter posted:

You can't evaluate introductory courses just based on how well the students like them. That's a recipe for disaster.

The real question you have to answer is why you're teaching programming. Do you want your students to be up and running as soon as possible? In that case, Python or JavaScript are probably the best choice. But if you want to set your students up to do well learning new things later, then bringing in some of the big ideas that those language sweep under the rug is probably a better choice.

Doing well... at writing code? lol

QuarkJets
Sep 8, 2008

Loezi posted:

ITT: goons ignoring every published piece of CSEd research because "well that's how I learned", or "it just makes sense to me". Truly the programming (education) horrors are coming from inside the thread.

This may come as a shock but often the point of publishing research is to enhance discussion, not to be authoritative. It's cool and good and normal for people, even experts, to read rigorous research and then disagree with it.

Goons itt probably aren't reading the research in the first place though (when it comes to this topic I certainly haven't read anything) so maybe you could point out something specific to improve the discussion?

Volmarias
Dec 31, 2002

EMAIL... THE INTERNET... SEARCH ENGINES...
I thought the point was to publish enough to eventually get tenure?

ultrafilter
Aug 23, 2007

It's okay if you have any questions.


Volmarias posted:

I thought the point was to publish enough to eventually get tenure?

And if it happens to be useful, bonus.

rjmccall
Sep 7, 2007

no worries friend
Fun Shoe
A lot of CS pedagogy studies have the same basic problems as pedagogy studies everywhere else, which is that it is impossible to do a blind experiment in pedagogy, and so the pedagogue’s preferred system is usually practiced by young, energetic teachers who are excited to be part of the study and deeply dedicated to improving things for their students, whereas the comparison group, uh, often does not differ from that only in carefully-controlled ways. There are a lot of studies that don’t replicate when you try to reproduce them outside the resource- and teacher-skill- rich setting of the original environment.

Xarn
Jun 26, 2015

lifg posted:

One thing I liked about learning programming with C was how you had to be explicit about passing parameters by-copy or by-reference. Higher level languages all assume you understand that model to some degree, label certain variable types “primitives”, and don’t spend a lot of time on it.

I’m not going to say it’s a foot gun in other languages, but I always wonder if it trips up people who write big projects.

C only ever does pass by copy

QuarkJets
Sep 8, 2008

Computers were a mistake

namlosh
Feb 11, 2014

I name this haircut "The Sad Rhino".

Loezi posted:

ITT: goons ignoring every published piece of CSEd research because "well that's how I learned", or "it just makes sense to me". Truly the programming (education) horrors are coming from inside the thread.

Point me to some of these studies/research so that I may continue to ignore it!

lifg
Dec 4, 2000
<this tag left blank>
Muldoon

Xarn posted:

C only ever does pass by copy

My vocabulary is shot. I meant being explicit about pointers.

Dijkstracula
Mar 18, 2003

You can't spell 'vector field' without me, Professor!

in grad school I TAed the intro CS course that used Racket and the How To Design Programs curriculum and it had a few very nice properties, including:

- The teaching language was actually a series of Racket subsets that expanded as the curriculum progressed, and that allowed for incredibly descriptive and precise error messages and avoided any "here's some magic `public static void main(string[] args)` incantantations for you to memorise because we're 4 weeks into the course and there's no expectation that you know what it means" sort of hand-waving. By the same token, the material remains pretty rigorous (we don't call it by its name of course but morally we start by drilling into students that induction principles for a datatype are how you write functions that operate on that datatype, and then loosening that principle as the material goes on)

- In the past I've really hated teaching IDEs like BlueJ and PyCharm but DrRacket integrates really nicely into the language, and the extent to which "embeddable" things like images and, morally, iframes, integrate with the tooling means you could very quickly write expressions that operate on "non-textual" data which let students build cooler things like web mashups without much ceremony

- The fact that essentially no high school CS curriculum used Racket meant students were coming in on a more even playing field, and as an added bonus the nerdsniping "I learned C++ over the weekend" class of first-year Uni students ended up getting nicely chasened fairly quickly.

Folks were asking about CSE papers earlier, so here's one about the curriculum: https://www.cs.tufts.edu/~nr/pubs/htdp.pdf

Falcon2001
Oct 10, 2004

Eat your hamburgers, Apollo.
Pillbug

Dijkstracula posted:

in grad school I TAed the intro CS course that used Racket and the How To Design Programs curriculum and it had a few very nice properties, including:

- The teaching language was actually a series of Racket subsets that expanded as the curriculum progressed, and that allowed for incredibly descriptive and precise error messages and avoided any "here's some magic `public static void main(string[] args)` incantantations for you to memorise because we're 4 weeks into the course and there's no expectation that you know what it means" sort of hand-waving. By the same token, the material remains pretty rigorous (we don't call it by its name of course but morally we start by drilling into students that induction principles for a datatype are how you write functions that operate on that datatype, and then loosening that principle as the material goes on)

- In the past I've really hated teaching IDEs like BlueJ and PyCharm but DrRacket integrates really nicely into the language, and the extent to which "embeddable" things like images and, morally, iframes, integrate with the tooling means you could very quickly write expressions that operate on "non-textual" data which let students build cooler things like web mashups without much ceremony

- The fact that essentially no high school CS curriculum used Racket meant students were coming in on a more even playing field, and as an added bonus the nerdsniping "I learned C++ over the weekend" class of first-year Uni students ended up getting nicely chasened fairly quickly.

Folks were asking about CSE papers earlier, so here's one about the curriculum: https://www.cs.tufts.edu/~nr/pubs/htdp.pdf

I kind of love how obscurity is a feature for this, but this all sounds pretty neat.

Adbot
ADBOT LOVES YOU

QuarkJets
Sep 8, 2008

I used to work adjacent to a group that used Racket and Scheme because their literally diagnosed autistic lead developer was in love with those languages, but every single one of them absolutely hated working with them when it came to developing software. I didn't ask for specifics but apparently the MIT professors that created Scheme dropped it from the curriculum because they couldn't find anyone outside of academia who actually wanted to use it for anything

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply