read this first → reindeer are good stock pickers.
So I thought of building my own Reindeer portfolio, So I have about 35 - 40 stocks in my wishlist. I thought every time when I want to invest I would randomly pick a stock from this list and invest as random as reindeer.
Every time when I want to get random stock I should be writing some code and use random function in that particular language and get the stock. Well this is tiring I can’t remember all stocks and I can’t write the same code every time(If I want to I can but you get it). So what do we do now, well like all developer I set out build a web application for it, wait but I don’t want a full fledged full stack application, as my backed is minimal just a list of stock tickers and pick a random stock ticker from it. I couldn’t just store the list in frontend and deploy, But if I need to add some more stocks in future I need to redeploy. hmm how do you solve it? I don’t want to spin a database for it, surely I don’t want to. What if I store the stock tickers in a file say excel and every time I update the excel I get the updated list of stock tickers to pick randomly. Hmm that a good idea, but how do i do it. Well here comes the savior GOOGLE APP SCRIPT. Every time I want to build a simple website with frontend only and minimal data like this case I use google app script. You can create a app script on google sheet and you can get the data of the excel in app script and deploy it. Now you can call this endpoint in front-end and get the stocks or even you can write the random picker logic in app script and reduce the data that is transferred to front-end.