Another week gone and only more Java to show for it. We finished up another larger assignment this week. We made a program that takes text files as input and generates sentences based on a few simple rules. Most of the time the output is gibberish, but these random words strung together, also known as “Markov chains” are a really basic form of natural language processing. It’s also just sort of fun to feed the program text from various sources to see what it spits out. See below for an example.

After working through the assignment, my groupmates and I discussed our strategies in building the Markov generator. My strategy was to work backwards, starting with the more basic and integral functionality such as choosing words and using them to form sentences. The other people in my group all worked the problem differently than I did, which is the first time that we had major differences in our approach.
Two people decided to go for the tried and true strategy of following a UML diagram and going down the line writing everything. Usually I do this too just because it is straightforward. Our other group member decided to test and build at the same time, consistently making edits and testing functions while writing. I also do this sometimes, especially when I’m trying to learn and understand more about what I’m working with.
I think that I would stick to the strategy I used for this type of problem where things are very interconnected and rely on one another. My code doesn’t match the google style guide exactly. I have a different style guide that generally follows the google style guide, but places brackets on a new line under functions for better readability.