We should rethink how we teach people to code
23 points by jdh
23 points by jdh
a lot of people who find no joy in anything and just want a big salary wind up in the field
Sadly, IME this describes most compsci students nowadays, maybe excluding the very best unis. Students just straight up don’t care, and the courses adapt to that – instead of requiring understanding, they focus on dull work that doesn’t really teach you anything (“implement 30 procedures and 9 triggers in your database”). Cheating is hilariously rampant – 90% of students cheating on exams is a conservative estimate. I’m not even counting how many people were ripping off their homework during the semester from others (or LLMs). It’s pretty much expected that you cheat.
Even if someone says they’re interested in e.g. ML, it’s so fucking shallow, and they nope out the second any equations appear on the lecture slides. Assuming they’re even in the minority that attends the lectures. There have been multiple classes for which I was literally the only student engaging with the lecture material.
But hey, this is absolutely enough for people to land internships at web3/AI/$buzzword companies doing webshit. That’s all that matters to most students.
I can’t express just how fucking underwhelming and depressing my undergrad experience has been, despite having went to one of the top unis in my country.
I’ve literally had classes where the lecturer generated all exercises with LLMs, which students then solved via LLMs (with very few exceptions), which the lecturer then proceeded to grade with LLMs. You didn’t learn shit about the actual topic of the class.
Anecdotally, one friend who’s one of the top students here gave up on doing a Master’s in compsci in this country at all. He’ll either go do another BsC in math, or go to a foreign grad school. I dropped out after two years to go study math too. Our field is completely fucked.
nowadays
This was the case when I went to university in 2009, which was before CS really took off; by mid-2010s I probably would not have met the initial enrollment criteria for the CS department. There were perks; professors were mildly amazed to have a student actually engage with the coursework so I got to do things like work on a semester-long project instead of doing the regular assignments. And yeah sure it was a drag being around lots of people who didn’t care, but there were other people who did care - enough people! You just had to find them. They were probably feeling just as isolated as you. The Putnam and ICPC clubs (I had to restart the latter myself) were good attractors.
I’m not saying the makeup of the CS student body hasn’t changed in composition in the past 15ish years. In 2009 it wasn’t well-known that you could land a six-figure job right out of college in CS, so the archetype for don’t-care students was gamers & the generically nerdy instead of comp-obsessed gunners. But very few students actually caring about the material has always been a thing for varying reasons.
Makes me glad I was a philosophy/math major where pretty much everyone did care about the subject.
For this exact reason I chose to get a BEng in Robotics, because I felt “computer science” is both a) something you can learn at home; and b) going to attract people who didn’t care at all about computers or science but thought it sounded cool/well-paid.
I went to university in two “stages” - first time 1998-2000 (after which I dropped out for a variety of personal reasons), then I went back 2004-2008 and got my degree. Both times were CS.
The difference in the mentality of my fellow students couldn’t be starker. In 1998, we “nerds” were a distinct minority, the vast majority being people who were mostly interested in a big pot of dot com gold. Most didn’t care at all. In 2004, things had cooled down considerably and things had flipped completely - there were still a few “get rich quick” types, but most of those had switched to studying business or law. The vast majority were deeply interested in computer science as a science, programming as an intellectual craft, or both. But there were also a lot fewer students than in ’98.
(gods, I miss those days.)
I went a few years earlier (early 2000s) and feel like most of my fellow CS students did care, at least about some of it? You definitely had people who didn’t care about any given class, but almost everyone seemed to have some aspect of comp sci that brought them there, whether it was 3d rendering, Linux, algorithms, or esoteric PLs. I wonder if I got lucky in a way that the immediate aftermath of the dot-com crash scared a ton of people out of majoring in it.
I’m not even counting how many people were ripping off their homework during the semester from others
I graduated in 2010 and I still remember that a lot of the homework in the first few semesters was on the dumb side, especially if you already knew how to program.
Not all of it, and I think it depends a lot on your personal interests but also how the lecture is structured. We also had a lot of homework that was relatively good and fun and not an 8h slog.
a lot of people who find no joy in anything and just want a big salary wind up in the field, never realising that they have no liking or aptitude for it.
Substitute “big salary” for “the biggest salary they think they can earn” and this is practically all jobs. Probably 80% of jobs are simply people there because they need to buy food and ps5 games and they can’t do that while unemployed. Unless you have a passion for synergy or the McDonald’s ice cream machine, you are probably fucked and doomed to a job you, at best, endure. Maybe I’m being a little pessimistic, but I’ve worked a lot of jobs. We are very spoiled to have fun engineering software, but hating your job is the norm, and unless the salaries tank it’ll be normal for people who don’t enjoy writing code to grit their teeth and try to become software engineers.
In general I think the observations in the article are true. One of my friends is headmaster at a public school (private school to you yanks) in London and we had a great conversation a few years ago about how teaching children symbolic logic and analytic philosophy sooner would improve their performance in maths specifically and life generally.
Anything that talks about programming & teaching and doesn’t mention Hedy https://www.hedy.org/ feels like it’s just starting from scratch. There’s been so much work put into code education that hasn’t fully permeated the education system, or seemingly the culture.
I tried it with elementary students and wouldn’t recommend it. The site was buggy. The lang implementation was buggy. The “frog boil syntax” didn’t seem to offer much tangible benefit to the students. Also (when I used it) you had to be careful about not letting kids enter in PII as all programs run are saved for research (don’t want them entering in their address or phone number etc.)
I HIGHLY recommend code.org. They do such an amazing job of introducing new concepts in a fun and memorable way. Also they have lesson plans and slides so it’s a highly polished product.
They hit a sweet spot of helping enough to not leave kids feeling left in the dark but not so much that kids don’t learn anything. I dislike their only non-block based language is JavaScript though as I feel Python offers more consistency and fewer quirks.
I think if Hedy switched implementation from typescript to Rust (more stability) and found a non-academic backer that there might be something there. If I had an innovation dollar to spend, I would invest it in adding more text based languages to code.org
My reason for mentioning Hedy is more that there’s been research done about Hedy and education. There’s a language (name is escaping me) that is also built based off of studies that I’d expect to show up in discussions about code education, but I didn’t see that either.
Other things like code.org (which I’m not familiar with) showing up is cool too, it’s really more about covering prior art & research in a field rather than the more opinionated “this is how I learned” or “I like better”. I like Elm and think it’s a great language for teaching programming, but I have no actual studies or such to back up my claim.
Maybe it’s more that I’d expect to see Felienne Hermans being mentioned or the authors of <that language I’m still blanking on>.
I looked at the Hedy website and I couldn’t find anything about who created it, the rationale or design criteria, papers about the design process or papers evaluating its success…
The “Learn more” link in the footer led me to https://www.hedy.org/learn-more, which links to that information.
I do think that page would be better if it linked to a summary of Hedy’s history and philosophy before embedding a “deep dive” 40-minute video about that. The linked papers probably have that information, too, but PDFs are harder to read than web pages, and it’s not clear whether the first paper has been superseded by a later one.
Thanks! I missed that link because at the top of the page there are “start learning” / “start teaching” buttons, and in the footer there are “learn more” / “teacher manual” links, so I assumed that the roughly parallel pairing meant they have roughly parallel content. I was looking for an “about Hedy” or “about the developers” or “help make Hedy”, but all I saw was “pay no attention to that man behind the curtain!”
I wonder why people develop such simple education-only languages when they could just learn directly an actual programming language which will allow them to be much more creative. Like, I started learning C++ when I was 11/12 years old and it was fine. If a young teenager won’t pick up basic python, maybe they just want to do something else in their life than programming?
I started learning C++ when I was 11/12 years old and it was fine.
That’s a truly astounding perseverance! In my experience, starting with C++ usually does not leave people fine.
How I learned to code, and how I recommend everyone else learn to code, is (after having played Minecraft) writing mods for Minecraft. Really any moddable video game that the student has played a bunch would work, but Minecraft is the most flexible and allows the tightest integration between the mod and the host, bar none. It bridges the gap between “the machine dances to your will” and “if your will was chiefly concerned with console utilities”: you have an entire video game environment with rich concepts and intuitive interactivity that you can make dance to your will. Discord bots have a similar “you already know how this platform works” nature but I don’t feel like they spark anywhere near as much creativity.
Okay, hear me out here: AutoHotKey.
So the core problem is that conventional languages don’t give motivating applications, right? AHK is all motivating applications. Want to make a timer that automatically closes a game after ten minutes? Five lines of code. Need a “fill in your full address” hotkey? One line. You can do all sorts of really useful “make using the computer more pleasant” stuff with just a few lines of code.
The main downside is that all your students need to be on Windows, which admittedly is enough of a downside to make this a nonstarter for most people.
The introduction has a hint to the problem, no?
See, a lot of the students get their initial education from computer science courses, and while they do a good job of teaching people how to program in the bare sense of the term, they don’t really have a good grasp of how to go from writing code to building something useful for them or other people.
Computer science is a science, basically a branch of applied mathematics. Software engineering is engineering and is about building something useful, generally as part of a team. Why would I expect a CS graduate to be able to build something useful?
Conversely - why would I expect a SWE graduate to be able to write a compiler or implement LLMs from scratch? Most software engineers don’t need to do that. They need the stuff mentioned in this article.
I’ve generally seen universities offer CS and SWE degrees as well as dual degrees with both. The two courses should be designed differently with different end goals. A SWE degree would tend to involve mandatory internships, project/team work and “shipping” working code. A CS degree would have more work on complexity theory, functional languages, compilers, statistics and machine learning, etc.
Is this not a distinction in the US? Are people hiring fresh CS grads and putting them in a “shipping” rather than “research” environment and getting surprised as to the results?
Heh, this is roughly what I was thinking the other day. I wouldn’t go from HTML & CSS to an SSG, tho: I think it’s more fun to add interactive bits to a webpage with some JavaScript. Fiddling with the DOM seems like an obvious first encounter with a data structure (albeit a fiendishly complicated one that sets a bad example). Learn a bit of graphics using the canvas, that kind of thing.
Yeah, I third this. Learning anything (human languages, instruments, etc.), having a reason to want to learn it is absolutely critical, and so is feeling some rewards from early on. Descriptive, useful, but still computer-friendly languages are a starting point, and structured languages, colors and layout as numbers, etc. and the practices that come along with them (like debugging) are already a step for many to learn. Then after they can describe static things, they can make them do things, then learn how computers can efficiently handle lots of things (as in, approaching CS), learn what others have said about making your descriptions and recipes maintainable, and so on.
I haven’t really thought about this part long, but maybe a partial workaround for the fiendishness of the DOM is to offer some libraries and so on at the start. Later, cracking open what the abstraction was doing all this time can be instructive not only about how the underlying platform works, but about what libraries are good for. The buildup a student needs isn’t necessarily from ‘fundamentals’ in the sense of what developed first or what runs the least code, but from the most basic skill that gives some reward to the most advanced.
The fiendish thing about the DOM is not so much the APIs but the fact that it’s representing a really complicated structure. If you’re starting with HTML and CSS and the browser’s DOM inspector then there’s not much you can do to hide that fact. It’s a bad example because it’s hard to distill complicated things to their essence. But I guess there’s a path down via JSON, and it isn’t necessary to go straight from first examples to underlying principles: once the learners have enough experience with arrays and hashmaps etc. that knowledge can be brought back to the DOM.
Dr. Krishna Krishnamurthi has some excellent thoughts in his piece, Which Programming Language Should I Teach First?.