I would argue that they should be teaching how file IO works at a low level at some point (preferably as one of the first "complicated" bits).
Everybody should, at some early point, interact with basic file descriptors and see how they map to syscalls. Preferably including building their own character and line oriented abstractions on top of that, so they can see how they work.
I'm convinced that IO is in the same category as parallelism; most devs understand it poorly at best, and the ones who do understand it are worth their weight in gold.
I beat benchmark after benchmark in 80s on disk I/O. I was amazed that nobody else figured out what my compiler was doing - using a 16K buffer for the floppy drive rather than 512 bytes.
Heh, wasn't 16k most of the memory in the machine? Large buffers do have other interesting and fun side effects, though back then you probably didn't have any threads or any/many of the things buffers cause these days.
I don't think they need to teach all of CS; I would agree your average language tutorial probably doesn't need a chapter on tree traversal or transitive closures or whatever.
I do think they should all teach IO, though. If I could only pick 1 part of a language to understand really, really well it would be IO.
The vast majority of apps spend the vast majority of their productive time on IO. Your average CRUD app is almost entirely IO. The user sends IO to the app, the app send IO to the database, the database does IO to get the results and then the IO propagates back up. The only part that isn't basically pure IO is transforming and marshalling the DB records into API responses.
If you you add parallelism, that's like 98% of what most apps do. Parallel IO dominates most apps.
Everybody should, at some early point, interact with basic file descriptors and see how they map to syscalls. Preferably including building their own character and line oriented abstractions on top of that, so they can see how they work.
I'm convinced that IO is in the same category as parallelism; most devs understand it poorly at best, and the ones who do understand it are worth their weight in gold.