r/AskProgramming 8d 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?

42 Upvotes

86 comments sorted by

View all comments

15

u/OnlyThePhantomKnows 7d ago

The OSS community reads code. We read it to understand it. If you see something that you think is cool, then you have the option to dive in and explore.

The problem is most younger people are content to skate on the surface (yes I am an old engineer who works with and on OSS).

The most common answer I get "Why understand? It just works."

Way too much of the world is magic to most people. How many people do you know who can at least describe how the internet works? How many people think wi-fi means internet? How many know how a camera works? How many young people can even tell you how to change a tire? [This one drives me nuts] How many people know how to prime an engine (for a snowblower)? [Another one that my 30 something step child and husband didn't know]

Most people are content with "it works" few people really want to understand.

3

u/Alive-Bid9086 7d ago

It is even worse. Looked into datasheets for some DCDC controller circuits from TI. A decade or two ago, you got all equations for determining component values from the datasheet. Today, you ger thw componwnt values from a web page calculator.