Hacker News new | ask | show | jobs
by julianh65 1037 days ago
I really like this idea. Reading other peoples code is one of the best ways to learn to code in my opinion.

Yet at the same time, a part of learning / understanding from reading other peoples code (given it's of good quality) is that you have to manually recreate what they're doing in your head without the comments.

I think for educational purposes the "educational comments" that you add have to hit a balance of explaining what the code does, without just explaining away an entire function. To that end, it might be better to add more comments in regards to specific lines, while letting the learner put the pieces of the different lines together themselves.

An extension that I'd like to see of this is many different types of codebases commented like this (OS, React, DBMS, etc etc) with additional information and diagrams about the overall design of the program and its different parts. Looking at and understanding a single file is all well and good, but without the context of how it fits into the bigger picture a lot of the potential learning is lost.