Taro Logo
4

I tried to introduce MVVM architecture and Jetpack into the codebase, but got rejected.

Profile picture
Android Engineer at Seed stage startup2 years ago

I was excited to land a PR that introduced the latest Android frameworks into the app, but I got feedback from my manager that it would add confusion, making it harder for new engineers to onboard into the codebase. My PR didn’t land. How do I avoid this in the future?

51
3

Discussion

(3 comments)
  • 1
    Profile picture
    Meta, Pinterest, Kosei
    2 years ago

    IMO this incident shows a gap where you're probably not performing as a senior engineer. For a meaningful architecture change, the first time your manager hears about it shouldn’t be in a PR.

    The phrasing also makes it seem like you’re starting with the technology first, rather than the problem. It should be really clear what problem you’re trying to solve, and then just pick the tool/tech that is able to solve that problem in the optimal way.

  • 1
    Profile picture
    Robinhood, Meta, Course Hero, PayPal
    2 years ago

    This is a common trap I've seen a lot of pre-senior engineers fall into: Mostly equating new with better. It's very easy to get swept up in these new framework launches, and the discourse online mainly supports this as well. This is because tech discussions online are mainly with more junior engineers, especially on LinkedIn.

    The mark of a true senior engineer is being able to step back and holistically consider the overall impact of a technical decision. Code is not a goal in and of itself; the purpose of code is to build a product that generates revenue for the business in some way through some sort of valuable user experience.

    To illustrate this more holistic way of thinking, here are some questions to ask yourself when adopting a new pattern like MVVM:

    1. What's the benefit of adding this pattern besides the fact that it's more modern? Does it make code easier to read, extend, or debug? Does it have performance implications like frame drops and cold start? Is it really that much harder doing tasks X, Y, and Z in the old framework vs. the new one?
    2. More importantly, what are the cons of adopting the new pattern? There are very few decisions that are 100% positive; there will almost certainly be cons. Ironically, a lot of new patterns make the code harder to read, not easier to read, as it breaks up the code into more abstractions/layers.
    3. What's the opportunity cost? If it takes 3 months to move the entire codebase into MVVM, what could we have done instead during those 3 months? Is the refactoring really the most impactful thing we can do for the business during this time?
  • 1
    Profile picture
    Meta, Pinterest, Kosei
    2 years ago

    See video for more of my thoughts :)