Tuesday, April 15, 2025

CST338: Week 5 (Week 13)

Markov Sentence Generator 

Who did you work with?

I worked with Ethan and Liam.

What was your strategy for solving the Markov assignment?

My strategy for this assignment was to break up the different tasks. (1) Define the member variables and constructor. (2) Add and implement the methods related to building the word dictionary. (3) Add and implement the methods related to building the outputted sentences formed by the algorithm. (4) Address any necessary code cleanup.

I implemented the methods in the order listed in the assignment definition. I implemented each method one at a time but whenever the operation of a method was unclear I would take a step back to see how it fits into the broader program to help clarify things.

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

I did not immediately start writing code. I read the assignment and the method specifications that were spelled out. I did not feel the need to map it out on paper.

What was THEIR strategy for solving the Markov assignment?

Ethan started by focusing on the visibility modifiers and attributes and worked on the bigger methods last. Though he describes it as delaying the inevitable I think it is a good way to build up to larger tasks with some small victories. He also used the sample runs to align his code with the expected output.

Liam's approach was to put the lesson he learned from the LDPM assignment into action. Instead of taking a more global look at the assignment and trying to fill in the gaps in a way that he felt made sense, he focused in on each method, one at a time.

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

Time has been a very very limited resource lately. Ideally, my strategy would be to move more slowly and to add javadoc comments... regardless of whether the assignment specification says that we need them or not.

According to your classmate(s): how well does your code follow the Google Java Style GuideLinks to an external site.?

My code was compliant but my teammates recommended that I use javadoc comments for the method definitions.  I did not see that requirement for this assignment so I left them out. I was also in a hurry. Next time I will include them.

Did you know you can automate applying some of the style guide rulesLinks to an external site.?

Yes. I have Google Java style checking enabled. 

No comments:

Post a Comment

CST363: Week 8 (Week 24)

 The three most important things I learned in this course: 1) What databases are and their advantages over for example, a flat file or sprea...