Coding

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 →

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 →

2025

Code Tutor AI Agent

Code Tutor AI 🧙🏼‍♂️

An AI-powered interactive CLI coding tutor built with OpenAI Agent SDK.

Code Tutor is built to allow you to learn to code yourself rather than just vibe code your way to success. This AI agent is supportive and uses the Socractic method to walk you, the coding student, through solving the problem on your own with guidance.

🧠 Code tutor is built on the principle that we can use AI to accomplish great things, but we need to protect our ability to think critically and learn.

Read more →

Better Tasks

Better Tasks Neovim Plugin

Better Tasks is a lightweight, modular and opinionated Neovim plugin for managing Markdown-based task lists across your notes, journals, or project files. It adds intuitive task management commands, persistent storage, status highlighting, and upcoming fuzzy-finding and popup UIs.

As always, you can find out more about this project and all my projects in my GitHub.


💡 Task Structure

As you can see below, the tasks can be formatted into a table-like structure (not truly a table due to markdown limitations) that allow you to quickly see your tasks at a glance and view them through the perspective of title, due date, category, or status.

Read more →