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
Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Kazinsal posted:

suddenly you've constructed an entire bytecode vm to safely handle strings for you

Why handle them? Let the strings create buffer overflows and SQL injections in the schools and churches, let the 0days pile up in the CVEs. In the end, they'll beg us to sanitise their inputs

Adbot
ADBOT LOVES YOU

DrPossum
May 15, 2004

i am not a surgeon

Powerful Two-Hander posted:

Why handle them? Let the strings create buffer overflows and SQL injections in the schools and churches. In the end, they'll beg us to santise their inputs

Radia
Jul 14, 2021

And someday, together.. We'll shine.

mystes posted:

C is fun to write and compile, just not necessarily to actually run

so long as it's not for as company it can be fun to run, too. that'd be it tho

mystes
May 31, 2006

memcpy all the strings and let god sort them out

FlapYoJacks
Feb 12, 2009
idk, I want everybody to be familiar with some of the basic concepts that C doesn’t hide as their first introduction to programming. knowing what the heap and stack are, what’s going on behind the scenes when you concatenate two strings, what a pointer or address is can be quite useful when debugging.

Really though, they should switch to “here’s how you properly search for issues and questions using Google and Github.” :v:

Radia
Jul 14, 2021

And someday, together.. We'll shine.

DoomTrainPhD posted:

idk, I want everybody to be familiar with some of the basic concepts that C doesn’t hide as their first introduction to programming. knowing what the heap and stack are, what’s going on behind the scenes when you concatenate two strings, what a pointer or address is can be quite useful when debugging.

Really though, they should switch to “here’s how you properly search for issues and questions using Google and Github.” :v:

universities really shouldn't be teaching programming-for-companies and the like, them focusing more on the theory, math and science bits is a good thing imho

Asleep Style
Oct 20, 2010

DoomTrainPhD posted:

idk, I want everybody to be familiar with some of the basic concepts that C doesn’t hide as their first introduction to programming. knowing what the heap and stack are, what’s going on behind the scenes when you concatenate two strings, what a pointer or address is can be quite useful when debugging.

Really though, they should switch to “here’s how you properly search for issues and questions using Google and Github.” :v:

my university switched from java to C for intro classes just before I got there for exactly this reason

CPColin
Sep 9, 2003

Big ol' smile.
My favorite bit a while ago was pointing out that Java passes all function parameters by value and watching the gears grind as people figured it out

Shaggar
Apr 26, 2006

Powerful Two-Hander posted:

Why handle them? Let the strings create buffer overflows and SQL injections in the schools and churches, let the 0days pile up in the CVEs. In the end, they'll beg us to sanitise their inputs

animist
Aug 28, 2018

GenJoe posted:


programming is a completely mystical thing to the majority of the population, so my theory is that if if you fail to sit people down during the beginning and, in the most basic terms possible, explain what a program actually /is/ (a control flow, using a syntax that follows definite and rigid rules), then of course you’ll end up with people trying to type natural language into the text file, because the rules on how this actually works were never reinforced in the first place


i should definitely have done this and will do it the next time i end up trying to teach somebody to program

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
play the pb&j instructions game

but the game is like, one game once, obviously long experience will help more than short experience to a point

Presto
Nov 22, 2002

Keep calm and Harry on.

Gazpacho posted:

i have to assume that at some point people are taught, or believe, that "a variable is a box for data" and then they come to pointers and it takes them a while to realize that that particular premise is no longer correct
It's still correct. It's just that for pointers the data in the box is the address of another box.

Antigravitas
Dec 8, 2019

Die Rettung fuer die Landwirte:

Powerful Two-Hander posted:

worrying flashbacks to my MATLAB control GUI from 2006 lol

That software has DRM implemented in Matlab code, by the way.

Yes, it's a commercial product.

Xarn
Jun 26, 2015

CPColin posted:

My favorite bit a while ago was pointing out that Java passes all function parameters by value and watching the gears grind as people figured it out

So does C.

Qtotonibudinibudet
Nov 7, 2011



Omich poluyobok, skazhi ty narkoman? ya prosto tozhe gde to tam zhivu, mogli by vmeste uyobyvat' narkotiki

GenJoe posted:

i will never understand why intro classes are still taught in C/C++, like I can not imagine a quicker way to turn someone off from programming than by making them deal with all of that poo poo

i can: introduce them to all the other bullshit they'll encounter in modern programming. the limitations of C are at least explained away as artifacts of their time, an earlier era where everyone built fundamental poo poo by hand. idk how you explain, say, the nodejs ecosystem

we at least got intro (and all the "implement CS concept as needed" courses) in python. later you got scheme in a programming languages course to showcase functional languages in opposition to python, and you then implemented a scheme interpreter in C to demonstrate how undergrads should not try to learn interpreter implementation AND C programming in ~5 weeks. mine worked, essentially, while leaking so much memory that it'd crash after about 5 nested addition calls. you also got C for the operating systems seminar, because it was unavoidable

i think since my alma mater has switched intro to java, a choice i cannot understand in the slightest

Deffon
Mar 28, 2010

I think the two most important things with teaching programming is explaining problem solving and being fun.

As programming becomes more common (it's taught in grade school where I'm from), I think you should assume that most people won't dabble in low level programming. They may only use a very small amount of programming to solve their day-to-day problems.
Their least concern should be the machine model that c specifies, as it is a minefield of gotchas where seemingly valid programs are rewritten by a gremlin compiler to be almost unrecognizable semantically.

I also don't believe that you should give the impression that you need a lot of ceremony to do the simplest things. In some languages you do, but students may never have to interact with one.
Dynamics arrays, dictionaries, strings, booleans and numbers should be enough for most problems, and people should be able to crank out solutions to these problems first. They can learn optimization after they know the basics of translating specification into code.

redleader
Aug 18, 2005

Engage according to operational parameters

DrPossum posted:

Any sufficiently complicated c program contains an ad hoc, informally-specified, bug-ridden, slow implementation

my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine
if someone is truly starting from absolutely nothing, then I think the only right answer is scratch, even at the undergrad level. people may think it's too cheesy though, idk

jesus WEP
Oct 17, 2004


scratch is fine, just needs a reskin to make it look less childish imo

redleader
Aug 18, 2005

Engage according to operational parameters
i can't believe the entire field of computer education has been getting it so wrong, when they we need are a couple of posters from this thread to set them straight

lih
May 15, 2013

Just a friendly reminder of what it looks like.

We'll do punctuation later.
weirdest intro course i've heard of was one that a french exchange student i knew had apparently taken, where they started out with assembly before moving to c. which sounds fine for learning how a computer actually works but as an introduction to programming for someone with no real background it sounds very rough

also don't really understand scheme's popularity as an introductory language but i guess that's been declining for a while now. early on as an introduction to functional programming, sure, but as a very first language it seems like it would be much more off-putting & have a higher learning curve than like, python. maybe that's the whole point though, being so unfamiliar that people aren't tempted to jam natural language into things or anything? looked up some Why Teach Scheme As A First Language resources and they're all advocating it in comparison to visual basic, c++, java or pascal, which says a lot and with those as the other options i can understand it as a choice much more.

my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine

redleader posted:

i can't believe the entire field of computer education has been getting it so wrong, when they we need are a couple of posters from this thread to set them straight

look buddy, if I had to be knowledgeable about the things I have opinions on I wouldn't be allowed a single one!!

Private Speech
Mar 30, 2011

I HAVE EVEN MORE WORTHLESS BEANIE BABIES IN MY COLLECTION THAN I HAVE WORTHLESS POSTS IN THE BEANIE BABY THREAD YET I STILL HAVE THE TEMERITY TO CRITICIZE OTHERS' COLLECTIONS

IF YOU SEE ME TALKING ABOUT BEANIE BABIES, PLEASE TELL ME TO

EAT. SHIT.


lih posted:

weirdest intro course i've heard of was one that a french exchange student i knew had apparently taken, where they started out with assembly before moving to c. which sounds fine for learning how a computer actually works but as an introduction to programming for someone with no real background it sounds very rough

also don't really understand scheme's popularity as an introductory language but i guess that's been declining for a while now. early on as an introduction to functional programming, sure, but as a very first language it seems like it would be much more off-putting & have a higher learning curve than like, python. maybe that's the whole point though, being so unfamiliar that people aren't tempted to jam natural language into things or anything? looked up some Why Teach Scheme As A First Language resources and they're all advocating it in comparison to visual basic, c++, java or pascal, which says a lot and with those as the other options i can understand it as a choice much more.

SMH as if JS or raw C is any better?

well maybe C isn't that bad, it's what my intro unit was in but I've been programming in a lot of things before so I didn't really care

and I was not alone hence the unit was hell on the literal 2 people who never programmed before, why yes writing a self-balancing tree in C few weeks in is perfectly legitimate

Private Speech fucked around with this message at 11:29 on Mar 27, 2022

Buck Turgidson
Feb 6, 2011

𓀬𓀠𓀟𓀡𓀢𓀣𓀤𓀥𓀞𓀬

lih posted:

weirdest intro course i've heard of was one that a french exchange student i knew had apparently taken, where they started out with assembly before moving to c. which sounds fine for learning how a computer actually works but as an introduction to programming for someone with no real background it sounds very rough

also don't really understand scheme's popularity as an introductory language but i guess that's been declining for a while now. early on as an introduction to functional programming, sure, but as a very first language it seems like it would be much more off-putting & have a higher learning curve than like, python. maybe that's the whole point though, being so unfamiliar that people aren't tempted to jam natural language into things or anything? looked up some Why Teach Scheme As A First Language resources and they're all advocating it in comparison to visual basic, c++, java or pascal, which says a lot and with those as the other options i can understand it as a choice much more.

As a guy that likes and uses scheme (well, racket nowadays) for my waste of time projects, I would say it's got the following going for it as an intro language:

- simple, extremely consistent (but extensible) syntax
- dynamic typing and types that are very easy to understand. Great numerical data types
- most accessible starting point for functional programming
- using list processing primitives is inevitably going to involve recursion, making it a good place to learn that as well
- interpreted, so you can test stuff out in the repl and then plonk it in your source file.
- decades of good resources covering beginner, intermediate and expert levels of knowledge
- high performance implementations are available so your code doesn't run like rear end
- pretty good tooling support (I mean... you don't need much)

In the case of racket you've got all the above, plus tonnes of cool libraries for doing all sorts of stuff, including gui and drawing stuff, you've got a good IDE that comes with the language, comes on a bunch of platforms etc.

Carthag Tuek
Oct 15, 2005

Tider skal komme,
tider skal henrulle,
slægt skal følge slægters gang



Powerful Two-Hander posted:

Why handle them? Let the strings create buffer overflows and SQL injections in the schools and churches, let the 0days pile up in the CVEs. In the end, they'll beg us to sanitise their inputs

and i will look down and whisper no

Corla Plankun
May 8, 2007

improve the lives of everyone
js seems like a good language to start with because it is trivial to inspect what is going on and it is filled with bullshit design decisions that will ruin your day, the two main things that programmers need to be aware of

leper khan
Dec 28, 2010
Honest to god thinks Half Life 2 is a bad game. But at least he likes Monster Hunter.

Corla Plankun posted:

js seems like a good language to start with because it is trivial to inspect what is going on and it is filled with bullshit design decisions that will ruin your day, the two main things that programmers need to be aware of

It's bad to start with because it encourages people to use it.

People should be initially taught in assembly because no one is dense enough to want to write large programs in it today. It also doesn't hide anything from the student about what the computer is doing.

Deffon
Mar 28, 2010

lih posted:

weirdest intro course i've heard of was one that a french exchange student i knew had apparently taken, where they started out with assembly before moving to c. which sounds fine for learning how a computer actually works but as an introduction to programming for someone with no real background it sounds very rough

also don't really understand scheme's popularity as an introductory language but i guess that's been declining for a while now. early on as an introduction to functional programming, sure, but as a very first language it seems like it would be much more off-putting & have a higher learning curve than like, python. maybe that's the whole point though, being so unfamiliar that people aren't tempted to jam natural language into things or anything? looked up some Why Teach Scheme As A First Language resources and they're all advocating it in comparison to visual basic, c++, java or pascal, which says a lot and with those as the other options i can understand it as a choice much more.

Using Scheme, you can teach people to build abstracts using very few building blocks.
All you need are some primitives data types, pairs, closures, recursion, and the ability to name expressions. Pairs can be chained into lists, records can represented as a list of alternating symbol names and values, a btree of pairs etc. Either way, you can hide these representations with names, and change their definitions without breaking clients. You are sort of forced into this mode of thinking, because reading a soup of (car lst) and (cdr lst) quickly becomes impossible.
I still feel like the Scheme design makes it hard to teach, since different things look too similar - dictionaries should stick out, but they look just like any other function call, which in turn look like macros. Clojure got this part right I think by using {} for dictionaries.

The low amount of building blocks and consistent syntax makes it easy to write an interpreter of Scheme, in Scheme itself. You can therefor try out new languages and language features relatively easy by building on top of it, as long you aren't bothered by all the parentheses. Racket takes this a step further by allowing you to write your own grammar for your languages that integrate with the DrRacket IDE - it's both a language and a language platform. Rhombus e.g. is language with an ML-like syntax being built on top of the Racket platform to address issues discovered when teaching the Racket language to students.

mystes
May 31, 2006

The one downside with starting people with languages like c is that while it will teach the fundamentals of stuff like pointers it may make them get overly used to implementing data structures from scratch every time.

It's kind of like high school english classes where students are supposed to come up with their own opinions on books without any reference to any existing works, which is completely divorced from the reality of what is going to be expected when writing anything in the entire rest of their lives.

Powerful Two-Hander
Mar 10, 2004

Mods please change my name to "Tooter Skeleton" TIA.


Corla Plankun posted:

js seems like a good language to start with because it is trivial to inspect what is going on and it is filled with bullshit design decisions that will ruin your day, the two main things that programmers need to be aware of

we have too many js devs as it is

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

Powerful Two-Hander posted:

we have too many js devs as it is
people with art history degrees have to end up somewhere, though

Sagacity fucked around with this message at 16:18 on Mar 27, 2022

Achmed Jones
Oct 16, 2004



Sagacity posted:

people with art history degrees have to end up somewhere, though

get outta here with this poo poo

Blinkz0rz
May 27, 2001

MY CONTEMPT FOR MY OWN EMPLOYEES IS ONLY MATCHED BY MY LOVE FOR TOM BRADY'S SWEATY MAGA BALLS

Sagacity posted:

people with art history degrees have to end up somewhere, though

gently caress off with all of this

FlapYoJacks
Feb 12, 2009

Sagacity posted:

people with art history degrees have to end up somewhere, though

gently caress off with this class warfare horseshit.

Doom Mathematic
Sep 2, 2008

Kazinsal posted:

a C program is something to look at, like a painting or an ivory box

A program is a beautiful thing up until anybody tries to run it or use it for something. Like fresh snowfall.

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost

Sagacity posted:

people with art history degrees have to end up somewhere, though

gently caress off

this is not to be construed as support for js devs but gently caress off

mystes
May 31, 2006

bob dobbs is dead posted:

gently caress off

this is not to be construed as support for js devs but gently caress off
This but lol that you were just posting about how people can only learn programming before they turn 18 or whatever

Sagacity
May 2, 2003
Hopefully my epitaph will be funnier than my custom title.

DoomTrainPhD posted:

gently caress off with this class warfare horseshit.
jfc this clearly touched some nerves

there just have been a ton of posts by someone trying to claim that you can't learn anything new once you're older than 18 and now it's a bad thing that you can actually retrain?

if it's not your passion in life to become a developer because you'd rather discuss fine renaissance art then that's fine, but nobody has a job for you so you can retrain and not immediately be a rockstar developer but someone who puts food on the table

if you consider this to be class warfare I'm not sure you understand what class warfare means

Achmed Jones
Oct 16, 2004



at least you're backpedaling instead of doubling down. that's good

Adbot
ADBOT LOVES YOU

bob dobbs is dead
Oct 8, 2017

I love peeps
Nap Ghost
did you people read my fuckin posts

i said you need to like, learn a board game or read music or learn geometry or something by 18, not know everything. yes, i have taught people who didnt meet this standard

bob dobbs is dead fucked around with this message at 17:18 on Mar 27, 2022

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