|
|
|
|
|
by throwaway2037
184 days ago
|
|
You raise a great point here: > since I didn't write the code, in order to understand it I have to read it. But gaining understanding that way takes longer than writing it myself does.
I remember reading Joel Spolsky's blog 25 years ago, and he wrote something like: "It is harder to read code than to write code." I was quite young at that stage in my programming journey, but I remember being simultaneously surprised and relieved -- to know that reading code was so damn hard! I kept thinking if I just worked harder at reading code that eventually it would be as easy as writing code. |
|
Also:
Everyone knows that debugging is twice as hard as writing a program in the first place. So if you're as clever as you can be when you write it, how will you ever debug it?
— Brian Kernighan: The Elements of Programming Style, 2nd edition, chapter 2
In summary: write simple code, it's easy to read and understand - by future you who forgot why you did something and others.