Skip to main content

Debugging My Way Out of the Monster Mash

For this learning journal, I worked with Erin Hurley.

I started coding right away, using sticky notes to jot down ideas and keep track of important logic and structure. Interestingly, I began by working on the first and second child classes first—just to make sure I understood the requirements and structure—before going back to complete the Monster base class. This helped me get a clearer sense of how everything would connect. I approached the assignment step by step, focusing on writing modular, organized code and using print statements to help with debugging when needed. My notes helped me stay on track and adjust my approach as I built out each piece.

My classmate said they felt overwhelmed at first and accidentally opened a project within another, which caused issues. After getting advice from Polina, they focused on building the simplest functions first, since the complex ones relied on them. They didn’t plan on paper due to the structured nature of the assignment. They finished all the classes before running any tests, which they later realized made things harder. Reading the README and grading rubric after finishing led to last-minute fixes—but they took it all in stride.

If I were to redo the assignment, I would spend more time planning out the structure before jumping into the code. While starting with the child classes helped me get a feel for the task, I realized that fully understanding and setting up the Monster base class first would have made everything smoother. I’d also sketch out a rough class diagram or flow on paper to map relationships and avoid rewriting sections later. Overall, I’d aim for a more top-down approach with clearer planning upfront to save time and reduce trial and error.

My code followed the Google Java Style Guide fairly well. They noted that my indentation and naming conventions were consistent and readable. However, there were a few areas I could improve on, like spacing around operators or keeping line lengths shorter for readability. Overall, the feedback was positive, with minor suggestions for polishing.

The most challenging part was organizing the Monster base class in a way that all the child classes could extend it cleanly without running into conflicts or redundant code. It took some trial and error to get the right balance between abstract methods and shared logic. Managing method overrides and making sure each child class had the proper behaviors—without repeating too much—was tricky at first. Once I got the structure down, everything started to fall into place, but getting there required some careful thinking and refactoring.

The most interesting part was seeing how each child class could take the base class structure and behave differently through overridden methods. It really showed the power of inheritance and polymorphism in a practical way, and it was satisfying to test and see the different monster behaviors come to life.

I’m most proud of how clean and modular my code ended up. Even though there were some bumps along the way, I managed to make each class readable, reusable, and easy to test. Debugging became much easier once the structure was solid, and the logic flowed nicely between the classes.

After submitting the assignment, I treated myself to a good cup of coffee and relaxed with a Netflix series. It was a small celebration, but it felt well-deserved after balancing school and work.

Comments

Popular posts from this blog

CST383: Learning Probability Distributions and Data Visualization in Python

This week, I learned more about probability distributions, density plots, histograms, and how to visualize data using Python libraries such as Pandas, Matplotlib, Seaborn, and SciPy. I practiced creating density plots, box plots, cumulative density plots, and histograms using real datasets. I also learned how changing things like bin width, bandwidth, transparency, and sample size can affect the appearance and interpretation of graphs. Another important topic was understanding skewness and how transformations such as log10 can help make heavily skewed data easier to analyze. One thing I found interesting was how probability density functions (PDFs) and histograms can represent the same data differently. Before this week, I thought graphs mostly showed the same information in different styles, but now I understand that each type of plot has a different purpose and can make patterns easier or harder to notice. I also learned that larger sample sizes tend to reflect the true distribution...

Choosing Between MongoDB and MySQL

This week I learned more about how MongoDB and MySQL are both powerful tools for managing data, but they serve different purposes. MySQL is a relational database that organizes data into tables with rows and columns. It uses SQL (Structured Query Language) to define and manage data, which makes it very structured and reliable. MongoDB, on the other hand, is a NoSQL database that stores data as documents in a flexible JSON-like format . It does not require a fixed schema, so it is easier to change or add new data types as needed. Both databases are similar because they can handle large amounts of data, support indexing for faster searches, and allow users to perform queries to get specific information. They are also widely used in modern applications and can be connected to programming languages like Java, Python, or C++. However, the key difference is how they store and organize data. MySQL is best when data has clear relationships, such as in school systems, banking, or employee ...

CST383 Week 1: Python for Data Science

This week, I learned the basics of Python for data science and how tools like NumPy are used. I already have programming experience from my computer science classes, but Python feels different from languages like Java or C++. It is easier to write and more flexible because it does not require strict data types. This makes coding faster, but I also need to be careful to avoid mistakes. We also learned about the Python data science ecosystem, such as NumPy, Pandas, and tools like Google Colab and Jupyter Notebook. I liked using Google Colab because it is simple and runs in the browser, so I don’t need to install anything. However, I am curious when it is better to use local tools like Spyder or Jupyter instead of Colab. The most important concept for me this week was NumPy. I learned that NumPy arrays are much faster than Python lists because they store data in a continuous block of memory and use the same data type. This connects to what I learned in my algorithms class, where performan...