Tuesday, April 22, 2025

CSUMB Week 14 (16 April 2025 - 22 April 2025)

This journal serves as both journal #7 and #8 for CST 338

Look back at the HW1

    HW1 was the Markov homework. I recall first attempting it by simply just coding whatever I deemed fit as a good starting point. While this method "worked" and I eventually finished the assignment, I think I could had saved myself a lot of the headaches if I just took the time to read the whole direction document first and made a picture diagram that connected all the methods and who was calling who. I suppose for my brain, a UML diagram simply isn't enough. 

Highlight at least two victories. 

    I suppose one of the victories is that I find it somewhat easier to read a code when thrown into the middle of it. Usually reading a code is easy when already cognitively knowing where I began and where I ended, especially if I am the one who created that code. However, what if it is not my own creation and I'm just thrown into a code that without a guidance on the starting point? Well, I'll just have to figure it out, and that's a practice I was able to participate in throughout this class. A lot of the assignments already had all the "fragmented puzzle pieces," as in I was not the one making all the fields and methods. Instead, I had to put them together in a cohesive manner. Reviewing other people's code also meant I had to review code that may have looked substantially different from mine or one's that lacked descriptive comments. I still don't find it easy per say, but not anxiously freaking out at the thought of being thrown into someone else's code is a small step victory. 

    A large victory is actually finally understanding (somewhat) on properly understanding and using GitHub and its various features. Yes, there are tons of video tutorials but none of them seem to help for a beginner like me when so many jargons were thrown in and nuance cases were never discussed. For example, it's like almost everyone just assumed everyone already knew what a "pull request" was. I did not, and if someone simply just said "it just means asking permission to merge your code to the remote main branch" would have saved me so many headaches. That's all it would have taken. Instead, I had to sit through several numerous 5-10 minutes tutorial videos that never got to the point and were begging for subscribers. Or having to figure out the nuances of "commit and push" the hard way. For example, apparently if I already merged my local branch to my local main and I remained checkout in my local main branch, and then press commit and push, my local branch just never shows up in the remote repository. Instead, I have to physically remained checkout in my local branch and then press commit and push before that branch gets inserted into the remote repository. That didn't sound intuitive since I assumed commit and push would mean actually committing and pushing every code and branch I made, but apparently that's not the actual case Or how no one ever mentioned that if you commit your changes locally, for some reason you now cannot commit and push to the remote repository because GitHub no longer recognizes there were code changes anymore, so now you have to make a silly little change like inserting a period in the comment section to actually force GitHub now to allow users to commit and push. It is these reasons (and many more) that I consider it a massive victory that I now somewhat understand how to use GitHub. 

Tuesday, April 8, 2025

CSUMB Week 12 (2 April 2025 - 8 April 2025)

Work with your fellow classmates and go through your solutions to the Markov assignment.

Who did you work with?

    I worked with Valentina Waltman and Brandon Evans.

What was your strategy for solving the Markov assignment?

    I started with reading the direction on the assignment document. I went line by line and started coding right away. I will admit, however, that this method did prevent me from seeing the full picture and how all the codes were initially connected/related to each other. 

What was THEIR strategy for solving the Markov assignment

    Similarly to me, Brandon basically coded right away as well (or at least that's how me made it sound like). I know that Valentina is more methodical and is the type to watch every relevant video before starting the assignment. 

    If by strategy, you mean the actual code methodology we used, the assignment was very straight forward in what was required so therefore we all used pretty much the same general tactic. However, the only thing different, was my purposeful decision to not use the PUNCTUATION_MARKS variable. I decided to use a for loop and typed "if (word.charAt(i) == '.' || word.charAt(i) == '!' || word.charAt(i) == '?' || word.charAt(i) == '$'){ return true;} to look for indications of punctuation. I chose to go this route simply because I wanted to see if the same type of method that I used in the past on a CodingBat question worked on this scope of the problem. It was more out of curiosity of "would this work?"

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

    I probably would have had created a flowchart map of how all of the methods are connected to each other (who's calling who). This way I would have gotten a bigger picture of what's going on when the Markov file is called. 

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

    Brandon believed it followed the style guide pretty well, and Valentina thought my comments were extremely detailed.

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

     I am now aware of this, yes.

Tuesday, April 1, 2025

CSUMB Week 11 (26 March 2025 - 1 April 2025)

With whom did you work?
I worked with Brandon and Valentina

What was your strategy for solving the assignments?
I actually copy and pasted the document directions as a note into my IDE and followed/solved line by line. This actually helped me a lot.

Did you start writing the code right away? Did you plan it out on paper?
I originally started writing right away but then got lost. So eventually I transitioned into paper planning (mapping out the UML and which methods are calling which) mid-way which helped to ground me on where to begin and where to go. 

What was THEIR strategy for solving the assignments
Well, I think Brandon just straight dived into the assignment and began coding right away. He solved as he went along. Valentina on the other hand was incredibly meticulous and essentially wrote out which methods may seem easy or hard and what was required for each before beginning.

How would you change your strategy?
I would go right to UML mapping to create a visual flow map for myself. This would have caused less confusion when I get lost mid-way through coding.

According to your classmate, did your code follow the Google JAVA style?
Yes, they believed I did.

Did you know you can automate applying some of the style guide rulesLinks to an external site?
I did not know that. I'll look up on that.

What was the most challenging part?
Keeping myself not lost among all the methods. I guess it was having the bigger picture in mind that was challenging.

What was the most interesting?
Well, I did enjoy the more compartmentalized approach to how JAVA should be utilized (as it should be) compared to what a beginner would do which is coding everything onto a single main class. 

What are you most proud of?
Similar to what I wrote for last week, it is not finishing the assignment that made me feel proud but rather what I learned from others that made me realize what I can tweak and change in my code. That's what usually gives me a feeling that I am improving.

How did you celebrate completing the assignment?
I went to the zoo with my girlfriend.

CSUMB Week 10 (19 March 2025 - 25 March 2025)

The code reviews I've given for Valentina and Michael is given within this link:

https://docs.google.com/document/d/18C-dDro7rwCim8owUT61LqdoouG8dW7e4n59Zsslfrs/edit?usp=sharing

With that being said, most of the feedback I've received is that I have highly detailed comments that makes it easy for anyone to follow along but that my code is not the most optimized. In particular I could had utilized HashMaps but instead I used multiple elementary for loops. 

As for my struggles, just like always, it was always with the little details. For example, when running the program, messages get printed infinitely because my monster was not fainting (as decrementing wasn't properly set). Or how I forgot to set a different minimum and maximum values for FlowerDino and FireLizard and that set off a whole bunch of errors when running the tests. The project itself wasn't hard; however, I wouldn't say writing code is easy either. I do believe I am getting better intuitions though the more I practice. 

I would say my "victory" is less so on about finishing the assignment and more so on what I learned and gained by comparing my code to my teammates. For example, seeing how they utilized HashMaps or realizing I could have done switch-cases (instead of a whole bunch of if and if-else) made me more cognizant of the different implementations I can use.