Hacker News new | past | comments | ask | show | jobs | submit login

The author seems to make the assumption that the problem with left-pad is how small the library is. But that's just the symptom. The real problem with left-pad is how little functionality is actually provides. A 200-LOC C library that only left-pads strings should be subject to just as much scorn as the original 11-LOC JavaScript one. Unfortunately, it's difficult to assess how much functionality a library provides just from its LOC count.



API surface is often misleading, too. A JSON library that basically just provides a "json_encode" and a "json_decode" could be perfectly cromulent, whereas "trimlib", providing "right_trim" and "left_trim"...


Maybe a complexity metric would be a better measure?


I don't think any algorithmic analysis of the code can determine how much value it provides to the user. Some things simply require human judgment.


but we're trying to infer that things dont have value to the user based on complexity.... the lower threshold is an easier target.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: