Tuesday, March 26, 2024

CST 338 - Week 4

 Markov Review

1. I worked with Maria I. and Chris T.

2. My strategy for solving the Markov assignment was just a dive-straight-in approach. I didn't do much planning and instead just went down the list of prompts and implemented the different methods as I went.

3. Both my teammates had a more strategic approach to solving Markov by ensuring tests passed one by one or by solving methods that other methods were dependent on first.

4. In the future, I'll probably try to take more time understanding what each function does before writing them. There were a few times where I confused myself due to misunderstanding of how the different methods connected.

5. According to my classmates, my code did seem to follow Java style guidelines overall.

Tuesday, March 19, 2024

CST 338 - Week 3

Jotto Code Review 

1.       For this review, I reviewed Brandon H and Chris T’s codes. My code is meant to be reviewed by Ryan M and Maria I.

2.      I received some feedback about my comments being more descriptive. For example, at the beginning of my code, explaining what Jotto is and how it’s meant to work. This is definitely something I’ve always needed work on as I have a tendency to leave out comments completely.

3.      I will definitely be making more thorough comments on future assignments. Another thing I noticed for myself as I looked through other people’s codes, was that I sometimes do the error-checking inside a method instead of before it is called, which just shows that I need to slow down and read the prompt thoroughly before working through the algorithms.

4.      Nobody seemed to struggle with a specific unit test, but more so just getting used to the JUnit style of unit testing in the first place and how to connect stubs of code in order to be able to pass tests as a whole. If I had to choose a specific test, it seems that the most challenging was getLetterCount and working out how to account for doubles.

5.      The existing tests could be improved. At one point during the process of developing my code, I was passing all of the unit tests, however I had a bug that was causing a runtime exception when entering a 5-letter guess, so sometimes the code would break even though the tests implied that it was correct.

6.      My biggest struggle during this assignment was tailoring my code to the prompt. I’ve done my share of larger projects, but they’ve been generally open-ended, so I’ve been able to connect and name different methods and I saw fit. Adjusting my flow to follow the prompts and getting used to how this type of unit testing works was definitely the hardest part of this assignment for me.

7.      It seemed that most people on my team, like myself, struggled to stay aligned with the directions. I think being able to adapt to someone else’s plan of action will be invaluable moving forward, but it is definitely a skill that needs to be practiced. This was especially challenging for this assignment as it’s the first full-calorie homework and we are still getting used to Dr. C’s style.

8.     I know it’s required, but I think I’m most proud of figuring out how to run/assess the individual unit tests. I struggle with change, and I do a lot of debugging using print strings (inefficient, I know), so being able to understand what’s going on in the unit tests and also how to use them to my advantage was a win for me.

Tuesday, March 12, 2024

CST 338 - Week 2

 Jotto

For this week, we spent the majority of the time working on Jotto and related assignments. The hardest part of this project was getting used to following someone else's organization. In previous classes, my assignments have all been generally open-ended in the sense that if you achieved the same final result, you were able to organize the project as you wished. Sometimes there were guidelines for specific functions, but how you implemented and called each method was completely up to you. I found myself reading and re-reading the instructions to understand what exactly I was meant to be doing with each step in this project. It will definitely take some practice for me to get confident with this type of setup.

The assignment in general wasn't too hard. The one issue I did have was with the unit test for showPlayerGuesses. I was passing it fine until I added the section regarding the player updating the wordList. I thought that the "press 'enter' to continue" was included at the end of each method, when it was instead intending to be part of the menu setup in play(). None of the other unit tests had checked for this, so I didn't figure out my mistake until I was testing this method. Once I figured that out, I solved the problem immediately and the program worked as intended. 

Overall, this assignment was great practice for me to get used to unit testing and debugging in Java/intelliJ. I had very minimal Java experience before this class, so these skills will prove valuable for me in the upcoming weeks.

Tuesday, March 5, 2024

CST 338 - Module 1

 CodingBat Challenges

For this module, Dr. C had us doing some coding challenges via CodingBat. This was my favorite part of the module as I love doing coding challenges and do them quite often in my free time. I've coded some Java in the past, but I've focused mainly on C++ and Python, so this was a good review for me. There weren't any challenges that I felt were difficult, but I did try to challenge myself to keep my solutions short and incorporated quite a few ternary operators. Another challenge for me was this "countCode" problem that was nicely solved with regular expressions. My original solution (without regex) worked, but certainly wasn't "nice", so I used the problem as an excuse to refresh on regular expressions and wrote a better solution.