Tuesday, March 26, 2024

CST338 - Wk04: Learning Journal Markov

Who did you work with?

I worked with my team 4 teammates (Vance Thrasher, Marcelo Villalobos Diaz, and Anwar Siddiqui) to discuss our Markov solutions.

What was your strategy for solving the Markov assignment?

My approach was the follow the methods provided in the prompt, reading in lines from the file, then splitting the lines into words, and adding those words to the HashMap, with the key being based on the previous word.  After the entire file was read and all the words added to the HashMap.  Then when generating a sentence it was picking a random word that came from the BEGINS_SENTENCE ArrayList in the HashMap, and using that word as the key to pick out a new ArrayList in the HashMap and randomly picking out a word from that ArrayList, until a word that ended with punctuation was found. 

Did you start writing code right away? Did you plan it out on paper? 

I started by first reading through the prompt, and trying to understand the complete purpose of the program and try to see the general flow of the assignment.  I then dove right in adding and filling out methods according to the prompt's requirements.  After that it was working on passing unit tests for individual methods.  And then finally ensuring that then running the program the output matches what's expected.

What was THEIR strategy for solving the Markov assignment?

Their strategy seemed similar to mine, first reading the prompt and reviewing requirements and coming to understand the program.  Others pointed out paying key attention to the UML was helpful to them.  Some mentioned debugging throughput the process of programming the assignment, not just at the end, which is a very helpful technique.  Some stated they sought to implement just enough to get the unit tests running to use the unit tests as the completed the rest of the program.

How would you change your strategy having worked on the assignment?

One aspect I would improve in my coding strategy is to incorporate more comments within the code. Occasionally, I find that when I revisit my code the following day, I struggle to recall the specifics of how certain sections were implemented or how they function. By adding comprehensive comments throughout the code, I aim to provide clear explanations and reminders for myself and others, facilitating easier understanding and maintenance of the codebase.

I would leave more todo comments everywhere where I think there might be an issue with the code so I can review them later and catch bugs more easily. 

According to your classmate(s): how well does your code follow the Google Java Style Guide?

They stated overall my style was pretty close to the Google Java Style Guide, some differences in spacing (which I have tweaked).  I generally flowed the Google Java Style Guide, matching things like the K&R style non empty blocks

Did you know you can automate applying some of the style guide rules?

I did not! But I will use that going forward with some spacing indent tweaks.


Wednesday, March 20, 2024

CST338 - WK3

 Jotto Code Review

  1. Who did you work with?

    1. I worked with my previous group, Anwar Siddiqui, Vance Thrasher, and Marcelo Diaz.  I shared my code with them and reviewed Anwars Jotto code

  2. Summarize the feedback you received about your code

    1. Still waiting on feedback, think we all got focused on completely this weeks midterm test and Markov.

  3. What improvements would you make to your code/what was suggested?

    1. From my own knowledge with my code, better commenting conforms to javadoc proper style.  Better program output (if allowed), to help understand what’s going on.  

  4. Which unit tests were the hardest to pass?

    1. The pickWord unit test for me was the hardest, as part of the issue was I wasn’t understanding the error messaging coming from Intellij.

  5. How do the existing tests function and could they be improved?

    1. There’s definitely more edge cases that could be covered with unit tests.  One thing I would try to improve the unit tests is with better logging as to understand when one does fail, where/why things might have blown up.

  6. What did you struggle with?

    1. Time management.  I think since for me this is also my first java experience, it’s coming up to speed on java in general that causes things to take slightly longer.

  7. What did one of your teammates struggle with?

    1. Like me, time management.  I think we were all expecting things to happen a little more quickly and wish we had more time at the end.

  8. What are you most proud of on your submission for Jotto?

    1. My first “real” java project.  As I’ve never programmed in java before, just coming up to speed with the environment and general experience programming it.  

Wednesday, March 13, 2024

CST 338 - WK02HW01

This week was our first be programming homework assignment.  It was a tough battle, that I didn't give myself enough time for as I was away for a long weekend and thought I would be able to still make it up.  Planning out the assignment needs to be better next time.

The unit tests that gave me some fustration were the showPlayerGuesses and pickWord tests.  The pickWord I wasn't able to solve because I didn't understand the error logging coming from the unit test, and didn't give myself enough time to goto office hours given I was away.

I think the best take away for me this week, is better planning, to not count on the ability to finish everything to the quality I want at the last minute, especially having to work full time and still take care of three kids.

 

Saturday, March 2, 2024

CST 338 - WK01HW02

 Problem Solving

For most of the problems the logical flow required to solve the program was pretty clear.  The biggest thing for me was adopting to the java syntax.  It typically took me a couple of tries due to that or off by 1 errors.  I did wish the codingBat allowed you to print things out, so I could see the state of some variables as I worked through the problem.