It seems to depend on whether work is defined as positive if it is done ON or BY the system of interest. Older thermodynamics books typically write dE = dQ - dW, where E is the internal energy of a system, Q is the heat flow into the system, and W is the work done BY the system. Newer thermodynamics books more typically write dE = dQ + dW, where E and Q are the same as before but W is the work done ON the system.