For the best experience on desktop, install the Chrome extension to track your reading on news.ycombinator.com
Hacker Newsnew | past | comments | ask | show | jobs | submit | history | qp9384btv_2e's commentsregister

> The last time foreign soldiers invaded the US proper was when Canada marched into Washington.

A foreign army invaded the South decades after that.


Do you still have it? I'd love to see a picture


I'm looking for it.


For those who do contract work, what is your policy on code-reuse between clients?


It 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.


My 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?


I 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.


I 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.


This sounds really helpful. I'm just beginning my contracting. Would you be willing to share these libraries and snippets?


EQCSS is for element queries, scoped CSS, IE8 support, and a whole ton of other goodies - check it out at http://elementqueries.com

Most of the other plugins and things are included in https://github.com/tomhodgins/template-factory

My HTML/CSS/JS/CLI snippets file is located here: https://gist.github.com/tomhodgins/27c29ecb4aceaefe5cdf

My responsive testing tool is located at: 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 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 so I can append a URL after a '?' and see the code formatted nicely. Like 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/

Hope that sets you off to a good start :)


How do you incorporate this re-use into your contracts?


You could explicitly retain the copyrights on your code. Actually that is the default so in general it's not actually necessary.


I 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.


21, 22 year old scientist?


Yep, 22!


happy to hear that, it proves my hunch on the matter


> hunch

Isn't it what we called "basic arithmetics" back in the day? :).


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search:

HN For You