Everything I Learned from My First Android Studio Project: A Journey in Coding and Collaboration

Starting my first Android Studio project was an eye-opener, packed with ups and downs and a whole lot of learning. It wasn’t just about getting better at coding; it was also about figuring out how to work well with others and create something new together. To visually showcase this journey, take a look at the slideshow below, featuring a selection of images from the app, highlighting key moments and features from the development process.

  1. Technical Skills

My contributions to our project were diverse and technically challenging, focusing on enhancing both functionality and user experience. I was responsible for developing the score logic, integrating background music and sound effects, and designing the ‘How to Play’ and pause screens. Additionally, I conducted numerous unit tests and refactored our code to adhere to coding best practices.

The scoring mechanism was particularly complex. Initially, we planned for the score to decrease over time. To achieve this, I implemented a Runnable object that reduced the score every second after the start button was activated. However, this approach proved too simplistic, especially when considering variables like difficulty levels and enemy attacks. To address this, I introduced a CountDownTimer object, ingeniously leveraging the player’s health variable to update the score dynamically.

The development of the pause screen was an enjoyable and creative process for me. It involved experimenting with UI/UX design, resulting in a functional and intuitive pause feature. This screen halts the game, including the score, enemy and player movements, and also pauses the background music. The integration of music added a lively dimension to the game. I achieved this by creating a private MediaPlayer object with built-in pause and start functionalities, initiating the music with the start button and pausing it as required.

These technical contributions, from score calculation to immersive audio-visual elements, were vital in creating a polished and engaging gaming experience. It’s important to note, though, that these are just the highlights of my individual work and don’t encompass the full extent of my contributions. I was also actively involved in collaborative aspects of the project, working alongside my team to bring our collective vision to life. These personal achievements, however, stand out as areas where I took the lead and found particularly noteworthy in their challenges and outcomes.

  1. Best Coding Practices

During our project, we were privileged to learn about design principles in the classroom and immediately apply them in a practical setting. This blend of theory and practice deepened our understanding of these principles, allowing us to see their direct impact on our work.

In Sprint 3, the application of the Strategy pattern was a key milestone. By distinguishing and encapsulating a set of algorithms, it enabled their interchangeability. This was evident in how we managed player movement in our game. Depending on the difficulty level, the player’s movement strategy varied—faster in easy mode and slower in hard mode. Additionally, we integrated the Observer pattern, which fostered a one-to-many relationship among objects. This meant players, acting as observers, received real-time updates from the leaderboard about their game status.

Moving into Sprint 4, we embraced the Factory pattern for enemy creation. This pattern, pivotal in object-oriented design, allowed us to create objects without tying them to specific classes. We developed an abstract Enemy class and an EnemyFactory class. This approach kept GameActivity independent of the specifics of enemy classes, enhancing our code’s flexibility and scalability.

Finally, in our last Sprint, we delved into implementing key SOLID and GRASP principles, such as the Creator Principle, Liskov Substitution Principle, Information Expert, and Open/Closed Principle. The Information Expert principle was particularly transformative. It guided us to assign tasks to classes with the requisite information, promoting low cohesion and distinct functionalities. For example, the player class, containing vital data like position, score, and health, was responsible for tasks needing this information. This not only streamlined our code but also ensured a clear, logical structure. 

Through these sprints, our project became a living example of how theoretical design principles can be effectively translated into practical, efficient software solutions.

  1. Teamwork

A key takeaway from this project was mastering the art of teamwork, which included not only our structured approach to collaboration but also navigating the nuances of Git version control. Our weekly scrum meetings were essential in keeping everyone aligned and informed, far beyond mere updates. We relied on Jira for task management, playing a crucial role in dividing and tracking our work.

Working in Sprints exposed us to the challenges and rewards of adhering to strict deadlines within an organized framework. This wasn’t just about hitting timelines; it was an immersive exploration into agile methodologies and iterative development. Integrating Git into our workflow was pivotal, as it allowed us to manage code changes efficiently, resolve conflicts, and maintain a coherent codebase even as multiple team members contributed simultaneously. This experience, encompassing technical skills and team dynamics, has been invaluable in understanding the full spectrum of successful software development.

Conclusion

Overall, this project served as a multifaceted learning experience, bridging the gap between theoretical knowledge and practical application. The implementation of complex design patterns such as the Strategy, Observer, and Factory patterns, was a testament to our growing proficiency in software design. These technical challenges not only honed my coding skills but also deepened my understanding of the intricacies involved in software architecture.

Moreover, the project underscored the importance of teamwork and agile methodologies in a real-world development setting. Engaging in regular scrum meetings and navigating the disciplined structure of Sprints, I gained invaluable insights into collaboration, time management, and adaptability. This practical exposure to agile frameworks and team dynamics has equipped me with a robust skill set and a clear vision for effective software development practices, setting a solid foundation for my future endeavors in the field.

Leave a comment