Re:LeftPad and Go: can tooling help?
by catnaroek on Friday April 01, 2016 @01:03AM
(#11402766)
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.
[ Parent
| on HN ]
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"...
Re:LeftPad and Go: can tooling help?
by TickleSteve on Friday April 01, 2016 @03:01AM
(#11403169)
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.
Re:LeftPad and Go: can tooling help?
by TickleSteve on Monday April 04, 2016 @02:43AM
(#11419818)
but we're trying to infer that things dont have value to the user based on complexity.... the lower threshold is an easier target.