Go to How To Track Your Savings to check out the Saving Ninja Super Spreadsheet.
I’m no longer financially independent.
This month saw the biggest drop in my portfolio since I began investing; wiping out almost half of the gains I made in the whole of 2021.
Well, I can’t say that I didn’t expect this to happen. There is always going to be a drop in the market, part of the reason why we see so much growth is due to volatility. But, it’s still a little bit disheartening.
Only looking at my figures once a month definitely helps with this bad feeling. I see that some people on Reddit are super stressed, and even losing sleep over the markets dropping. This seems crazy to me, maybe these people probably shouldn’t be invested in equities.
I’m not phased too much. Although maybe if I had actually retired 2 months ago, I’d be more than a little annoyed!
My contributions have gone back down to the normal level of around £3k. This figure jumps around each month due to the currency prices of the Swedish SEK fluctuating against the pound, but it’s more or less around £3k.
Even with this massive drop, I see that my total net worth has only dropped to what it was between November and December, so it’s barely lost a month. This is cheating a little as I contributed a lot more in the last months. I can’t imagine how many people would be flipping out if there was a 50% drop!
We’re going on a snowboarding trip next week. This time in Norway, the drive is only 6 hours and the resort is meant to be one of the best for snowboarders. I’m excited to be present again. Focusing on nothing else except carving down the mountain, this is one of my only escapes from my racing mind.
I’ve been getting pretty good at writing Python scripts since I joined my current company. So, when I ended up with 74 quotes from my recent non-fictional reading that I wanted to post on Twitter I thought, “Why don’t I build a Twitter scheduler?”
As I’ve set myself a challenge of reading only non-fictional, foundational learning books in 2022, I’m sure to be finding out a lot more useful insights that I’ll want to Tweet. To use a commercial scheduler like Crowdfire you have to pay $8 per month, and even then you can only schedule 100 tweets, building one myself was my only option!
For the techies who read this blog, this explanation is for you. If you know nothing about programming then I’m sorry, but feel free to stop reading now, I’ll see you next month.
Twitter Bot Tech Stack
Heroku is amazing. I’ve talked about this service before, and used it a couple of times. Heroku lets you store micro-services for free, and it’s the easiest thing ever to get up and running or copy a project because they run everything via GitHub. When you push to the GitHub repo for your server, it’s automatically re-deployed, and this works out of the box. I’m not a backend engineer but I find this easy.
The Twitter bot server (which is really just a Python script) is hosted on Heroku for free. I am also using a Heroku Scheduler addon so the script will be ran every day at 5:30pm. Heroku gives each user 1000 free server hours per month, and this bot only uses around 2% of that allowance, so it will stay free forever.
I store the tweets that I want to schedule in a YAML file on my own private GitHub repository. I push to this repository when I want to add new tweets, normally after I’ve finished reading a book. I’ve constructed the YAML to include metadata for each tweet: The tweet String, a tweet ID (which is a unique hash that I generate), a tweet type (if it’s a quote, a personal tweet, a question, a post re-share etc.), Twitter handle if it’s a quote, hashtags, category, things like that.
This was the first time I’ve used Redis cloud, it was so easy I can’t believe I haven’t used it in the past. Redis is a simple, lightweight, and super fast, key-value pair database store. I used this to store Twitter ID’s as keys and the date they were last tweeted as values. I wanted my Twitter store to randomly post tweets that hadn’t been posted in a long while (months) so I needed a fast database to store the last tweeted dates. This is also hosted on the Redis free tier which will be free forever! They really only charge for large scale applications.
The heart of the Twitter bot is Python. This Python script connects to my GitHub twitter data private repo, pulls in the YAML file and parses the tweets. It then randomly selects a tweet from the list and checks Redis to see if the tweet can be posted, when one is found that hasn’t been posted in a while, the Redis value is updated with the current date and the Python script connects to the Twitter API and posts the tweet.
It’s that simple!
I now have a YAML file where I can store all of my tweets, and I know that the Twitter bot will post one from the list every 24h.
I had so much fun with this project that I’m trying to find other similar projects that I can work on. I may even add a user interface for inputting and viewing tweets so that eventually it could be a service that could be sold… Although I’d have to switch to AWS or GCP for the servers and Twitter data then, and create account-linked user shards. But, it could be a super fun project! If I didn’t have a full time job, I’d have so much more time to build things like this just for fun.
I wonder if there is a way I could build a product and sell it as is? Without thinking about turning it into a business or getting customers, just build a tool and sell it. That would be cool.
How was your month?