NerdResa utilise witches.town. Vous pouvez læ suivre et interagir si vous possédez un compte quelque part dans le "fediverse".
NerdResa @NerdResa

Teaching first semester students about C is surprisingly hard. How do you explain the concepts of variables or loops when they didn't understand your first three attempts at it?

@eribloodlust Good idea.
For variables maybe like drawers with some content in it?
For loops, mhh... there's probably songs or poems or something that repeats, but I'm not sure if that works.
You got more ideas?

@NerdResa drawers is good idea! or labels? maybe folders, because in folders u might label the items and the type?

or, variables can be related to algerbra, but you use instead of one letter, a different naming system

for loops, i would do it by relating it to doing action again and again until a condidion is met. like, hammering a nail until the head meets the wood, or if you only want to try something 3 times :)

@NerdResa curious, where is C used directly in the first semester? All universities I know start with some language (like Java) to explain the very basics with a similar syntax to C (assuming zero programming knowledge and experience) and progress to C,C++,etc in later semesters

@ng0 TU Berlin. There were reasons behind that choice, like I think the students need C for some other course in the first year.

@NerdResa Ah, okay. I imagine this to be challenging, here at the university of applied science they start very low, with Java.

@NerdResa Try (in parallel): explaining, how CPUs work (registers, instructions etc. C is quite low level after all) and showing them Scratch (or Python), or… teach them Lisp, there ar no variables.

@NerdResa

If it doesn't have to be technically accurate and you just want people to get a rough understanding of the concepts, maybe you could use a desk worker as an analogue for the CPU.

Variables would be notes the worker keeps.

A loop could be the boss/coworker/whatev (ie. the program) coming in handing the worker the same form 20 times and telling them to fill em out for different recipients?

This analogue clearly needs some work, but I think you'll get what I'm going for.

@NerdResa Also, it has a neat connection with the real world since "computers" used to be people. :)

@NerdResa You're welcome. Learning is one of the better things going on in our society. :P

Update on the C programming course: I'm getting better at patiently explaining what the difference between declaring, defining, and calling a function is, while chasing segfaults with some other students who are already playing around with pointers and memory management.
It's not easy adapting to the learning speed of 1000 first semester students, but I'm happy about everyone's progress.

@NerdResa As they advance a bit more, you may suggest them reading others' code and changing it.

@steelman Sadly sharing their code with each other would violate my group's anti-plagiarism policy.
However I just recently argued for at least the tutors making their code examples available to the students. Some people, like me, learn well by recognizing patterns, imitating and adapting.

@NerdResa My bad. I had rather meant free software code.