3 ms·
From the article: If you're a n00b, you'll look at experienced code and say it's impenetrable, undisciplined crap written by someone who never learned the esse
by NathanKP 17y ago
From the article:
If you're a n00b, you'll look at experienced code and say it's impenetrable, undisciplined crap written by someone who never learned the essentials of modern software engineering. If you're a veteran, you'll look at n00b code and say it's over-commented, ornamental fluff that an intern could have written in a single night of heavy drinking.
I have never seen this so succinctly expressed before.
- ErrantX 17y agoA guy who works for us just read that and laughed and said: "To be honest I'd sit there and say both were equally shoddy and unlearned in their own way. There is a sweet spot middle ground that the really really good programmers learn" I suspect he is right.
- gprisament 17y agoI've found that the best compromise is to use verbose "n00b-style" commenting in header files (or wherever your interfaces are defined), and sparse commenting in the implementation. Interfaces are like contracts, so you want to make sure everything (including how corner-cases are handled) are explicitly described. With well-designed and fully-documented interfaces, the implementation code can usually be quickly understood even if it lacks comments and is written in a more "advanced" style.