Introduction
Well, this is it. My final blog for DPS909. What a journey this has been. Not only did I get the chance to develop my own open source project, but I got the opportunity to interact with several open source projects and commit to working on them. This is one of the few courses I had this semester where it truly felt like what I was working on mattered, and I am forever thankful. For this final release, I was tasked with working on another open source project. There were several option of what I could do, but after looking through my options I decided to go with fixing a family of bugs on an open source project I've worked on before. That open source project is wordlecheat, and here's the link to its repo:
https://github.com/bodonovan/wordle_cheat
Why this project?
I choose to work on this project again for a couple of reasons. For one, the project was just really interesting to me and I wanted to learn more about it. Another reason is there were a couple of bug related issues on the repo that needed to be worked on, and I wanted to help with it as much as I can. Finally, my previous interactions with the repo manager have been quite nice, and I even introduced him to hacktoberfest. One more reason is this was the only person to get back to me of all the repos I contacted. My last blog post details that due to time constraints and personal things in my life I was not able to work on the desired project I wanted, since the repo managers never responded to me. So this, while not being as challenging, is still a project to dedicate my effort to.
A quick recap
If you don't know already, wordlecheat is a project that allows you to "cheat" at the game wordle. Wordle is a game where you need to guess a 5 letter word by entering letters. If you're wrong, the game will give you hints about your letters each turn. The game can either tell you you guessed the right letter in the right spot, the letter is in the word but not in the spot you guessed, or the letter isn't in the puzzle at all. Below is an example of a worlde game:
In this example, each guess gives more hints as to what the word is. A green letter means the letter is in the right spot, a yellow letter means it's somewhere in the puzzle but not on that spot, and a grey letter means it's not in the puzzle at all. This project allows you to cheat at this game by logging your progress and searching through a large dictionary of 5 letter words, like so:
My first issue that I worked on all the way back in October for this project was to simply find a new dictionary, since the previous one didn't have enough 5 letter words in it. For this release, I decided to delve into the source code and try to tackle as many bugs as I could, and here I will go over them.
Issue 1
https://github.com/bodonovan/wordle_cheat/issues/2
For this issue, I was tasked to fix a bug that made the "in" button not handle duplicate letters properly. The in button is meant to track letters that are in the word but not in the position the user guessed, for example if I the position was 2-A then the program would filter for words that have an A in them, but not in the second position. However, if you entered the same position letter combo multiple times it would log multiple times, which was unnecessary. For my fix, I had to look through the source code and understand where the in button was being tracked and adding letters. Once I found it, I added a check to see if it was already stored in the list. Finally, it would print out an error message if the user tried to do the same combo multiple times, and the error message had the same style as the rest of the code.
# add a rule that a letter appears in the target word, but not in the specified position
def add_in_letter(letter, posn):
posn = int(posn)
if letter in in_letters:
# only add the position if it's not already in the list
if posn not in in_letters[letter]:
in_letters[letter].append(posn)
else:
print("Same letter and position so ignore")
else:
in_letters[letter] = [posn]
add_rules_to_hist()
Finding and trying to understand this bug is what made this issue difficult, but once I figured it out it seemed pretty simple. I made a pull request but as of writing this blog it has not been merged yet. I'm not too worried though since the repo manager is usually slow to respond anyway.
https://github.com/bodonovan/wordle_cheat/pull/8
Issue 2
For this issue, I needed to fix a bug that caused the input field for letter to not be focused. At first I didn't understand what this meant, but after some research I found out the letter field would not be selected upon starting the program, so the user would have to manually click on it each time, which was inconvenient. In order to fix this bug, I had to understand how the window was created and the input fields were generated. It took some research but I was able to make the input field focused so the user does not need to click on the letter input every time. Once I made a pull request for this issue, it actually did get merged which I'm glad for.
https://github.com/bodonovan/wordle_cheat/pull/9
Interacting with the community
At first I was nervous interacting with the repo manager as it seemed they weren't maintaining the project anymore. But after simply asking them for permission to touch up on the remaining bugs in their project, he allowed it and was even happy to see me continuing his project. They are a bit slow to respond to my questions but I appreciate them nonetheless because they gave me the opportunity to work on a really interesting project. (I even use the program to cheat at a few games of wordle myself!)
Conclusion
In conclusion, this project and this whole course for this matter has taught me so much about working on open source projects. I'll be able to say that I've contributed to these projects on my resume and it'll help me get a good career in the future, since open source projects are becoming more and more popular. Thank you for joining me in this journey, as this will be my final blog for this course. Peace!
Top comments (0)