Yak shaving is the art of doing something that you have to do before you can do something that you have to do before you can do something that you have to do before you can do something important. It's how geeks put difficult tasks off while telling themselves they're not being lazy. If I were a yak, I'd be very nervous around computer coders with a deadline to meet.
The term originated with the Ren and Stimpy episode "Yak Shaving Day" and was popularised by the MIT Artificial Intelligence Lab in the 1990s.
Remarkably, sometimes shaving the ol' yak produces useful side-effects.
The second greatest piece of yakshaving in the history of computer technology was arguably TeX. Don Knuth was working on The Art of Computer Programming and realised his typographical tools didn't let him do everything he wanted. So he spent a minor several-year diversion writing an entire page description language and a font manager for it. To this day, anyone attempting to establish their nerd cred will always write everything they ever do in TeX, just because they can. (In practice, scientists simulate this process by writing their paper in Microsoft Word and changing the font to Computer Modern.)
The greatest is Unix, otherwise known as that thing Ken Thompson and Dennis Ritchie wrote so they could play Space Travel on that discarded PDP-7 sitting in the corner of the lab.
Seth Godin gives this little story to explain the term:
"I want to wax the car today."
"Oops, the hose is still broken from the winter. I'll need to buy a new one at Home Depot."
"But Home Depot is on the other side of the Tappan Zee bridge and getting there without my EZPass is miserable because of the tolls."
"But, wait! I could borrow my neighbor's EZPass..."
"Bob won't lend me his EZPass until I return the mooshi pillow my son borrowed, though."
"And we haven't returned it because some of the stuffing fell out and we need to get some yak hair to restuff it."And the next thing you know, you're at the zoo, shaving a yak, all so you can wax your car.