CST338 - Markov
Week 3: Markov
I worked with Mike Divine to talk about the Markov assignment as well as discuss different approaches to solving it. The first thing we did was read the entire prompt (I re-read it numerous times throughout the week as well). Next, I followed the UML diagram and got all fields, constructors, methods, and classes laid out exactly matching the diagram. I find doing this first helps me visualize and see how everything is going to come together. Once the methods were all laid out I read through the prompts again and started working on the methods that would be called inside of other methods first. This helps avoid those annoying red lines everywhere if you're calling a method that hasn't been coded yet. From there it was following the prompt and left print statements where I thought something might not be right to track down errors. When an error would arise, the print statements helped me track down the method causing them. Mike and I also discussed different ways to pass each word of a line to another method as well as how to isolate each line in a text file. Mike's strategy was very similar to mine and we both had the same ideas of how to start as well as the next tiny steps to take to not be overwhelmed.
After working on the assignment there are a couple things I would change. First, this learning journal prompt mentioned planning out the assignment on paper. To me, that seems like a very helpful way to be able to visualize how the data was going to flow from method to method. I will be giving that strategy a try next time. Another strategy that Mike took advantage of was using the test class periodically to ensure everything is working rather than finishing the code and then running the tests, which is what I did. Using Mike's strategy next time will definitely save me the headache of having to debug an entire assignment at the end. Both Mike and I followed the Google Java Style Guide, and our code was neat and easy to read. I was unaware that style guides could be applied in IntelliJ and might have to make that my default setting.
Comments
Post a Comment