It is effortless to get lost in giving instructions to the machines. Mainly when people always rely on you to create one or two functionalities.
Getting comfortable is good, no doubt about that. The horrible part is when you start thinking and feeling you know it all.
Early in 2022, I made a big mistake I pray no one should ever make. It was a challenging moment for me.
Programatically, I became handicapped and couldn't undo the damage I was causing my users.
You might be wondering how lousy could this error would have been? Now let me dive dipper.
This article is segmented into five parts; first, I will share how it started. Secondly, we will look at the avoidable mistake I made.
Thirdly, how was I able to overcome? In the fourth segment, we will look at how I bounced back and finally; we will look at lessons learned.
1. How it all started.
I wish I could always listen to my wife whenever she says things.
My wife always tells me that It is not all the time I should be working on some of my applications; well, I'm always of the opposite opinion.
It all started when I needed to send emails to users on our applications; of course, I have an account with Mailchimp and Sendgrid.
When I exhausted their free trails plan, I proceeded to subscribe to their basic plans.
In a little while, I realised that the cost implication is becoming alarming to send emails?
Building a startup is not easy when you have to cater to many with almost no available funds to keep pushing.
You know what? There is always a way out for an entrepreneur (who is dynamic in thinking). So, I asked myself, what will it cost to create a CRM (Customer Relationship Management) that we can use in-house?
Where there won't be the maximum user contacts I can store?
A mini-application where I can send emails to many contacts without throttling and inflation by any third party application?
My response was, "it will cost me time!"
So I started; it took me a month to get everything working, Python programming is my favourite, so I didn't waste time diving into it.
Of course, not everything worked at first, but at least all the basic functionalities needed at that particular moment worked.
Weeks after weeks, I added more features based on my marketer feedback.
2. The avoidable mistake I made.
I won't forget, as of 18:41 - 21:00 (WAT) on 12th January 2022; I wrote a script that broke the whole thing.
It is painful that it is just a line of code I forgot to comment out.
emails = [user.email for user in contacts]
Because of the single line performing loop on all the contacts from the database, I spammed my users badly.
Instead of sending 839 emails, I end up sending 703,921 emails.
In other words, the loop multiplied with another loop I intended to use (839*839).
If you don't still get how bad this was, let us talk about the impact on a single user.
It means each user will get 839 emails.
I wish the emails were delivered at intervals; the email crashed peoples' phones.
Sadly for me, 4 of my emails was on the list, my phone stopped working, and the temperature increased.
If it were possible that if I smashed my laptop on the ground, people would stop receiving those emails, I would have done it quickly.
It was a dark evening for me on 12th January 2022.
The task has left my sever; there was nothing I could do from my end. Over 839 affected users got multiple emails, and it crashed their phones.
People were frustrated; I began to get emails like:
"Please don't send any mail to my box again. thank you."
"Please kindly stop spamming my inbox. I have received over 10 mails in a space of 45 minutes"
Earnestly, I pray you don't find yourself in this mess!
3. How was I able to overcome?
I remembered my wife's advice; I took a short break to think about the other option to resolve the issue and stop the remaining queued emails from hitting the users.
Fortunately, an idea came after 30 minutes.
I contacted the third party providing me with the API parameter for sending emails, and they helped me un-stage all the queues.
After that, seriously, I took a break from coding!
It was a necessary break because I was demoralised.
The costly incident shouldn't have happened, but it did.
I took a two break to free my guilt and think of the best way to apologise to the affected users.
4. What I did do differently, and how did I come back to my fits?
I admitted I wasn't as intelligent as I thought and needed to be more careful next time.
I promised myself more time in testing before moving to production.
These two subjections became the building blocks and foundation whenever I wrote any application.
I don't take any aspect for granted; I don't assume (because computers won't).
Another thing I did was to write an apology note to the users, and I gave them a direct link to unsubscribe if they wish not to hear from me again.
This was very important because I'm likely to do the same if I was to be in their shoes.
5. What is the moral
No one is too perfect not to make a mistake; the earlier you accept this, the better.
As much as you can, try not to assume while coding; make sure everything is well checked and they give the expected result.
I would like to know the most challenging moment in your journey; kindly share it in the comment box below.
A tech career with instinctHub
Ready to kickstart your tech career or enhance your existing knowledge? Contact us today for a dedicated instructor experience that will accelerate your learning and empower you to excel in the world of technology.
Our expert instructors are here to guide you every step of the way and help you achieve your goals. Don't miss out on this opportunity to unlock your full potential. Get in touch with us now and embark on an exciting journey towards a successful tech career.