I am sure this has been mentioned countless times but as counter intuitive as it sounds, be aggressive.
He can't stun you until level 6, so break his turrets before he can put down more. Often, it takes perhaps one spell of two AAs to do so, then proceed to fight Heim as he has no mobility.
As well, picking a champion such as Yasuo, Talon, Akali or Lissandra with AOE clear and with abilities that lets them bypass turret shots is extremely helpful. Heimerdinger can do absolutely nothing against a wind wall or an ice claw in his direction. As well, Talon's combo naturally clears the turrets just by pressing R. Akali can shroud herself if she needs to from Heimerdinger's turret and can easily burst him down at level 6 or use his own turrets to escape.
Playing these champions against him is borderline cyber bullying.
Of course, even if you are using above champions, going aggressive still generally works well.