Mechanical modeling: placing a bar between two ball joints Background:
I need to place a bar (cylinder) between two ball joints (roundcubes).
You might think "Uh! Such an easy task deserves a post here?"

Well, the task is less easy than you could think at first:
As you can see, these joints are positioned really weird in the space.



So, I thought to a quick solution: I could position a bone, with the head centered on a joint, the tail on the other one and finally parent the bar to the bone.

This way I'd get the bar located, scaled and rotated to match the ball joints. NOPE.

Positioning a bone EXACTLY is really trivial.
You set the cursor where you want the bone's head to be and set the head to the cursor position.
Repeat for the bone's tail. DONE.

What I tried:
I tried parenting the object to the bone, but the cylinder went to some random position in the space.
I also tried using the eSnap addon, to no avail.
I tried using hooks, but I couldn't make them work as I expected to.

All complicated by the fact that my right arm is currently enveloped in chalk...
Something like this:


Place the origin of the cylinder at one end.
Parent the cylinder to the first sphere.  Reset the cylinders origin (Alt+O) to position the end of the cylinder at the first sphere.
Add a Track To constraint (Ctrl+T) to the cylinder with the target as the second sphere.  Adjust the track axes until the cylinder is aligned towards the second sphere. 
Apply the visual transformation (Ctrl+A) and delete the Track To constraint.
Scale the cylinder along the local Z axis (S,Z,Z) until it intersects with the second sphere.