3 ms·
> Note: none of the ids are necessary, but we add them because it's nice. I would advise against this. Good code examples for getting started should include on
by Etheryte 5y ago
> Note: none of the ids are necessary, but we add them because it's nice.
I would advise against this. Good code examples for getting started should include only the bare minimum to get going, nothing more. Nuance and additional options should be left to the details pages, not the introduction. Defaults have a very strong influence on how people use products and the same holds for code samples.
- robert_tweed 5y agoI upvoted because I agree with the general sentiment, but I can't find the specific example you're talking about. Have you got a link for context?
- franciscop 5y agoSorry you mixed my project (in a sibling thread) with JSGraph in the global thread; they are actually being used for the script to generate all those images with the proper names! I'll try to remove them if possible, but otherwise change the statement from "because it's nice" to something closer to reality
- robert_tweed 5y agoYou've answered my question and explained why I couldn't find that text on TFA or even their entire domain. FWIW, with the context I would say that I'd find that example quite hard to parse without the IDs (or at least a comment), unless you changed it to have each graph next its own code. For anyone reading this confusing subthread in the future, here's a permanlink to your post that the parent was replying to: https://news.ycombinator.com/item?id=28715868 https://news.ycombinator.com/item?id=28715868