It was another really bad week for me studying CS. 👎🏼 I think I studied for less than 5 hours which is the first time that’s happened in months. I had an abnormally social Friday, Saturday, and Sunday and didn’t study at all any of those days… I also spent a lot of time thinking about CodaKaizen and what I want to do with it. I came up with a new idea for where I’d like to take the program which I’m really excited about and which I’ll talk about at the end of this post. But, suffice it to say that between working on CK and everything else that came up this week, my focus was not on CS. I am still motivated to keep studying Python as I think it’s important for me to develop another skill I could use in one way or another in the future. In my mind, learning Python also has to do with CodaKaizen since my goal with the program is to help others become better, more competent versions of themselves and so, in my mind, I need to do the same thing with myself to lead by example. However, I’m also starting to think I should reallocate some of the time and energy I’ve been putting toward CS back to CodaKaizen. In any case, it wasn’t the most productive week for me on KA, but I still managed to learn some stuff, so I suppose it could have been worse.
Here are my notes on the few things I managed to get through on KA this week:
Unit 7 – Building Software with Classes
Lesson 3 – Class Design
Video – Object Equality


In this video, Kim talked about the double underscore method __eq__, (a.k.a. a “dunder” method). This method is used to check if certain and specific attributes are the same between objects. In the first screenshot above you can see that the queen1 and queen2 objects have the same/equal attributes, but because __eq__ isn’t used, Python is essentially just checking to see if the variable names are the same. (Actually, I think Python is probably checking to see if the variables names are pointing to the same memory address, but I could be wrong about that.) Since the names aren’t the same, Python doesn’t consider them equal.
In the second screenshot, you can see that the class Card includes __eq__ on lines 7-10. On line 18 you can see that Python is checking to see if queen1 (line 13) and black_queen (line 16) have equal attributes, and they don’t so the terminal prints “Cards are NOT equal.” However, at one point in the video, Kim compared queen1 and queen2 and since their attributes are the same, the terminal printed “Cards are equal!” due to __eq__.
Exercise – Special Methods
Question 1



Question 2




This exercise was pretty easy, although I did get a question wrong from misunderstanding what it was asking. The questions were surprisingly easy considering right before this I read/worked through an article that was a bit tricky for me to understand (which is partly why I didn’t make notes on it). In the article, I was a bit confused about the __st__ dunder method. However, when this method came up in the questions in this exercise, the solutions were super obvious. So, I’m glad to have done this exercise to get a bit of practice but also know that I need to use the dunder methods way more to get a better handle on them.
Article – Classes Style Guide




This article was helpful in giving me more clarity into the naming conventions used for different parts of Python syntax. I find it very helpful to have a better grasp on the notation because I find that it makes it easier way to understand what the syntax is denoting. (Which seems kind of obvious reading that sentence back. 😂) It also helps me to differentiate the terms and syntax used from each other.
Video – Program Design: Course Enrollment





In this video, Kim worked through writing a program that was used to enrol and unenrol students to different university courses. I decided to write the code along with her which was helpful for me to better understand what was going on. In main.py I wrote:
import course
import registrar
journalism = course.Course(“Journalism”, “Dr. Jones”, 22)
for student in registrar.students:
journalism.enroll(student)
print(journalism)
for student in registrar.students:
journalism.unenroll(student)
print(journalism)
And in course.py I wrote:
class Course:
“””A course tracks student enrollment within a fixed capacity.”””
def __init__(self, title, instructor, capacity):
self.title = title
self.instructor = instructor
self.capacity = capacity
self.roster = []
def __str__(self):
enrollment = f”({len(self.roster)}/{self.capacity})”
return f”{self.title}, {self.instructor} {enrollment} “
def enroll(self, name):
“””Registers student if spots are available”””
if self.is_full() or name in self.roster:
return
self.roster.append(name)
def unenroll (self, name):
“””Removes student from the course, if enrolled.”””
if name not in self.roster:
return
self.roster.remove(name)
def is_full(self):
“””Returns True if the course is at capacity”””
return len(self.roster) >= self.capacity
In registrar.py there was a list of 50 names which I got Gemini to make for me. Overall, I found this video very helpful to watch and work through. It helped me get a better idea of how objects work and how each object had its own internal attributes and methods.
And that (unfortunately) was it for this week… Like I said, definitely not one of my better weeks, but I do feel like I made some progress. I mentioned the last two weeks that I wanted to try and study for four hours every day which I definitely fell short of this time, and now I’m wondering if four hours a day is realistic. In the past few weeks, I’ve also been thinking that I to write more. I’m wondering if it would be best to only try and commit an hour to writing and coding each day. I’m not certain if this is this will be my new plan of attack going forward, but it’s something I’m thinking about. And even though this week wasn’t the most productive, the silver lining is that I think I have finally figured out the right direction to take CodaKaizen!
For the past two months, I haven’t been trying to get new clients signed up to CodaKaizen. The two people I was doing CK with both finished around May and since then I haven’t been looking for new clients. I’ve always known that I want to work with kids but I also thought that CK was better suited for people in their late twenties and early thirties. However, I’ve started thinking that it might make sense to set CodaKaizen up as a program for kids in Grade 12 going to university in the fall. It could be a bridge program that helps kids develop the life skills they need in order to function well and independently in their first year of university. I’m thinking the program could span their last semester of high school and first semester of university which would give them a chance to practice CK while at home and then keep the momentum going when in their first semester of university. There’s more to this idea than that, but I’ll wait until I have the idea fleshed out a bit more before I go into to more detail. That said, I’m pretty fired up about this new idea and am going to spending a decent amount of time this coming week trying to think it through and figure out a good plan of attack for how I can execute it.
So, as always, fingers crossed that I can have a productive week across all the different ideas and things I’m working on so I can come back next week with some good news! 🤞🏼