I'm no programmer myself, so I can't help in a direct way. Encouragement and examples of knowing what your going through and how I got over them are as best I can do. Unless you've other ideas?
Maybe stick some music on? I find that music helps me hugely in concentrating when I am applying effort to a task. It helps me 'get into the zone' if that makes sense. In my case its a calm, yet hyperfocused and extremely vigilant, concentrated state, but without the stress that would typically accompany a state of hypervigilance. Almost...best I can describe it is to take an extremely accomplished zen buddhist in meditation techniques and give them a dose of hypomania. And perhaps a blotter of acid or a light dose of mushrooms at the same time
just maybe, (although this state is reached, in my case, without the use of psychedelics, I would not wish to do any potentially dangerous chemistry when under the influence of anything that can alter my perceptions in a way such as to distort my reference frame. Things like light doses of stimulants, or nootropics like the 'racetams are fine, in my book, for me, personally. But I'd definitely not trip and start up chemistry procedures at the same time. PLANNING OUT the procedures, writing things down, to get into a creative and inspired state sure, but I would always, always leave the actual practical to a state of sobriety, excluding the consciousness and intellect-enhancing nootropics, the assistance in concentration of non-interfering doses of classical psychostimulants, and my usual, daily meds, to which I am of course adjusted in such a manner as for those I take on a daily basis not to interfere, my pain meds, clonidine to stop me overloading, tizanidine for the fucked up neuropathy-spawned hell-forged spasm in my calf muscle etc, antiseizure meds, whilst that lot would both seriously, and drastically interfere with my doing any chem work on their own, if I wasn't, since I do need them daily then I'm alright to proceed, use power-tools on them etc. although were I unused to even a couple of them put together, as I was at first, just the tizanidine and even a light dose of oxy FLOORED my ass, to the extent I found myself passing in and out of nodding micro-sleeps and waking up when I felt face hit computer keyboard (some of the time anyway, some of the rest of the time it was more a matter of waiting until the nod turned to wakefulness, albeit heavily sedated until another one came along. And that was with just 80mg oxycodone. (albeit a fair dose, even XR for somebody opioid-naiive. Quite surprisingly given the stinginess of most doctors here, I got quickly put on OC80s from dihydrocodeine, when I had the issue that DHC was too short acting, in addition to far too weak, but mostly, the worst of the problem I had with DHC was that its short action, coupled with being mostly a pro-drug and requiring a recuperation period for further biosynthesis of the hepatic CYP-P450 enzymes which metabolize it to more active products, kind of puts a big damper on redosing more reguarly as the answer, and taking a larger dose at once is partially successful, but there is again a metabolic rate-limiting and quantity-limiting cap. Although less of a problem with DHC than it is with codeine, the latter being much more of an absolute, while DHC has some effect itself. But after trying XR-DHC, straight from that fairly weak opiate, and only on the higher XR dose for a very short time before requesting something better and actually, shockingly, getting it....to OC80s, I was so surprised I almost said something stupid like 'are you actually DOING that?' to the dr. Although I caught myself and shut my face in time so they didn't on my account get any temptations towards saying something like 'actually, you are right, no, bad idea' and my going and so to speak shooting myself in the foot
But now they don't distract me, although I'm on an IR type of oxy now, and morphine for my main workaday pain med. They don't interfere as long as I don't push the dose (which even in the case of the oxy alone, is now higher than it was when I was on OCs, didn't use to be, but I got the dose upped after that awful, awful and shockingly painful utter cunt of an incident where I suffered the corrosive alkali burn to the eyeball. Took a fair long time to recover and stop being in so much pain, and for it to fade to just extra-sensitivity to light, the brighter it is the worse it is, but not painful like after the burn and during healing. They increased the oxy dose IIRC twice, and now its double, as IR what it used to be in XR/oxycontin, they just never remembered to, or never bothered or thought to decrease it again afterwards. Pretty much forgot about it and left me with the increase, and I too...well I forgot to remember, and remembered to forget to remember quite on purpose. Because I wasn't getting nearly enough pain relief as it was. Shouldn't have to rely on an accident to compensate for a failure on the part of a doctor to calculate an adjustment in dose when one drug is of different potency to another sharing the same general mode of action and purpose. They were too thick, and too stingy to go by anything but absolute mg-for-mg difference transferring me from purely XR oxy, to morphine and IR oxy, the latter at first from a lower dose.
And I had to plead for ANY oxy after. This despite the fact that morphine is, if delivered by a parenteral route with equal as possible bioavailabiity, at least half as potent as oxy is. And by mouth the BA decreases from about 100% via intravenous injection, to oral morphine being of little actual practical use in reality, because all but about 20-25% of it is destroyed in the liver before it can act in the brain to do its job! and they refused outright to even compensate for the 100% equal BA-basis potency factor.
I want doctors that can program people as well as I can. Or at least UNDERSTAND instructions on how to go about it effectively. I've got one of them who isn't a tool, and who will listen, accept evidence-based-medicine as best practice, and as such is willing to receive journal articles supporting a position if I have one, on something, or going against one he is firmly for, and I against, whatever either may be. Although he does tell me that most of what I show him at first goes right way over his level and flies on overhead. It would be funny, the patient teaching the doctor, if it wasn't for it having practical consequences of making things harder to get done when I need something particular to BE done. But he will at least both receive a paper willingly, and acknowledge that evidence based medicine as backed by peer-reviewed science is the appropriate best way to go ideally speaking. But at the same time that means any appointment takes ages, with my having to explain all manner of things from receptor-G-protein coupling, biased agonism as a result (in the case of GPCRs), moduation of ion channel flux in the case of drugs affecting ligand-gated ion channels, things like receptor sensitivity/density modulatory effects, even the basics like that. Its kind of a bit frustrating, I just wish I had a doctor, even one, who is both humane and kind like this guy, has his sensibiity and generlly being good at practicing medicine, but who I coud talk with rather than to, on an equal level and have things be understood at the speed of conversation rather than needing to take the time to break things down into little bite-sized kiddie-servings of neurology and neuropsychopharmacology and pharmacokinetics/pharmacodynamic effects and interactions between drugs, between drugs and enzymes and drug-enzyme-other drug type interactions when it gets anything more complicated than things like 'drinking lots of grapefruit juice inhibits hepatic cytochrome P450-3A4 and prolongs the duration of effect, as well as heightening plasma levels of morphine and benzodiazepine sedative-hypnotics, as does the antacid I take, cimetidine. (a trick I taught him actually, in the case of cimetidine being used as a booster agent for morphine. Was originally on ranitidine, which does not share this enzyme inhibitor effect, being a second-generation derivative of cimetidine specifically intended not to do so, and when I asked him to change from one to the other he was like 'but these are for all intents and purposes drugs you can consider identically'
And me having to tell him 'ahem....actually, doctor, there are some major differences in their enzyme kinetics and interactions, specificallly with cytochrome P450 pathway enzymes in the liver, and this can be in fact, exploited in these circumstances......'
But, he was good enough to go with me on it, and switch me over, just saying if I was wrong, then tell him, and we can switch back if you want'. I wasn't and didn't. And he learned a good trick in the process.
I just want a damn people-programmer of a doctor. Or at least somebody who can keep up.