I started doing some research (prior to speaking with my psychiatrist) and started noticing some ADHD-esque behaviors in my toddler. I'm not looking to get them diagnosed (yet?), because who knows what is "normal young kid inattentiveness and hyperactivity" versus anything else, but ADHD is absolutely hereditary and a family history is one aspect that is/was used to diagnose.
This is a good resource I've read (well, listened to the audiobook of..): https://www.amazon.com/Driven-Distraction-Revised-Recognizin...
Did you get the correct diagnosis? Well, no idea how even the best & brightest internet crowd could guess.
Do features of ADHD interact with one's way of life? Hell yeah! It goes both positively (e.g. providing much-needed stimulation) and negatively (modern media & marketing prey on the addiction to dopamine kicks).
Regardless if you have it or not (and since it is a spectrum, the answer is not binary) - try "How To ADHD" YouTube Channel (https://www.youtube.com/watch?v=cx13a2-unjE) and the book "Driven to Distraction" (https://www.amazon.com/Driven-Distraction-Revised-Recognizin...). It might help you in understanding yourself.
What you write reads like a typical ADHD Imposter Syndrom. Why do I bring ADHD? Because you are a jack of all trades, experience FOMO, work at startups, and are concerned with not doing things "the proper way". Been there, done that.
There is "Driven to Distraction" book by Hallowell & Ratay (https://www.amazon.com/Driven-Distraction-Revised-Recognizin...), which deals with ADHD in adults. This type of behavior is common. The crucial thing is to accept that one will never be (or should strive for) being a "typical [insert a job here]". So corporations and other well-specified jobs are usually (though not always) bad fits. And there is a lot of strength in that - startups, freelancing, consultants .
Furthermore, big companies push this narration that only "things at a scale" matter. I strongly disagree. All startups start from a small scale. And even in big companies, a lot of innovation comes from small, proof-of-concept projects.
 The complete phrase is "a jack of all trades is a master of none, but oftentimes better than a master of one".
 For me, school, studies, even Ph.D. were too standardized. Then I started to shine as a freelance consultant, and now I flourish as a founder. It is good to find one's niche!
First and foremost - if it is your style, try focusing on short projects - something that can be done in a few hours. But once you decide, make a rule that for 3 hours you stick for it.
For anything longer that one day, I try to find collaborators (otherwise it is impossible). Importantly, they do not even need to touch the same parts of code - it is enough that I get some stimuli from time to time. Even for things that are day long, I try to move checkpoint-by-checkpoint, to have a sense of completion.
In general, I really recommend diving in materials on ADHD, especially "Driven to Distraction" https://www.amazon.com/Driven-Distraction-Revised-Recognizin..., this attention-jumping may be a symptom of larger issues.
Another thing that is worth nvestigating - WHY do you quit? Is it like that there are too many ideas? Or maybe being afraid of failure. (Vide perfectionism & procrastination.)
On the other hand, I strongly object to some pieces of advice found in the thread, in the line of "if you cannot sustain attention, it means it is not worth it". Well, it might be true for the neurotypical population, but certainly isn't for AD(H)D folks.
In my case, well, if something really needs to be regular, the only way to go is external pressure (external deadlines, people meeting at a given time with the goal to learn) and bringing some intensity (instead of 1h learning, a day focused on that).
Most people associate ADHD with kids who struggle in school. But highly intelligent people can have it too. It still holds them back from reaching their potential, it's just that their potential is much greater.
Here are some things to ask yourself:
* Do you also procrastinate non-work things such as buying gifts, paying bills, calling people back?
* What is your home like: Do you have a lot of half-finished projects, "piles", or chores that never get finished?
* Are you always running late because you are busy doing other things, or underestimate what you need to do to get out the door and get to your destination?
* Do people tell you that you frequently interrupt others when they are talking?
* Would you describe yourself as a risk taker and more prone to high adrenaline activities? How the friends you keep?
* Are you only able to focus with the help of caffeine, guarana (eg, Vitamin Water Energy), or other energy drinks?
* Do you use nicotine to relax or be more focused? (If so, please stop and see a doctor.)
* Do you use alcohol, not to get drunk or for the drink itself, but as a way to unwind or slow down at the end of the day?
This is a good book: http://www.amazon.com/Driven-Distraction-Revised-Recognizing..., which reminds me of another question:
* Do you buy/start a lot of books, but rarely seem to finish them?
Read enough of the book to see if this resonates with you. If it does, the next step would be to talk to (a) your doctor if you have one, or (b) find a psychiatrist in your area who specializes in ADHD. The book can help you find resources.
Edit: Just to be clear, this list is NOT meant to be diagnostic. Although I happen to have an MD, I am NOT a practicing physician no one should assume they have ADHD based on any list like this. I would only say that if many of these things hold overwhelmingly true for the OP, then it might be worth learning more about ADHD and finding a professional to begin a conversation.
Yes, ADHD and meds sparks a lot of cynicism in some people. However, one reason I recommended that book is that the authors present a balanced approach to meds. One of the authors has ADHD, but doesn't find that meds make much of a difference for him (they reportedly are ineffective for 25% of adults with ADHD). But they have helped many of his patients and his own son.
Fresh book recommendations delivered straight to your inbox every Thursday.