Jul 312023

Below is a piece I wrote for my Unitarian Universalist group

Tldr: We have an abundance of time, if we are intentional about how we spend it. Let’s explore how to ensure our lives are filled with meaningful moments, and avoid wasting one of our most precious resources: time.

It may seem hard to believe, but back in my college years, I was one of the COOLEST computer science students on campus (surprised?). This was back in the day when desktop computers were the size of a desk, and those large tv-tube monitors were the norm. One semester I took my hard-earned summer cash and got a brand new, state-of-the-art 18” flat screen monitor. These were the bees knees back then, and I was so proud to have one. But also that’s why I was distraught one afternoon, when my cool status was challenged.

That pivotal afternoon, I came back from class to find my roommate a little frazzled. He explained that someone came by, asking if he had seen any thefts around our place. Little did we know, that that person was actually THE thief (trying to steal some more), and that they had come through my window and stolen my *delightful* flat screen monitor. To a computer science student, that was the end of me! I mean, I still had my old CRT behemoth I could use, but my revolutionary code looked soooooo good on that slick, flat screen. I was ruined.

I was also young, and this was the first time in my life that I felt violated. I was DETERMINED to find the culprit. I spoke with our apartment security guards. With campus police. With city police. How DARE someone steal from ME?! It wasn’t about the property. It was about the principle…of taking something that was MINE.

I received suggestions to go to the local flea market, to see if my stuff was being resold there. To scour craigslist, to look for it listed there. I spent several Saturdays going to the swap meet to see if I could identify my precious monitor. MY MONITOR. I had no idea what I would do if I did find it. 

I interviewed neighbors to see if they had any insight. Called my parents, and talked to their insurance agents to see if they had any recourse. But long story short – I never saw it again

I must have spent about 30 hours, over several weeks, trying to hunt down my prized possession. And looking back, I now realize how foolish that was.

Those hours….were during the peak of my college years. I finally had friends, the professors knew me by name, and my field of study was finally clicking. Those hours…were hours I could have spent diving deeper with genius professors, hours I could have spent strengthening relationships with classmates and friends that I wouldn’t have near me for long, hours that I could have spent partying (responsibly) without a care in the world before my adult life kicked in.

In retrospect, I realize that what was really stolen from me that semester, was my time.

Time, which I’ll argue today, is the most precious resource we have.

When we normally think of precious resources we think of physical materials that are in short supply. Gold and silver. Rainforests. Natural minerals. Money. But with each of those physical resources, you might have an opportunity to get it back even after you’ve spent it, it usually has only changed hands. It may require a huge investment to do so, but it’s possible.

But time – time is the only resource, where once we spend it, it’s gone. Forever. This second right here. This moment has now passed, and I’ll never get it back. Same with THIS one. Kinda crazy to think about, right?

There’s a stoic philosopher known as Seneca, who spent a lot of time thinking about just that. He had an interesting life that was filled with crazy highs and lows. He was born into a noble family, wrote some influential plays, got exiled to an island for eight years, became the chief advisor to the Roman emperor, and then got sentenced to death by forced suicide.

In between all of that, he did a ton of philosophy, and gathered some of his thoughts in an essay called “On The Shortness Of Life”, which he wrote around 2000 years ago. I was lucky enough to come across an analysis of it by Dmitri Brereton, a self described ‘practical optimist’ who explores philosophy in his spare time.

Dmitri postulates that if Seneca were around today, he would have the following to say:

Everyone complains about how short life is, but that perspective is broken. Life is not short. The real issue is that we waste so much of it.

In fact, life is long enough for you to achieve your wildest dreams. You’re just so busy wasting it that you get to the end without living much of it.

In regards to my precious computer monitor getting stolen, he’d reply:

It’s surprising that most people wouldn’t let anyone steal their property, but they consistently let people steal their time, which is infinitely more valuable

No one is willing to hand out their money randomly, but that’s exactly what you do with your time. You’re very frugal with your physical possessions, but when it comes to your time, you’re wasteful of the only thing in the world that you should actually be frugal with

You can’t touch or feel time, so it’s hard for you to really grasp it. But if your doctor told you that you had a deadly illness, you’d spend every cent you have to try to stay alive. That’s how much your time is actually worth to you. But on a day to day basis, you treat it like it’s completely worthless, just because you can’t see it.

Now I have a strategy for this, because he’s right…time is hard to see. But check out this poster I got last year that I have hanging up in my office.

It’s a bit of an eyesore, so if it’s hard to make out what’s going on let me explain – each of those  circles represents a week of my life. Every row is 52 of them, representing each year. The goal here is to have an obvious representation of my life lived, and how much I have left to live. And let me tell you, every week when I cross off another week, it gives me a little kick in my butt, as I question – did I spend that week wisely? Especially, a few months ago when I crossed off that last circle in the year 40 – I could tangibly feel the mid-life-crisis coming on.

Dmitri as Seneca continues:

It’s even worse when people come up with deferred life plans. They’ll say something like “When I’m forty, I’m going to retire and write a book” or “I’ll do this thing I hate right now so I can make money, then in ten years I’ll do what I really love”.

Seriously? You think that the universe is going to let your life proceed the way you want it to? What guarantee do you have of even making it to that age?

When he says that I’m immediately reminded of my father in law, who worked long hours, for 45 years straight, only to retire, and in the first year of retirement had a major stroke, and was left paralyzed and unable to speak, for the rest of his life. Breaks my heart.

Putting things off for the future is the biggest waste of a life. You deny yourself the present by promising the future. You’re relying on the future, which is outside of your control, and abandoning the present, which is the only thing you can control.

The whole future lies in uncertainty – so live immediately.

Now, to me, that sounds great. I’d love to go to the beach everyday and not stress about reality, work, bills, health, but that’s simply not practical.

But I think what we need to take away from this, is that our time is finite, and we need to be careful if we’re spending it on a path where we only care about the end result and not the journey.

We should live our lives intentionally, and be aware when our time is stolen from us little by little. We should avoid spending time on things that don’t really matter to us.

On a personal note, this year has been a tough one for my family. We’ve suffered a lot of loss. 

Back in April, Kelly’s dad (who I mentioned earlier), was placed on hospice and she held his hand as he struggled to take his last breath.

A month later we learned that our family dog Zelda had an aggressive form of bone cancer, and had to say goodbye to her shortly after.

And while we were trying to escape that double dose of grief by spending time at my grandparent’s lake cabin, we learned it was to be sold and we wouldn’t be able to continue our annual family vacations there.

This was some heavy stuff for us. 

In this time of mourning, I recalled all the good times I had with what I was losing. I cried, a lot. It sucked. It still sucks. But I did realize that what I was grieving was the memories, and that those weren’t going anywhere. 

I’d still always have the moment I asked Terry for his blessing to marry his daughter.

I’d still always be able to recall the comical time when we brought our first baby home from the hospital and Zelda refused to come inside because she was outside barfing, as she was no longer the top priority and couldn’t handle that.

I’d still have the memory of my grandpa shouting ‘Atta boy!’ after I got up on a single ski behind his speed boat at the lake.

And I can’t help but think of the quote that is popularly attributed to winnie the pooh, though upon research shows that might not be the case – but the quote “How lucky am I to have had something that makes saying goodbye so hard.”

Yes, I am lucky to have had so many meaningful moments with that which I’ve lost. Could it be that I’m so emotional with these memories because they were such meaningful moments? That I spent the time with Kelly’s dad, with my first dog, with my childhood vacation spot so purposely and so intentionally…and that’s what made them so impactful? And if so, then I don’t have a solution to grief (that’s still hard), but instead a confirmation that I spent my time wisely with those that I’m mourning.

There was something special about that lake house that I lost. It was in the middle of nowhere, and you couldn’t get cell phone reception, a good TV signal, and for a long time no internet. So whenever I was there, I was spending quality time with those around me. Playing cards. Time in the water. Watching sunsets. Being retrospective on life. I have SO many memories of those vacations.

And it makes me realize, we live in an age of countless digital distractions, always begging for our attention. Emails. Likes. Alarms. Text messages. Tweets. Infinite scrolling.

Tom Johnson, a technical writer from Seattle talks about when he was asked to join a book club, and documents his journey starting a new book:

Sometimes, I’d occasionally pull out my phone without any particular reason, unlock the screen, and just stare at it dumbly, not sure which app to open. When I caught myself doing this, I was kind of shocked, but also too desensitized to act. In every spare moment of inattention, I occupied my focus with my phone’s information. Something was wrong.

Cal Newport, an author in the digital minimalist movement reiterates “The urge to check Twitter or refresh Reddit becomes a nervous twitch that shatters uninterrupted time into shards too small to support the presence necessary for an intentional life.” 

Has anyone else noticed this? You’re trying to focus on something, yet for some reason instead of the task, you decide to distract yourself with a social media feed? It makes being productive pretty difficult.

It’s not entirely our fault…I recall a conversation with my wife where she was distracted with her phone after we had put the kids to bed and it was finally ‘our time’. When I challenged her why she was glued to her phone, she responded that she had a million emails to respond to. And if she didn’t respond to them now, then she’d have 2 million by tomorrow morning. Can I blame her for wanting to get ahead of that queue?

Seneca would say:

In your mind, you genuinely think you’re going to live forever. You think you have an infinite supply of time, and you keep spending it on the first thing that pops up without giving it much thought.

We live in a world that requires so much of our precious time. How do we manage that?

To be honest, I don’t have a simple solution for that. There’s been countless books and methods on time management, because everyone works differently and no single approach will work for you. But they typically have one thing in common, and that’s logging your time.

Now you don’t have to do this every day, but I challenge you to just take 1 day, perhaps next week, and log where you spend it. How long did breakfast take? What about that ‘quick’ phone call you had to make? Where did the time go, and were there moments where you were ‘killing’ time before the next thing?

At the end of the day look back at that log, and reflect on it. Seeing how you spent your time, are there any changes you’d want to make tomorrow?

And I want to be clear that not every moment has to be ‘productive.’ It’s 100% okay to do nothing. To take a nap if you need it. If you do get joy out of checking facebook to catch up with friends that’s fine. The key is to be *intentional* about doing it. Think to yourself “I’m choosing to do this because I want to. Not because it’s the routine. Not because I’m bored or distracted. Not because someone else is asking me to do it. But instead, I know that I’m choosing to spend my precious time on this activity.”

When I take that perspective, and a solicitor comes to the door asking for a moment of my time, I’m okay saying ‘No thanks,’ and then returning to my kids. When someone asks me to volunteer, I’m not going to, unless it’s an activity that I’m happy to be a part of. I’m definitely going to think twice before taking a new job that requires extra commuting in traffic. And (I’m still working on this part), but when I have a few minutes to ‘kill’ before I head to work, perhaps instead of bringing out my phone to check the latest news, instead I’ll sit and listen to the birds, or take a moment of reflection.

I know I titled this “The Secret to a Long Life”, and if anyone else is as literal as I am, they might be looking for an exact formula for living longer….and…I’m not going to let you down… I actually do have one. For in my research I came across something known as the Blue Zones Power 9. 

Blue zones are geographic areas where people consistently live longer than the world average. Areas like Ikaria (uh-car-ia), Greece, and Okinawa, Japan. What could it be about them or these zones that increase their longevity? Some researchers got together and studied them and their environments, and came up with the following 9 habits:

1. Move Naturally

People who live the longest engage in regular, everyday activity rather than specific exercise routines. They maintain active lifestyles through tasks like gardening and manual housework.

2. Purpose

Having a clear sense of purpose, or a strong reason for waking up each day, can extend life expectancy by up to seven years.

3. Downshift

People in the Blue Zones still have stress, but they manage it with daily rituals like ancestor remembrance, prayer, napping, and happy hour.

4. 80% Rule

This practice involves stopping eating when 80% full, which can aid in weight management.

5. Plant Slant

The diets of people in these regions are mostly plant-based, with beans being a major component. Meat is consumed sparingly—about five times per month and in small serving sizes.

6. Wine @ 5

All but one of these regions consume alcohol moderately and regularly. They typically drink one to two glasses of wine per day, often with friends or food. Unfortunately, you can’t save up all week and have 14 drinks on Saturday.

7. Belong

Nearly all the people who live the longest participate in some form of religious community, regardless of the specific faith. Regular participation in religious services can add several years to life expectancy. – hey – you all are doing that right now!

8. Loved Ones First

Those who live the longest tend to prioritize their family. They keep aging parents and grandparents close or in their homes, commit to a life partner, and devote time and love to their children.

9. Right Tribe

Long-lived individuals are part of social circles that encourage healthy behaviors. Studies show that smoking, obesity, happiness, and even loneliness are contagious – being around those that have healthy habits helps you tremendously.

I can’t make any promises, but according to the researchers of that study they predict the average person’s life expectancy could increase by 10-12 years by adopting a Blue Zones lifestyle. Kinda cool.

I’ve spoken a lot today on our personal time, but before I close I want to examine the inverse of that. Other people’s time. If we know how valuable time is to us, how should we be treating other people’s time? If you agree that time is our most precious resource, then perhaps there’s no better gift you can give to someone than time. 

Spending focused time with them. 

Ensuring we don’t waste their time. 

Thinking twice before we cancel plans, and ensuring we’re not late or making them wait for us.

Perhaps even giving them time by taking something off of their plate.

Pretty powerful gift.

Has anyone here heard of the 5 Love Languages? You know where I’m going with this… it’s no surprise that ‘Quality Time’ is one of them. For some people, nothing says “I love you” more than your full, undivided attention. To be honest, Quality Time isn’t even MY love language, but I can vouch that when my wife gives me uninterrupted focus with phones down. Eye contact. And really shows an interest in how I’m spending my time, I feel her love so deeply.

I think dying is scary. It freaks me out that I’ll no longer have any more time on this earth. But something tells me that if I’m on my deathbed and I’m filled with memories of time well spent with my kids, my wife, family, this earth, this loving community, then I might be more at peace with it. Because I think what I’m scared of is not death, but waste, taking my life for granted. And even if I don’t live a long life, if I live a fulfilling life, that may be enough.

In closing, I’d like to express my deepest gratitude to each of you. Time, is our most invaluable resource—never to be regained once it has passed. That you have chosen to spend some of your precious time here with us today, is an honor I do not take lightly.

I hope our reflections inspire you to treasure each moment, living fully, loving profoundly, building a life filled with meaning and connection. 

As you go forth, I wish you a chance to view each second as a unique opportunity, a chance to craft an intentional life. 

May each tick of the clock echo with purpose, joy, and of course, abundant love.

Thank you for your time. May it be so.

May 092023

Below is a piece I wrote for my Unitarian Universalist group

When I was growing up, as a kid in school, math was my favorite subject (anyone else here?). The numbers were easy to relate to, the operations were practical, and everything was just so LOGICAL. 

I think one of the things I loved the most was that there was always a single, indisputable, right answer. Nothing was open to interpretation like reading or writing essays. If I got the wrong answer there was no reason to argue with the teacher – that’s as pointless as arguing with math. Math is RATIONAL..

And that’s why one of the most tragic days in my childhood was the day I learned about negative numbers. What? How can you have -5 apples? What do you mean the square root of 9 is no longer just 3 but also -3? And don’t get me started on imaginary numbers – they don’t even exist!

But looking back that was a break in my reality that was an absolutely necessary one. Because as we’ll be exploring today, the world does not fit into neat, logical, buckets.

Before I go further let me take a minute to refresh everyone on the difference between discrete and continuous data. When something is discrete it is described in a finite number of values. For instance, how many dogs do you have? When something is continuous it can take on any value along an interval. Example: the temperature today could be 75.9265 degrees.

An extreme example of a discrete system is the binary number system, in which something can take only 2 values: 0 or 1. True or false, Off or on. That’s actually the basis for how computers work. Every action that a computer takes has been decided by running instructions through a ton of transistors. And transistors at their fundamental level work in absolute binary, they either restrict or allow current through – off or on. 

I know that can be a bit tricky to understand – for example how can a video that my computer plays be represented in just 0s and 1s? Well let’s break down that video – it’s essentially a collection of photos, played one right after the other. How do we break up that photo? Well that’s just a collection of pixel colors placed in the right spots. How do we break up that color? Well any color can be created by just mixing a few fundamental colors together, each of which can just be represented by how much of that color, example 60% red. 60% is just a number in the base 10 decimal system, and all it takes to convert a number from base 10 to base 2 (which is binary) is just a little math. So underneath that visually striking cat video is just a long sequence of 0s and 1s. Fascinating, right?

My love for math eventually led to a love for computers, and resulted in me getting a degree in computer science. Most of the computer science curriculum is programming languages, essentially how to speak to a computer. And after you do that for a long time, your brain starts to get wired like a computer, where everything is a binary decision. Am I hungry? Yes. Did I have breakfast? Yes. Should I eat more? No.

Now you can start to see how I can potentially get myself into trouble thinking that way, for when you’re limiting all of your actions based on a black or white decision, you miss out on a vast collection of the gray areas. 

But I started to see things in absolute terms. Today is a great day, or a terrible day. That person is my best friend, or my enemy. I’m feeling proud of myself, or extremely embarrassed. However, I know I’m not the only one who has thought in extremes.

During a period of religious exploration, Siddhartha Gautama (Sid-artha Gotta-ma), who later became known as the Buddha, abandoned his fancy lifestyle in search of spiritual enlightenment. He initially pursued extreme sacrifice by abstaining from all self indulgence. At this time statues depicted him with his ribs showing, from eating just a few grains of rice per day. Ultimately, the Buddha realized that both indulgence and deprivation were equally useless, even detrimental to his goal of achieving awakening, and he came up with one of the core teachings of Buddihm known as “The Middle Way” which embraces the center path as the most balanced and effective approach to life.

Another example comes from our solar system. For in the 1500s the leading theory of planetary alignment put the earth at the center of our solar system. Everything revolved around the earth. Then along came Copernicus, who stated that the sun was the center. What followed was a big debate about what revolved around what. Was it the sun? Or the earth at the center? A or B? 0 or 1?

Now most of us will say “Of course the earth revolves around the sun!” But I’m going to rattle your reality and tell you that you’re wrong. For if NASA based its calculations off of that we’d have satellites crashing into each other. The real answer is that there is so much mass in our solar system, if you include all the planets, think about how huge jupiter and saturn are, that there is a center of gravity of our solar system, called the barycenter – and that’s what everything in our solar system revolves around. Believe it or not the sun actually wobbles around. This barycenter actually changes position based on the alignment of our planets, sometimes it’s near the true center of the sun, many times it’s outside the surface of the sun. Mind boggling, right?

My point here is that if we are to constrain ourselves to choosing between two answers, we may not have made it to the moon. For when we’re limited in our choices, we often overlook the reality of the situation.

Can anyone think of any other concepts that we often force into just 2 buckets? Go ahead, shout it out

Jobs? White collar vs blue collar.

Cars? Electric vs gas guzzlers.

Relationship status? Single vs married

Gender is a huge one. Male or female. I recently came across a quote from Dr Rebecca Helm, a biology professor at the University of North Carolina, and friend to the LGBTQIA community. Let me pause for a sec – the LGBTQIA community. Lesbian, Gay, Bisexual, Transgender, Queer, Intersex, Asexual. That’s 7 additional categories compared to the standard male or female. Here’s what she says: 

I see a lot of people are talking about biological sexes and gender right now. Lots of folks make biological sex seem really simple. Well, since it’s so simple, let’s find the biological roots, shall we? 

Now I’m going to spare you about 5 minutes of biology jargon where she starts with a simple XX or XY chromosome and leads us through all the various situations that can occur as your body develops, and all the permutations it can lead to, but she concludes with:

It means you may be genetically male or female, chromosomally male or female, hormonally male/female/non-binary, with cells that may or may not hear the male/female/non-binary call, and all this leading to a body that can be male/non-binary/female.

No wonder it’s hard to fit everyone into a simple male or female gender. Thankfully some really smart people have come together and developed a framework known as the ‘Gender Unicorn’ where everything is viewed on a spectrum.

This concept of a spectrum is super important, and it reminded me of when I went through Starting Point here with Rev Nica a few years ago. In one of our first meetings we did an exercise where she made statements such as “I believe in God”, and “I believe people are inherently good” and we were supposed to express whether we agree or disagree with those – Well you should have seen the frozen faces among us all, as we were thinking “How am I supposed to make a decision like that?” But then she explained that on one side of the room was the extreme “I agree”, and on the other side “I disagree”, and that we were allowed to place ourselves anywhere along that line in order to represent what we believed. Instantly, by being allowed to answer on a spectrum, we unfroze and found our spots along that line.

I have a neighbor who at the time of the last election flew a Trump flag high and proud. Now if you don’t know me, that doesn’t typically align with my political views, and internally I admit I labeled them as ‘MAGA Republicans’ and I vowed to avoid them because I was sure any encounter with them would have resulted in conflict. So when I was with my daughter selling girls scout cookies a few months ago I had planned to skip their house. Not surprisingly, Scarlett in her cookie-selling eagerness had jumped a house ahead of me and was already on their front porch. Preparing for a possibly awkward situation, I was stunned when they placed one of the largest orders on our block, and then proceeded to throw some extra cash as a donation to her troop. How could it be that these Trump supporters were actually very generous people? Could it be that I mislabeled them, or perhaps my mistake was in labeling them in the first place.

The point I’m trying to make here is that although life is full of discrete categories and binary decisions, we can lose out when we allow ourselves to be restricted by those buckets, especially with people. 

I’ve talked about Gender. Religion. Politics. What else do we commonly group into buckets?

Race? Is race a discrete attribute, or perhaps a sliding scale?

Illnesses? Or Addictions? Does someone become sick overnight, or is their level of sickness a spectrum? (and regardless should that even define them?)

Feelings? Are you happy or sad? Or could you be a little of both at the same time?

The smaller the number of buckets we classify things into, the more detail is lost. Remember back to my earlier explanation of computers and binary code? I’d like to show you a quick 1-minute video about the difference between how many bits (which is the number of 0s & 1s) can be used to represent a picture and some music. In this video you’ll see it go from 1 bit (just black and white), into 64 bits (which can represent 281 trillion colors)

How basic did that Imposter look with just 1 bit, and how much more beauty did we gain with each set of more bits, not just in the image but the music too? 

The problem with binary thinking is its inaccuracy. Gray areas do exist and are prominent in every issue. It may make us feel better to think about this or that, them or us, him or her, but it’s not how the world works.

When we’re engaging in binary thinking, we’re stuck making assumptions. Being stuck in categorical thought doesn’t actually involve much thinking at all—you just assume without thinking– that new experiences will fit into your old boxes, buckets, labels, generalizations, and stereotypes.

Binary thinking also leads to conflict and detachment. When we make assumptions about others by lumping them into preconceived categories, we aren’t being curious about them, and we aren’t trying to investigate nuances that might bring us closer together. Why bother getting to know someone when you already have a clear picture of who they are?

It’s a dangerous road because it leads to people making racist remarks or shallow connections with other people.

So, how can we stop thinking in a binary way?

Clay Drinko, an educator and proponent of “Full-Spectrum Thinking” proposes 7 things we can do to break free from the limitations of binary thinking and embrace an open-minded approach to life:

  1. Try New Things: Engage in new experiences to encounter new ideas and perspectives, which trains your brain to think outside of the box.
  2. Meet New People: Expand your social circle to include individuals from diverse backgrounds and cultures, and be open to their perspectives.
  3. Cultivate Curiosity: Ask questions and approach interactions with genuine curiosity, focusing on learning about others instead of talking about yourself.
  4. Listen With an Open Mind: Slow down your reactions, avoid jumping to conclusions, and keep your mind open to new information, even if it challenges your preconceptions.
  5. Build Empathy: Acknowledge the truth in others’ experiences and be open to multiple perspectives, fostering empathy and understanding.
  6. Don’t Fall for the Dunning-Kruger Effect: which explains that we have the tendency to overestimate our expertise in a topic based on limited knowledge. But stay humble and continue learning to avoid assumptions and generalizations.
  7. Embrace Uncertainty: Accept the complexity of the world and recognize that you may not know as much as you think. Embracing uncertainty promotes intellectual growth and open-mindedness.

It’s also worth noting that as UU’s we’re called to escape binary thinking as part of our principles. Our 2nd principle which focuses on ‘justice, equity and compassion in human relations’; and our 3rd ‘acceptance of one another and encouragement to spiritual growth in our congregations.’;

If more people primed themselves for full-spectrum thinking, perhaps we wouldn’t live in such a disconnected and divisive world because more people would be engaged with each other’s diverse perspectives instead of lumping each other into preconceived categories. 

Now I know I’m probably one of the nerdiest ones here in this sanctuary. If we had a spectrum line from cool to nerd I’d be out the door – so perhaps most of you don’t fall into binary thinking as much as I do – and that’s great. But as you leave here today, I’d ask you to try and take notice of any categories you catch yourself using, especially with people, and then reflect on if you’re seeing the whole person when you place them into these buckets, or if there’s a spectrum that you might want to consider instead.

When I was preparing for this service a few weeks ago my other daughter asked me what I was doing, and I told her that I’m writing a talk on how life is a balancing act, and that you should never have none of something or too much of something, it’s best to consider a balance. She paused, a little confused, and then asked “But what about hugs, Daddy, can you ever have too many hugs?”

No, my sweet dear, you’re right – you can never have too many hugs. But with everything else – I challenge you to resist the norm of binary thinking. For we are not computers. We are people. We are spiritually courageous people who transform the world through justice and compassion.

Jan 042023

Below is a piece I wrote for my Unitarian Universalist group

The observable universe is 93 billion light years across. It’s estimated to have around 2 trillion galaxies, with each galaxy a home to 100 trillion stars and planets. And of all those planets we’ve been searching for signs of life since we first looked up at the skies – only to find that so far, our humble earth is the only planet with Goldilocks-perfect conditions to sustain biology.

The only planet that has the rare distance from a star to allow for liquid water – yet also has plentiful reserves of the basic elements of life  – and – a magnetic core and atmosphere that repels life-destroying cosmic radiation that is constantly thrown our way.

How lucky are we??? Seriously – we’ve won the cosmic lottery!

And we don’t just have ‘life’ here. It’s not just some bacteria or amoebas floating around in some soup. No, our earth is home to 8.7 million species of life. Incredible life ranging from colorful peacocks to electric eels. Metamorphosing butterflies to humongous humpback whales. Fragrant roses to giant sequoias. The earth is beautiful, right?

In fact, I’d love to hear what some of you are most impressed by. What do you find most beautiful on this earth – go ahead, shout it out….

(calla lilies, rainbows, horses…I agree)

This life has learned to carefully balance itself with all of earth’s resources, ensuring that the food chain, the water cycle, the seasons – all work together to ensure generation after generation of life for over 3 billion years.

This is a gift. An awesome gift that we receive from the earth every single day. Today I’m going to challenge us to examine our relationship with the earth. She is always giving, always providing. Are we returning the favor? Are we thanking her, and giving back to her? Or is this a one-sided relationship?

Here are a few points to consider.

In the last 100 years 64% of our wetlands have been lost.

Since 1970 our forests have been decreasing in size, at a rate of over 2000 trees per minute.

In the last 15 years the number of species listed as ‘threatened with extinction’ has tripled.

David Attenbourough, who many of you may recognize as the voice on almost all nature documentaries, sums it up by saying, “1 million species on earth is threatened by 1 species”. Who is that 1 species?  (us!)

We’re a species that too commonly makes short-sighted decisions, not caring about the impact on our future. We’re living in a world of instant gratification, of towering debt, of me vs you. And it has a real cost.

Let’s ponder the argument that we are the only species that makes trash. Every other animal on this earth has a cycle for its waste – it eventually becomes something else.  Sometimes it even becomes something beneficial to other species, such as the dung beetle, or mushrooms. But our waste – our take-out containers that don’t decompose, our diapers that fill up landfills, our discarded furniture or mattresses that no one wants. These are things we create that still stick around possibly forever. Our modern trash hauling system is both a blessing and a curse – it conveniently takes these items away from our focus as if they magically no longer exist, but it removes us from the impact of our trash.

Our annual greenhouse gas emissions – the exhaust from our cars, the methane from factory farming, the byproduct of burning natural gas – has reached 51 billion tons. Let me pause right there, because it’s hard to comprehend that a gas (something as light as air) has weight, but it does. If you were to take a balloon of CO2 about the size of a refrigerator, that weighs 1 pound. Every year we are emitting 112 trillion refrigerators of greenhouse gas.

Many scientists argue that with all this waste we’re making drastic changes to our planet. Some even say the damage we’ve done is irreversible – we’ve crossed a tipping point and we better buckle up. Environmental activist Greta Thunberg refers to this not as climate change, but as a “climate emergency”, and that if we don’t treat this as an immediate crisis then we’ll have no way to avoid a climate- and ecological disaster​.

Back in December Netflix released a movie called “Don’t Look Up” – anyone see it? Raise your hand if you saw it…Did you like it?

In this movie, two astronomers – played by Leonardo Dicaprio and Jennifer Lawrence go on a giant media tour to warn the planet of an approaching comet that will destroy all life on Earth. They have the telescopic photos and the orbital calculations and all the scientific evidence to prove that the earth will be demolished at an exact time – but almost everyone ignores them. They go on TV, they go to the white house, they try to get anyone’s attention, and they’re always met with resistance. In fact there’s even an opposition group that forms called “Don’t look up” – the name of the movie – persuading people to ignore these astronomers because they’re spreading ‘fake news’ – yet as the comet gets closer all anyone has to do is “just look up” and they’ll see it.

While this is an entertaining film, it’s also a wake-up call – an analogy to the current issues we’re facing on earth that no one is acting seriously enough on.

As UU’s we already have enough on our plate to care about – do we really need to be concerned about the earth too?! Let’s take a look at our 7 principles that guide Unitarian Universalism. 

Our 1st principle – remembering the inherent worth and dignity of every person. Every person that lives on this earth deserves to enjoy this earth. To me, this means people of fortune should not be able to trash the earth at the expense of those less fortunate. The reality is that those that are most affected by a degraded earth are usually people without privilege. Areas in developing countries are going to be the first to experience heat waves, droughts, lack of food, way before it reaches developed nations. The un-housed will feel its effects harder than those living in multi-million dollar homes.

Our 6th principle – The goal of world community with peace, liberty, and justice for all. Unfortunately many scholars predict that a changing, unstable climate will result in more famine, more conflict over natural resources, more wars. Dr. Sean Anderson, an ecologist and chair of environmental science at CSUCI was a speaker at a recent community forum where he stated that the Syrian Civil War was 100% caused by climate change – that with massive drought and crops failing people started to rise up and protest and eventually conflict led to war. The better we treat our earth, the less we compete for limited resources, the more peaceful this world will be.

And most relevant, our 7th principle – Respect for the interdependent web of all existence of which we are a part. Our relationship with all species is to be considered. Are we sharing the earth with them? Or are we taking more than our fair share? The earth is so vast that it’s easy to think of it as infinite. But the opposite is true. There’s a limited set of resources on earth, and in time they will run out. Earth is finite. Are we using its resources wisely and well? Are we considering the interdependent web and how individual actions can affect entire ecosystems?

With all that in mind, I feel like as UU’s it’s our responsibility to act, to thank this earth, to appreciate it and take care of it.

I think this starts with a specific mindset. One that views the earth and all its fragile parts as equals with ourselves. One that honors the connection we have with the earth. How do we do that?

We could begin the day with an intention to respect the earth. We could go on more hikes. We could name the plants in our garden. Take a moment every day to admire the sunset. Stop and listen to the birds. Dig your bare feet into the grass and soak up the soil. Smell the flowers. Native Americans looked up to animals as teachers, and they had no word for owning land. They had an earthly relationship that is hard to find today. Let’s find that lost relationship and rekindle it. I propose if we awaken this connection we will naturally perform actions that thank our earth.

For those of you (like myself) that need some concrete instructions on how to thank the earth-  I have 3 ideas I’d like us to consider.

Number 1: Reduce Consumption. Whatever you can do to use less is a step in the right direction. Shave 5 minutes off your morning shower to use less water. Put on a jacket instead of turning on the heater to use less energy. Think twice about buying that new TV when your current one works just fine. The less resources you consume, the happier the earth will be.

Less is more.

I recently read a book called “101 ways to go zero waste,” and in the opening chapter it said “By the end of this book if you follow my advice you’ll be recycling less.” What? I thought recycling is good for the environment? Well, it’s better than the landfill, but what the author was trying to convey is that it’s best to not consume in the first place. Kathryn Kellog writes, “Consider all the resources that go into producing the products we buy and all of the packaging and transportation that comes with them. When we truly think about all of the stuff we interact with, it becomes clear that some of the best things we can do are buy less, buy consciously, and produce as little waste as possible.”

Remember ‘recycle’ is only 1 of the 3 R’s in the iconic green triangle, the others are: Reduce and Reuse. Ask yourself if you can fix something instead of getting another. Can you buy used instead of new? Craigslist and Ebay are your friends! If you receive a product with a cosmetic blemish can you live with that, or must you return it where it will most likely be thrown in the garbage? I know this sounds silly but I’ve started to pick where I eat out based on the materials they serve their food on – do they have dishes that they wash and reuse, or will I have to throw out the plastic container it came in?

In fact one of the arguments for eating plants over meat stems from this reasoning. Raising animals for food is an incredibly inefficient use of resources. Growing crops to feed animals introduces a major extra step of waste relative to just eating the plant foods directly. If you just eat the plants, you cut out the middleman. For example, it takes 39 gallons of water to grow a pound of vegetables, yet that same pound of beef takes 1,847 gallons.

So – overall, the less you use, the better for the earth. And – as an added bonus, the less you consume, the more money you save! That’s a win-win situation!

The 2nd way you can thank the earth, is to utilize green technology, but carefully. Over the last decade we’ve had a boom in solar panels, electric cars, and energy efficient appliances. Rooftop solar has allowed the average homeowner to produce their own clean energy, and if you pair that with charging your new electric vehicle, then you’re essentially saving the world, right? 

Well, it’s tricky. We need to be careful here to make sure that we’re really upgrading our stuff for the right reasons. Believe it or not, but there are cases where your old gas-car is better than buying a brand new Tesla. Think about all the resources that go into building a new car – from the factory energy to mining the raw materials themselves. Its cost to the environment is considerable. So when you do upgrade your car, make sure that it’s because your current car has no more life in it. Same with appliances – it’s rarely helpful to switch out your functioning fridge for a new energy-efficient model if your old fridge was working fine and it’s just going to end up in the landfill. 

Some of this new green tech is incredibly expensive, so consider that being green is a privilege. If you have the means and your clunker is falling apart then awesome! But there’s no shame in not being able to afford it. The good news is that some of these green solutions don’t require upfront investment. For example, did you know that your home can be powered by renewable sources without installing expensive rooftop solar? Give your electricity provider a call and ask to be put on their ‘green rate’. It does cost about 10-15% more than your current rate, but they’ll be sure to buy your energy expenditure from local solar or wind farms, without you having to front the cost at all.

I have to be careful of “greenwashing,” where a company promotes a new product of theirs that they claim is green, but really isn’t deep down. I just recently heard an ad for a “Green” credit card that promises to plant trees correlated with your spending. Sounds great, right? But doesn’t that just promote/rationalize more consumption? A true ‘green’ credit card would reward you when you don’t buy anything new. But that’s not profitable…so I don’t expect to see that anytime soon.

Don’t get me wrong, I’m not discouraging new green tech. There’s been a ton of progress in making typical consumer products more efficient and green, and I’m very excited about them – We just replaced our dying water heater with a tankless one, and I know my wife is sick of hearing me talk about the energy savings. What I am saying is that when we purchase new green tech we need to look at the whole picture from a resource lifecycle point of view.

I saved the most important point for last, even though it’s the most boring. The 3rd thing we can do to thank the earth is to support regulations. This means voting for carbon pricing, higher efficiency standards, recycling laws, and democratic power grids. I know this is getting political and increasing the government’s hand which I admit can be scary. But the truth is that while individual actions are helpful, they’re not going to solve the crisis alone. Most of the biggest offenders are companies who are just looking at their profits and aren’t going to change unless they’re mandated to. We could all go get solar panels, switch to induction heating, grow our own gardens, become vegan, and live within our means, but if corporations are not doing the same it’s barely going to move the needle.

We must vote. We must talk to others about this. We must get involved in collective action. Our very own Clint Fultz, reminded me of the many groups we can participate in. From national organizations such as 350.org (named after the safe amount of CO2 in the atmosphere – we’re currently at 419 btw) to local groups such as the Ventura County chapter of Citizens Climate Lobby. These groups stand up to the fossil fuel industry aiming to build a clean energy future for all. Even more local than that is our Chalice Climate Action Team, who meet monthly and according to their mission statement “educates and connects with others to advocate for a just and sustainable future for life on Earth.” They’re a very welcoming bunch and would be thrilled to see some new faces.

I know I’ve dumped a lot of dread on you here today…but I want to emphasize how important it is to not give up. It’s easy to say “If the world is ruined then I might as well enjoy it while it lasts.” – and if you think that way you’re actually doing exactly what the fossil fuel industry wants you to do. They thrive on hopelessness and apathy. 

Some think “It’s fine, we have plans to colonize Mars so we have a backup planet.” But let me tell you what it would be like to live on mars, where the average temperature is -80 degrees, the atmosphere is not breathable, and dust storms are commonly shrouding the entire planet from the sun. You won’t ever be sunbathing on a beach on Mars. There is no planet B. Planet A is amazing and we’d be in a world of hurt trying to start over on a new planet.

I want to remind us about the ozone layer crisis back in the 90’s. Scientists had discovered that a critical part of our atmosphere was being destroyed by our actions and we needed to change. Countries got together, they collectively researched, decided to ban CFCs, and fast forward to now the ozone hole has stopped progressing and there’s evidence it’s starting to shrink.

We do have hope.

Back when climate change was first discovered we were on track to warm the earth by 4-8 degrees. Based on our current projections we’re now at 3 degrees. That’s still scary, but it’s no longer an apocalyptic human extinction event. The coal industry is dying because it’s now cheaper to get electricity from sun and wind. Climate awareness is at an all-time high – I can’t look at the news without seeing a climate-related headline. There are a lot of things trending in the right direction.

We can take better care of the earth. We’ve done it before and we can do it again. It starts by reducing our consumption, using green tech (carefully!), and supporting climate regulations.

[Media – https://content.thriveglobal.com/wp-content/uploads/2019/03/Blue-Dot.png]

I close with words by astronomer Carl Sagan, who when looking at a photo of a distant earth taking up a single pixel in a sea of black, remarked: 

Look again at that dot. That’s here. That’s home. That’s us. On it everyone you love, everyone you know, everyone you ever heard of, every human being who ever was, lived out their lives. The aggregate of our joy and suffering, … every king and peasant, every young couple in love, every mother and father, hopeful child, inventor and explorer, … every saint and sinner in the history of our species lived there–on a mote of dust suspended in a sunbeam.

He continues:

this distant image of our tiny world. To me, it underscores our responsibility to deal more kindly with one another, and to preserve and cherish the pale blue dot, the only home we’ve ever known.

In the last scene of “Don’t Look Up,” the characters get together for one last feast, to enjoy each other, and indulge in their favorite food. As the Earth’s doom approaches, Leonardo DiCaprio’s character turns to his loved ones around the room and says: “We really did have everything, didn’t we?”

My friends, we really do have everything. Right? We’ve won the lottery. This pale blue dot is our fortune. Let’s cherish it. Let’s thank it. Let’s connect with it, honor it. Let’s awaken our relationship with the earth and ensure it can be cherished by others, for many, many generations to come.

It can start with you. And it can start today.

May it be so.

Jan 042023

Below is a piece I wrote for my Unitarian Universalist group

Hi, I’m Shane – son, husband, and father of two young girls. And I believe in the Scientific Method.

Now I realize that might sound a little silly at first – this is church, not a science class – but hear me out.

For those that haven’t been in school recently, let me offer a quick refresher. The Scientific Method is a process of acquiring knowledge through experimentation. You start with a question (“why is the sky blue”), you form a hypothesis (a guess at an answer, “maybe the particles that make up the sky – oxygen, carbon dioxide – are blue”), you perform an experiment (“collecting CO2 by breathing out into a balloon and observing its color)”, and finally you analyze your results and come to a conclusion (“when I looked at the balloon, it was still clear, not blue – so carbon dioxide is NOT the reason the sky is blue”).

In this case, we didn’t solve our original problem – but we did gain knowledge about it – and we are closer to our answer than before. And that’s typical of the scientific method. Often times it requires many iterations of trying different hypotheses before you arrive at a conclusion that answers your question. 

BUT – even then (and this may come to a surprise to some of you) you’re never 100% certain. There are some widely accepted theories that have been rigorously tested but even then, their status as laws can be broken.

Consider this example – raise your hand if you were taught that Pluto was a planet? Me too! For almost 80 years it was widely accepted to be the 9th planet in our solar system. Until in the early 2000s when astronomers started observing thousands of other objects in the Kuiper Belt that were more similar to Pluto than they were the rest of our planets. So they said ‘Hey, we were wrong, we can’t keep thinking about Pluto as a planet so we’re going to recategorize it. Sorry Pluto!”

And that is the most fascinating part of the scientific method to me. That you can be wrong after so many years, and it’s okay. In fact, it’s expected that you’re wrong. Most experiments fail their hypotheses, and only once in a blue moon do scientists come out with something significant.

I believe in the Scientific Method because it forces me to be curious, and wonder why things work. It forces me to take the time to do some research and come up with my own opinions. It forces me to test my opinions, and finally it forces me to accept that I can be wrong.

I’m talking about the scientific method because I feel it’s incredibly important right now. We’re living in a time when many people are guided not by science, but by ideas that have no backing. And that concerns me, because there’s a major difference between a scientist and a conspiracist. A scientist welcomes the idea of being wrong – it happens all the time; while a conspiracist chooses to believe only the data that proves their point right – their idea is certain and infallible.

A scientist says “We’ve observed within 95% accuracy that this vaccine is effective.” Note there’s still a 5% chance of being wrong built into that statement.

A conspiracist says “The virus is no different than the flu because anything that suggests otherwise is fake news.” Notice there is no amount of evidence that can be given to change this person’s mind because they’re choosing to believe something that throws out all conflicting information.

Just yesterday I came across a tweet from one of the researchers behind a COVID vaccine – he states: “Scientists that adapt their views based on new and reproducible data are not guilty of flip-flopping – they’re guilty of being good scientists…..Scientists that refuse to adapt their views in the face of new and reproducible data are not guilty of being consistent – they’re guilty of being stubborn.”

I believe in the scientific method because it embodies having an open mind. An open mind to ideas you’ve never considered. An open mind to looking at things differently. An open mind to be wrong. And I believe all of those are needed in order to be an effective Unitarian Universalist.

Dec 112019

Struggling trying to come up with a solution to calculate the time difference between two datetimes, with respect to when a business is open? I was too.

First approach I looked into was a package that does just this: https://packagist.org/packages/hughgrigg/php-business-time . Unfortunately it doesn’t allow much configuration for constraints. Ie, if you have different hours on a weekday than you do a weekend then you’re out of luck.

Second approach was to use the diffFiltered function that’s part of Carbon. My solution looked like this:

$minutes = $fromTime->diffFiltered(CarbonInterval::minute(), function(Carbon $date) {
            return $this->isOpen($date);
        }, $toTime, false);

There are two problems with this approach. First, it’s slow. It works by iterating through your time interval one by one. That means if you have a huge span between your fromTime and toTime, you’re going to be wasting a lot of cycles.

Second, there’s a constant in the Carbon class: NEXT_MAX_ATTEMPTS = 1000; This means we can’t go more than 1000 iterations without returning a valid date otherwise we’ll get “RuntimeException: Could not find next valid date”. This effectively prevents us to measuring anything more than a day, which doesn’t work for us considering businesses can be closed on weekends, or over holidays.

We can overcome both of those concerns by changing the CarbonInterval to a bigger value, such as CarbonInterval::hour(), or even CarbonInterval::minute(5). The downside of this is we lose precision. Everything is now chunked into that interval length, so (in the case of minute(5)) we wouldn’t get anything more accurate than 0, 5, 10, 15, etc.

Best Approach

What first seemed like a hard problem didn’t turn out to be too bad if I took the time to think through it. If you simply iterate through your time span a day at a time, and consider the open and close time of your business, the logic isn’t that tricky. Here’s the code I used

 * Returns the number of minutes between two datetimes, excluding time the facility was closed
 * This method works by iterating through each day and comparing open/close times of facility
 * @param Carbon|null $fromTime
 * @param Carbon|null $toTime
 * @return int $minutes
public function minutesDiffWithinOpenHours(Carbon $fromTime, Carbon $toTime)
    //prevent time travel
    if($fromTime >= $toTime) {
        return 0;

    $minutes = 0;
    $loopTime = $fromTime;

    while($loopTime < $toTime) {
        $openTime = $this->openTime($loopTime);
        $closeTime = $this->closeTime($loopTime);

        if ($openTime && $closeTime) {
            $calcFromTime = max($loopTime, $openTime);
            $calcToTime = min($toTime, $closeTime);

            if ($calcFromTime < $calcToTime) {
                $minutes += $calcFromTime->diffInMinutes($calcToTime);
            //else from is after hours, don't count
        //else facility is closed all day, don't count

        $loopTime = Carbon::parse($loopTime->addDay()->toDateString().' 00:00:01', $this->timezone);

    return $minutes;

Note that it’s dependent on you coming up with your own implementations of openTime() and closeTime(), which returns a Carbon datetime of the open/close time on that date.

What’s great about this is it’s fast, and it’s precise. Win-win!

Oct 192015

Was trying to connect to a PostgreSQL database running through VirtualBox locally, but is only exposed though SSH. In order to do that, I have to connect through an SSH tunnel. I found the following article here http://www.heidisql.com/forum.php?t=15472 that says:

SSH tunnel is built into HeidiSQL for MySQL only. For using a tunnel to a PostgreSQL server, you will need to start a plink.exe command line seperately, and then let HeidiSQL connect to on the port you specified in the command line.

But I had no idea how to do that!

Did some research, and here’s what I ended up running that worked for me:

Make sure you have Putty installed (which included plink.exe). Open up a windows command prompt and navigate to the folder you have the Putty executables:

cd "C:\Program Files (x86)\PuTTY"

From there, run the following:

plink -L 5432:localhost:5432 "my local ssh profile"

where “my local ssh profile” is the name of the session config you have saved in PUTTY.

What this does it route all requests from localhost port 5432 to the connection it created through PUTTY and forwards them to the same port (hence the second 5432)

Now you just need to change the config for HeidiSQL to connect to ‘localhost’, port 5432. Then provide the user and password for the postgres database user you want to connect with.

Hope that helps!

Apr 292015
NODE.JS(1)                                                                                                                                                                                NODE.JS(1)

       node - Server-side JavaScript

       node [ -v ] [ --debug | --debug-brk ] [ --v8-options ]
            [ -e command | script.js ] [ arguments ]

       Execute without arguments to start the REPL.

       Node is a set of libraries for javascript which allows it to be used outside of the browser. It is primarily focused on creating simple, easy to build network clients and servers.

         -v, --version          print node's version

         -e, --eval script      evaluate script

         -p, --print            print result of --eval

         -i, --interactive      always enter the REPL even if stdin
                                does not appear to be a terminal

         --no-deprecation       silence deprecation warnings

         --trace-deprecation    show stack traces on deprecations

         --throw-deprecation    throw errors on deprecations

         --v8-options           print v8 command line options

         --max-stack-size=val   set max v8 stack size (bytes)

         --enable-ssl2          enable ssl2 in crypto, tls, and https

         --enable-ssl3          enable ssl3 in crypto, tls, and https

              ´:´-separated list of directories prefixed to the module search path.

              If set to 1 then modules will load in their own global contexts.

              If set to 1 then colors will not be used in the REPL.

         --use_strict (enforce strict mode)
               type: bool  default: false
         --es5_readonly (activate correct semantics for inheriting readonliness)
               type: bool  default: false
         --es52_globals (activate new semantics for global var declarations)
               type: bool  default: false
         --harmony_typeof (enable harmony semantics for typeof)
               type: bool  default: false
         --harmony_scoping (enable harmony block scoping)
               type: bool  default: false
         --harmony_modules (enable harmony modules (implies block scoping))
               type: bool  default: false
         --harmony_proxies (enable harmony proxies)
               type: bool  default: false
         --harmony_collections (enable harmony collections (sets, maps, and weak maps))
               type: bool  default: false
         --harmony (enable all harmony features (except typeof))
               type: bool  default: false
         --packed_arrays (optimizes arrays that have no holes)
               type: bool  default: false
         --smi_only_arrays (tracks arrays with only smi values)
               type: bool  default: true
         --clever_optimizations (Optimize object size, Array shift, DOM strings and string +)
               type: bool  default: true
         --unbox_double_arrays (automatically unbox arrays of doubles)
               type: bool  default: true
         --string_slices (use string slices)
               type: bool  default: true
         --crankshaft (use crankshaft)
               type: bool  default: true
         --hydrogen_filter (optimization filter)
               type: string  default:
         --use_range (use hydrogen range analysis)
               type: bool  default: true
         --eliminate_dead_phis (eliminate dead phis)
               type: bool  default: true
         --use_gvn (use hydrogen global value numbering)
               type: bool  default: true
         --use_canonicalizing (use hydrogen instruction canonicalizing)
               type: bool  default: true
         --use_inlining (use function inlining)
               type: bool  default: true
         --max_inlined_source_size (maximum source size in bytes considered for a single inlining)
               type: int  default: 600
         --max_inlined_nodes (maximum number of AST nodes considered for a single inlining)
               type: int  default: 196
         --max_inlined_nodes_cumulative (maximum cumulative number of AST nodes considered for inlining)
               type: int  default: 196
         --loop_invariant_code_motion (loop invariant code motion)
               type: bool  default: true
         --collect_megamorphic_maps_from_stub_cache (crankshaft harvests type feedback from stub cache)
               type: bool  default: true
         --hydrogen_stats (print statistics for hydrogen)
               type: bool  default: false
         --trace_hydrogen (trace generated hydrogen to file)
               type: bool  default: false
         --trace_phase (trace generated IR for specified phases)
               type: string  default: Z
         --trace_inlining (trace inlining decisions)
               type: bool  default: false
         --trace_alloc (trace register allocator)
               type: bool  default: false
         --trace_all_uses (trace all use positions)
               type: bool  default: false
         --trace_range (trace range analysis)
               type: bool  default: false
         --trace_gvn (trace global value numbering)
               type: bool  default: false
         --trace_representation (trace representation types)
               type: bool  default: false
         --stress_pointer_maps (pointer map for every instruction)
               type: bool  default: false
         --stress_environments (environment for every instruction)
               type: bool  default: false
         --deopt_every_n_times (deoptimize every n times a deopt point is passed)
               type: int  default: 0
         --trap_on_deopt (put a break point before deoptimizing)
               type: bool  default: false
         --deoptimize_uncommon_cases (deoptimize uncommon cases)
               type: bool  default: true
         --polymorphic_inlining (polymorphic inlining)
               type: bool  default: true
         --use_osr (use on-stack replacement)
               type: bool  default: true
         --array_bounds_checks_elimination (perform array bounds checks elimination)
               type: bool  default: false
         --array_index_dehoisting (perform array index dehoisting)
               type: bool  default: false
         --trace_osr (trace on-stack replacement)
               type: bool  default: false
         --stress_runs (number of stress runs)
               type: int  default: 0
         --optimize_closures (optimize closures)
               type: bool  default: true
         --inline_construct (inline constructor calls)
               type: bool  default: true
         --inline_arguments (inline functions with arguments object)
               type: bool  default: true
         --loop_weight (loop weight for representation inference)
               type: int  default: 1
         --optimize_for_in (optimize functions containing for-in loops)
               type: bool  default: true
         --experimental_profiler (enable all profiler experiments)
               type: bool  default: true
         --watch_ic_patching (profiler considers IC stability)
               type: bool  default: false
         --frame_count (number of stack frames inspected by the profiler)
               type: int  default: 1
         --self_optimization (primitive functions trigger their own optimization)
               type: bool  default: false
         --direct_self_opt (call recompile stub directly when self-optimizing)
               type: bool  default: false
         --retry_self_opt (re-try self-optimization if it failed)
               type: bool  default: false
         --count_based_interrupts (trigger profiler ticks based on counting instead of timing)
               type: bool  default: false
         --interrupt_at_exit (insert an interrupt check at function exit)
               type: bool  default: false
         --weighted_back_edges (weight back edges by jump distance for interrupt triggering)
               type: bool  default: false
         --interrupt_budget (execution budget before interrupt is triggered)
               type: int  default: 5900
         --type_info_threshold (percentage of ICs that must have type info to allow optimization)
               type: int  default: 15
         --self_opt_count (call count before self-optimization)
               type: int  default: 130
         --trace_opt_verbose (extra verbose compilation tracing)
               type: bool  default: false
         --debug_code (generate extra code (assertions) for debugging)
               type: bool  default: false
         --code_comments (emit comments in code disassembly)
               type: bool  default: false
         --enable_sse2 (enable use of SSE2 instructions if available)
               type: bool  default: true
         --enable_sse3 (enable use of SSE3 instructions if available)
               type: bool  default: true
         --enable_sse4_1 (enable use of SSE4.1 instructions if available)
               type: bool  default: true
         --enable_cmov (enable use of CMOV instruction if available)
               type: bool  default: true
         --enable_rdtsc (enable use of RDTSC instruction if available)
               type: bool  default: true
         --enable_sahf (enable use of SAHF instruction if available (X64 only))
               type: bool  default: true
         --enable_vfp3 (enable use of VFP3 instructions if available - this implies enabling ARMv7 instructions (ARM only))
               type: bool  default: true
         --enable_armv7 (enable use of ARMv7 instructions if available (ARM only))
               type: bool  default: true
         --enable_fpu (enable use of MIPS FPU instructions if available (MIPS only))
               type: bool  default: true
         --expose_natives_as (expose natives in global object)
               type: string  default: NULL
         --expose_debug_as (expose debug in global object)
               type: string  default: NULL
         --expose_gc (expose gc extension)
               type: bool  default: false
         --expose_externalize_string (expose externalize string extension)
               type: bool  default: false
         --stack_trace_limit (number of stack frames to capture)
               type: int  default: 10
         --builtins_in_stack_traces (show built-in functions in stack traces)
               type: bool  default: false
         --disable_native_files (disable builtin natives files)
               type: bool  default: false
         --inline_new (use fast inline allocation)
               type: bool  default: true
         --stack_trace_on_abort (print a stack trace if an assertion failure occurs)
               type: bool  default: true
         --trace (trace function calls)
               type: bool  default: false
         --mask_constants_with_cookie (use random jit cookie to mask large constants)
               type: bool  default: true
         --lazy (use lazy compilation)
               type: bool  default: true
         --trace_opt (trace lazy optimization)
               type: bool  default: false
         --trace_opt_stats (trace lazy optimization statistics)
               type: bool  default: false
         --opt (use adaptive optimizations)
               type: bool  default: true
         --always_opt (always try to optimize functions)
               type: bool  default: false
         --prepare_always_opt (prepare for turning on always opt)
               type: bool  default: false
         --trace_deopt (trace deoptimization)
               type: bool  default: false
         --min_preparse_length (minimum length for automatic enable preparsing)
               type: int  default: 1024
         --always_full_compiler (try to use the dedicated run-once backend for all code)
               type: bool  default: false
         --trace_bailout (print reasons for falling back to using the classic V8 backend)
               type: bool  default: false
         --compilation_cache (enable compilation cache)
               type: bool  default: true
         --cache_prototype_transitions (cache prototype transitions)
               type: bool  default: true
         --trace_debug_json (trace debugging JSON request/response)
               type: bool  default: false
         --debugger_auto_break (automatically set the debug break flag when debugger commands are in the queue)
               type: bool  default: true
         --enable_liveedit (enable liveedit experimental feature)
               type: bool  default: true
         --break_on_abort (always cause a debug break before aborting)
               type: bool  default: true
         --stack_size (default size of stack region v8 is allowed to use (in kBytes))
               type: int  default: 984
         --max_stack_trace_source_length (maximum length of function source code printed in a stack trace.)
               type: int  default: 300
         --always_inline_smi_code (always inline smi code in non-opt code)
               type: bool  default: false
         --max_new_space_size (max size of the new generation (in kBytes))
               type: int  default: 0
         --max_old_space_size (max size of the old generation (in Mbytes))
               type: int  default: 0
         --max_executable_size (max size of executable memory (in Mbytes))
               type: int  default: 0
         --gc_global (always perform global GCs)
               type: bool  default: false
         --gc_interval (garbage collect after  allocations)
               type: int  default: -1
         --trace_gc (print one trace line following each garbage collection)
               type: bool  default: false
         --trace_gc_nvp (print one detailed trace line in name=value format after each garbage collection)
               type: bool  default: false
         --print_cumulative_gc_stat (print cumulative GC statistics in name=value format on exit)
               type: bool  default: false
         --trace_gc_verbose (print more details following each garbage collection)
               type: bool  default: false
         --trace_fragmentation (report fragmentation for old pointer and data pages)
               type: bool  default: false
         --collect_maps (garbage collect maps from which no objects can be reached)
               type: bool  default: true
         --flush_code (flush code that we expect not to use again before full gc)
               type: bool  default: true
         --incremental_marking (use incremental marking)
               type: bool  default: true
         --incremental_marking_steps (do incremental marking steps)
               type: bool  default: true
         --trace_incremental_marking (trace progress of the incremental marking)
               type: bool  default: false
         --use_idle_notification (Use idle notification to reduce memory footprint.)
               type: bool  default: true
         --send_idle_notification (Send idle notification between stress runs.)
               type: bool  default: false
         --use_ic (use inline caching)
               type: bool  default: true
         --native_code_counters (generate extra code for manipulating stats counters)
               type: bool  default: false
         --always_compact (Perform compaction on every full GC)
               type: bool  default: false
         --lazy_sweeping (Use lazy sweeping for old pointer and data spaces)
               type: bool  default: true
         --never_compact (Never perform compaction on full GC - testing only)
               type: bool  default: false
         --compact_code_space (Compact code space on full non-incremental collections)
               type: bool  default: true
         --cleanup_code_caches_at_gc (Flush inline caches prior to mark compact collection and flush code caches in maps during mark compact cycle.)
               type: bool  default: true
         --random_seed (Default seed for initializing random generator (0, the default, means to use system random).)
               type: int  default: 0
         --use_verbose_printer (allows verbose printing)
               type: bool  default: true
         --allow_natives_syntax (allow natives syntax)
               type: bool  default: false
         --trace_sim (Trace simulator execution)
               type: bool  default: false
         --check_icache (Check icache flushes in ARM and MIPS simulator)
               type: bool  default: false
         --stop_sim_at (Simulator stop after x number of instructions)
               type: int  default: 0
         --sim_stack_alignment (Stack alignment in bytes in simulator (4 or 8, 8 is default))
               type: int  default: 8
         --trace_exception (print stack trace when throwing exceptions)
               type: bool  default: false
         --preallocate_message_memory (preallocate some memory to build stack traces.)
               type: bool  default: false
         --randomize_hashes (randomize hashes to avoid predictable hash collisions (with snapshots this option cannot override the baked-in seed))
               type: bool  default: true
         --hash_seed (Fixed seed to use to hash property keys (0 means random)(with snapshots this option cannot override the baked-in seed))
               type: int  default: 0
         --preemption (activate a 100ms timer that switches between V8 threads)
               type: bool  default: false
         --regexp_optimization (generate optimized regexp code)
               type: bool  default: true
         --testing_bool_flag (testing_bool_flag)
               type: bool  default: true
         --testing_int_flag (testing_int_flag)
               type: int  default: 13
         --testing_float_flag (float-flag)
               type: float  default: 2.500000
         --testing_string_flag (string-flag)
               type: string  default: Hello, world!
         --testing_prng_seed (Seed used for threading test randomness)
               type: int  default: 42
         --testing_serialization_file (file in which to serialize heap)
               type: string  default: /tmp/serdes
         --help (Print usage message, including flags, on console)
               type: bool  default: true
         --dump_counters (Dump counters on exit)
               type: bool  default: false
         --debugger (Enable JavaScript debugger)
               type: bool  default: false
         --remote_debugger (Connect JavaScript debugger to the debugger agent in another process)
               type: bool  default: false
         --debugger_agent (Enable debugger agent)
               type: bool  default: false
         --debugger_port (Port to use for remote debugging)
               type: int  default: 5858
         --map_counters (Map counters to a file)
               type: string  default:
         --js_arguments (Pass all remaining arguments to the script. Alias for "--".)
               type: arguments  default:
         --debug_compile_events (Enable debugger compile events)
               type: bool  default: true
         --debug_script_collected_events (Enable debugger script collected events)
               type: bool  default: true
         --gdbjit (enable GDBJIT interface (disables compacting GC))
               type: bool  default: false
         --gdbjit_full (enable GDBJIT interface for all code objects)
               type: bool  default: false
         --gdbjit_dump (dump elf objects with debug info to disk)
               type: bool  default: false
         --gdbjit_dump_filter (dump only objects containing this substring)
               type: string  default:
         --force_marking_deque_overflows (force overflows of marking deque by reducing its size to 64 words)
               type: bool  default: false
         --stress_compaction (stress the GC compactor to flush out bugs (implies --force_marking_deque_overflows))
               type: bool  default: false
         --log (Minimal logging (no API, code, GC, suspect, or handles samples).)
               type: bool  default: false
         --log_all (Log all events to the log file.)
               type: bool  default: false
         --log_runtime (Activate runtime system %Log call.)
               type: bool  default: false
         --log_api (Log API events to the log file.)
               type: bool  default: false
         --log_code (Log code events to the log file without profiling.)
               type: bool  default: false
         --log_gc (Log heap samples on garbage collection for the hp2ps tool.)
               type: bool  default: false
         --log_handles (Log global handle events.)
               type: bool  default: false
         --log_snapshot_positions (log positions of (de)serialized objects in the snapshot.)
               type: bool  default: false
         --log_suspect (Log suspect operations.)
               type: bool  default: false
         --prof (Log statistical profiling information (implies --log-code).)
               type: bool  default: false
         --prof_auto (Used with --prof, starts profiling automatically)
               type: bool  default: true
         --prof_lazy (Used with --prof, only does sampling and logging when profiler is active (implies --noprof_auto).)
               type: bool  default: false
         --prof_browser_mode (Used with --prof, turns on browser-compatible mode for profiling.)
               type: bool  default: true
         --log_regexp (Log regular expression execution.)
               type: bool  default: false
         --sliding_state_window (Update sliding state window counters.)
               type: bool  default: false
         --logfile (Specify the name of the log file.)
               type: string  default: v8.log
         --ll_prof (Enable low-level linux profiler.)
               type: bool  default: false

       See the website for documentation http://nodejs.org/

       Mailing list: http://groups.google.com/group/nodejs

       IRC: irc.freenode.net #node.js

                                                                                                2010                                                                                      NODE.JS(1)

Feb 232015

What happens when PHP’s CURL library encounters a 301 Redirect header? It depends.

By default, it does NOT redirect. It will simply halt after the header is returned.

However, there is an option you can set that allows it to follow up to 5 redirects in a chain: the CURLOPT_FOLLOWLOCATION setting.

curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);

Hope that helps anyone else out there that was curious!

Feb 232015

What happens when PHP’s file_get_contents() function encounters a 301 Redirect header? I thought I could find out by going to the PHP documentation, but I couldn’t find anything. So instead, I set up a simple test myself.

Just made a simple script that echos file_get_contents() and pointed it to a URL that I know has a 301 redirect. What happened? It followed it.

Now I’m not sure how many redirects it will follow (most environments have a limit to prevent infinite loops of one 301 redirect back to another), but by default file_get_contents() DOES follow redirects.

Hope that helps anyone else out there that was curious!

Sep 202014

I’m writing code for a wordpress plugin of mine, and needed for the get_posts() function to return ALL posts. Here’s what I was using before:

$args = array(
‘post_type’ => ‘post’,
‘post_status’ => ‘publish’,
$posts = get_posts($args);

According to the wordpress documentation, the ‘posts_per_page’ option for this function has a default value of 5, meaning you’ll get at most 5 results back. I looked to see if there was a way to show all posts, and I couldn’t find it documented anywhere.

However, I did see some people provide code that had that value set at -1. I thought it might be a way of specifying no limit, so I tried it, and it’s working. Here’s what I use now:

$args = array(
‘post_type’ => ‘post’,
‘post_status’ => ‘publish’,
‘posts_per_page’ => -1
$posts = get_posts($args);

It may not be a documented features, but it’s working for now. Give it a shot if you’re looking to have get_posts() return an unlimited number of posts.