I've told my own students how programming conventions are about appreciating reading code and not about making it easier to write, and my frustration at CS curriculum that "doesn't teach you how to read, yet grades you on your poetry"

@wilkie 💯
it took me *years* after undergrad to learn to think of my programs as artifacts (“love poems to my future fellow engineers”) and not as write-only Rube Goldberg machines

@wilkie btw. from my experience, you can learn a lot by reading code, especially code written by programmers more experienced than you.

@wilkie Hi! As someone who is relatively new at learning programming, how does one learn to read code? Are there any good resources on this particularly, or anything I can do to learn this better or faster? Or do I just start reading through other people’s code until I “get” it?

@awitch @wilkie my advice is to switch between reading and experimenting with the code. It depends upon what you want to do though. What are you interested in reading?

@awitch @wilkie I guess just reading code is a way, but maybe more interesting: Try to figure out how a program does a specific thing (or why it has a specific bug) - that way the reading is more directed and less boring/more manageable than reading all the source :)

@awitch @wilkie consider taking an up-for-grabs issue from an open source project to implement it. You’ll learn how (some of) the existing code works, how to make your own style fit, etc.

@awitch @wilkie I'd say it's not so much reading arbitrary code but learning to appreciate well written code (and learning to recognize badly written one).

Sign in to participate in the conversation

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!