Kicking off a new 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-04-14 - 2025-04-20
📚 What I Studied
- Chapter(s) covered: 2, 3, 4
- Concepts I focused on: Lists, sets, and problem solving logic
- Challenges or problems attempted:
- All of the questions and problems at the end of each chapter
- Worked with ChatGPT to come up with Leetcode style problems to test my logic, such as:
- Finding repeatable streaks in a list of strings or numbers
- Determining if a list of numbers is mirrored
- Filtering a list based on a starting string
🧠 What I Learned
- Key takeaways:
- A
set()
in Python can store unique values when looping through a collection - A Tuple
(23, 14, 15)
is an immutable data type that is similar to a list, but cannot be modified - Slow down. Write the problem down. Try writing in English and sketching.
- A
🔁 Repeated Patterns or Skills Practiced
- Continuing to practice set logic and working with lists
- Using the
sorted()
function to ensure we don’t share duplicate values in a set - Thinking through how we compare weights by examining what is in a given set
⚔️ Challenges I Faced
-
Problem(s) that tripped me up:
- Determining if the list was mirrored or not.
- Getting frustrated by the logic questions and feeling dumb.
-
What I misunderstood at first:
- I didn’t think to split it by half instead of comparing the entire list.
- That I’m never going to get this.
-
How I solved or reframed it:
- Thought that checking the second half of the list would be a waste as that’s what we checked in the first half through our indexing
- Chatting with ChatGPT to break down the problems, slowly.
✅ Wins of the Week
- When I finally understood how the
find_dagger_pair
function was working by comparing the weights of the items in a set - Continuing to dedicate time to this and pushing through the discomfort
🔮 What’s Next
- Topics I plan to tackle next week:
- Chapter 5 and continuing to nail down the logic problems
- Goals for the next 7 days:
- Work on 2 logic problems per day
- Questions or curiosities I want to explore:
- How do I get better at these logic puzzles without getting frustrated?
🧾 Favorite Snippet of the Week
def find_dagger_pair(weights, limit):
seen = set()
for i, w in enumerate(weights):
complement = limit - w
if complement in seen:
return [complement, w]
else:
seen.add(w)
print("🛑 Finished searching. No two daggers found that add up to the limit.\n")
return None