Posts

2026

Python in 30 Days Day 4

Day four was more string work. It was focused on manipulating strings and doing some built in methods to build some analytics.

Challenge:

You’re processing user-submitted restaurant reviews. Real user input is messy β€” inconsistent casing, extra spaces, typos in structure. Write a program that:

  1. Starts with this list of raw reviews exactly as given:
raw_reviews = [
    "  great burger, loved it! ",
    "FRIES WERE COLD. bad experience. ",
    "  the milkshake was amazing. will return.",
    "salad was okay. nothing special.   ",
    "BROWNIE IS A MUST TRY!!  "
]    
  1. Writes a function clean_review(review) that:
  • Strips leading/trailing whitespace
  • Converts to sentence case (first letter capitalized, rest lowercase β€” look up which method does this in one step)
  • Returns the cleaned string
  1. Uses a list comprehension to apply clean_review to every review, storing results in cleaned_reviews
  2. Writes a function analyze_reviews(reviews) that returns a dictionary containing:
  • "total": count of reviews
  • "positive": count of reviews containing words like “great”, “amazing”, “loved”, “must”, “will return”
  • "avg_length": average character length of the reviews (rounded to nearest whole number)
  1. Prints the cleaned reviews and the analysis dictionary cleanly

Things to figure out: how to check if any of several words appear in a string, and how to calculate an average from a list.

Read more β†’

Python in 30 Days - Day 3

Day three was all about list comprehension, or manipulating lists in a concise manner. The main concept is that what would normally take a typical for loop to accomplish can be done in a single line. This appiles to lists, dictionaries, and tuples.

The Challenge:

Using your restaurant system from day two as a base, write the following using list comprehensions β€” no standard for loops allowed for these:

Read more β†’

Python in 30 Days - Day 2

Day two was all about dictionaries, which have always been a real struggle for me. I’ve been told by many people that they’ve also struggled with them in the past, so at least I know I’m not alone.

The Challenge:

You’re building a simple restaurant order sytem.

Write code that:

  1. Creates a dictionary of menu items with their prices (at least 5 items)
  2. Creates an empty list called order
  3. Writes a function add_item(order, item_name, menu) that:
  • Adds the item to the order list if it exists in the menu
  • Prints a warning if the item isn’t on the menu
  1. Writes a function get_total(order, menu) that returns the total cost of everything in the order
  2. Adds at least 3 items to the order (try adding one that doesn’t exist)
  3. Prints the final order list and the total, formatted cleanly

My Code:

menu = {
    'Burger': 15,
    'Fries': 5,
    'Milkshake': 9,
    'Salad': 6,
    'Brownie': 3
}

order = []
total = 0


def add_item(order, item_name, menu):
    if item_name in menu:
        order.append(item_name)
        print(f"Added {item_name} to order.")
    else:
        print(f"Sorry, {item_name} is not on the menu!")

           

def get_total(order, menu):
    total = 0
    for i in order:
        price = menu[i]
        total += price
    
    
    return total

add_item(order, 'Burger', menu)
add_item(order, 'Pizza', menu)
add_item(order, 'Fries', menu)
add_item(order, 'Milkshake', menu)

bill = get_total(order, menu)


print("\nYour order:\n")
print(*order, sep="\n")
print(f"\nTotal: ${bill}")

The results of running the code are:

Read more β†’

Python in 30 Days - Day 1

It’s been a while since I’ve heavily invested time into learning Python and I thought I’d do a refresher course, using Claude AI to help guide mea s an experiment. I decided to have Claude quiz me on what I know already in ten questions and build a 30 day course from there.

I passed the ten questions with flying colors and Claude said that my theoretical knowledge is excellent, so it suggested we get straight into functions and scope for day one.

Read more β†’

Python Fun

I recently started messing with Python again and saw a challenge on a practice website. For context, I haven’t written any Python in a bit, so I wanted to scratch the itch and keep my knowledge alive.

The challenge was to create a program that asks for user input and does some math with their age to calculate what year they’d turn 100.

Here’s what I came up with:

current_year = 2026
name = ""
age = ""
yourage = 0


def main():
    print(f"Hello! What's your name?")
    name = input()

    print(f"\nAnd how old are you, {name}?")
    age = int(input())
    yourage = int(age)

    return name, yourage


def hundred(yourage, current_year):
    yearstohundo = 100 - yourage
    yearwillbe = yearstohundo + current_year

    print(f"\nYou will turn 100 in {yearwillbe}!")


name, yourage = main()
hundred(yourage, current_year)

If you run that program in the terminal you will get (regular text is my answers):

Read more β†’

Claude Code

It’s been about a year since I last tried to “vibe code” and I used the normal Claude LLM to do so. The experience was okay, but frustrating. When using the standard chat interface, you have to be very specific about what you’re feeding the chat and make sure that you keep the context window fairly short, because eventually the tool will start hallucinating more and more as you go on.

Read more β†’

New Site

In case you missed it, I’ve been blogging at Meditations and Marginalia. I’ve started using that more than this site for various reasons, but I may change my mind, depending on how things go in the future. I was having some issues with GitHub Pages, but that seems to be resolved now.

Moral of the story, check out the new site if you happen to stumble on this page.

Read more β†’

You-Should-Self-Educate

Have you ever thought about going back to get a degree in your topic here?

I have. Many times.

Yet, I have never been able to personally justify spending tens of thousands of dollars to get a formal degree that may or may not provide a return on that investment. I signed up to do an MBA program several years ago with the University of Illinois, but ended up never taking a single class when I found out that most graduates with that degree don’t make significantly more than their non-MBA degree holding peers.

Read more β†’

All We Have Is Today

I recently read the book The Courage to Be Disliked by Ichiro Kishimi and Fumitake Koga. If you are unfamiliar, it is an overview of Adlerian Psychology, also known as Individual Psychology.

I’ll admit that I had never heard of Alfred Adler or the psychology he was a proponent of, but I am glad that I gave this book a read. Unlike many psychology or self-help books, this one is written in the form of a narrative dialogue between a student and a mentor, which makes it very easy to read.

Read more β†’

2025

Steady

How do you react when difficult circumstances arise?

Life isn’t always fair. It’s not easy. Difficult circumstances will arise for all of us from time to time. The question is how will you choose to respond during tough times?

It is tempting to give into our emotional response and allow that to dictate how we react. This, however, is not good. Emotions are fleeting and driven by hormones flooding your body. They are indifferent to reality outside your current circumstance. They have no perspective.

Read more β†’

Sales Success Is Boring 😴

The Boring Path to Sales Success

Ask any top sales performer the secret to their success, and chances are, you won’t get a flashy answer. You won’t hear about a secret script or a viral campaign or some once-in-a-lifetime pitch that changed everything. What you’ll hear β€” if they’re being honest β€” is something much simpler, and far less exciting:

πŸ’‘Sales Success Comes Down To Consistency, Discipline, And A Commitment To The Basics.

Read more β†’

Decorators in Python

Python Decorators

Decorators are a way we can use higher order functions to modify other functions. Typically they are used to wrap a function with another function.


def hello(name="Ian"):
    def greeting(func):
        def wrapper(*args, **kwargs):
            print("A man is sitting at the bar, you go up and greet him.")

            if name == "Ian":
                print("My name is Ian, what's yours?")
            else:
                print(f"My name is {name}, what's yours?")

            print("The man glances your way momentarily, then moves to the other end of the bar.")
            result = func(*args, **kwargs)
            return result
        return wrapper
    return greeting

@hello("Alice")
def bar_talk():
    print("You start a conversation about the weather with the bartender instead.")

@hello()
def another_chat():
    print("You shrug your shoulders and ask the bartender about the local sports team.")


print("=== First Interaction ===")
bar_talk()

print("\n=== Second Interaction ===")
another_chat()

In the example above, you would get the following print out:

Read more β†’

RAG

What is RAG?

If you’ve been trying to keep up with AI, there’s a good chance you’ve come across the term RAG. When I first learned heard the term, I wasn’t exactly sure what it meant form the context of the discussion.

Retrieval-Augmented Generation (RAG) is a technique that enhances the accuracy of large language models (LLMs) by giving them a wider context window and including external (from the LLM’s database) knowledge sources.

Read more β†’

Sales Mindset

Mindset is everything.

Sales is arguably a mindset game and most salespeople get it wrong.

Let me tell you why…

Most sales reps I have spoken to over the last decade have told me that the reason they went into sales to begin with is to make more money. There’s no doubt that making commission is a massive upside to working in sales - but the issue arises when the initial motivation becomes the focus of your daily mindset.

Read more β†’

Agentic AI

Agentic AI

Agentic AI is essentially giving AI a specific job that it will execute on a regular basis and giving it the autonomy to do so.

There are five main categories of agentic AI today:

  1. Simple Reflex
  2. Model-Based Reflex
  3. Goal-Based
  4. Utility-Based
  5. Learning

Simple Reflex Agents

The most basic agentic AI models are reactive and are built to analyze an input from the environment then use condition based logic/rules to make a decision on what to do next. For instance, your thermostat has a sensor that evaluates the temperature of the air (environmental input) and checks it against the conditional rules (if the temp is above 72 degrees F, then turn on cooling until it reaches 72 degrees). Once it evaluates the data against the conditional logic, it performs an action.

Read more β†’

Functions

What Are Functions?

Functions are blocks of code that perform a given task any time they are called.

A function could process one action a single time and move on to the next block of code in the script, or it could iterate through itself multiple times (infinitely if you wrote it that way).

In Python, your declare a function with the reserved keyword def - which defines the function.

Read more β†’

Types in Python

Type()

In Python you can check for what type of variable you are dealing with by using the type() formula. It takes one input and tells you what type of variable it is.

See below:

>>> num = 3
>>> num_str = "3"
>>> bool = True
>>> num_float = 3.0
>>> type(num)
<class 'int'>
>>> type(num_str)
<class 'str'>
>>> type(bool)
<class 'bool'>
>>> type(num_float)
<class 'float'>

In the example above, we see that the function returns what class the variable belongs to. This can be very useful if you are trying to debug existing code that has variables written somewhere other than where you are looking or trying to fix the bug.

Read more β†’

Pure Functions

Pure Functions

Pure functions are functions that return the same result every time, assuming they receive the same inputs. This is made possible by writing the function to be self-contained, meaning it doesn’t rely on variables outside it’s local scope.

Pure functions do not change the external state of the program. They are great for keeping clean code that is easy to debug, but you can’t write an entire program of pure functions, because it wouldn’t actually do anything.

Read more β†’

Variables

What Are Variables?

If you are brand new to coding, the term variables might not immediately register. It’s important to understand what a variable is, as most coding languages do use them.

So What Are Variables?

Variables are containers that store values, such as:

Numbers:

  • Integers (3)
  • Float (3.0)
  • String (“3”)

Text:

  • Strings are plain text and are wrapped in parenthesis to tell Python to interpret the text as text only. “For example, this would be a string”

Boolean:

Read more β†’

Hugo Script

Shell Script - Create A New Hugo Blog Post

I’ve recently been going deep in the world of creating shell scripts to automate tasks as I operate in the shell. I’ve seen other developers fly around the terminal like some kind of wizard πŸ§™πŸΌβ€β™‚οΈ, their hands never leaving the keyboard.

I am no stranger to using keyboard shortcuts to accomplish tasks in other apps I’ve used for years in my sales career and content creation, but the terminal is a new environment for me. I’ve really enjoyed learning to navigate and use CLI tools to accomplish tasks… and edit in my text editor of choice, Neovim. However, after a month of typing out the same commands over and over in full, I decided to teach myself to write shell scripts.

Read more β†’

Hello, World!

Your First Bit of Code

Everyone starts with the first program that was ever ran on a computer with a visual interface:

Hello, World!

The purpose of the program is to tell the Python interperter to show “Hello World” on the screen.

Go to your terminal and type the following to check for Python:

python3 --version

If you get an error, be sure to install it. On MacOS, I recommend HomeBrew, but you can use your package installer of choice. For HomeBrew, do the following:

Read more β†’

Welcome πŸ‘‹πŸΌ

Welcome To My Blog And Porfolio!

My personal journey to becoming a developer from ground zero.

A Little History

Β Β Β Β Β Β I have had a love for learning languages for as long as I can remember. I lived in Okinawa, Japan for the first five years of my life. Being exposed to multiple languages while I was acquiring my ability to communicate verbally seems to have unlocked a lifelong fascination with becoming a polyglot.

Read more β†’