Categories
Uncategorized

Week 9: Constant Improvements

In the hustle and bustle of the past two weeks, I realized that I inadvertently missed sharing a blog post last week. Nevertheless, I am here now, eager to delve into the myriad of experiences and learnings that have transpired.

Last week was marked by collaborative efforts with my team as we endeavored to complete the remaining features on the search page. My primary task involved integrating my recent search file system utility into the recent search list. During this process, I discovered that my utility was lacking a “delete term at index” method. Once this functionality was added, we successfully connected it to the RecyclerView, which is responsible for displaying recent searches. This marked the completion of the search feature, rendering it fully functional and operational.

Aside from this accomplishment, the remainder of the week was relatively quiet, with no new tickets coming in. I seized this opportunity to further hone my skills in Android development. I challenged myself by rewriting the search page using various design patterns. The initial version of the search page adopted a procedural and imperative approach, resulting in a tightly coupled UI. This complexity in the flow of execution made debugging a challenging task. I dedicated the majority of the week to rewriting the page using ViewModel, MutableLiveData, and RxJava. This approach allowed me to decouple the UI components, leading to significant improvements in both performance and code complexity. Additionally, it shed light on the issues we were experiencing with Jetpack Compose.

In a previous post, I mentioned rewriting the search page with Jetpack Compose, only to encounter performance issues. Upon revisiting this task, I realized that the excessive recompositions on the main thread were the culprit. I reworked the Compose version using ViewModel and Kotlin Flow, resulting in a substantial performance boost. I am now eagerly awaiting feedback from my team on this revised version.

This week brought a new challenge in the form of a Spotify API bug ticket, which I eagerly claimed. I was initially cautioned, as students typically do not handle Spotify bug tickets due to the API’s complexity and its critical role in production builds. Nevertheless, I was granted the opportunity to tackle it. The task proved to be intricate, as Spotify had recently updated their Oauth2 process. This required me to update my Chromium via adb to accommodate the new JavaScript functions used by Spotify. Despite these hurdles, I was able to identify and resolve the issue within a few hours. While I do not have access to the physical device for testing, I am confident in the robustness of my code and look forward to the code review.

As I reflect on the past two weeks, I am filled with a sense of accomplishment and gratitude. I have grown more adept at navigating and understanding extensive codebases, a skill that will undoubtedly serve me well in the future. With graduation on the horizon, I am filled with excitement and anticipation for the next chapter of my journey. I remain committed to continuous learning and am grateful for every opportunity to expand my knowledge and skills.

Categories
Uncategorized

Week 7: Bug Smashing

Hey there! I’m back and absolutely thrilled to share my last two weeks at Echelon Fit. Oops, I overlooked my update last week, so let’s dive into a double update, shall we?

On October 2nd, I got the amazing chance to connect the popular searches API to the search page. A few challenges arose when collaborating with our senior developer, especially when merging our RecyclerView Adapters. We spent quite some time tackling a bug due to merge conflicts, and guess what? It was all because an ArrayList wasn’t initialized properly, leading to a runtime error. It was an eye-opening moment for me; there’s always something new to learn, even with seemingly small issues. Engaging with the senior developer was a real treat. I cherish those moments when I get to discuss code in depth.

By October 4th, I was fully engrossed in the active search suggestions task. Multithreading caught my attention, and I was super excited about it! My task involved creating a scheduled thread pool with a cancellable future. As users type, it debounces the network call by 500 ms. If the input changes within that timeframe, the function re-adjusts, encapsulating the essence of the debounce logic. I managed to generalize this debouncing idea, making it reusable. It felt like a small achievement!

On October 5th, I dove into some design adjustments. While they seemed mainly cosmetic, I noticed a discrepancy in the top navigation bar’s design across the app. Every screen had its unique representation of the top nav bar. I’m keen to ensure everything matches the given designs, so I flagged it for discussion. Awaiting feedback on that!

October 7th was a blend of design tweaks and a deeper dive into a runtime crash issue. While adjusting the workout difficulty sorting was straightforward, the crash was a real puzzle. The issue emerged when selecting and then clearing a filter. The solution? Preventing an unnecessary API call when no filters are active. This issue highlighted some opportunities for code optimization, making me wonder about the potential of Jetpack Compose for the project.

From the 7th onwards, I tackled a couple more bugs. Completing nine tickets in two weeks feels like a milestone, especially considering my college commitments and my full-time job. Excitingly, I took a small initiative to try out Jetpack Compose for the search page. I made sure not to tweak the existing dependencies and created some handy extension functions. I finished this in a day, which made me appreciate the efficiency of Jetpack Compose. I’ve shared this with the senior developer and project manager, and we’re discussing its potential for future use.

All in all, this journey has been exhilarating! I’m constantly learning and growing. If there’s one thing I’ve realized, it’s the importance of presenting oneself effectively. Maybe it’s time to polish my résumé? Onwards and upwards!

Categories
Uncategorized

Week 5: Software Architecture

Week 5 unfolded with a renewed vigor, marking a significant escalation in our endeavors compared to the preceding weeks. We embarked on a new sprint, unveiling a plethora of tickets and ensuring a full workload for the entire team. This week, my focus was on integrating the API suggested search results with the UI using Android’s RecyclerView and accomplishing a ticket that ensures the persistence of recent search results to local storage.

Delving into the recent search results ticket was an exhilarating experience. I had the opportunity to craft a utility class, named RecentSearchesFSUtil, which seamlessly manages the logic for storing, retrieving, and gracefully truncating backfill. It meticulously ensures that each new user search is unique before it’s positioned at the forefront of the list, maintaining a streamlined history. Utilizing a doubly linked list facilitated a more reliable and manageable approach, given the stack/queue nature of the search results. Furthermore, the integration of an observable object within the utility class enabled real-time notifications to observers upon any alterations in the list, allowing for seamless recalculations of each search result on screen. This feature not only ensures separation of concerns but also guarantees file system persistence. The pull request was duly submitted within the week.

However, the journey with the API wiring ticket is still in progress. A discrepancy between the UI and the design surfaced post-integration, necessitating further refinements to align the visual elements accurately. I am retaining this ticket until we achieve alignment between the UI and the design.

This week was a harmonious blend of collaboration and individual contributions, with each member immersed in their respective tickets, many of which are interdependent. The air was abuzz with numerous phone calls and Slack “huddles,” fostering a vibrant atmosphere of collective brainstorming. It’s been an enriching journey, and my anticipation is piqued for the unfolding of the coming week and the feedback from QA on our recent pull requests.