5 ms·
I find most the examples I need in Stackoverflow, along with community ratings and comments. Which reminds me of another idea which I think I remember Jeff Att
by guelo 12y ago
I find most the examples I need in Stackoverflow, along with community ratings and comments.
Which reminds me of another idea which I think I remember Jeff Attwood talking about: We all copy these snippets from websites into our code. Those snippets might have bugs that are later fixed by others on the web, or the APIs change or get deprecated, etc. It would be good to have a reference from the code to the web page so in the future you can remember where that snippet came from and look it up and maybe see if the community's recommendations have changed. But even better would be if the bugs that were fixed by the web-community ended up back in your code automatically. So imagine Stackoverflow with a gist-type comment system for the code snippets with versioning and community editing, and then you could somehow do a pull on those gists and grab the community's wisdom automatically.
- bostonpete 12y agoDo people really copy snippets they found on a website into their code? I use examples on the web to further my understanding of a technical issue but would never cut and paste blocks of code. Aside from the copyright uncertainty, I simply wouldn't trust a piece of random code found on the web enough to pull it into my own. That said, I do agree that if you've make choices in your code based on information that you found online, its good to include a reference to the source in a comment.
- pjc50 12y agobugs that were fixed by the web-community ended up back in your code automatically .. and bugs that were introduced by the web community were automatically introduced into your program? Besides, I suspect that copy-paste-modify makes this impossible to automate.