Wow. Who built this cap - did the idea come from PHB? It's pretty damn ingenius. And I love that Wally is "surprised" that he can't reach it. That's one of the funnier sight gags SA has done in a while.
Well, even with the coffee cup swinging back, it will do so at an angle, and may still be out of his reach.
In all reality he could just take the hat off or go get another cup of coffee. But if we were really looking for reality we'd just turn around and watch our co-workers rather than be sitting here reading Dilbert.