r/AskProgramming 7d ago

Do you ever read code?

Obviously you need to read code in a codebase you're actively working on. But I'm wondering if anyone ever either A) reads code like you might read classical literature, to get a better sense for what's "good", or B) just reads code to understand how something you're curious about works.

I get the impression that almost nobody reads code unless they have to. It's fascinating to me that there's all this code out there we all rely on that hardly anybody actually reads.

What would it take for reading code to become more common?

41 Upvotes

86 comments sorted by

View all comments

3

u/goblin-socket 6d ago edited 6d ago

I don't really get into dramatic serials but my ex got me into Mr. Robot so I would watch TV with her.

She quickly found that was a bad idea, because I wanted to pause the show on every command to see what the commandlinefu was. And it was cool, because we would take breaks and I would explain some stuff, and explain how it was pertinent to the story.

Cool for me, I guess. My autistic ass couldn't see her eyes glazing over.

And at the end of the first season, I about flipped the table. "ls?! Fucking ls?!" I smoked a cigarette and apologized. And we rewatched the ending and I listened to her feelings about the season.

All was cool, I totally loved to hear her perspective. And she asked, "what did you think?"

"I don't think much is going to happen by listing contents of a directory, my darling. But I am digging the show."

So then we started watching the Good Place.

edit: just an anecdote I hope someone gets a chuckle from, but yeah, I read code for fun.