The sequences, loops, and logic of Life

dad2summitUncategorized, Words on Wednesday

Long before I was a parent, I was a computer programmer.

Ryan Hamilton

Ryan Hamilton

In elementary school, one of the first programs I wrote was a simple animation loop of a stick figure doing jumping jacks. I didn’t know it then, but I was learning much more than code and syntax; I was beginning to understand the fundamental functionality of all things and the very building blocks of life itself.

I was learning how to think, and how to approach virtually any problem in the universe, regardless of its complexity. With a little time and effort, I could break any problem down into its elemental sequences, loops, and conditional logic to find a solution.

The same three function types that handle highly sophisticated tasks like sending rockets to Mars and deploying robotic rovers to navigate its planetary surface, are the same functional structures that govern programs like Call of Duty, Minecraft, Tic-Tac-Toe, or Snake.

Seriously, this stuff isn’t rocket science.

Bill Gates, the wealthiest and arguably the most successful man on the planet, is a coder. And he said, “Learning to write programs stretches your mind, helps you think better, and creates a way of thinking about things that I think is helpful in all domains.”

I agree wholeheartedly, and ever since I can remember, when I observe the external world or look internally into our very psychology and physiology, I’ve found sequences, loops, and conditional logic everywhere. I’ve applied programming fundamentals across all domains in my life, including my life as a parent.

As I’ve matured through adolescence into adulthood, my parents, friends, family, media, culture, and the world itself have programmed me with the usual prototypical sequence:


Mired in interminable loops of incessant study and repetitious work, I spent decades executing this sequence exactly as planned, making logical (and a few illogical) decisions along the way. I graduated from business school. I got a job. I saved money. I married a woman. I bought a dream house.

Life was good, and I was building my picket fence when the unexpected happened.

getDepressed(); // #fml
medicate(self, [beer, whiskey]);
consider(suicide); // *** DEV NOTE: Please fix. Might crash system. ***

New factors entered my life, which caused massive resource leakages and threw the original functional execution into a crash course of destruction. I found my original programming of never-ending work was wrought with bugs, flaws, questionable values, and the inefficiencies of failed sequences, poor habits, and errors in logic.

The program wasn’t working. It needed major redevelopment, and I had to step in and fix it ASAP.

I approached the project like most of the problems I’d ever faced in life – by questioning them, evaluating them in great detail, breaking them down, and applying code fundamentals to solve them. I asked myself:

  • What sequences are at play?
  • What is being repeated, and what is the nature of that repetition?
  • What logical decisions am I making to influence it all?
  • What’s working? How can I fine-tune those things to perfection?
  • What’s NOT working? Where are the bugs in this system? What can I do to troubleshoot and eliminate them?
  • How can I enhance the overall performance in this system?

The hardest thing I’ve ever done is take apart the code of my life, and find the courage to reprogram it. I cleaned up my diet, built a new dream career, stabilized my finances, restored amicability with my ex-wife, reunited with my child, and I now spend plenty of time with him as a highly involved and actively engaged father. I love it.

I was able to steer my life back in the right direction, but only after breaking it down into all of its fundamental functions.

I came into this world beholden to these three fundamental structures. I spent my childhood piecing them together like LEGO bricks in spectacular ways, mostly for my own fun and frivolous entertainment. But, nowadays, I realize their true potential to build a future for myself, my child, my family, my community, and the world.

I’ve endured joy and pain, happiness and depression, love and hate, wealth and poverty, sickness and health. Just like the programmers who coded it, my program isn’t perfect. But, through repeated cycles of trial and error, each experience has given me additional knowledge, wisdom, and perspective to make improvements, iteration after iteration, in a constant feedback loop.

Through all of life’s ups and downs, I know one thing to be true: There’s not a problem that code cannot solve.

Ryan E. Hamilton is a father, blogger, podcaster, coder, co-founder and chief web developer of Life of Dad, and co-host of “The Life of Dad After Show” podcast. A programmer since elementary school, Ryan also teaches his 8-year-old son (and children and parents worldwide) how to code through a blogging/podcasting effort called “DaddyDev.