Ahhh, cables and housing. Nothing gives your bike that "hey it's new" feeling quite like fresh cables and housing. As manufacturers continue to add more and more gears on bikes (now up to 11 speeds in the back) the condition of the cables and housing is critical for precise shifting. If your brakes are still of the cable variety, new cables and housing will give your brakes optimum power and good modulation.
In the picture above the bike seemed fine and shifted great upon the initial test ride but once I got it in the stand I noticed the cable was failing. It was probably only a ride or two away from complete failure. This guy would've been stuck in his "granny" ring after the cable failed.
Before I get into "this is how I do it" mode, let's have a look at what's inside the housings. I've cut some of the casing away so you can see what makes this stuff work.
The housing on the right is shifter housing. The steel in shift housing is round and runs straight in line with the housing. It's done this way to eliminate compression within the housing.
Weather it's brake or shift housing, they both have a teflon tube under the steel that the cable rides through. This teflon tube is what breaks down and causes poor shifting and braking performance. Additionally, a housing ferrule (end cap) is added on the end of the housing to keep the ends from splitting.
When the housing gets cut it's uneven. It usually leaves a sharp steel end sticking out and always crushes the teflon tube inside the housing.
After I get the new cable and housing on, I'll pull on one of the exposed sections of cable to "seat" everything as much as possible. I'll also lube the pivots on the derailleur and check the main mounting bolt and jockey wheel bolts for tightness while I'm back there looking around. This way I know that everything is G.T.G. (Good To Go) for the next ride.