J = (CK)/B where:
J is the joy found in completing a long and harrowing task,
C is the celebration one gets to partake in upon completion of the task,
K is the knowledge acquired while successfully completing the task, and
B is the bullshit one is required to wade through to complete the task.
[Addendum: Thanks to JMalk for the math correction]