Thursday, March 21, 2024

Week 12 Report

 CST 338 Week 4 Learning Journal

I worked with Guillermo Zendejas and Edward Torres on this task.

I first read the instructions and then commented on the methods with JavaDoc style comments to explain them. Then, I begin completing each method one by one, until they are all finished. Afterwards, I complete any debugging in tandem with running unit tests to assert correct functionality. Then I will polish the program for maximum readability.

Eddie starts similarly to me, with many todo’s inserted on initial coding. Eddie simply starts typing right away, until he encounters a problem upon which he will take a break and either research and/or think about it on paper. For Guillermo, he codes the methods one at a time. Guillermo does a rough mental plan in his mind and then begins writing the methods. Guillermo will also keep in mind what the unit tests require as he is coding, which is a good strategy.

I would experiment next time by running unit tests earlier during program completion, rather than after it is all written. This can help both with assignment completion and project functionality.

My program follows the Google Java Style Guide well, with no notable violations of the guidelines.

Monday, March 18, 2024

Week 11 Report

 CST 338 Week 3 Learning Journal

Jotto Code Review 

    I worked with Victoria Ramirez and Ichiro Miyasato. The feedback I received indicated to me that I missed a small opportunity to keep the game going by offering the player the option to update the wordlist when words are run out of, as my program is coded they must go to the main menu to do that. Another small improvement is to include the proper score sum output when the player guesses the correct word, rather than only including it in the menu.

    The improvements I would make to my code include updating the program so that the player has the option to add more words when they run out and try to play a round, rather than having to do it from the other option in the main menu. To be honest, the only unit test that I had trouble with was getLetterCount(), but it was only because of the need to capitalize the input in the method in addition to doing so in the game round process. It was easy to fix.

    The clearest improvement that could be made to the getLetterCount() test is one of two options: remove the capitalized GRAPE word that is tested, or include in the Jotto instructions to capitalize the passed in String value at the beginning of the method definition. This is sincerely nitpicking though since the unit tests are overall well designed and appropriate.

    I only struggled a bit with understanding the different variables, for example in differentiating the local “score” variable in guess() and the global “score” variable in the class fields. I think this could be improved in the future by changing the global variable to be named “final_score” and the local variable “round_score”. Also, learning how to work with File and StringBuilder objects was cool.

qVictoria struggled with IntelliJ, specifically her Gradle tool kept bugging out. She was being gatekept by the compiler, it seems. We are still looking for a proper solution, I am sure we will find it eventually. With the Jotto program, we had similar struggles, mostly being confused by the overlapping score variable. She also struggled with coding getLetterCount(), but was able to solve it with focus.

     I am most proud of the fact that I was able to put all the code together and then most of the tests passed afterwards, which in retrospect is potentially a foolish way to complete similar assignments since test driven development should involve continuous testing rather than coding marathons in between testing. I look forward to implementing more stops and testing in between coding in future projects.

Saturday, March 9, 2024

Week 10 Report

     For this week of CS online in CST 338, we got to work with developing a small text based game named Jotto guess. The unit tests were all straight forward and easy to pass, with a small exception being the tear down test issue that Dr. C had let us know about occurring in windows machines (now I am curious what percent of the course students are using windows vs mac). There was a unit test that also expected getletterCount() to lower case the input which was not mentioned in the instructions, so I went ahead and fixed it after most of the program was complete. I am frankly most proud of simply getting the program finished way ahead of schedule. I had it complete at least a week ahead, which is exactly how my die hard Type-A mind likes it. All prophecies of immeasurable ambition aside, I thought the program was a cool challenge for us to learn Jotto, File, scanner, and array list methods. I think if the program was in C++ we would have finished it much faster since we are comfortable with that language more right now, however this is quickly shifting as we learn more about Java. I think within two weeks from now I may actually prefer Java.

    Looking through the new videos for week 2 now, I am hyped to train harder and become stronger as a programmer. In honor of Akira Toriyama I vow to become the software super saiyan

Tuesday, March 5, 2024

Week 9 Report

    This week is technically our first in CST 338: Software Design, a course for Java fundamentals and a good introduction for software engineering. Already I have learned a ridiculous amount of new knowledge, particularly about working with GitHub, IntelliJ, and Java classes. Our professor and TA are really cool, which makes the learning process easier. 

    For our first week, we completed several assignments including progress in CodingBat, which is to help us get comfortable with strings, arrays, hash maps and whatnot in Java. When it came to tackling the problems in CodingBat, I would briefly plan out the solution in my head into at least two steps and then write the beginning of each part in the compiler. For instance, in many of the problems I would generate variables and then get to the loop to complete the task. The problems were actually fun, they are like little puzzles. It would take me usually at least two tries to get the proper solution, though often I got it on the first thankfully. None of the problems were particularly frustrating, especially since we are just barely getting acquainted with Java. 

    We also got to learn about UML and Unit testing with Junit which looks like a great technique for software development. In test driven development, test coverage refers to what percent of the code in the program is covered by unit tests, and the more test coverage one can build, the better, usually. We got to put many of these skills to use in our full calorie homework, Jotto Guess, which is basically a mini project in Java for a text based word guessing game. I am grateful that we received quite a bit of starter code from Dr. C, because that was probably the more complicated code since it involved Unit testing and several instances of File objects being summoned with respective try catch blocks. The process for completing Jotto was rough at first, since there was much researching to be made regarding Java syntax, array list methods, and other fundamentals. My favorite part was actually creating the method getLetterCount(), which compares how similar two words are and returns a score for it. 

I am hyped for learning more about Java and software development in this course.