Ok, this technique is taught by Dr. Bernstein and works for a syringe. With a pen you just need to hold the pen needle up, flick the pen to move bubbles to the top and shoot a unit or two to prime.
To fill a syringe without bubbles and not waste any insulin. Fill syringe with the bolus units of air and insert needle into rubber stopper of vial and inject the air into the vial (Dr. B actually skips this step). Top the syringe and vial vertical so that the vial is upside down. Pull insulin into the syringe pulling more than you need. Flick the syringe to move any bubbles to the top. Then slowly push in the plunger until you reach you desired dose. Remove the syringe, it will contain the desired dose with no bubbles.
ps. If I recall, Dr. B actually suggests pulling the plunger in and out a few times drawing insulin in and out of the syringe to work out any bubbles but I never found it was needed.
pps. The only reason to avoid bubbles is that the displaced volume of the bubbles will cause an error in the dose, the bubbles themselves are harmless.