Posts

Showing posts from March, 2024

Week 4

For this week, one of my assignments was to reflect on completing my Markov program, and compare my reflections to those of my teammates. Who did you work with? You can work with up to three people For this exercise, Luis Hernandez and Edward Torres. What was your strategy for solving the Markov assignment? Did you start writing code right away? Did you plan it out on paper? I typically read the instructions in the prompt first to get a mental picture of how the program should work, and how the different parts of it interact. I also reviewed the lab video since I couldn't attend the session live. When reading through the prompt, the driver file, and the test file, I also try to identify which methods or classes need to be written first. I usually choose to implement methods that don't depend on others first. Depending on how the tests are written (if the methods or classes are too dependent on each other), I often wait until the end to run the test file. The interdependency can

Week 3: Jotto Code Review

Below are some thoughts regarding last week's Jotto assignment and code review: I worked with Luis Hernandez (I reviewed his code) and Edward Torres (he reviewed my code). Edward mentioned my code was well written and organized. Only suggestion was to include a header with comments at the beginning of the file. He mentioned he liked the way I used a hashmap for the getLetterCount method instead of a for loop. I would add more comments at the beginning. Also, I would rewrite some of the variable and method names so that less documentation is needed to explain what they hold/do. The hardest to pass was getLetterCount, but mostly because I didn’t notice the test was testing a word with capital letters (I was handling this elsewhere in the code). Looks like there needs to be a test for the guess() and play() methods. Between the two of them, they handle a lot of important functionality (or at least direct a lot of it). I wouldn’t say I struggled the most with understanding the expected

Week 2: Reflections on HW 1 and Other Assignments

 This week I finished Homework 1: Jotto. The assignment was easier than expected. While the prompt made it seem challenging at first, it helped to read through the entire instructions, and through every method and field. After doing that, I had a better mental picture of how the gameplay should work, and what needed to be done first. I started with the play method, and started writing the methods necessary to implement each choice in the menu. On the few occasions that unit tests failed, I was able to fix my code pretty easily. For the most part, unit tests were only failing because a few syntax errors (I'm still getting used to Java).

Reflections on CodingBat Homework 2 from Week 1

 This week we had two light homework assignments through CodingBat. Completing the challenges was a fun way to get familiar with Java syntax. Before the start of this course, I've only had limited exposure to writing Java. Prior to starting the challenges in each section, I read through the recommended introduction to the topic. As I read the instructions for each challenge, I tried to take a mental note of what I would need to solve the problem (specific syntax, built-in functions, loops, etc.). I felt that made it easier to start writing the syntax. When I was stuck, or part of my syntax resulted in an error message, I tried researching for the correct syntax, then tried to apply it to the challenge.  In some instances, I tried using built-in methods from other languages to see if it was also present in Java. Oftentimes that didn't work initially, but it did give me a starting point towards finding the Java equivalent through Google and StackOverflow. Most challenges didn'