Continuing a set of journal entries where I’m working through Automate the Boring Stuff with Python to strengthen my logic and programming skills. Been in management for close to 6 years now and I’m beginning to feel my logic skills atrophy. I’m hoping that by working through this book on a weekly basis while practicing Leetcode-style questions will help sharpen those skills to the point of where I was 5 years ago.
I plan to keep a log here and continue to learn in public. I’ll be tracking the progress this Github repo.
🗓️ Dates Covered:
- 2025-05-05 - 2025-05-09
📚 What I Studied
- Chapter(s) covered: 6
- Concepts I focused on: String manipulation, dictionary, and lists
- Challenges or problems attempted:
- Nested dictionary and list logic
- String normalization and matching
- Structured user input + CLI design
- Reading and writing JSON files
- Defensive programming (e.g. checking for valid categories)
- What I built:
- Search spells by name or description (case-insensitive)
- List spells by category with emoji decoration
- Remove spells by category and index
- Full JSON file persistence using
json.dump()
andjson.load()
🧠 What I Learned
- Key takeaways:
- Looping over dict.items() for nested access
- .lower().strip().title() for robust input handling
- Persisitence is key
- Defensive programming is important
🔁 Repeated Patterns or Skills Practiced
- Looping through dictionaries with key, value iterators in loops
- The importance of defensive coding while using
dict.get()
instead of directly accessing the key-value throughdict[key]
⚔️ Challenges I Faced
-
Problem(s) that tripped me up:
- Navigating nested dictionary/list structures while building the search tool
- Tracking where to validate user input for robustness
- Refactoring logic to avoid redundant checks or overwritten output
-
How I solved or reframed it:
- Log, log, log to the console to see what’s going on in my code
✅ Wins of the Week
- Completed a real, interactive Python project that feels like a tool, not a toy
- Rebooted my learning momentum after getting sick last week
🔮 What’s Next
- Add OpenAI integration to generate_description() (LLM description generation)
- Extend CLI with:
- Edit spell description
- Export all spells as a printable text file
- Categorize spells by power level (stretch)
- Start Chapter 8 (File I/O deep dive + structured formats)
- Continue light daily Leetcode-style problem solving
🧾 Favorite Snippet of the Week
def categorize_spells(spells):
categorized_spells = {}
for spell in spells:
spell_name, spell_category = spell.split(':')
spell_category = spell_category.strip().title()
categorized_spells.setdefault(spell_category, [])
categorized_spells[spell_category].append(spell_name)
categorized_spells[spell_category] = sorted(
categorized_spells[spell_category])
return categorized_spells