Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Me and a friend of mine were discussing yesterday about differences between writ

ID: 654632 • Letter: M

Question

Me and a friend of mine were discussing yesterday about differences between writing a large C++ software and understanding it as a new recruit.

Is it possible that since a software gets done one line at a time and this process resembles how we (humans) learn things and build a thing on top of another one, writing a large software is actually easier than reading it and understanding what it does (stepping through the code helps but you need to remember multiple classes/source files together you don't even know what they've been written for, multithreaded code adds malus points)?

This sounds weird at first but after we thought a bit it seemed reasonable

Explanation / Answer

Based on my experience, I would rank the following activities in order from easiest to hardest.

Reading good code
Writing bad code
Writing good code
Reading bad code
The above ranking leads to 2 conclusions

While it is easier to write code than reading bad code, it is easier to read good code than write your own code
Writing bad code is easier than writing good code, but writing bad code sets you up for reading bad code, which is the hardest thing of all. Especially since bad code is read more than it is written.
Of course, good code and bad code are broad generalizations. I recommend Code Complete and Clean Code for more details about good code.