A Slice of Pi

Archimedes poised to measure a circle behind him in the distance.

Circles. Those fascinating geometric shapes have perplexed us for millennia. The Babylonians began poking at these mysterious objects 4,000 years ago and discovered that the distance around a circle was slightly greater than 3 times its width, specifically 3 1/8 or 3.125, which they recorded on a stone tablet. About the same time, Egyptians, seeking the area of a circle, estimated the ratio to be 3.1605 and recorded their estimation in the Rhind Papyrus (1650 BC).

Fast forward to ancient Greece, Antiphon and Bryson of Heraclea developed the innovative idea of inscribing a polygon inside a circle, finding its area, and doubling the sides over and over. Unfortunately, their approach meant finding the areas of hundreds of tiny triangles, which was complicated and yielded very little results. Then came Archimedes. Instead of computing area, he focused on estimating the circumference based on the sum of the perimeter edges of the polygons. Imagine iteratively doubling the sides of these polygons, slicing them into many tiny triangles, each subdividing the former and pushing closer to the circle’s edge. Using a theorem from Pythagoras, Archimedes was able to compute the length of the sides of these right triangles. As he progressed, dividing the former triangles into smaller ones, an ever more accurate estimation of the circumference emerged. He started with a hexagon, then doubled the sides four times to finish with a 96-sided polygon. Through this method, he narrowed down the value to between 3 10/71 and 3 1/7 (3.141 and 3.143).

Using right triangle geometry and Pythagorean theorem, a2 + b2 = c2, you can compute the length of the edges to approximate the circumference of the circle.

Over the centuries, mathematicians across cultures and continents refined these approximations, each contributing a piece to the puzzle of this magical number. However, it wasn’t until the 17th century when mathematicians like Ludolph van Ceulen calculated this golden number to an unprecedented 35 decimal places. Humanity’s relentless pursuit of mathematical precision didn’t stop there. Our fascination with this mysterious golden ratio continued to motivate mathematicians, engineers, and enthusiasts alike. In 2022, researchers at Google announced computing it to 100 trillion decimal digits.  We still haven’t found the end. Its digits extend infinitely, never repeating in a discernible pattern, yet holding the key to understanding the fundamental property of circles. 

Of course, this fascinating ratio is the number we call Pi, represented by the Greek letter π. As we approach Archimedes estimate of 3.14 on our calendars as March 14, Pi Day, let’s celebrate the enduring curiosity and perseverance of our human family that led to the discovery of this remarkable number. It reminds us that even the most complex mysteries can be unraveled with dedication and ingenuity.

Here is a slice of Pi you can take with you this week. This simple python script will compute Pi to 100 places using Archimedes’ approach:

https://gist.github.com/jasonacox/dfc3f1c1d4e630009c80797352d81c32

Python
from decimal import Decimal, getcontext

def pi_archimedes(n):
    """
    Calculate Pi using Archimedes method with n iterations to estimate Pi.
    This method approximates Pi by calculating the perimeter of a polygon 
    inscribed within a unit circle.

    Polygon edge lengths are computed using the Pythagorean theorem and 
    the geometry of the polygons. The number of sides of the polygon is
    also doubled in each iteration, as each side of the polygon is 
    bisected to form a new polygon with twice as many sides.

    The formula is:
        sides = 2 * 2^n
        length^2 = 2 - 2 * sqrt(1 - length^2 / 4))

    After n iterations, the function returns the approximate value of 
    Pi using the formula:
        perimeter = sides * sqrt(length^2)
    """
    polygon_edge_length_sq = Decimal(2)
    polygon_sides = 2
    # Start with a line, then a square, then a octagon, etc.
    for _ in range(n):
        polygon_edge_length_sq = 2 - 2 * (1 - polygon_edge_length_sq / 4).sqrt()
        polygon_sides = polygon_sides * 2
    return polygon_sides * polygon_edge_length_sq.sqrt()

# Set the number of decimal places to calculate
PLACES = 100

# Calculate Pi with increasing iterations until the result converges at
# the desired number of decimal places
old_result = None
for n in range(10*PLACES):
    getcontext().prec = 2 * PLACES  # Do calculations with double precision
    result = pi_archimedes(n)
    getcontext().prec = PLACES      # Print the result with single precision
    result = +result                # Rounding
    print("%3d: %s" % (n, result))
    if result == old_result:        # Did it converge?
        break
    old_result = result

References

Clutter

Office with clutter and bookshelves full of books.

“Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.” – Antoine de Saint-Exupéry

I confess, I’m a hoarder. I have boxes full of junk that haven’t been visited in over 10 years. There are ancient RCA, S-Video, Coaxial, and even Apple 30-pin iPhone 4 cables, just in case I ever need them again. I have broken electronics and computer parts for the same reason. My nostalgic tendency means I also collect piles of mementos from trips, photos, and even birthday cards. I love physical books and have shelves packed full of them. My digital life is just as bad. In fact, I don’t think I have ever really deleted an app. I collect them like souvenirs. Are any of you like that too?

Clutter. I’m sitting at my desk today in awe of the piles of things around me. Books, magazines, post-it notes, half-completed forms, empty boxes, and some left-over décor from the holidays. I was about to comment on the several coffee mugs sitting on the desk, but that isn’t clutter, that is essential equipment for survival. But still, so much clutter.

My mind is full too. I have to-do lists, incomplete thoughts, spurious worries about implausible events, un-actionable regrets, doubts, and a collection of unhelpful grudges in the corner. My mind is full. Time to relive that embarrassing moment? Worry about something? Think about something you can’t take any action on right now? You might have forgotten it or left something behind, time to worry about it. My mind keeps sorting the useless junk, going back and forth, wondering if it can collect more. It’s like trains of thoughts going in circles. Stop! 

The mental clutter is a bit noisy at times, isn’t it? It can be overwhelming. Do you ever have that? If so, it’s time to clean house. Yes, it’s time for some Marie Kondo magic of tidying up. Go through the clutter… Start with what is around you. What can be tossed. What needs to be kept? Start with what is in reach in front of you. As the haze clears, expand to the office area or room you are in. Be careful, it may get away from you! Don’t try to do it all. After all, we still need to visit the most important place of all. The mind palace. Those trains in your mind that are doing circles around each other, tell them to stop. Look around. Can you do anything about that thought? If not, cast it aside. Wrap up those worries, regrets, and grudges. Pack them in tight, thank them for their better days and ship them off to the garbage. Sweep out the useless fears and self-doubt. Is it getting better? 

Distill, reduce, minimize, and simplify. Clutter happens. In fact, it seems to collect around us like dust with little or no effort. It takes energy to remove it, but happiness awaits! I encourage you to join me in spending a few minutes this week purging the clutter, taming the thoughts, and sweeping out the mess that saps our energy. Find that clarity. Enjoy it and appreciate it! Oh, and set a reminder to do this again next week.

Have a great week!

Turn up the Temperature of your Thinking!

How to Approach Problems with a Creative Twist

The kitchen sink wasn’t draining. The Super Bowl was about to start, and a pile of dishes and pre-game food prep was queued up on the counter. “Well, this is great,” I said to myself. I could hear SpongeBob commenting about the pre-game show. Yes, that’s right, we tuned in to Nickelodeon, as all sports enthusiasts would do.

Several years ago, I bought a drain cleaning machine to help clear roots out of our side yard area drain. It’s one of those drum type with a motor and a 75’ auger cable. It has paid for itself ten times over for things like this. I went to the garage and wheeled it to the super small clean out drain opening. I fed the cable into the drain and watched the sink start to slowly drain. As I have done in the past, I added a garden hose to increase the water pressure and ensure the line was clear. The sink was draining. The crisis was over. Well, or so I thought. As I began to pull the cable back out, something happened. It locked up. I tried pushing it back in, but it wouldn’t budge. I wanted to get a look, so I needed to pull the water hose out to see. Oh no! It was stuck too! I pushed, pulled, and even switched the auger direction. Nothing. Then it happened, water started backing up too and was spraying all over me. I felt like I was in one of those cartoon sitcoms where everything goes wrong. I started imagining if I just cut the hose if that would help, but then that would likely permanently clog the drain. I sat there on the back patio, staring at the problem, covered in drain goo.

Large language models (LLMs) like ChatGPT are complex systems that use artificial intelligence to predict answers based on context. You provide a statement or question prompt, and it will attempt to answer it. It is like an elaborate function call. The input is the prompt. To derive the output, the model feeds the input into its neural net. The network produces a set of possibilities as to the “next word” (token). Some of those next word options can be equal or similar in probability. It randomly picks one of them. A model parameter that you can use to influence that randomness is called “temperature”. The higher the temperature, the more diverse and unpredictable the output. Using 0.7, as is the default for ChatGPT, provides the model with some creative freedom (including some hallucination). A setting of 0.0 will create nearly identical responses. Turning it up to 0.9 or even as high as 2.0 will produce pure creative output, possibly with little technical relevance.

I’m not a large language model, and even my intelligence may be suspect. At least that is what I was thinking, sitting there in the pile of goo. But maybe I just need to turn up the “temperature” on my thinking. I stopped for a minute and thought about those math problems that you just couldn’t solve. After 5 pages in, you were still unable to reach the conclusion. You were stuck. The only way to proceed was to reframe the problem itself. Start over. Pick a more improbable path and see where it takes you. That’s what I needed to do. I looked at my “stuck drain” problem and decided to turn it over. Literally. I twisted the hose and the cable together. Pop! I heard the cable unwind deep in the wall. It was unstuck and began draining again. And all in time to see the Super Bowl kickoff at Bikini Bottom. I mean, that is, after a shower.

Do you ever get stuck? Does that frustrating problem seem to have no solution? Well, turn up the “temperature” of your thinking! Reframe the problem and approach it from a completely new angle. Explore the less probable path and see if it unwinds the knot and sets the problem free.

Keep Growing

Keep Growing - Green plant growing in the glow of technological advancement.

What are your skills? I recently saw some research by IBM that suggests that general skills typically have a “shelf-life” of about 5 years. More critically, technical skills expire in about 2.5 years! Fundamentally that means that for us to stay relevant, we are always re-skilling, learning new things and mutating our skills to meet the fast-evolving landscape of technology. How does that feel to you? Exciting, exhilarating and well, maybe even a bit exhausting? I agree!

Constant change is the very nature of life and all of creation. Life and creative energy strive to grow against the gravity of the status-quo, branching and evolving to become more than it was before. Each generation breaks through the bedrock of normalcy and sends roots into the unknown and absorbs it, learns from it, and flourishes. Our generation is no different. Even today, we are on the verge of a vast shift in terms of technological change and disruption.

But there is a danger. Life yearns to become greater, yet our rival, death is in the shadows, lurking to devour us. Progress demands energy and determination, but it is difficult, and the burden can become heavy, sapping away our enthusiasm. There will be the temptation to stop, to stand still, or to give up. That negative propulsion tugs on us every day. But we have a choice. We can defy gravity. We can send our roots into the unchartered unknown, learn from it and grow. How do we do that?

Stay curious! Move forward, do new things, try new ideas, open new doors. What is current in tech? Explore it and learn about it. A world of endless possibilities lies ahead. We are made for this! To grow, to explore, to experiment, and to enjoy life and all creation. And yes, I know, we are but imperfect dust, stardust to be exact. But that stardust was reborn with a glorious purpose to shine and make a difference, to help each other, to learn, to build, and to grow into what has never been before.

The frontier awaits! Technology doesn’t stand still, it keeps moving, powered by human imagination and energy. Embrace the challenge and keep learning, keep growing.

Imagine 2029

Imagine it is 2029. Describe it to me. What is going on in your life, your family, your job and in the world? What were those amazing things you dreamed about in 2024 and did those dreams come true?

Five years ago, Gene Kim, a good friend and mentor of mine, challenged me to do a thought experiment. He asked me about my goals for 2024. I started off giving general aspirational goals around making a positive impact in the world, at work, supporting my team and my family. He dared me to get specific. He told me to imagine my future self 5 years from now. What would I be proud to have accomplished if it could be anything in the world? Write it down, he said, so you can pull them out in 2024 and compare your dreams to reality. It was so clarifying, so motivating and so powerful.

When I started this exercise in 2019, I confess, I thought some of my goals were audacious if not ridiculous. But as my friend challenged me, I wrote them down anyway.  Here is what I imagined in 2019 about my 2024 future:

  1. My team and I helped Disney deliver a large new guest delighting product that wouldn’t happen without our SRE efforts.
  2. I became an author of a book and several papers on leadership and using DevOps practices to accelerate business.
  3. My team and I partnered with our businesses to expand the impact of SRE and our SRE approach to toil reduction.
  4. I’m an inventor listed on a published patent and have several patents pending.
  5. My family and I enjoyed several vacations together, managed to stay out of debt and were able to fund college.
  6. I’m the maintainer for at least one Open-Source project with over 100 stars and an active community on GitHub.
  7. We updated our home with energy efficient windows, solar panels, and built a domestic robot to help our family at home.

Not all my dreams have come true. But many of them have. In fact, all but one! My robot is still a bunch of lines on a paper, a 3D printed arm and a pile of wires in the garage. Still, I can say with absolute certainty that I wouldn’t have accomplished even half of those things if I hadn’t listened to my wise friend and made note of my goals.

We hunger for a mission and objectives that we believe in. We prioritize time for what we think is important. State your mission. Define your objectives. Make those dreams come true, one step at a time. But it requires that first step… Imagine.

Are you ready? Let’s dream into 2029. Take a breath. Close your eyes and push out all other distractions. What will make you happy? What do you want your world to be like? After imagining that, open Notes or your favorite note taking tool with the title, “Goals for 2029” and write down 7 things. Do you believe in them? If so, save your dreams, revisit them every year or so and make them happen!

12 Days of Christmas

Christmas living room with a Cocker Spaniel sleeping on a blanket in front of a warm fire. Photo by Adobe Firefly.

Last week ended the 12th day of Christmas and Epiphany on Saturday. I sat by the fire this weekend, in the frigid 40 degree Southern California weather, contemplating my plans for our holiday decoration removal. Unintentionally poetic, we have ended up with 12 large bins that store our lights, trees, ornaments, greenery and candles. It’s beyond ridiculous. We don’t have any lords a leaping, but we do have some ladies dancing and if you will listen closely to our Scottish background music, there might be some pipers piping. I tripped over a few turtle doves on my way to get some coffee by the maids a milking, all in an attempt to amplify my motivation. 

Lighting hooks, ladders, boxes… logistics were flooding into my mind like those drummers drumming. I knew I needed to get moving, but my head was swimming around like those seven swans a swimming. I took a stroll outside to survey the outdoor décor removal. It was dusk, so likely nothing would happen today but I was building my mental checkbox and dropping items into my packing list like those geese a laying.

At this point, I need to mention that we welcomed a new girl into our family this Christmas. Her name is Elizabeth and she is a Cocker Spaniel we adopted from the local animal rescue center in Santa Paula. She is a sweetheart and I can’t help but sometimes call her Ms. Lady, from Lady and the Tramp. Anyway, she was helping me with the survey mission but as the cold wind blew, she talked me into going back inside. As is her new custom, she drug her blanket over to our fireplace and began walking in fast and determined circles on it like those five golden rings, until it was “just right”. Off to sleep she went. I shut the door and wondered what she would think about missing those beautiful black birds that had landed on our lawn. Maybe she was dreaming about the French hens instead.

Oh no! Somehow Epiphany became Sunday and the runway was running out to get all the holiday goodness packed up and stored. Oddly, it didn’t seem quite right. I discussed with my family and my true love said to me, “I’m not quite ready to take it down.” I was elated! Looking at the cheerful twinkling lights, glowing candles and shimmering ornaments, I agreed completely. It was clear that the décor needed to be enjoyed and age a few more days before it was ripe for picking and packing. 

I know what you are thinking. You have neighbors like us. They keep the lights up way to long. Yes, to keep the season special, it must be put away to be enjoyed again next time. We normally do that sort of thing religiously, but sometimes it is good to give yourself some license, some kindness and grace to pause and enjoy the moment. We wanted to sip a little more on the beauty that is all around. Do you feel it too? It’s wonderful! 

We will pack tomorrow, but today, we will enjoy the wonder of the season for a bit more. I encourage you all to do the same. Even if your holiday wares are all packed up and tidy, spend a few minutes this week reflecting, meditating and appreciating the goodness and joy that every season brings. Life is glorious, precious and can easily be missed. Enjoy it!

Oh yeah, and I’m still looking for the partridge in the pear tree…

Have a great week!

Christmas lights on a house, tress ans bushes in the evening with a snow covered yard. Photo by Adobe Firefly.

23.5 Degrees

“On every world, wherever people are, in the deepest part of the winter, at the exact mid-point, everybody stops and turns and hugs. As if to say, ‘Well done. Well done, everyone! We’re halfway out of the dark.’ Back on Earth we call this Christmas.” – Doctor Who


As many of you know, I’m a big fan of solar power and energy storage systems that extend the sun’s amazing power throughout the night. We installed our solar array and batteries in 2021 and I can’t help but watch and measure the incredible energy we see from our friendly thermonuclear fusion reactor in the sky.

23.5 degrees. That’s the tilt of the earth that pushes our daily spin more directly to the sun, or away from it. Ironically, due to the earths elliptical orbit, we are actually closer to the sun in the winter than the summer, 92 million miles instead of 95. But the tilt makes a huge difference. It causes the sun’s rays to hit us in the northern hemisphere at an oblique angle, bouncing off of our terrestrial globe instead of being absorbed. It’s hard for us to sense it, but the solar panels feel it! We saw a peak of 51 kWh of energy per day during this summer, now we barely get 13 kWh. That’s a quarter of what it was during peak production! The sun didn’t get lazy, we just stop getting its rays.

We have all been observing the growing blanket of darkness that pulls over us, stretching deeper into our mornings and evenings. Days get shorter and nights grow longer. As we tick inescapably towards our winter solstice on December 21, we feel the cold wind, the fading colors and the melancholy shadows that scrape against our souls. Darkness is here.

Light a candle. This isn’t our first trip around the sun. Our human family has witnessed this solar dance since our beginning. We measure the sky and plot the stars to know where we are. We embrace the rhythm of the year by decorating it with celebrations and traditions. In the darkness of the winter, we light our lights. We illuminate our winter journey. We adorn our homes with fragrant greens, twinkling lights, cheerful ornaments and glowing fires. All the while, we know, the light is coming again. The glory of the sun will return! But for now, we celebrate.

It’s almost here. The dead of winter has arrived. Cuddle up with a warm cup of coffee or tea, your loved ones and a glowing fire. The light will return. We are halfway out of the dark! Celebrate it. 

Merry Christmas!


Here is the solar energy year as seen by our solar panels via my Powerwall-Dashboard.

My Space Camp Adventure

I always wanted to go to NASA’s Space Camp. As a kid, I saw the movie SpaceCamp and dreamed of one day being able to go and learn about astronaut training and missions first hand like the characters in the movie. Maybe I’d even end up in the cockpit of the Shuttle during an FRF (Flight Readiness Firing). No, that didn’t happen, but it was fun to dream about. And of course, I never thought I would get to actually go… but then it happened!

I got to go to Space Camp! I didn’t go as a trainee, but thanks to my good friend, JD Black, I was invited to Huntsville, Alabama as a guest author, along with Gene Kim, to see among other things, the US Space & Rocket Center campus and program. We had the privilege of talking to them about their mission, software development, reliability engineering, history and leadership. It was amazing. We toured the training facilities, explored the rocket engines, and spent time in the mock international space station watching the trainees learn to tackle real-world challenges through the application of science.

For my fellow science history nerds out there, we managed to get a behind the scenes tour with the archivist, looking at equipment, notes and design plans used in the Apollo program to get us to the Moon. We even got to see the slide rule and calculations used by Wernher von Braun to design the Saturn V launch vehicles! We went from that to the Artemis mission, the NASA program to take us back to the moon in 2024-2025 with the plans to have a sustainable presence on the moon by the end of the decade. It was an incredible experience.

To the moon!

This visit inspired and reminded me of the amazing things we can do when we pursue our dreams and work together to make it happen. As a species, humans are insatiably curious. We are restless. We love to explore. We can’t help but push boundaries and reset the impossible. We dream and take moon shots. We strive to go beyond ourselves and our own restrictions. No limits, no ceilings, no borders. We apply energy, passion and ambition to go where we have never gone before. To infinity… and beyond. I love human beings… and love being human!

Keep dreaming, keep going!


Jason Cox with Gene Kim and JD Black, attempting to operate the mock ISS at Space Camp

Jason Cox with JD Black and Gene Kim at U.S. Space & Rocket Center

Birthday Connections

My dad and I share the same birthday. I once asked him if he liked celebrating his birthday. Without missing a beat, he laughed and exclaimed, “It’s better than the alternative!” 

Growing up, we would count down to the date together. He loved to call a week before to remind me that our birthday was almost here. Nine years ago, I got that last call from him. He told me a joke. We laughed together. We talked about our birthday, getting old and his new aches and pains. We reminisced and celebrated the decades long journey together. Six months later, his body would give out and he would close his final chapter. He had reached the alternative.

Today as I celebrate yet another trip around the sun, I’m reminded of my dad. I know he would be laughing and tell yet another corny joke. I miss him and will always think of him on my birthday. It is a precious thing. A golden moment that I can hug and cherish every year. 

Many of you, like me have had to say farewell to parents, friends and loved ones. Today reminds me of how precious those connections really are. It can be small things, like that simple call on your birthday, that forge a shared experience that will last the rest of your life. Can you think of a way to connect with a loved one today? Invest in those small things. Create those future memories today. Reach out to your loved ones while they are still with us. Wrap up those memories. Hold them tight against your heart and open them anytime you need a bit of encouragement. They will be a source of laughter, smiles and yes, sometimes even a tear.

Make those connections. Capture those memories. Celebrate them. We have a finite number of times around the sun, let’s make the most of them.


My first birthday celebrating it together with my dad. First time for him too. And that’s Aunt Annie and a very cool car I seem to have misplaced. – Jason

Traditions

I confess, we are troublemakers. We think differently. And we like to do things that are different. We don’t adapt to the world around us, we attempt to adapt the world to us. We love to challenge the status quo, join the rebel alliance, experiment with new ideas and promote constructive discomfort. We sit at the helm of the ship, facing the wind, breaking the ice and steering toward a brighter future. Even setbacks and head winds, steel our resolve to go further, faster. That is what we do and how we continually evolve to elevate ourselves, our teams and our company.

But around us, behind us and beneath us are the planks that support that steady progress and resolve. They may be taken for granted or go unnoticed. They support us, bind us and encourage us in ways we can’t even fully imagine. They are the rhythm of our lives. They are the fabric threads that encourage our hearts, bind our wounds, calm our anxieties and fill our sails with powerful gusts of energy. They are our traditions, our habits, our memorials and spiritual devotions. We lean on them and grow with them, year after year. We celebrate them. We gather around them as a human family, warming ourselves by their perpetual flame of stability, belonging and continuity.

Traditions. They are all around us. We are in the midst of the season of them right now. My family just celebrated several of them this past Thanksgiving week with rituals of family, fun and feasting around the dining room table. Like many of you, we celebrate with familiar holiday fare, play games, put together puzzles, participate in shopping excursions, go to the theater, watch holiday movies, bake cookies, send out Christmas cards, decorate the house and visit with family.

I love our traditions. They connect us to the past. They create bonds, shared values and experiences that forge us together as a stronger human family. Having traditions and looking forward to them brings comfort, hope and a sense of structure to our often unpredictable lives. I know what you are thinking. Yes, to be fair, there can be chaos in traditions too. But even those mishaps can add to the strength of our human story.

What are the traditions that bring you excitement, comfort and joy? Maybe you don’t have many? Well, guess what? You can make some new ones. Start this year. Assemble those planks under your feet. Stand up new guardrails of joy that you can count on and look forward to, year after year. Establish some personal or family traditions right now. Embrace some way that you can memorialize them and repeat them every year. I’m convinced that you will discover the same thing I have. The adventure is more rich, rewarding and enduring when you have traditions to keep, treasure and power you along the journey.

Happy traditions, everyone!