I think its arbitrary what sign you give W as long as you are consistent with it (like, I know it differs in different areas of science like in physics or chem).
But the conventions I personally find easier to understand is that if work is being done BY the gas (i.e. the gas is expanding), then the sign is negative since the gas is losing internal energy by expanding (think of a piston, if a gas is expanding, its DOING work, and expending energy to push the piston, therefore losing internal energy).
Similarly, if a gas is being compressed work is being done ON it by the surroundings, so its internal energy is increasing then the sign is positive.
I was a little confused myself about the convnetion for the first law.. I think thats just a matter of convention as well? Id be cool if someone can clarify that...