3 ms·
Code is primarily for communicating between programmers, if it were mostly meant to be executed it would just be object files. Being a great coder means being
by nullc 10y ago
Code is primarily for communicating between programmers, if it were mostly meant to be executed it would just be object files.
Being a great coder means being adept at reading code however its structured. Reading unclear code is important because it helps you avoid making the same mistakes... it's also an important skill in practice: You will often encounter unclear code and have to understand it.
The idea that there is one true good form is a misconception often held by novices. An expert should be able to read and write in a multitude of styles so that they can conform to whatever codebase they're working on and apply the best practices within that context.
- clusmore 10y agoThese are all great points, and I'm realising now I have missed the point a little. Reading arbitrary code is good, because you learn something regardless of whether the code is "good" or "bad" -- you learn how to understand more styles of code, and which patterns tend to be easy to understand and which tend to be hard. I guess the part that was tripping me up is that you shouldn't necessarily try to emulate all code you read.