5 minutes
Hackbright Week 7: Projects Week 2
This is my Week 7 (week 2 of projects) wrap-up, starting with daily scrum stand-ups:
- Monday: Over the weekend I worked on route for searching and rendering results from Spotify Web API. Today, I am working to create a route for adding songs that have been returned from the search. No blockers.
- Tuesday: Yesterday, I put together the route for searching and adding songs. Today, I am working on rendering the playlist based on the songs I’ve added and setting up WebSockets for real-time playlist rendering. No blockers.
- Wednesday: Yesterday, I set up the WebSocket and got new songs to add when the playlist is rendered. Today, I will work on ensuring that the proper playlist is rendered based on the jukebox a user belongs to and also for the current state of the playlist to render when a user connects to the proper jukebox. No blockers.
- Thursday: Yesterday, I figured out how to sort users into groups of connections based on their jukebox, so when new songs are added, the jukebox is updated for only their users. I also ensured that the current version of the jukebox renders when a user joins a jukebox. Today, I’m adding the voting function to the jukeboxes. No blockers.
- Friday: Yesterday, I added the voting functions and I had it sync across all connections on the same jukeboxes. So, when a guest votes, it automatically updates the admin view with the new vote total. Today, I am working through some bugs in the voting and then getting ready to set up some tests. This could involve refactoring some of my code as I create unit tests. No blockers.
- Saturday: I was extremely frustrated with some bugs I overcame Friday, so I did not do any major work on my project. I did a small amount of refactoring on my WebSockets.
- Sunday: On Friday, I worked out the bugs in the voting, however I did not get a chance to begin the testing process. Today, I will work on the refactoring and setting up testing. No blockers.
For accomplishments this week, I have two to report. The first was getting through all the documentations around WebSockets and implementing them in my project. This was not something we covered in class and as with everything in software, there is more than one way to use WebSockets with Flask. After doing the research and going through the various plugin options out there, I’ve chosen to use a Tornado container for my WSGI Flask web app. I felt comfortable with the documentation available for this option and frankly it was the option that I understood the best. We’ve been told that software engineers are opinionated and I’m starting to see that now. That being said, I’m working on keeping an open-mind and getting as much exposure as possible to new technologies. My second accomplishment this week also involves WebSockets. One of the things I was solving for was ensuring that everyone in the same jukebox had the exact same playlist showing at all times. I broke this down into two ideas (1) whenever a user adds a new song to the jukebox, all other participants would receive the same update and (2) when a new participant joined, they would get the most recent playlist loaded for them. So, I went out and did some research on sending messages to all the sockets that were currently open. One of the solutions I encountered involved adding all open connections to a set and then sending out messages to all connections currently in this set. This was very helpful, however, I did not want all users to be in a single gigantic set, since each user should only get updates on the jukebox they belonged to. So, I built on the idea of this solution by creating a dictionary that stored sets of connections based on their jukebox id and updates were only sent to their respective jukeboxes. In retrospect, this is a very simple solution, but I am proud of it because it combined something I found and something I came up with that fit the specifications of my work.
Some things that I struggled with this week include coping with “unveiling my bugs” and dealing with the fact that progress on my project is slowing down. One of the things I began this weekend and am continuing today is putting together tests and refactoring some of my code. The problem with testing and refactoring is that the process forces me to face all the bugs that are beneath the surface of each of my features and all the edge cases that trigger these bugs. It’s been frustrating overcoming the feeling that I was breaking something that “worked”, however, I recognize that it didn’t work well to begin with, so it was important to iterate. This leads to the second struggle I am having, which is the slowdown in progress. When I am ironing out these wrinkles, it doesn’t feel like I am progressing because I am not building new things. That being said, I recognize that this is a very fundamental and important aspect of the work, so I keep this in mind as I work through all of my current features and prepare for adding new features throughout this week.
Thanks for reading and following along with the progress of my project! On to week 8! 🎆