This week we began programming the control layer methods that we planned last week, and we ran the test cases that we’d established in our matrices during that assignment. We read and watched about implementing control layer functions, understanding the scope and life span of variables, and passing information by value versus passing by reference. There was really a lot to learn, and this has probably been the most difficult week for me so far.
I learned more about the control layer and how it is supposed to interact with the model and the view layers, and I realized that some things I had been struggling with were not even necessary in the control layer, but were in fact part of the view layer, which we will cover later. Luckily, I met with Bro. Jones and received some guidance on that issue, because it was becoming frustrating.
I appreciated the opportunity to sit down and do some programming, which is the part that I really enjoy, however I ran into some challenges with syntax and properly structuring my code blocks. I reached out to a programmer friend of mine, Dallan Simper, who has been working in the field for over ten years. He loves working through programming challenges, and we spend a couple of hours Wednesday morning fixing some problems in my code and running test cases on one of my methods. As a bonus, Dallan also taught me more about “refactoring,” or simplifying, my code, and I discovered that the switch statement that I had planned on using was not the most efficient way to get the results I was looking for.
Without a doubt, I find the act of writing the code to a program to be the most engaging part of what we’ve been doing. It’s certainly challenging and can be frustrating, but I love having a specific problem that I can work on and find solutions to and immediately see the results of my attempts at correcting it.