3 ms·
> Reading code is underrated, and many software engineers don’t understand how and why they should read it. Reading code is much harder than writing code becaus
by jart 3y ago
> Reading code is underrated, and many software engineers don’t understand how and why they should read it. Reading code is much harder than writing code because writing code translates your thoughts into code, and reading code is the opposite.
That's like saying reading Hamlet is harder than writing it. What kind of garbage do you have to be filling your head with all day to hold such a dismal opinion of software?
- Zambyte 3y agoProprietary enterprise production code
- ok123456 3y agoThe modal programmer barely reads stack traces that tell them where exactly something is happening, even when it tells them exactly the mistake they're making. Digging into other people's code, reading it, and having enough education and context to understand why they did things a certain way is an even rarer skill.
- floating-io 3y agoReading most code is more akin to reading Hamlet fan fiction.
- mistercheph 3y agoReading Hamlet is as hard as writing it, no reader has ever enjoyed the same pleasure the writer indulged, being finished. "Reading" Hamlet is something my pet hamster does for breakfast.
- SPBS 3y agoIt's true. The easiest code to read is the code you wrote yourself. To read other people's code, you have to decode it. And it's very easy to write convoluted "clever" code that you yourself will not be able to read six months down the line, like what Brian Kernighan meant when he said: "Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." I strongly believe it's easier to write working code than it is to untangle it later on. Writing readable code is a skill.
- deleted 3y ago[deleted]
- cjbprime 3y agoReading Hamlet is harder than writing your own, not very good, short story about something that you’re motivated to share. Reading Hamlet such that you fully understand its internal structures and design and could propose changes to it that maintain cohesion and do not make it drastically worse is harder still.