Which one has two zero and two four?

I came across a post on Facebook, in which you’re challenged to provide the “correct” answer. Normally, I would bypass these as I don’t have much time in the day-to-day work to engage but I had a build that was particularly slow so I “play”

“Which one has two zero and two four?”

  • A) 0024
  • B) 2024
  • C) 0044

I’ve recently started taking formal Spanish lessons again to improve my public speaking and I looked at the question a bit differently. As I started thinking about the solution, I was taken back to my sophomore year of college at the North Avenue Trade school, when I changed my major from Computer Engineering to Computer Science. That summer, I stayed in Atlanta and took a pivotal class, CS1411. It was there that I met 3 of my best friends. It was in this class that I started learning about parsers by way of building an operating system over the course of the class.

Let’s break the sentence down or in compiler-speak apply a lexical analyzer, parsing the components (tokens) in order to make sense of it

“Which one has” – this is equivalent to a query/filter command, returning a single result similar to:

•  “SELECT TOP 1” in SQL

“.first(where: )” in Swift

Is there a “correct” answer?

The correct answer is “It depends”. Let’s look at the ways in which we can interpret the remaining components

The most common interpretation (based on responses) may say that the words TWO, ZERO, TWO & FOUR each represent a LITERAL value. We will also state that AND is a concatenation operator, meaning we simply combine it with the preceding value(s)

With this interpretation, we get “2024” and B is correct

What if the rules were slightly different?

Let’s now say the first number represents a COUNT operator and the following number represents a LITERAL value. We will maintain the rule that AND is a concatenation operator, as above.

 “Two Zero” would be interpreted as COUNT (“TWO”) followed by a LITERAL number (“ZERO”) meaning “2 of the literal value (0)”, which results in “00”. Similarly, “Two Four” would be interpreted as “44”

With this interpretation, we get “0044” and C is correct

What if AND behaved differently?

Imagine that our AND did more than just concatenate, which makes sense as it feels unnecessary in the prior examples. The values can simply be returned, negating the need for the AND (Think  “me llamo Alondo” instead of “me llamo es Alondo”)

Instead, consider AND behaving as switch operator, moving between modes of the LITERAL and COUNT/LITERAL interpretations.

• COUNT/LITERAL “2 of the literal value (0)”  

• AND (switch modes from COUNT/LITERAL to LITERAL

• LITERAL(“24”)

With this interpretation, we get “0024” and A is correct

Summary

For me, this was a simple reminder that there are often more than “2” sides to something and that the “correct” answer is usually context dependent. It’s important to pay attention to the factors that impact interpretation and therefore resulting outcomes.

CN Podcast #47: Creating Small Things

In this week’s episode, I talk about the value in creating small things and how you can use it to increase your likelihood of success. I’ll share some of the advantages of starting small and using those wins as building blocks

Episode Link

Show Notes:

You can listen to the Cocoa Nomad Podcast on the following services:

I’d love to hear from you! Reach out with comments, feedback or show ideas on Twitter or Instagram

Aspiration and Inspiration

As aspirational people (those who want to do), we often look to the inspirational people (those who have done it) for the keys to success.

We would do well to learn from those who are in media res (those who are in the middle of doing).  

Their stories provide the context of their decision making w/o the fog of memory, sanitization nor embellishment .

It’s why we love the the hero’s journey. We can follow the story as it unfolds. It’s exciting and we don’t know how it’s going to end.

Though it’s tempting to dismiss people who “haven’t made it yet”, I encourage you to reconsider and take advantage of what their journeys have to offer.

The Best Time

The best time to look for the next opportunity is when you already have one. 

The best time to start your side hustle is when you don’t have to depend on it for income.

The challenge is that there’s no sense of urgency.

You have comfort.

You have consistent income.

Things are getting taken care of.

Eventually, you’ll “find the time” to work on it, right?

As someone who’s been frustrated with his progress, I had to finally get fed up with the feast/famine cycle of client work to finally make a change.

I encourage you, MAKE the time to get that project going TODAY.

Technology's Impact on Work

I had the pleasure of sitting down and talking with Prof. Temple this past week in Medellin. In the wake of so much technological change and it’s impact our lives, we need to reevaluate what it means to be a human being and how we define our worth. He impressed upon me the need for intergenerational work in order to confront this sea change.

  • Are we prepared for high rates of employment due to increased automation?
  • Are we ready to discuss our relationship to work and its impact on our self-image?
  • Will we continue to measure our value by our jobs or our wealth?


These aren’t new questions but rapid change has made it imperative that we decide who we are and who want to be.


Donald Temple: The Social and Political Implications of Technology

CN Podcast #46: Finish The Season

When setting goals it’s important to establish boundaries to avoid negative thinking about your journey. Committing to a certain period and then evaluating afterwards is good for a number of reasons. In this episode, I talk about the importance of “finishing the season” 

Episode Link

Show Notes:

You can listen to the Cocoa Nomad Podcast on the following services:

I’d love to hear from you. Reach out with comments, feedback or show ideas on Twitter or Instagram