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.
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
