Tuesday, March 18, 2025

CSUMB Week 10 (12 March 2025 - 18 March 2025)

As this week comes to a conclusion, I have completed the Markov assignment. I would say the challenges I've faced were not based on coding that required substantial theories but rather silly mistakes. For example, I've spent close to 3 hours trying different approaches as to why my addWord method was not being passed in the test. Turns out, the method was fine from the beginning. The test wasn't passing because I forgot to create a constructor and hence words were not being initialized correctly (slaps forehead).

I did, however, learn something very new that I never tackled before: regular expression (aka Regex). I learned this to try and trim all the whitespaces out in a given line of texts. The regex approach (assuming if I understood Regex) seemed simpler, so I started to learn Regex syntax. Some of the initial learning sources felt very esoteric and confusing; however, once I found the right source, it started to make sense. This video in particular helped tremendously:

https://www.youtube.com/watch?v=HvryGBPmNl8




No comments:

Post a Comment