I used to have a new copy of that file for each project that I created. That seemed redundant, but I didn't have a nice place to host a single version.
Then I discovered github, and decided to host a single version there. However, that version got too big and outdated, and I didn't feel like I could delete or refactor stuff for fear of breaking existing projects.
So I went back to having a new copy in each project, and I felt good about it, because it made me feel like my projects were self contained. I also felt free to refactor the file as I saw fit, and it seemed like evolution, since each version of the file was a child of the "fittest" parent.
However, sometimes I would remember writing some nice function in some utility file, but couldn't remember where it was.
Also, I started hiring people to help with projects, and I felt like my personal utility file was non-standard, so I didn't feel like I could expect people to use my utilities.
So I started using underscore (which a friend had suggested when they first saw my utility file), which is a somewhat "standard" utility that has all the functional list processing functions that I like, and they work similarly to the ones in myutil.js.
Of course, I still want some utilities that underscore doesn't provide, so I now extend underscore, and I've gone back to a single version on github, but I'll give it a version number: myutil2.js.
(I've thought about linking to commits, but those urls are messy, and I fear that the load times may be slower since I'm not sure what github needs to do to resurrect files in previous commits.)
(I've thought about linking to commits, but those urls are messy, and I fear that the load times may be slower since I'm not sure what github needs to do to resurrect files in previous commits.)
No comments:
Post a Comment