Dear Diary, You’ll Never Guess What I Encrypted Today

Day 28 of 100 Days Coding Challenge: Python

I’ve always kept a journal—both digital and analog. In fact, I still scribble in a notebook with a pen, even though my handwriting is the kind of cryptic mess that could double as a CAPTCHA test. But I’m oddly comforted by the idea that if someone tried to read it, they’d either go blind or start decoding it like a Cold War cipher. That said, I still remember the sheer horror of a sibling (yes, the nosy one) reading my diary out. Since then, I’ve had a deeply personal vendetta against unsecured journaling. So, I finally did it: I built my own diary app—with encryption. No prying eyes. No traumatic readings. Just me, my thoughts, and a very tight password.

Today’s Motivation / Challenge


Journaling is personal. Like, really personal. Whether you’re logging your feelings, goals, or that weird dream you had about sentient laundry, it deserves privacy. I wanted to make a journal that felt like a digital vault—simple to use, but impossible to crack without the key. And since I’m also practicing my GUI skills, I figured, why not make it look nice while I’m at it?

Purpose of the Code (Object)


This app is a private digital diary. You can write journal entries, save them securely, and read them later—only if you enter the correct password. It uses encryption to make sure no one but you can read what you’ve written, and it now includes automatic timestamps so you can look back and see exactly when you had that existential crisis.

AI Prompt:

Build a GUI-based personal diary app in Python that encrypts each entry using a password-based key. Include timestamped entries and secure storage using the cryptography library. Use tkinter for the interface.

Functions & Features

  • Password-protected access
  • Add new diary entries
  • View previously written entries
  • Each entry automatically includes a timestamp
  • Clean, scrollable GUI built with Tkinter

Requirements / Setup


To run this app, you’ll need:

pip install cryptography

Python version: 3.8 or higher recommended

Minimal Code Sample

timestamp = datetime.now().strftime(“%Y-%m-%d %H:%M:%S”)

full_entry = f”[{timestamp}]\n{entry}”

encrypted = cipher.encrypt(full_entry.encode())

This adds a timestamp to your diary entry and encrypts it before saving.

Encrypted Diary (GUI)

Notes / Lessons Learned

With the help of an AI prompt, building this script was surprisingly smooth—until I hit my first “I forgot to install the cryptography library” moment. Classic. Then came the part where the program asked me to set a password, but nothing appeared on screen. For a split second, I thought my keyboard had staged a walkout. Turns out, the password input was just being ultra-stealthy—so stealthy that I couldn’t see what I typed. But hey, that’s security. If you mess up your password confirmation, it makes you do it all over again. Fair enough.


Later, I decided to ditch the command line and build a GUI version. Because honestly, clicking buttons is more satisfying than typing commands, especially when you’re just trying to jot down how your day went. And I added timestamps—because every journaling tool I love (Notion, Obsidian) includes them, and they make going back in time feel like digital archaeology.


Honestly, if I’d had this kind of encrypted diary app when I was a teenager, I probably would’ve written about a hundred volumes of emotional drama—and no one would’ve ever been able to decode my secret crushes.

Optional Ideas for Expansion

  • Add a “Search by date” function
  • Export selected entries to a readable .txt file
  • Add light/dark mode toggle for late-night journaling vibes

A Very Bad Fitness Day (With Lessons Included)

Brian’s fitness journal after a brain stroke

Today was—how shall I put this—an unqualified disaster.

It began badly and showed no interest in improving. When I woke up, it was literally freezing outside, and I spent the entire morning dreading my usual run. Cold has a way of turning motivation into theoretical knowledge.

Before even getting to the run, I failed at completing my planned number of dips and leg lifts. That’s usually a sign that I’ve hit my current limit. Not “I’m lazy” failure—more “the muscles have voted and the motion did not pass” failure.

Sometimes my muscles simply don’t repair fast enough. Because of my kidney condition, I’m on protein restriction, which means muscle recovery takes longer than it does for the average man. I already space out resistance workouts by several days for this reason. Today was just not the day to push the number. I’ll try again next week. No drama—just biology.

Then came the plot twist.

My wife popped into the room and asked, very calmly, whether I needed to go to my nephrologist today.

Today?

Yes. Today.

Just like with my dentist appointment the other day, I had completely forgotten about it. I was convinced the appointment was tomorrow. My wife, working from home, had noticed that I was still very much at home when I shouldn’t have been.

This one felt bad.

Missing a nephrology appointment isn’t ideal, especially when you’re actively monitoring kidney disease. My wife had driven me to the lab a week earlier specifically to prep for this visit. If something were abnormal, the doctor would call early—but still, forgetting the appointment wasn’t okay. I immediately called the office and reached the answering machine, which did nothing for my guilt.

My wife looked worried. That part stung the most.

Logically, I knew that if there were serious lab abnormalities, the office would have contacted me already. Emotionally, I still felt like I’d dropped the ball—again. Clearly, I need a stronger system. The solution is probably simple: checking my calendar needs to become part of my morning phone routine, right alongside language lessons and weather checks.

And just to complete the full bingo card of disappointment: I also failed to hit my target running pace.

Cold weather and speed do not get along. At all. I finished the run, but not at the pace I wanted. At least Friday and Saturday should be less hostile—still cold, but no longer actively threatening.

So yes. Today was rough.

But days like this still teach something. I need to be better at:

  • respecting recovery limits
  • managing appointments
  • planning around cold weather
  • and keeping my systems tight when my brain decides to freelance

As always, the goal isn’t perfection.
It’s improvement—one repaired habit, one rescheduled appointment, and one tolerable run at a time.

Tomorrow gets another chance.

How to Build a Simple Python Chatbot (No AI Required!)

Day 27 of 100 Days Coding Challenge: Python

About a year ago, I was trying to get help from a state government website—you know, the kind that promises “24/7 assistance” via a chirpy chatbot. Except, instead of assistance, I got a face full of code errors. Repeatedly. The bot was supposed to reduce agent time, but apparently, it had decided to take a permanent coffee break. I asked nicely, refreshed, and even pleaded. Nothing. That little robot ghosted me.

Naturally, I got curious—how hard could it be to build a simple chatbot that actually responds? And here we are: this is not some ultra-sophisticated AI oracle; this is a humble, pre-AI chatbot. No deep learning, no fancy brain. Just old-school logic and a love for the “if-else” life.

Today’s Motivation / Challenge

Today’s challenge is nostalgic. We’re going back to a simpler time—before neural networks and hallucinating chatbots—when your digital assistant was more rule-follower than mind-reader. This project connects to that curious urge we all get when tech breaks: “Could I make something that works better than this?” Well, maybe. Today’s your chance to try.

Purpose of the Code (Object)

This code creates a chatbot that responds to common phrases using plain, predictable rules. It doesn’t learn, guess, or improvise. Instead, it listens for keywords and responds accordingly—like a polite robot butler who doesn’t like surprises.

AI Prompt

Build a rule-based chatbot in Python that recognizes user input using keyword matching and gives relevant responses about greetings, time, weather (simulated), jokes, and simple math. Add a fallback response for anything it doesn’t understand.

Functions & Features

  • Recognizes greetings, goodbyes, and help requests
  • Simulates a weather response (pure imagination)
  • Tells the current time using your system clock
  • Solves basic math expressions (like “What is 3 + 5?”)
  • Tells a (very polite) joke
  • Politely admits confusion when it doesn’t know what you said

Requirements / Setup

  • Python 3.x
    (No external libraries are needed—just plain Python)

Minimal Code Sample

if “time” in user_input:

    current_time = datetime.datetime.now().strftime(“%H:%M:%S”)

    return f”The current time is {current_time}.”

Checks if the user asked for the time and responds with the current system time.

Rule Based Chatbot

Notes / Lessons Learned

The first basic chatbot worked great. So naturally, I got ambitious. I layered on more logic, more keywords, and more “features.” That’s when it happened: chaos. The code refused to run. I suspected a directory issue—maybe I saved the file in the wrong place? Nope. The file was there. It was my code that was broken, all because of one sneaky extra quote at the end of a string.

Lesson? Python is picky about quotation marks—and for good reason. Mixing ” and ‘ or doubling up can cause a silent meltdown. Also, watch your syntax coloring. If your code suddenly lights up like a Christmas tree, it’s probably not because you’re a genius. It’s because something’s off.

Also, rule-based bots are loyal but very literal. Misspell one keyword—like typing “wether” instead of “weather”—and it freezes like a deer in headlights:

“Hmm… I’m not sure how to respond to that. Try saying ‘help’.”

Still, there’s something rewarding about building a little machine that answers you. In fact, I’m now dreaming of creating a text-based adventure game where the chatbot acts as the narrator and dungeon master. Primitive? Yes. Promising? Absolutely.

Optional Ideas for Expansion

  • Add real weather data using an API like OpenWeatherMap
  • Allow fuzzy matching so it understands similar words or typos
  • Turn it into a text-based game with branching dialogue

Passwords, Please: Why Your Cat’s Name Isn’t Good Enough

Day 26 of 100 Days Coding Challenge: Python

As someone who is doing accounting for a living—and not just the easy kind, mind you, but the multi-state, bank-reporting, ERP-wrangling kind—I juggle more passwords than a magician with trust issues. At last count, I had around near 20 different passwords scattered across platforms like SAP, Microsoft, banks, state websites, and yes, even the mysterious beast that is Windows.

Now, an ERP system like SAP doesn’t mess around. It demands long, complex passwords that look like someone accidentally fell asleep on the keyboard. So, I figured—if I can understand how these systems judge password strength, maybe I can outsmart them. Or at least, use the same logic to fortify my Amazon or bank logins. I mean, no one’s hacked me (yet), but why wait for disaster when I can beat the bots at their own game? Today’s mission: test the strength of my passwords using Python. Because if I can calculate depreciation schedules, I can definitely calculate how weak “Fluffy2021!” really is.

Today’s Motivation / Challenge

Let’s face it—most of us are one sticky note away from giving up on remembering our passwords. That’s what makes today’s project kind of brilliant: instead of memorizing 27 variations of “qwerty123!”, we’re learning to evaluate passwords for strength. It’s a practical tool with just enough spy-movie flair to feel exciting. Plus, there’s something satisfying about making a program that judges your passwords before a hacker does.

Purpose of the Code (Object)

This simple program acts like a personal password bouncer. You hand it a password, and it tells you whether it’s weak, moderate, or strong. It does this by checking for things like length, numbers, special characters, and uppercase letters—basically the same stuff most secure systems look for, minus the scolding tone.

AI Prompt:

Create a Python program that evaluates password strength based on length, use of uppercase and lowercase letters, digits, and special characters. Return a score and give user-friendly feedback.

Functions & Features

  • Checks password length and gives points accordingly
  • Evaluates if you used uppercase + lowercase letters
  • Looks for numbers and special characters
  • Provides a strength rating: Weak, Moderate, or Strong
  • Offers suggestions to improve your password

Requirements / Setup

You’ll need:

Python 3.x

No extra libraries needed. Just plug and play.

Minimal Code Sample

import re

def check_strength(pwd):

    score = 0

    if len(pwd) >= 12: score += 2

    if re.search(r'[A-Z]’, pwd) and re.search(r'[a-z]’, pwd): score += 1

    if re.search(r’\d’, pwd): score += 1

    if re.search(r'[!@#$%^&*]’, pwd): score += 1

    return score

This snippet scores a password based on length and character variety.

Password Checker GUI

Notes / Lessons Learned

The program was surprisingly easy to write—and even easier to obsess over. It’s just a few if-else checks and a running score tally, but the real fun starts when you feed in your actual passwords. I tried mine. Every single one came back as “Moderate.” Not “Weak,” which was a relief, but not “Strong” either. Apparently, I’m living in the password middle class. Turns out, all I need is a few more letters or symbols to boost my score. So maybe it’s time to retire “Fluffy2021!” and embrace something like “S@pTaxQueen2025.” Catchy, no?

Optional Ideas for Expansion

  • Add a live strength meter (green/yellow/red bar) using Tkinter for a GUI
  • Store password feedback history in a CSV for tracking

Ending It Nearly Completed All Tasks With Time Management Skills

Brian’s fitness journal after a brain stroke

Today, I forced myself out of bed—feeling surprisingly rested and recovered—but immediately remembered one inconvenient truth: it was cold. Very cold. Cold enough to make running sound like a poor life choice. Still, I started my day on time.

I checked the weather app and plotted the optimal moment for my run like a general preparing for battle. Cold-weather gear would be required, but I could afford to wait a bit for marginally better conditions. Unfortunately, waiting too long wasn’t an option—I had a long list of chores left over from yesterday.

Thanksgiving 2025 was a genuinely lovely family gathering. The food was excellent. The company was even better. But holidays have a way of borrowing time from the future, and today was the repayment day. With a full slate of chores waiting, time management suddenly mattered a lot.

Despite my worry that I’d overworked the evening after returning from my sister’s house yesterday, I managed to power through. As soon as we got home, I transferred clothes from the washer to the dryer, then went upstairs to finish the dishes while the kombucha water boiled. Multitasking isn’t glamorous, but it’s effective.

Once those tasks were underway, I checked the dryer timer and realized I had just enough time to eat a piece of leftover pizza before the next wave of responsibilities arrived. On days like this, I have to work systematically—doing the task that fits into the gaps while something else runs in the background.

When the laundry finished, I folded and put away everything except the sheets. Those had twisted themselves into an impressive knot and hadn’t fully dried, so they earned another spin in the dryer and a postponement until tomorrow. At that point, the sheer volume of tasks was starting to feel heavy.

By the time I finally stopped moving, I was completely exhausted and very ready for sleep.

My Time Management Method

To manage days like this, I rely on task chains—doing one thing that naturally leads to the next—so I don’t have to hold everything in my head at once. These are coping strategies I’ve learned since my brain stroke. When your brain has been injured, remembering things isn’t automatic. Systems matter.

Out of curiosity, I checked on my wife. She’s been off since Wednesday and will be until the end of the week, which usually means more chores—not fewer. But she had already completed most of her tasks yesterday, knowing how packed the week before our family gathering had been. Planning ahead: her specialty.

I’m still working on my time-management skills. But today, I got most of what needed to be done—and that’s good enough. The rest can wait until tomorrow. Progress doesn’t always look energetic.
Sometimes it looks like finishing the day tired—and still satisfied.

Shrink Me, Baby, One More Time

Day 25 of 100 Days Coding Challenges: Python

When I post a blog, there’s always that option to clean up the slug and make the URL look like it spent a summer at finishing school. I’ve done it occasionally—shortened a few links here and there like trimming bangs on a whim—but I never committed. I wasn’t sure if it really made a difference, or if I was just breaking up with my beautifully descriptive blog titles for no good reason.

But here’s the thing: shorter URLs are easier to share, easier to remember, and—let’s be honest—they just look more confident. Like a blog post that walks into a party and knows exactly where the snacks are. How about I create my own Python URL shortener script?

So I stopped overthinking and built a Python script to handle URL shortening. It’s a humble subroutine for now, but it could easily become part of a larger “Blog Publishing Flow”—one that’s as sleek as my ambition to automate everything, including procrastination.

Today’s Motivation / Challenge

Ever copy-paste a long blog URL into a text, only to watch it stretch across the entire message like it’s trying to steal the spotlight? Me too. Today’s challenge was about making my blog links compact and elegant—like a haiku for URLs. Plus, I wanted a reusable, no-fuss script I could tuck into my content workflow.

Purpose of the Code (Object)

This little Python script takes a long URL and turns it into a neat, short version using the TinyURL service. It’s a great way to tidy up links before sharing them on social media, email newsletters, or in text messages to your less tech-savvy relatives who panic when they see a string with too many slashes.

AI Prompt:

Create a Python script to clean up my URL code.

Functions & Features

  • Takes any valid URL and returns a shortened version
  • Uses the TinyURL API (via pyshorteners) to handle the shortening
  • Simple enough to run as a subroutine in a larger automation flow

Requirements / Setup

pip install pyshorteners

Works on Python 3.6 and above.

Minimal Code Sample

import pyshorteners

def shorten_url(long_url):

    return pyshorteners.Shortener().tinyurl.short(long_url)

# Example usage:

print(shorten_url(“https://yourblog.com/very/long/descriptive/link”))

This function takes your long-winded link and trims it into something social-media-ready.

Console URL Shortener

Notes / Lessons Learned

I tested it using one of my husband’s blog posts:
https://kaizennekoproject.com/the-case-of-the-missing-kilometers-a-summer-running-mystery/
It transformed into:
https://tinyurl.com/2y8vt6v5

Yes, it’s shorter—but now I can’t immediately tell what the post is about: running, whether rue crime; or a mileage-based ghost story.

And then the SEO question popped into my head like a banner ad: Does a shorter link help me show up in search results? Spoiler: probably not—at least not when using a third-party shortener. I still have some investigating to do. But the code itself? It works. And sometimes, finishing something is more satisfying than overthinking it.

Optional Ideas for Expansion

  • Add a clipboard copy feature to automatically copy the short URL
  • Let users choose their shortener service (e.g., Bit.ly, is.gd)
  • Build a simple Tkinter GUI for those who like buttons more than typing

Thought Keeper: A GUI Journal App for Your Inner Monologue

Day 24 of 100 Days coding Challenge: Python

Growing up, I was that kid who scribbled thoughts into any notebook I could find—even the back of my math homework. Writing was my thing. But journaling? That felt too… reflective. It took a few years (and a few existential crises) before I warmed up to the idea.

Now, I journal every day—usually with pen and paper, in my own cryptic shorthand. No one’s supposed to read it (and frankly, no one could). But writing helps me think about how I think.

What motivates me, what annoys me, what I pretend not to care about but actually do. Today, I decided to take that analog habit and try building a digital version—my own daily Python journal app. Less ink smudging, more save buttons.

Today’s Motivation / Challenge

There’s something meditative about journaling—until you forget where you left your notebook… again. I wanted to create a simple desktop app that captures those thoughts without needing a physical page. The goal? Combine my love for writing with my desire to build something functional, cozy, and just retro enough to feel like a Windows 95 flashback.

Purpose of the Code (Object)

This little project creates a journal app with a user-friendly window where you can type your thoughts and click “Save” to store them. Each entry is saved in a file named by date, organized neatly in a folder. It even includes a menu bar—just like those old-school apps—with options to save or exit the program.

AI Prompt:

“Create a GUI journal app in Python using tkinter. Include a menu with Save and Exit options. Journal entries should be saved to a dated text file in a folder.”

Functions & Features

  • Opens a clean text window for writing your journal entry
  • Saves entries to a daily .txt file with a timestamp
  • Automatically organizes files in a journals/ folder
  • Includes a classic File menu with “Save Entry” and “Exit” options

Requirements / Setup

  • Python 3.x
  • No external libraries needed—just good ol’ tkinter (which comes with Python)

Minimal Code Sample

def save_entry():

    text = text_area.get(“1.0”, tk.END).strip()

    if text:

        with open(get_journal_filename(), “a”, encoding=”utf-8″) as file:

            file.write(f”\n[{datetime.now().strftime(‘%H:%M’)}]\n{text}\n”)

This function grabs the typed text and saves it with a timestamp to a dated file.

Python Encrypted Diary

Notes / Lessons Learned

I started with a no-frills version that ran in the terminal. It was basic—you hit “Enter” twice to save, which felt like submitting your soul to the void with no takebacks. Naturally, I couldn’t resist making a GUI. But my first try was a mystery: the “Save Entry” button vanished like my motivation on a Monday. Turns out, I’d set the window height too short (root.geometry(“500×400”)), hiding the button like a shy turtle. Bumping it up to 500×600 fixed it.

Then I got bold—scrapped the button and added a File menu like a proper ’90s app. “File > Save Entry” and “File > Exit” made it feel almost professional. While I still prefer scribbling on paper, this app could easily be adapted as a task logger or even a minimalist idea tracker. Plus, it was fun building something that looked like software from a time when dial-up internet still screamed.

Optional Ideas for Expansion

  • Add keyboard shortcuts (Ctrl+S to save, Ctrl+Q to quit)
  • Include a date-picker to view or edit past entries

Sore Quads, Smart Squats, and Rethinking My Training

Brian’s fitness journal after a brain stroke

I’ve been running for nearly a decade. A few years ago, I added resistance training. And yet—brace yourself—there’s one thing I somehow never did: leg strength training.

Yes, I run. A lot. I convinced myself that running was leg day. Turns out, that logic only works until it doesn’t—usually in the form of injury. Somewhere along the way, it finally clicked: runners also need resistance training for their legs.

My wife has known this all along.

She does resistance training six days a week, and she works her legs especially hard. Her reasoning is simple: cardio doesn’t fully train leg strength. Recently, she’s taken it even more seriously, and the results are obvious. Her legs are noticeably stronger than before.

So I made a decision.
I would join leg day—late, but sincere.

I introduced squats into my routine, and my quadriceps responded immediately by filing soreness reports. That’s how I know something new is happening. I do have to be careful, though. Once a week, I already run 10 kilometers, and our neighborhood is aggressively hilly. My legs aren’t exactly underworked.

Still, the soreness tells me something important: I’m using muscle fibers that running alone doesn’t reach. Whether increasing strength first will eventually improve my speed is still an open question—but early signs suggest I’m on the right path.

As with everything else, I’m introducing this change slowly. My kidney condition limits how much protein I can consume, so I can’t afford to destroy too many muscle fibers at once. At the same time, muscle growth requires some breakdown. Balancing those two realities is the real workout.

To stay honest, I track my biometrics using our scale—water percentage, protein, bone mass, muscle mass, weight—and I cross-check all of that with quarterly blood work. Numbers don’t lie, even when motivation does.

For now, the goal isn’t speed.
The goal is durability.

I’ll continue monitoring, adjusting, and easing leg exercises into my routine over the next few months. After nearly ten years of running, it seems only fair to finally give my legs the attention they deserve—outside of just asking them to carry me uphill.

How to Build a Python Email Validator (That Actually Catches Your Typos)

Day 23 of 100 Days Coding Challenge: Python

Today, I built a Python Email Validator, and this is why I got my inspiration.

A long time ago—back when dinosaurs roamed the earth and PDF forms were considered cutting-edge—I managed to sabotage my own job application by giving them the wrong email address. Not wrong like a typo. Wrong like “here’s someone else’s inbox, enjoy!” The form was printable, fillable, but still very much analog when it came to submitting. I only realized my blunder when I sat waiting for a reply that never came. Cue a long, awkward phone call to the admissions office where I had to prove I was me—without sounding like a scammer. They had to resend the link. I had to verify my identity. It was a whole saga. So today, I’ve decided to write a simple email validator. Nothing too fancy—no AI, no spam filters, just the basic “Is this an actual email address or did your cat walk across your keyboard?” kind of check.

Today’s Motivation / Challenge

Let’s be real: checking whether an email is valid feels like it should be automatic—and these days, it often is. But behind that little red warning that says “please enter a valid email” is a small, mighty piece of logic. Today’s project is about building that logic yourself, understanding how to spot a bad address before it sneaks into your system and causes a customer service meltdown. It’s a nod to every web form you’ve ever cursed at.

Purpose of the Code (Object)

This program checks whether the email address someone typed in looks like a real email. That’s it. No email is actually sent—just a quick format check to catch things like missing “@” symbols or suspiciously dot-less domains. It’s like a bouncer for your inbox: if you don’t look the part, you’re not getting in.

AI Prompt:

Write a simple email validation program in Python using regular expressions. The program should have a function that takes an email address and returns whether it is valid. Include a basic GUI using Tkinter where users can input their email and get immediate feedback.

Functions & Features

  • Accepts user input via a graphical interface
  • Validates email format using a regular expression
  • Provides instant feedback: “Valid” or “Invalid”
  • Friendly UI with no command line needed

Requirements / Setup

Python 3.x (Tkinter is included by default)

No pip installs needed!

Minimal Code Sample

import re

def is_valid_email(email):

    return re.match(r’^[\w\.-]+@[\w\.-]+\.\w+$’, email)

This function checks if the email follows the basic format: name@domain.extension

Python Email Validator GUI

Notes / Lessons Learned

I thought this code would be a tangled mess of symbols, but it’s surprisingly short and sweet. Here’s the kicker: when I typed xxxxx@mail.com instead of xxxxx@gmail.com, it still counted as valid. So did hello@whatever.io. But hello@gmail? Nope—no dot, no go. It turns out, this kind of validation only cares about structure. It doesn’t know or care whether the domain actually exists—it just wants to see an “@” followed by some dots in the right places. It’s like someone who judges whether a movie is good based only on the poster.

Optional Ideas for Expansion

  • Add a domain blacklist to reject shady or disposable email providers
  • Highlight formatting errors as you type (e.g., missing “@” or extra spaces)
  • Connect to an email verification API for real-time existence checks

Punkt Happens: A Throwback to Pre-AI Summarizing

Day 22 of 100 Days Coding Challenges: Python

I woke up today with a peculiar mission: build a text summarizer without relying on AI. Yes, I willingly traveled back in time—back to the days before ChatGPT could just nod and condense a thousand words into ten. Why? Curiosity, mostly. I wanted to know how the old-school extractive methods worked. Spoiler alert: they’re kind of charming in their own clunky way.

Did it work on the first try? Of course not. I wrestled with broken libraries, mysterious errors, and one particularly judgmental error message about “punkt_tab” that seemed to imply I should know what that is. I wrote one version, then another. Tried a different library. Threw a mini tantrum. Eventually, I ditched NLTK entirely, kicked open the spaCy door, and got a summarizer working. Is it perfect? Nope. Is it lovable in its quirky way? Absolutely.

Today’s Motivation / Challenge

You ever read something and think, “Wow, that could’ve been a tweet”? That’s the spirit behind today’s project. Summarizing text is a superpower—whether it’s for condensing long articles, making notes from journal entries, or just helping your brain cope with too much information. While AI can do it effortlessly now, building one from scratch is like learning to cook pasta before using a microwave: humbling but worthwhile.

Purpose of the Code (Object)

This code takes a chunk of text and extracts the most important sentences. Instead of “understanding” like AI, it just finds which words show up the most and grabs the sentences that use them. It’s a bit like highlighting the loudest parts of a conversation and calling it a summary—but hey, it kind of works.

AI Prompt:


“Write a Python program that summarizes text using classical NLP techniques. Do not use deep learning. Use word frequency and sentence scoring instead.”

Functions & Features

  • Tokenizes text into words and sentences
  • Removes common words like “the” and “is” (stopwords)
  • Scores sentences based on word importance
  • Extracts and returns the top N sentences as a summary

Requirements / Setup

pip install spacy  

python -m spacy download en_core_web_sm

Minimal Code Sample

python

CopyEdit

doc = nlp(text)

sentences = list(doc.sents)

word_freq = {word.text.lower(): word_freq.get(word.text.lower(), 0) + 1 for word in doc if not word.is_stop and not word.is_punct}

summary = ‘ ‘.join([sent.text for sent in heapq.nlargest(3, sentences, key=lambda s: sum(word_freq.get(w.text.lower(), 0) for w in s))])

This grabs the top 3 most important sentences using word frequency as a guide.

Spacy Text Summarizer GUI

Notes / Lessons Learned

Oh, the joys of punkt_tab. Today’s real adventure was less about Python logic and more about survival. The original plan was to use NLTK—but it had other ideas. It kept yelling at me about a missing “punkt_tab” resource, which sounded more like a 90s German punk band than a tokenizer. I redownloaded, wiped caches, and whispered sweet nothings to the command prompt. Nothing.

Eventually, I gave up and pulled in spaCy instead—and guess what? It just worked. Sometimes, letting go of the buggy route is the bravest choice. Along the way, I learned how to uninstall libraries cleanly, delete hidden cache folders, and even navigate the Windows file system like a seasoned hacker. It didn’t summarize exactly like a human or an LLM, but it got the job done. And now, I’m much more confident using Python from the command line. NotebookLM still wins at summarizing, but my little app gets a gold star for effort.

Optional Ideas for Expansion

  • Let the user choose how many sentences they want in the summary
  • Add a “read from file” button so you can summarize documents directly
  • Highlight the summary sentences in the original text to show what was picked