Posts

Showing posts from March, 2024

CST 338 Week 4 Reflection - Markov Code

Image
Markov Code Reflection Who did you work with? I worked with Guillermo and Luis. We met on Thursday this past week and assigned a person to review another person’s code.  My Markov Strategy I started by following the video to start the code during office hours. From there, I used the Markov Prompt to create the necessary methods and structured the code so that it would run and I could see the outcome of the MarkovTest. Next, I would identify the easiest test to pass and code those methods, making my way toward the methods that are more interdependent with other methods. If I get stuck on creating code, I move to pencil/paper to get some ideas down before going back to IntelliJ.  Team members' Markov Strategies Guillermo codes his method one at a time but first tries to visualize the functionality of the whole program. He looks for the first thing that needs to be done to make the program functional. He does not run the unit tests until all methods have been coded. From there, he deb

CST 338 - Week 3 Reflection - Jotto Code

Image
 Jotto Code Review This week, we were tasked with reviewing our group members' work on our code for Jotto. I worked with Luis Hernandez, Victoria Ramirez, and Guillermo Zendejas. We met as a group on Thursday to discuss Jotto and assigned each person to review another’s code. I reviewed Guillermo’s code and received feedback from Victoria. Team members worked with Victoria mentioned that all my tests passed and it was well put together when it comes to overall code and Javadocs. There were some comments that I forgot to delete before submitting. She mentioned that lines 190 to 196 and 206 to 224 can be removed to improve the clarity of the comments.  Improvements to Jotto The improvements I would make to the Jotto code would be to use an alternate method for obtaining a Jotto score in getLetterCount(). After reviewing Guillermo’s code, I realized that I could have used a HashMap to compare the words. I used a char array and a nested for loop to compare each character and another fo

CST 338 - Week 2 - HW01

Image
 For the past two weeks, we have been working on a various assignment that helped us become more comfortable with Java. Assignments consisted of Coding Bat assignments and a homework assignment titled Jotto.  For the Jotto homework assignment, we were given starter code and had to write code for methods that passed the given unit tests. The unit test that was the hardest to pass was pickWord() and getLetterCount(). The method pickWord() had some influence on other tests, which made it a vital unit test to pass. What challenged me about this method was deciding how to structure the code, so that it did exactly what I wanted. For the getLetterCount() method, I had trouble with checking for duplicate letters and adjusting the score as needed. I was able to get a score, but it included duplicates. After some research and attending office hours with Polina (she is awesome!), I came up with a piece of code that allowed me to adjust the score based on duplicate letters. Once this was complete

CST 338 - WK01HW02

Image
  CodingBat Reflection This week, we were given the task of completing the CodingBat challenges as two separate homework assignments. They were very helpful in learning the basics of Java. Some sections were fairly simple which others took way longer than they should have. It just shows how much practice I need with Java. I actually find it very similar to C++, with the difference being the syntax of some structures.  To solve the problems, I started out throwing code at it on how I thought the problem could be solved.  I used the error codes to fix my syntax error. Once I got the code to work, I looked to see if the tests passed.  If no tests passed, I wrote out a pseudocode version of a test and tired to get that one test to pass. This usually led to other tests passing as well. If I was stuck on a specific test and writing it out did not help, I copied and pasted the code into Intellij and tried to work it out from there. This was usually the last step that led to my success.  The s