Ask HN: Does this exist? (micro open-source)
This must have been done thousands of times by other devs. I have done it a few times myself. I know I have it somewhere in another project, but I don't feel like hunting to find it. It's not an amazing feature, just a small thing I need.
It really doesn't have a place in a library, it's a small stop-gap; like thousands of other small stop-gaps we all write into our projects.
I don't know whether or not the technique I used is the fastest possible; at the moment I don't really care. I needed something quick, and I wrote it. It will probably never get replaced, as it will never show up on a hot-path when profiling.
I'd like to know if there is a place I can put little things like this, with a way to find little things like this placed there by others.
I'd imagine you'd need to come up with a way of describing your method in a verbose way so it can be found.
If I use one of these small methods from that place, and that method is improved by someone else, I'd like to be automatically notified that there is a better solution so I can go back and replace mine.
Does something like this exist? If not, who wants to build it (I'm busy)?
Hey there stackoverflow. This might be right up your alley.
7 comments
[ 4.6 ms ] story [ 29.9 ms ] threadYou can share small chunks of code like this here: https://gist.github.com
Are gists indexed in a big indexed list where others that don't know me can find them using search terms?
[0]: http://search.cpan.org/~adamk/File-Which-1.09/lib/File/Which...