You are browsing as a guest. Sign up (or log in) to start making projects!

SeanBlitz

@SeanBlitz

Joined June 4th, 2026

  • 7Devlogs
  • 1Projects
  • 0Ships
  • 0Votes
Open comments for this post

2h 46m 36s logged

Fully debugged my Command Line Interface after moving everything into OOP.

Change twin logic variable call (it was supposed to call list index 0, but called 1) to solve linking issue for double delegate committees.

Fix relative imports by adding “.” to my init.py files. During this I learned a lot about how the python interpreter views files and locations.

Also separated responsibilities by splitting functions. Now, my libraries are no longer aware of each other, to allow for easier debug and changes later.

I will need to take out my business logic from the infrastructure and put it with my main files, to further separate responsibilties.

0
0
2
Open comments for this post

2h 49m 11s logged

Moved everything into Object Oriented Programming Classes

This included Gmail, Sheets, and Drive Functions. I will probably do the same for the other folders soon, but they are not connected.

I have yet to fully debug the command line interface, especially after these changes. Will do that soon.

0
0
2
Open comments for this post

1h 5m 6s logged

Continued debugging my command line interface and adding some necessary business features.

Previously a new committee was only checked against the main list of names. Now, it is split by type of committee to prevent switching between types.

Add ability to print suggestions to user if committee selections are double, advising them to change the other delegate in the same committee if needed.

Fix twin logic error and place code into more organized functions.

With this part of the debugging, I began to understand the importance of splitting all code into functions, and grouping those functions into classes. Previously, all my code was a rough draft minimum viable product designed to just get the job done. Now, with the need to edit things in the future and share with other developers in my team, I began to sort things into functions (which turn out to be amazingly useful and easy to debug). In the next update I might begin writing classes.

0
0
1
Open comments for this post

2h 21m 58s logged

Began debugging my command line interface code.

  1. Discover that the columns which referred to my Google Sheet were incorrect; fixed string in code.
  2. Bold print statements in terminal for readability, and fixed ANSI escape codes to properly clear the terminal.
  3. Fix iterator problems. Previously, there did not exist a global tracker variable, and since i reset after every while loop, the number stored to finalassignments dictionary was incorrect.
  4. Fix infinite looping in the while loop for edge cases where none of the conditions are satisfied. Now with a proper error statement and ending of loop.
  5. Added a continue statement to prevent code from pushing before the questionary interface has finished receiving all inputs.

Most of these errors were small bugs in the system, not major conceptual issues. However, I did learn how to use the VSCode debugging feature while going through this, as it is a program that is easy to set breakpoints in and analyze variables.

0
0
3
Open comments for this post

4h 8m 45s logged

Finished making the Command Line Interface. It checks for availability whenever the user inputs assignments in the questionary interface using sets. Stores all assignments in a dictionary, which is then converted into a cell map after the user finished all assignments. This cell map accurately recreates the cells that were pulled, except that used assignments now get blank cells. School assignments go into a separate sheet, where they are listed as “country name (committee name)”.

During this process I learned a lot about safely converting data between types, i.e. from dictionaries to lists to sets, and their respective advantages for later processing. For example, sets are great with the “in” keyword, which gives O(1) time complexity, an important feature when I expect datasets with 800+ values.

I also learned some intuitive strategies on improving code efficiency. Instead of writing multiple for loops, using tuples to do multiple jobs within one loop is usually much more efficient.

Converting the dictionary that contains {(“committee”, “country_name”): “sheet_coordinate”} into a dictionary with the sheet coordinate as the key and the value as committee and country name took some thought and studying into dictionary rules in python.

The function add_assignments_and_map_cells() took a lot of editing. What started as a simple questionary function that returns user inputs in a dictionary evolved into a full input-checker and cell mapper. I originally wanted the latter process to happen in the main code, but I discovered that the function had all necessary variables, and that it would be cleaner to simply pass back all the completed variables.

Also decided that pushes are inherently untrustworthy, because my data goes from Google Sheets into a dictionary into a cell map, and finally back to Google Sheets. Multiple edge cases and errors may be possible during this time. Implemented a basic checker at the very end to confirm against the counta() function built into the sheet.

Screenshot is not all; have yet to test the code for errors. Very excited to see this work! It used to take dozens of hours to complete, with plenty of human errors (especially double assignments), but with the loop pushing final values after every school and only operating within the list of possible assignments, many human errors are eliminated.

0
0
1

Followers

Loading…