|
|
|
|
|
by tikhonj
3064 days ago
|
|
Well, no. Each individual piece in the child-like code might be easy to understand, but you lose the forest for the trees. You, as the reader, have to reconstruct how all the simple (simplistic?) pieces fit together to accomplish, well, whatever the code is supposed to do. Compared to over-abstracted code, you've just shifted the difficulty from understanding an explicit structure created by the programmer to mentally extracting the implicit structure of the code. A good point of comparison is technical writing. Think back to the best textbooks you read: they didn't have the flourishes and sophistication of literary writing, but they still had a significantly richer structure and organization than, say, a children's book. They needed this richer structure to get their ideas across effectively. You can't write a coherent textbook in the style of Where's Spot? The same goes for code. You can be too clever, sure, but you can also not be clever enough. On a scale from "Salman Rushdie" to "Clifford the Big Red Dog", you don't want to be at either extreme. Is this hard? Yes! Writing readable code is a skill unto itself, distinct from writing working code. People don't always agree on what is and isn't readable, but that's true for writing too. Still a worthy goal, just one that doesn't lend itself to simple rules. You just have to build up the right skills from experience. |
|
Not sure what level of clever Salman Rushdie is acceptable for?