Monday, June 4, 2018

Improving the design of google home app

In the current design of the app, the number of quotes is hardcoded in the app. But because of that each time, I add new quotes I will have to redeploy the app. This will cause reluctance in me to redeploy and change the quotes - which means it has difficult maintenance.

To fix this, I want to modify it such that either I will set the total count as a runtime configuration which the app can pick up automatically. I tried using the firebase runtime configuration. But it seems for this config change to take effect I will need to redeploy the function. This seems to not fix any of the issue.

Researching further I found a solution to this problem by adding a random float to each quote and when querying just querying for quote greater than a specific random number. That way I will get a different random quote each time and I don't need to redploy the app each time. I haven't made the changes yet and redeployed the app but this should fix the maintenance nightmare and will make it easy for me to add new quotes to the app. 

No comments:

Post a Comment

Comments