17

Me, the only iOS dev at work one day, and colleague (who we'll call AndroidBoy), the only Android dev at work that same day (he's been working with us for less than two months). There was a change in one of the jsons we received from the server: instead of receiving a list, we now received a dictionary with strings as keys and lists as values. My iOS colleague had already made this modification on our parse function the day before.

AndroidBoy: "Hey what happened with the json?"
Me: "Oh, well instead of parsing a list, we'll parse a dictionary and get the list from each key. You basically have to do the same thing, only this time the lists are organized into categories."
AndroidBoy: "Oh, ok. But I don't know how to parse a dictionary while using Retrofit." (Context: Retrofit is a framework for request handling - correct me if I am mistaken, that's just what I've been told)
Me: "Sucks, dude, can't help ya. I've never worked with that and don't have that much exp. with Android."

I go out for a cigarette break. When I return, AndroidBoy is nowhere to be seen and suddenly I can't seem to get that data in my app. AndroidBoy comes in from the room where the backend colleagues work.

AndroidBoy: "Solved it!"
Me: "Solved what?"
AndroidBoy: "I told them to change back to a list and just put the key inside the objects of the list."

... he used the precious time of the backend colleagues to change the thing back hust because he was too lazy to search how to parse a dictionary. I was so amazed by his answer, that I didn't know whether to laugh, scream at him or punch him in the face. Not to mention the fact that now I had to revert just so he could avoid that extra work.

Comments
  • 4
    ...thats like 1 line of code, fuck that guy

    Also hi welcome to devrant
  • 1
    @BindView thanks a ton, mate :D yup, usually when some problem regarding jsons appears on either platform, iOS and Android teams discuss the problem, that's what annoyed me most. It was like a smack to the face, especially since he's the "new guy".
  • 2
    Just what @BindView said, it's a damn line change :/

    As for me I prefer not to use retrofit but instead directly with OKHttp and Gson, I put a dedicated constructor in each data model and handle parsing model data inside so that I don't have to repeat parsing code or create a parser for json data
  • 2
    @gitpush i fucking hate retrofit too, its so unnecessary
  • 1
    @BindView it is not even developed anymore if I'm not mistaken, its last release was a couple years ago.

    I don't know why devs take the short path instead of the complete control path?

    Now imagine he has to change that one liner to handle the new format, he'd have to change all calling functions to start handling the new returned data instead of modifying one constructor or creating another constructor for the new data type
Add Comment