Tuesday, November 19, 2024

CST 338 Week 4 - Project 1 Code Review Cont.

For this assignment, I worked with Alex Miller and Mathew Johann. My strategy was to tackle the easier methods first, saving the hardest method for last. This approach worked well for simpler parts of the project, such as the Book.java Shelf.java, and Reader.java files. Since these classes were straightforward, I felt comfortable jumping into the code right away. However, I realized this approach might not be ideal for more complex programs. After hearing their strategies, I learned that it's better to break down each task into smaller parts and tackle them one at a time. I really like the idea of creating diagrams and use cases to visualize how each method should function within the overall structure.

Reflecting on this experience, I recognize that my strategy was efficient for simpler code but could have been more organized and structured for complex projects. For future assignments, I plan to incorporate the strategy that I learned from this feedback by sketching out diagrams and use cases before coding. This will help me better understand the interconnections between different methods and anticipate potential issues early on.

My code largely followed the Google Java Style Guide, especially in terms of naming conventions and code structure. I also learned that certain style guide rules, like consistent indentation and spacing, can be automated, which would make it easier to maintain clean and readable code. I plan to explore these automation tools to ensure I consistently follow the style guidelines on future projects.

Monday, November 11, 2024

CST 338 Week 3 - Project 1 Code Review

We’ve been working on the Library Project for the past few weeks, and so far, so good! I can see that the assignments are gradually getting more challenging as the weeks go by, but it’s quite exciting. For this week, I did a code review with my teammate, and one suggestion I received was to add more comments to explain some of the methods. This would help make my code easier for others to understand. I feel that the methods in Book.java and Reader.java are fairly simple, so I didn’t add much explanation in the code, but I agree that it’s good practice to include some descriptions.

Using the auto-generate tool in IntelliJ for the equals() and hashCode() methods helped a lot, so those parts went smoothly. As I mentioned, the structure of Book.java and Reader.java was straightforward, and I didn’t face many challenges while working on those two files. The part I had to test multiple times was the toString() method, which required some adjustments to the output string format. However, this was also an easy fix. I always feel a sense of accomplishment when I see all the tests pass.


Tuesday, November 5, 2024

CST 338 Week 2 - Jotto

Throughout Week 1, I started working on the Jotto Guess game, focusing on implementing its basic structure. Although I haven't completed the entire program yet, working on it along with the lecture videos has been incredibly helpful in understanding each step. One challenge I encountered was handling file input, particularly when deciding on the best file methods to read lines from a text file. I experimented with several approaches to find the most effective one, which slowed my progress but also provided valuable insights into file-handling techniques in Java. This trial-and-error process was frustrating at times, yet it strengthened my understanding of file manipulation and error handling, key skills I’ll use frequently in future projects.

On the unit test side, the challenging part was creating input validation for user input by using a try-catch block. I still haven't fully implemented this yet, but the input validation requires careful attention to handling various edge cases, which has helped me practice with the try-catch block to manage exceptions effectively. Working on this has taught me the importance of thorough validation and error handling, especially in ensuring that a program can handle unexpected inputs smoothly.

Reflecting on Week 1, we covered UML diagrams and learned about JUnit tests, which I found to be incredibly valuable preparation for future projects. Translating UML diagrams into Java code helped me better visualize the structure of my program and map out its components in a logical way. Practicing with JUnit testing has been helpful for debugging and ensuring code quality. Although these concepts were relatively new, I enjoy debugging with JUnit, and help me write cleaner, more reliable code. 

CST 334 - Week 8

I spent most of my time reviewing the materials to get ready for the final exam. The final covers two big topics, concurrency and persistenc...