CST 338 Week 4

 Shelves, Screens, and Style Guides

This week in CST 338 was particularly exciting as we explored Android development, covering intent factories and creating a Fahrenheit to Celsius calculator. Despite being a basic example, it was exciting to see written code come to life on an emulated Android device. The exercise provided a sense of accomplishment that went beyond the usual IDE outputs and debug prints. I even enjoyed working with XML, as seeing how your code translates into a functional app added a new dimension to our programming efforts.

In addition to Android development, we reviewed the code of our peers for Project 1. I had the opportunity to go through the code of my classmates, Saria Kabbour, Jess Hammond, and Gary Keupper. Jess and I, in particular, had some interesting discussions comparing specifics in our code. For instance, in the Shelf.java file, we both tackled the public String listBooks() function in radically different ways. I opted for a structured approach using numerous helper methods, while Jess took a more straightforward, brute-force approach. The exercise allowed all of us to appreciate the different ways you can approach a similar problem.

Our strategies for solving the assignments varied but shared common elements of thorough planning and iterative development. Personally, I started by outlining the structure and functionality of the classes, using pseudocode comments to clarify my thoughts and guide my coding process. This method ensured that my code was well-organized and logically sound. I also maintained a history of revisions as comments within the code, creating a quarantine area for difficult methods where I could experiment with different implementations without losing track of previous attempts.

Part of our review process was assessing how well our code followed the Google Java Style Guide. Consistency in coding style is crucial for readability and collaboration, and adhering to a style guide ensures that all team members can understand and contribute to the codebase effectively. We discovered that some aspects of the style guide could be automated, making it easier to maintain consistency. Tools like IntelliJ's configuration for the Google Style Guide, as discussed in Reed Odeneal's article, were particularly useful in this regard. This experience underscored the importance of style guides and the benefits of automating their application to maintain high coding standards.

Comments

Popular Posts