I'm not sure I'd call myself prolific just yet. My second book, Mastering Python for Bioinformatics (O'Reilly) is heading to press next week, and I have started my third on Rust. Maybe if I get to five books I'll accept that description! I've been programming for about 25 years and spent a good bit of time teaching and mentoring and reviewing code. I finally found enough to say, and now I feel like I just need to write and write to get all these ideas down on paper.
I recall when I started my undergraduate degree at the Univ of North Texas back in 1990. I signed on to be a Jazz Studies major because I wanted to study the drum set. I'd be playing since age 9, and the choices were either to study music ed to become an instructor, music performance to become an orchestral player, or Jazz to study the kit. Anyway, it seems ridiculous now that I was studying Jazz because I'd never listened to it in my life.
I could barely read music, couldn't hear the difference b/w a major and minor scale, couldn't vocalize, didn't know jack about music history or theory. Mostly I could bang out some rock beats on a kit, and yet I was going to study music! Anyway, I come to quickly realize that I'm in way over my head. I'm trying to learn how to play swing on the kit when I've mostly just listened to hard rock. It was a radical change. I had no vocabulary.
Every member of a jazz group is expected to be a virtuoso and take a solo. You have to know the form of a tune, play in the correct style, interact in real time with other players. When it came time to take a solo, I would just freeze. I had no idea what to "say" on my instrument.
One of the instructors patiently said one day that jazz is something of an old person's music. That it takes a really long time, lots of studying and playing and listening, to find something to say on your instrument, particularly something new.
Until then, we should just study what others have said, mimic them, write down ideas, synthesize until we found our own voices. This would ultimately take decades, so don't be in too much of a hurry.
After a couple of years, I switched majors (a few times), but I kept studying music on my own. I got deeper into literature and reading and thought about writing fiction, but, again, this was so beyond me. I still harbor delusions of writing stories. The words of my jazz prof stuck with me, though. It would take a really long time for me to find something to say, so I've just kept trying over the years to work out what I have to bring.
I also really thought about teaching as a career, but obviously programming pays way better. While working at the Univ of AZ, I finally got a chance to teach in a classroom by helping my boss, Dr. Bonnie Hurwitz. At first we split classes, her teaching science (metagenomics) and me programming so our student could learn how to do computational research.
Teaching was a huge challenge, and I really sucked at it at first. I would type out my lectures entirely long-hand, that is, as a prose document to work out what I wanted to say in an hour. That's pretty much the length of a decent chapter. I would devise examples and sequence things to show, for instance, what is a list, why it's useful, how to manipulate it, where you'll find one in the wild.
After a couple of years, I finally designed an entire course just on the programming material and got to teach for entire semesters. That was really life-changing. I enjoyed working with students and seeing their struggles. Since I learned to program so long ago, it was easy to forget what was hard to learn. I kept refining my examples and prose and lectures and moved entirely towards live-coding in class.
"Active learning" is a great way to keep people from falling asleep in class and really helps people retain information. So I have adopted this active approach to writing. I describe a challenge, give the reader some information and hints on how to solve it along with the data and tests to know when things are correct, and push the reader to work it out. Then I present some different ways to solve the problem.
I don't know if it's just a formula I'm following for now. I'm not trying to be derivative, but this is the format for TPP, the bioinformatics book, and now the Rust book. There are plenty of other books that describe everything you want to know about a list or a dictionary for a given language, but not enough that show you when and how to use one in an actual program.
As for the energy, I've got issues. I feel really OCD about writing at this point in my life. Like I've been trying to learn to speak and finally figured it out. My father died young, and I think I'm haunted by ideas of mortality. I recently watched (and rewatched and rewatched many times) "Hamilton" with my daughter, so I guess "I am not throwing away my shot."
Sorry if that took a weird turn, but you hit a button, I guess.