Hacker News new | ask | show | jobs
by ramoneguru 1233 days ago
Instead of pure code try seeing it as a book. If I read a book with a lot of spelling/grammar errors, a story that goes nowhere, characters that aren't interesting to me, plots that make no sense, etc..., then I'd tend to think of it as a not well written. Same with code, if variable names are obscure, function names don't match what they actually do, needless abstractions, nonexistent documentation, no tests, etc..., then I'd tend to think of it as a not well written project. Those aren't the only things I look for, but that's a start for me.

One could also argue, "why does it matter how it's written, it's not a book and it does what I need to do so that's fine." If it works and you don't have to do anything, great. If you have to troubleshoot it because it broke, then hopefully the code is structured in a way that lends itself to debugging. Otherwise, you might end up having a bad time.

For myself I'd say the lodash repo is well written. Would you agree/disagree?