Live data from Hacker News

Teaching how to code is broken

neil.computer

141–150 of 258 posts

Re: Teaching how to code is broken

#141
post #137

One of the paradoxically oddest and best ways I've seen programming taught was from a games programming class I took in high school. We were tasked with transcripting a game (custom engine) from a booklet with its code already written. So it was more-or-less just typing what was in the book. Thing was, the code was filled with typos and broken code so that if you copied it verbatim, it wouldn't work. I'm not sure if…

This sounds pretty similar to code koans, where you learn a language by making all the tests pass. The rustlings course for Rust works this way too - very effective IMO.

Some examples:

- F#: https://github.com/ChrisMarinos/FSharpKoans

- Ruby: https://github.com/edgecase/ruby_koans

- Powershell: https://github.com/vexx32/PSKoans

- Rust: https://github.com/rust-lang/rustlings

Re: Teaching how to code is broken

#142

Earlier quoted context omitted.

> Girls in STEM: society needs to quit telling people "math is hard, tee hee" To me, the very existence of "Girls in STEM" groups is sending a weird message to girls (and I’m apparently not the only one to think that). Something along the lines of “sure you can do STEM, you’re just not good enough to do it the regular way so we created a group just for you”. Honestly that’s the message a lot of diversity initiatives…

True to some degree, but I think it does help girls get involved in areas where boys are dominant. In high school the comments from boys towards girls interested in such pursuits can deter them. Having a space free of that, at least until they've developed the motivation to continue, is important. As a high school CS teacher, I've seen how boys can be towards girls interested in coding. All of this swings both ways,…

> As a high school CS teacher, I've seen how boys can be towards girls interested in coding.

I'm surprised. I was expecting the opposite (boys wanting more girls in the classroom!).

> All of this swings both ways, of course, and men are deterred from positions like elementary school teacher, nursing, and secretary roles.

It's interesting that there's an acknowledgement that we need more male nurses (from healthcare professionals) and male elementary school teachers (from experts in the field) and yet there are zero initiatives to do so.

By that I mean money being spent toward that goal. The same way there's a will to have more "diversity" in medicine... mainly so that people of color can go serve "their people" in underserved areas (read: not very attractive or lucrative).

But in computing we’re spending a fortune and investing time to essentially… commoditize ourselves.

Re: Teaching how to code is broken

#143
I like the idea presented here but I think a mix of approaches is needed.

After the author's chapter 2, "Chapter 2: Suits (String concatenation, Int vs literal string)" I would want to extend it to say on top of strings and ints we also have booleans, floats, null, and any other primitives and why they're useful (maybe these show up in the lessons, maybe they don't).

I'd do the same for chapter 3 too. After learning about arrays I'd want to include a section on other objects that are common, maps, sets, linked lists etc.

Both styles need to be mixed together imv.

Re: Teaching how to code is broken

#144

Earlier quoted context omitted.

> grade-driven teaching I've never understood the modern theory that one can master a subject yet not be able to answer questions about it.

/watches straw man fall over without putting up a fight. Would you rather work with someone who added a major subsystem to one of your compilers for fun or someone who had never coded but could recite the ISO standard by heart? Who believes the former person “would not be able to answer questions about [the subject]”? If measurements tend to become targets over time then the goal of “develop expertise” measured by “p…

> Who believes the former person “would not be able to answer questions about [the subject]”?

All the people who believe that "teaching the test" is not real knowledge.

For example, would you hire a lawyer who flunked the bar? How about consult a physician who couldn't pass his medical boards? How about get on an airplane with a pilot who flunked flight school, but "really knows how to fly"?

And yes, there are bad tests. But there are also good tests, and they work. Personally, I've never encountered a person who mastered a topic but couldn't get a good grade in it.

Re: Teaching how to code is broken

#145

My approach is to employ folks with enthusiasm. If they're teachable, they'll figure out whatever pile of tools they get thrown into on the first task. Then they'll have some skills and the next task will seem less daunting. Of course some mentoring is useful. But just the stuff that's pertinent to the task at hand; concrete help that gets them moving forward. Because, somebody is paying for results. And because prod…

Have you actually been through this before ? I ask because my experience wasn't the same so I'm interested in other perspectives. One experience that jumps to mind right away - a few years back I was in charge of mentoring a group of interns. The thinkering/enthusiastic guy was smart and reminded me of myself at that stage - but I was a terrible employee at that point and it took a lot of failing to get productive, a…

Reminds me of myself too. Very enthusiastic, loved to code and built over complicated stuff (I can only hope I've stopped or do so less).

But I do still most enjoy working with enthusiastic people as long as they've totally failed a few times, to know their own weakness.

Re: Teaching how to code is broken

#146
There are people working on this rigorously, try going through Prof Krishnamurthi's papers: https://cs.brown.edu/~sk/ he teaches higher-order functions because they've found it helps students understand how an API works, he designed his own learning language from scratch (Pyret) and I went through much of his older CS19 Brown course here: https://learnaifromscratch.github.io/software.html because the course uses a web browser IDE, they were able to take stats of all students to see when they started to write code VS when they wrote examples and tests. The tests he teaches are property-based not typical cs101 style tests just plugging in edge cases and hoping for the best. His goal is to turn the teaching of programming from absolute guesswork and wishful thinking into something proven to work which is admirable, most CS professors that I had just taught whatever they felt was best for them when they first learned, not what is provably best for everyone in a large class.

Of course the answer to everything is 'just be motivated and dig deep into X then you will learn as you go' like building a program from scratch, or how some mathematician's learned by being fascinated with various topics and purely researching them on their own for hours on end. For some people this will work others will just give up when it gets too difficult, I find it's something you can do after 1/2 of a course, you have just enough education to be able to read the documentation and now you can actually teach yourself whereas before that just attempting cryptic docs about types and objects good luck.

Then of course there is getting paid to program, which requires specific skills you would never get doing ad-hoc hacking around for fun. You actually have to go on Kattis or Leetcode and bang out countless tiny algorithms where each one you have to defend your architect choices with analysis of it's complexity to a room of professionals with vastly more experience than you, and this is of course what most people want when they tell you 'teach me how to code' it's really 'teach me to make money from my laptop like you do'.

Re: Teaching how to code is broken

#147
post #9

Earlier quoted context omitted.

Meanwhile my sister's first programming course at university involved making a game using an existing bespoke framework. It mostly involved adding graphics and a few methods & some properties to objects (which already had physics etc. implemented) in an otherwise more or less done project base. I don't know about retaining or intimidation but I feel like it was way too much "just fill in the gaps, look you have a cha…

> Meanwhile my sister's first programming course at university involved making a game using an existing bespoke framework. I had exactly the same exercise on my first day on uni, we had to take some robot maze pathfinder game and adjust the algorithm a bit. As someone who had been writing code for over a decade at that point (but who was unfamiliar with Java), I still remember it was intimidating. I cannot imagine ho…

Warwick? :)

In hindsight, the quality of teaching actual coding at my uni was pretty poor. But coding in general is pretty hard to teach well in that setting.

Re: Teaching how to code is broken

#148
It's not about teaching people literally how to code. It's about teaching people how to learn how to code.

For example, if you're trying to teach someone Javascript with "this is a variable, this is a function, this is an event listener" they're going to get no where. It should be "how to change the color of a button when I click on it."

Then you guide the person to creating a good Google search query. And I think it's totally acceptable for beginners (and experienced programmers) to just copy and paste at the beginning, slowly figuring out how it all works as they try to get an idea working.

Re: Teaching how to code is broken

#149

Earlier quoted context omitted.

> grade-driven teaching I've never understood the modern theory that one can master a subject yet not be able to answer questions about it.

I think you've got that backward. I think parent poster is complaining about teaching methods where the belief is that "answering questions" -> "mastery." "Grade-driven teaching" here refers more to the "all we're gonna do is give you homework and a test." It's like industrialization of teaching - no mentoring or individual conversation, just tests and reading material. When you've got 1 teacher and 20-40 kids, it's…

I've forgotten the material from many courses I've taken. But I've also discovered that the knowledge quickly returns if I retake a course on the same material, far quicker than it took the first time. The knowledge is still there, it just needs some WD-40 to break it loose again.

And yes, doing column buckling problem sets in college enabled me to size the jackscrew for the 757, as it was a column buckling problem.

Re: Teaching how to code is broken

#150

Earlier quoted context omitted.

> grade-driven teaching I've never understood the modern theory that one can master a subject yet not be able to answer questions about it.

I think you've got that backward. I think parent poster is complaining about teaching methods where the belief is that "answering questions" -> "mastery." "Grade-driven teaching" here refers more to the "all we're gonna do is give you homework and a test." It's like industrialization of teaching - no mentoring or individual conversation, just tests and reading material. When you've got 1 teacher and 20-40 kids, it's…

What’s interesting to me is that I’m tue internet you’ve got loads of students and loads of more experienced medium people meeting on stackoverflow and forums and right there where there is individual connection and back and forth, the experts keep trying to silence it because they want only expert discussions about advanced topics.

Like the companies that will help you leave as a customer because at least you leave with a good feeling and might come back, versus the companies which make it hard so you hate them forever. Experts go round Internet forums with a “fuck off lazy noob” attitude then wonder why the forum is in decline and empty with only noobs traffic, and then blame it on the noobs, because they are overrunning the site and that must be driving the “good people” out.

Mentoring and individual communication happens all over, but it looks like “doing their homework for them” which is verboten.

If they don’t learn from your answers, you might, other readers might.

The fix for “eternal September” is not “duplicate question” it’s that the older questions and answers need to be deleted, forgotten. The important bit is the development of ideas in the questioner and answerer, not the production of paperwork.

I suspect there is room for a huge forum/site based around these ideas that would combine collaborative editing, live examples, questions, and push new people not on “how to ask a good question” but “how to engage in a back and forth discussion” in some way.

This has been a disjointed blog post in a comment.

Post reply on HN