How to use the first law of thermodynamics for simple mechanical systems? I'm confused about what exactly is $Q$ and $U$ and their signs.
Consider a block initially having some kinetic energy which we stop and we want to find by how much amount its temperature increases.
Then $Q=dU + W$ where $dU$ is change in internal energy. (I'm using the sign convention that heat absorbed by the system is positive and work done $by$ the system is positive).
Now we do $-ve$ work on the system while stopping it so the work done by the system is $+ve$. Is this part right?
Now I'm really confused as to what to do next.   
I assumed system is not absorbing or giving out any heat so that $dU=-W$ and since work 
is positive that means $dU$ is negative and so this means temperature should very counter intuitively decrease.
Isn't $dU$ for the block $mc(T(f) -T(i))$ where $T(f)$ is final temperature and $T(i)$ the initial temperature , $m$ is mass and $c$ is specific heat capacity or is that wrong?
A different approach I thought of was that $dU=0$ so $Q=W$ and now we can let $Q=mc(T(f) -T(i))$ to find final temperature which'll come more than initial. This seems to work fine but I don't know why. Why should $dU$ be $0$ when temperature is increasing?
I'm having difficulty understanding why dU=0 . Consider that the block is stopped by friction. Then won't the block heat up when it stops and hence its internal energy as well as temperature should increase. In fact calculating the temperature increase is one of the problems in my textbook
The first approach seems to work fine with a different example of a human climbing an incline. There, work done by the human is positive and heat is $0$ (or negative in the case human sweats, again i'm confused how should i go about deciding $Q$) So $dU$ is negative (and even more negative if you consider sweating , again as expected) which is true since fat is used up.
I'll provide one final example. Suppose a gas is in a container initially having some velocity. Then we stop it. We've to find the final temperature.
Here again $W$ is positive , now i'm again confused what to assume about $Q$. If we assume no heat exchange , $Q=0$ and so we've $du=-W$ so $dU$ is a negative quantity. But $dU$ of ideal gas is $3/2nR(T(f) - T(i))$ so this suggests final temperature is actually less and this seems wrong.
I looked in different textbooks , but none has good discussion on this. Any help is appreciated.
edit: Further , isn't work done always equal to change in kinetic energy(by the work energy theorem) ? Or is that actually a subset of first law?
 A: 
Now we do $-ve$ work on the system while stopping it so the work done by the system is $+ve$. Is this part right?

Not always; you've stumbled upon a subtle point in the definition of work in mechanics, which is rarely discussed. Generally, if body $A$ has done work $W$ on body B, it does not follow that the body $B$ has done work $-W$ on the body $A$. This is true only if the two material points under action of the mutual forces have moved with the same velocity.
Explanation:
Definition of rate of work: When body S acts with force $\mathbf F$ on body  $\mathbf{B}$ that has velocity $\mathbf v_B$ (more accurately, it is the velocity of the mass point which experiences the force), the rate of work being done by S on $\mathbf{B}$ is defined to be 
$$
\mathbf F\cdot\mathbf v_B.
$$
Notice that the velocity is that of the receiver, not that of the body the force is due to. So if I scratch my desk while the scratched portion remains at rest, no work has been done on the desk.
Thus, the definition of work is based on:


*

*the force due to the giving body;

*the velocity of the receiving body (its mass point the force acts on).


What about the work done on the body $S$? This is, per definition,
$$
-\mathbf F\cdot\mathbf v_S.
$$
The forces have the same magnitude and opposite signs (due to Newton's 3rd law), but there is no general relation between the two velocities of mass points where the forces are acting. If $\mathbf v_S$ is not equal to $\mathbf v_B$ during the whole process, it is possible the two works done on the bodies will not have the same magnitude.
                                      ⁂

Let's look at some specific cases.
Case 1. If a massive block $\mathbf B$ is brought to rest by another moving body $S$ with no sliding friction occurring (if the mass points of bodies experiencing the mutual forces always move with the same velocity), the velocities $\mathbf v_B,\mathbf v_S$ are the same and the two works have the same magnitude and opposite sign.
This is the case, for example, when the block is stopped in its motion by a spring mounted on a wall, or a person stops it gradually by hand. The kinetic energy of the block $E_k$ decreases to zero and equal amount of energy is added through work to the total energy of the stopping body. No heat transfer and no change in temperature need to occur, if there is no sliding friction and no temperature differences beforehand.
Case 2. If the block is stopped by forces of sliding friction - say, due to the ground - the description in terms of work is different. The mass point where the force due to ground acts on the block $\mathbf B$ is part of the block and is moving. Therefore the ground is doing work on the block (and from the reference frame of the ground, this work is negative). However, since the ground is not moving at all, the block does zero work on the ground!
This may look like violation of energy conservation, because block is slowing down without ground receiving energy, for there is no work received.
But it is only violation of mechanical energy conservation, which is fine and occurs daily. Total energy may still remain conserved, because it includes also internal energy of the block and internal energy of the ground, which change during the process.
As the block slows down, its kinetic energy transforms into different form of energy: internal energy of both the ground and the block. This happens with greatest intensity in the two faces that are in mutual mechanical contact.
The faces get warmer and for the rest of the system, they act as heat reservoirs.
The energy is transferred via heat both upwards into the block and downwards into the ground.

Further , isn't work done always equal to change in kinetic energy (by the work energy theorem) ?

Only if the only energy that changes is kinetic energy. Generally, the work-energy theorem includes other energies. Kinetic energy can change into potential energy (in gravity field, in a spring) or into internal energy (inside matter, may manifest as increase in temperature or other change of thermodynamic state).
A: If you do work and stop the block from moving you don't actually do anything to the internal energy of the block. Work on the body which changes the internal energy is defined by $dW=pdV$, think about pressing down on a piston that contains some gas. This changes the internal motion of the gas molecules and changes the internal energy.
Changing the translational motion of the entire body doesn't really change the motion of the internal particles that make up the body. That energy goes into heating the ground through friction or some other mechanism by which you have stopped the body. 
As a little aside I would really use the alternative convention $dU=dQ+dW$ in some sense this is easier as heat into the body and work done on the body contribute to the internal energy. So we loosely have two quantities going into the body.
A: It is always true that for the center of mass of a system of particles, the integral of force times distance (dot product) is the change in the kinetic energy of the center of mass; this integral is called work in classical mechanics. This is true even if the system has a change in internal energy (e.g., increase in temperature, volume,...).  This limited classical mechanics definition of work as the integral of force time distance is not the broader thermodynamics definition of work. In thermodynamics work is energy transferred across a boundary without mass transfer due to an intensive difference other than temperature.  (Heat is energy transferred across a boundary without mass transfer due solely to a difference in temperature.  Mass transfer is addressed using the flow of enthalpy into and out of an open thermodynamic system.)  Some recommend denoting the limited mechanics concept of work as "pseudowork" and use "work" to only mean the broader thermodynamics concept.  You can search the web for "pseudowork" to find the pertinent discussions.  To address the heating of a system you need to apply the first law of thermodynamics along with the conservation of momentum and mass, not a simple evaluation.  Mechanics texts frequently consider a rigid body, and for a rigid body there is no "heating" (no change in internal energy).  For a rigid body friction cannot heat the body, it can only change the kinetic energy.  For example, for planar rotary motion of a rigid body under sliding friction and gravity, the total work = the total change in kinetic energy. Work is work by gravity (- change in potential energy) plus work done by friction (integrals of friction force times distance of center of mass plus friction torque times angular displacement with respect to center of mass); kinetic energy is that of the center of mass plus that of rotation about the center of mass.  Friction causes no "heating" for a rigid body.  If heating effects are important, the body must be modeled as non-rigid.  Sometimes, a correction factor can be added to the mechanical energy equation to account for the actual degradation of energy as internal energy, instead of having to solve the energy/mass/momentum equations.  This is the approach used for problems in fluid mechanics when there is degradation of energy (e.g. flow of liquid in rough pipes) without significant changes in the properties of the fluid.  That is, the mechanical energy equation has a loss term added.  For significant changes in the fluid the first law and conservation of mass and momentum relationships must be solved.  For example, see the text Transport Phenomena by Bird, Stewart, and Lightfoot.
