I spent the whole of 2015 trying to grow an app I made. By the end of 2015 the app was still not growing and I was low on money. I could have kept going but I was thinking “Man I spent the whole year on this and I’m out of ideas to grow it. I think it’s time to go back to work”
I interviewed at a company and they tell me they’re like a venture capital firm, but instead of giving money to start ups, they develop the software for a start up in exchange for equity.
It sounded pretty interesting. They then told me they just started and haven’t found any start ups to work with. To keep themselves busy, they were working on their own app. It was called Hopsee.
Hopsee was a mobile app to help you find someone to share a taxi with. You'd input where you wanted to go, and then someone else could join your ride and you could split the fare.
This was kind of a shitty idea because taxis in Hong Kong aren’t that expensive. It was also shitty because it requires a lot of people using the app before there’s a match.
Imagine being the fisrt pereson to use the app. You put in where you want to go, you wait and no one joins your ride. You then delete the app.
In the interview a guy called Melvin told me he was developing the iOS app, but they also wanted an Android app. They wanted me to make the Android app.
Me: Okay, I can make the Android app based on your iOS app.
This was kind of a big claim from me, because at that point I had developed one Android app.
Melvin: Great great, we’ve been trying for ages and ages to find an Android developer, but it seems there are very few in Hong Kong. What kind of salary are you looking for?
At this point I should have said some crazy number. Instead I asked for $3800 USD a month and they agreed.
On my first day I looked through the code and tried out the iOS version of Hopsee.
Okay I get it, it’s really just a CRUD app with some Google Map views and chat features. They used Firebase for their backend. Firebase was kind of weird to work with but not that complicated. I liked it.
I worked on the Android port for a few weeks and then Chinese New Year came around. In Hong Kong we get three days off for Chinese New Year, and 2016 was a good year because the three days off started on a Monday. That meant I got Saturday to Wednesday off work.
On the Thursday after Chinese New Year I went into the office. When I got there Melvin was really excited about something.
Melvin: Hey I spent Chinese New Year working on something.
Me: What did you do?
Melvin: You know on Firebase you can configure how long a user’s login session lasts?
Me: Yeah.
Melvin: We had it set to 30 days, and I thought, the shorter it is the more secure the app is.
Me: Okay.
Melvin: So I set the session time to one minute.
Me: So the user has to login every minute?
Melvin: Yeah, but that’s annoying right?
Me: Yeah.
Melvin: So what I did was, when the user logs in or registers, I save their username and password to a text file on the phone.
Me: Alright.
Melvin: Then I went through the code, and wherever we make a network call I added code to handle the case where authorisation has failed.
If authorisation fails:
1. I grab the username and password from the text file on disk.
2. I do a login.
3. I retry the original network call.
I was thinking “wow this is nuts”. I imagined he implemented what he described with a wrapper function like this.
But he didn’t use a wrapper function, instead the network calls were inside the ViewController, and he had duplicated the retry logic around each network call.
The way he did it wasn’t good, but I guess that doesn’t really matter because the whole idea wasn’t good either.
There’s no point improving the implementation of a bad idea. It’s better to just delete the bad idea.
Me: Adding this retry logic means the user never has to login again. It’s like we set the auth expiration time to infinity.
Melvin: Yeah.
Me: Why don’t we just set it to the max value in Firebase?
Melvin: Hmmmm…
We set the session expiration time to whatever the maximum was. I think it was ten years. Which is kind of funny because these events happened in 2016.
If someone still has the app installed on their phone from 2016, they can try opening it to see if their session is still active. However I think the database has probably been deleted.
The story happened in this room. I took this picture on the day we moved out of this office into a bigger office. I think I sat in the chair on the far left. It's kind of sad to see the office with all the equipment and people gone.