Hello, former opiate addict here. I wasn't using heroin in particular, but the year or so that I used opiates daily was the most economically productive period of my life. Every day I would be high by the time I came in to work, which involved maintaining Linux servers. I would get my job done without issue. Unless you get to near-overdose levels, opiates don't effect your coordination or higher level thinking to the degree of alcohol or even cannabis. Indeed the biggest negative effects were prohibition-related. The price was heavily increased price due to enforcement measures (3x to 4x increase over as many years) and I had to associate with certain shady people to get it.
It's worth noting that the medically accepted treatments for opiate addiction, like methadone maintenance treatment, simply substitute illegal opiates for legal ones. You're still under the influence of opiates daily, but instead of going by the dope house every morning and shelling out $100 for the illegal pills, you go by the clinic and pay maybe $10 and get legal ones. And that's an improvement. These programs have been in place for decades and their positive effects are well studied.