5 ms·
For those who do contract work, what is your policy on code-reuse between clients?
by qp9384btv_2e 11y ago
For those who do contract work, what is your policy on code-reuse between clients?
- eropple 11y agoIt depends on my arrangement with a client. Work-for-hire contracts make reuse impossible, and so I tend to price higher, whereas a perpetual, transferable, etc. license to the code I work on has a better chance of being useful down the line and so I may knock a couple bucks off.
- qp9384btv_2e 11y agoMy thought was to develop a library for code re-use among clients. It would cover common problems/features. In your experience, do many contract workers have such a thing?
- eropple 11y agoI dunno, but I wouldn't want to have such a thing in a stack. I reuse code like "hey, I've got this super nice Vagrant setup that makes life easier" or "I've got this Chef cookbook that's a little too specialized to meaningfully open-source but I can turn it around to help," rather than application-level code. If I had a library for application code-reuse, I'd just find a platform-appropriate library like Guava or something and try to get it in there, or open-source the whole thing myself.
- err4nt 11y agoI dunno about others, but I sure do! I have CSS stylesheets in 7 colour themes, a dozen bootstrap-like JS plugins that add common interactive elements I can drop into any site, and tons of parts and pieces of layouts (like an order form, signup form, pricing chart, or media player) isolated and ready to re-use. I also maintain a big snippets file, filled with HTML, CSS, JS, and command-line snippets and tricks so I can grab them from anywhere. I dont know how any freelancer or contractor doesnt have a bag of tricks like this.
- qp9384btv_2e 11y agoHow do you incorporate this re-use into your contracts?
- bartvk 11y agoYou could explicitly retain the copyrights on your code. Actually that is the default so in general it's not actually necessary.
- err4nt 11y agoI make the stuff and put it under MIT :) Everybody (including me) is free to include it in anything, so long as you don't sue me for having used it.
- mattmccarthy 11y agoThis sounds really helpful. I'm just beginning my contracting. Would you be willing to share these libraries and snippets?
- err4nt 11y agoEQCSS is for element queries, scoped CSS, IE8 support, and a whole ton of other goodies - check it out at http://elementqueries.com http://elementqueries.com Most of the other plugins and things are included in https://github.com/tomhodgins/template-factory https://github.com/tomhodgins/template-factory My HTML/CSS/JS/CLI snippets file is located here: https://gist.github.com/tomhodgins/27c29ecb4aceaefe5cdf https://gist.github.com/tomhodgins/27c29ecb4aceaefe5cdf My responsive testing tool is located at: https://github.com/tomhodgins/speedtest https://github.com/tomhodgins/speedtest You can use your keyboard keys 1-0 to test a variety of widths quickly, or use the buttons on mobile to test widths your phone or tablet can't physically emulate If you're looking for a 'view source' tool for mobile, check out https://github.com/tomhodgins/sourceror https://github.com/tomhodgins/sourceror It's a simple PHP proxy that loads the requested site and displays it as content on the page. For example, I have it hosted at http://staticresource.com/inspect http://staticresource.com/inspect so I can append a URL after a '?' and see the code formatted nicely. Like http://staticresource.com/inspect/?http://staticresource.com/data-buttons.css http://staticresource.com/inspect/?http://staticresource.com... You can also check out my CodePen profile, here's my collection of 'Front-end snippets', but I've got plenty more on there you can feel free to use or expand on: http://codepen.io/collection/nNqyvZ/ http://codepen.io/collection/nNqyvZ/ Hope that sets you off to a good start :)