2. A Harsh Lesson Learned – Do Not Reinvent the Wheel!
In the past, I have tried to implement grouped lists completely on my own, and a few of them even went into official MvvmCross NuGet channels for some time. The problem was that I made one of the biggest mistakes a software developer can make. I tried to prove I was smarter than my peers and ended up reinventing the wheel.
During the initial testing and implementation of my project, I ran into a lot of bugs and its performance was insufficient. Therefore, my list contribution had to be temporarily removed from MvvmCross.
I soon realized that implementing a grouping is an extremely difficult task. That is why developers should seek out ready-to-use yet customizable solutions. Situations like this can also serve as a distinction between experts and novices. After gaining years of software development experience, developers typically achieve a certain level of humility. They often come to realize that a simple problem can turn out to have a lot of tricky edges after the test and release phase. Nevertheless, instead of trying to fix my initial project at all costs, I decided to explore an easier way to solve my grouping problem with a generic yet editable solution.
I happened to recall that I have used (and even published) some Pull Requests to the existing library that implemented the expandable lists (AdvancedRecyclerView). I looked at this library’s Java Code once again and saw that it was quite complex. Thus, instead of coding all of the logic in Xamarin, I chose to simplify the original library and create MvvmCross, an easy-to-use plug-in support library. This also wasn’t as easy as I thought though.
Harsh lesson learned. If you plan to implement considerably complex features, look at similar open source codes first. If what you are trying to achieve looks like it will be difficult, borrow as much as possible from other people’s previous work (IF LICENSE ALLOWS ).